wscript: Use -mtune=native by default for performance boost benefiting those who build from source, packagers can disable.
This commit is contained in:
parent
9e82b28f07
commit
7c071c7422
9
wscript
9
wscript
|
@ -21,6 +21,8 @@ def options(opt):
|
|||
help='Build for debugging')
|
||||
opt.add_option('--disable-sse', action='store_false', default=True, dest='sse',
|
||||
help='Disable SSE optimization')
|
||||
opt.add_option('--disable-native-cpu-optimization', action='store_false', default=True, dest='native',
|
||||
help='Disable native CPU optimziation (e.g. for generic binary packaging)')
|
||||
opt.add_option('--project', action='store', default=False, dest='project',
|
||||
help='Limit build to a single project (' + ', '.join( projects ) + ')')
|
||||
|
||||
|
@ -95,6 +97,13 @@ def configure(conf):
|
|||
"-pipe"
|
||||
]
|
||||
|
||||
if Options.options.native:
|
||||
print('Using native CPU optimization')
|
||||
optimization_flags.extend( [
|
||||
"-march=native",
|
||||
"-mtune=native", # ~200% DSP performance increase on AMD bulldozer...
|
||||
]);
|
||||
|
||||
if Options.options.sse:
|
||||
print('Using SSE optimization')
|
||||
optimization_flags.extend( [
|
||||
|
|
Loading…
Reference in New Issue