shims/super/cc: tweak optimisation flag handling for runtime CPU detection builds
Let's reinstate adding our own optimisation flags if the compiler was not invoked with a conflicting optimisation flag.
This commit is contained in:
parent
fd0c3c059c
commit
351f7f82f3
@ -308,7 +308,10 @@ class Cmd
|
||||
|
||||
args << "-w" unless configure?
|
||||
args << "-#{ENV["HOMEBREW_OPTIMIZATION_LEVEL"]}"
|
||||
args.concat(optflags) unless runtime_cpu_detection?
|
||||
optflags.each do |optflag|
|
||||
flag = optflag.split("=").first
|
||||
args << optflag if !runtime_cpu_detection? || @args.none? { |arg| arg.start_with?(flag) }
|
||||
end
|
||||
args.concat(archflags)
|
||||
args << "-std=#{@arg0}" if /c[89]9/.match?(@arg0)
|
||||
args << "-g" if debug_symbols?
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user