From 74a31466ab0612d15443f896ab2e9667348eeafd Mon Sep 17 00:00:00 2001 From: Carlo Cabrera Date: Wed, 4 Dec 2024 19:18:05 +0800 Subject: [PATCH] llvm: various config file fixes 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. --- Formula/l/llvm.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Formula/l/llvm.rb b/Formula/l/llvm.rb index 6b19013c8aea3..c3b5fa2583789 100644 --- a/Formula/l/llvm.rb +++ b/Formula/l/llvm.rb @@ -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" @@ -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