Module: OS::Mac::Formula 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.
Instance Method Summary collapse
- #std_cmake_args(install_prefix: prefix, install_libdir: "lib", find_framework: "LAST") ⇒ Array<String> private
- #std_swift_args ⇒ Array<String> private
- #std_zig_args(prefix: self.prefix, release_mode: :fast, cpu: nil) ⇒ Array<String> private
- #valid_platform? ⇒ Boolean private
Instance Method Details
#std_cmake_args(install_prefix: prefix, install_libdir: "lib", find_framework: "LAST") ⇒ Array<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.
23 24 25 26 27 28 29 30 31 32 33 |
# File 'extend/os/mac/formula.rb', line 23 def std_cmake_args(install_prefix: prefix, install_libdir: "lib", find_framework: "LAST") args = super # Ensure CMake is using the same SDK we are using. sdk = MacOS.sdk_for_formula(self) raise "No macOS SDK found. Install Xcode or the Command Line Tools." if sdk.nil? args << "-DCMAKE_OSX_SYSROOT=#{sdk.path}" args end |
#std_swift_args ⇒ Array<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.
36 37 38 |
# File 'extend/os/mac/formula.rb', line 36 def std_swift_args ["--disable-sandbox"].concat(super) end |
#std_zig_args(prefix: self.prefix, release_mode: :fast, cpu: nil) ⇒ Array<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.
47 48 49 50 51 |
# File 'extend/os/mac/formula.rb', line 47 def std_zig_args(prefix: self.prefix, release_mode: :fast, cpu: nil) args = super args << "-fno-rosetta" if ::Hardware::CPU.arm? args end |
#valid_platform? ⇒ 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.
12 13 14 |
# File 'extend/os/mac/formula.rb', line 12 def valid_platform? supports_macos? end |