Module: OS::Mac::Superenv Private
This module is part of a private API. This module may only be used in the Homebrew/brew repository. Third parties should avoid using this module if possible, as it may be removed or changed without warning.
Defined Under Namespace
Modules: ClassMethods
Instance Method Summary collapse
- #determine_cccfg ⇒ String private
- #homebrew_extra_cmake_frameworks_paths ⇒ Array<::Pathname> private
- #homebrew_extra_cmake_include_paths ⇒ Array<::Pathname> private
- #homebrew_extra_cmake_library_paths ⇒ Array<::Pathname> private
- #homebrew_extra_isystem_paths ⇒ Array<::Pathname> private
- #homebrew_extra_library_paths ⇒ Array<::Pathname> private
- #homebrew_extra_pkg_config_paths ⇒ Array<::Pathname> private
- #libxml2_include_needed? ⇒ Boolean private
- #no_fixup_chains ⇒ void private
- #no_weak_imports ⇒ void private
Instance Method Details
#determine_cccfg ⇒ String
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
88 89 90 91 92 93 94 95 96 97 98 |
# File 'extend/os/mac/extend/ENV/super.rb', line 88 def determine_cccfg s = +"" # Pass `-no_fixup_chains` whenever the linker is invoked with `-undefined dynamic_lookup`. # See: https://github.com/python/cpython/issues/97524 # https://github.com/pybind/pybind11/pull/4301 s << "f" if no_fixup_chains_support? # Pass `-ld_classic` whenever the linker is invoked with `-dead_strip_dylibs` # on `ld` versions that don't properly handle that option. s << "c" if ::DevelopmentTools.ld64_version.between?("1015.7", "1022.1") s.freeze end |
#homebrew_extra_cmake_frameworks_paths ⇒ Array<::Pathname>
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
81 82 83 84 85 |
# File 'extend/os/mac/extend/ENV/super.rb', line 81 def homebrew_extra_cmake_frameworks_paths paths = [] paths << "#{self["HOMEBREW_SDKROOT"]}/System/Library/Frameworks" if MacOS::Xcode.without_clt? paths.map { |p| ::Pathname.new(p) } end |
#homebrew_extra_cmake_include_paths ⇒ Array<::Pathname>
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
65 66 67 68 69 70 71 |
# File 'extend/os/mac/extend/ENV/super.rb', line 65 def homebrew_extra_cmake_include_paths paths = [] paths << "#{self["HOMEBREW_SDKROOT"]}/usr/include/libxml2" if libxml2_include_needed? paths << "#{self["HOMEBREW_SDKROOT"]}/usr/include/apache2" if MacOS::Xcode.without_clt? paths << "#{self["HOMEBREW_SDKROOT"]}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers" paths.map { |p| ::Pathname.new(p) } end |
#homebrew_extra_cmake_library_paths ⇒ Array<::Pathname>
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
74 75 76 77 78 |
# File 'extend/os/mac/extend/ENV/super.rb', line 74 def homebrew_extra_cmake_library_paths %W[ #{self["HOMEBREW_SDKROOT"]}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries ].map { |p| ::Pathname.new(p) } end |
#homebrew_extra_isystem_paths ⇒ Array<::Pathname>
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
45 46 47 48 49 50 51 |
# File 'extend/os/mac/extend/ENV/super.rb', line 45 def homebrew_extra_isystem_paths paths = [] paths << "#{self["HOMEBREW_SDKROOT"]}/usr/include/libxml2" if libxml2_include_needed? paths << "#{self["HOMEBREW_SDKROOT"]}/usr/include/apache2" if MacOS::Xcode.without_clt? paths << "#{self["HOMEBREW_SDKROOT"]}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers" paths.map { |p| ::Pathname.new(p) } end |
#homebrew_extra_library_paths ⇒ Array<::Pathname>
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
54 55 56 57 58 59 60 61 62 |
# File 'extend/os/mac/extend/ENV/super.rb', line 54 def homebrew_extra_library_paths paths = [] if compiler == :llvm_clang paths << "#{self["HOMEBREW_SDKROOT"]}/usr/lib" paths << Utils::Path.formula_opt_lib("llvm") end paths << "#{self["HOMEBREW_SDKROOT"]}/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries" paths.map { |p| ::Pathname.new(p) } end |
#homebrew_extra_pkg_config_paths ⇒ Array<::Pathname>
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
29 30 31 32 33 34 |
# File 'extend/os/mac/extend/ENV/super.rb', line 29 def homebrew_extra_pkg_config_paths %W[ /usr/lib/pkgconfig #{HOMEBREW_LIBRARY}/Homebrew/os/mac/pkgconfig/#{MacOS.version} ].map { |p| ::Pathname.new(p) } end |
#libxml2_include_needed? ⇒ Boolean
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
37 38 39 40 41 42 |
# File 'extend/os/mac/extend/ENV/super.rb', line 37 def libxml2_include_needed? return false if deps.any? { |d| d.name == "libxml2" } return false if ::Pathname.new("#{self["HOMEBREW_SDKROOT"]}/usr/include/libxml").directory? true end |
#no_fixup_chains ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
164 165 166 167 168 169 |
# File 'extend/os/mac/extend/ENV/super.rb', line 164 def no_fixup_chains # This function has been no-op for quite some time as it's set by default. # Unlike above, do not touch the `cc` shim or the support method when removing this. odeprecated "ENV.no_fixup_chains" append_to_cccfg "f" if no_fixup_chains_support? end |
#no_weak_imports ⇒ void
This method is part of a private API. This method may only be used in the Homebrew/brew repository. Third parties should avoid using this method if possible, as it may be removed or changed without warning.
This method returns an undefined value.
155 156 157 158 159 160 161 |
# File 'extend/os/mac/extend/ENV/super.rb', line 155 def no_weak_imports # This has little-to-no usage and doesn't make sense to have a special function for. # When removing this function, also cleanup related usage in the `cc` shim # and remove `no_weak_imports_support?`. odeprecated "ENV.no_weak_imports" append_to_cccfg "w" if no_weak_imports_support? end |