shims/super/cc: add comment for optimisation flag handling

Follow up to #19551
This commit is contained in:
Carlo Cabrera 2025-03-20 23:19:31 +08:00 committed by Carlo Cabrera
parent f3bd91d3af
commit ec8f3033e0
No known key found for this signature in database
GPG Key ID: C74D447FC549A1D0

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)