Skip to content

Commit

Permalink
llvm: various config file fixes
Browse files Browse the repository at this point in the history
Let's create config files that target `aarch64` too. This is used as the
target by Python. See Homebrew/discussions#5778.

Also, use `-isysroot` instead of `--sysroot` so that our choice can be
overridden by setting `SDKROOT`. Fixes #197277.
  • Loading branch information
carlocab committed Dec 4, 2024
1 parent b1c8303 commit 74a3146
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Formula/l/llvm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,7 @@ def install
def write_config_files(macos_version, kernel_version, arch)
clang_config_file_dir.mkpath

arches = Set.new([:arm64, :x86_64])
arches = Set.new([:arm64, :x86_64, :aarch64])
arches << arch
sysroot = if macos_version >= "10.14" || (macos_version.blank? && kernel_version.blank?)
"#{MacOS::CLT::PKG_PATH}/SDKs/MacOSX#{macos_version}.sdk"
Expand All @@ -503,7 +503,7 @@ def write_config_files(macos_version, kernel_version, arch)
arches.each do |target_arch|
config_file = "#{target_arch}-apple-#{system}#{version}.cfg"
(clang_config_file_dir/config_file).atomic_write <<~CONFIG
--sysroot=#{sysroot}
-isysroot #{sysroot}
CONFIG
end
end
Expand Down

0 comments on commit 74a3146

Please sign in to comment.