Browse Source

wscript: Use -mtune=native by default for performance boost benefiting those who build from source, packagers can disable.

tags/non-daw-v1.3.0
Jonathan Moore Liles 3 years ago
parent
commit
7c071c7422
1 changed files with 9 additions and 0 deletions
  1. +9
    -0
      wscript

+ 9
- 0
wscript View File

@@ -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 ) + ')')

@@ -94,6 +96,13 @@ def configure(conf):
"-ffast-math",
"-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')


Loading…
Cancel
Save