Merge pull request #19555 from Homebrew/optflags-comment

shims/super/cc: add comment for optimisation flag handling
This commit is contained in:
Carlo Cabrera 2025-03-20 15:33:46 +00:00 committed by GitHub
commit b337351d5c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -310,6 +310,7 @@ class Cmd
args << "-#{ENV["HOMEBREW_OPTIMIZATION_LEVEL"]}"
optflags.each do |optflag|
flag = optflag.split("=").first
# For runtime CPU detection builds, pass our optimisation flag whenever the build hasn't provided its own.
args << optflag if !runtime_cpu_detection? || @args.none? { |arg| arg.start_with?(flag) }
end
args.concat(archflags)