allow overriding optimization flags completely
If an optimization level ("-O<something>") is present in the argument for --arch, do not prepend default optimization flags.
This commit is contained in:
parent
1c2de76991
commit
85a277c6a3
13
wscript
13
wscript
@ -303,12 +303,21 @@ def set_compiler_flags (conf,opt):
|
||||
# prepend boiler plate optimization flags that work on all architectures
|
||||
#
|
||||
|
||||
optimization_flags[:0] = ["-pipe"]
|
||||
|
||||
# don't prepend optimization flags if "-O<something>" is present
|
||||
prepend_opt_flags = True
|
||||
for flag in optimization_flags:
|
||||
if flag.startswith("-O"):
|
||||
prepend_opt_flags = False
|
||||
break
|
||||
|
||||
if prepend_opt_flags:
|
||||
optimization_flags[:0] = [
|
||||
"-O3",
|
||||
"-fomit-frame-pointer",
|
||||
"-ffast-math",
|
||||
"-fstrength-reduce",
|
||||
"-pipe"
|
||||
"-fstrength-reduce"
|
||||
]
|
||||
|
||||
if opt.debug:
|
||||
|
Loading…
Reference in New Issue
Block a user