From c90b9580096e184ae2e3395ebce2344121cc9983 Mon Sep 17 00:00:00 2001 From: brian crabtree Date: Sun, 20 Mar 2022 14:17:17 -0400 Subject: [PATCH] release build flags (#1534) * release build flags * typo Co-authored-by: brian crabtree --- crone/wscript | 20 +++++++++++++++----- wscript | 5 +++++ 2 files changed, 20 insertions(+), 5 deletions(-) diff --git a/crone/wscript b/crone/wscript index 6bbc37997..56288bbe0 100644 --- a/crone/wscript +++ b/crone/wscript @@ -24,6 +24,19 @@ def build(bld): 'softcut/softcut-lib/src/Voice.cpp' ] + crone_flags = [ '-std=c++14', + '-O2', + '-Wall' + ] + + if bld.env.NORNS_RELEASE: + crone_flags += [ '-mcpu=cortex-a53', + '-mtune=cortex-a53', + '-mfpu=neon-fp-armv8', + '-mfloat-abi=hard', + '-funsafe-math-optimizations' + ] + bld.program( features='c cxx cxxprogram', source=crone_sources, target='crone', @@ -46,8 +59,5 @@ def build(bld): 'm', 'sndfile' ], - cxxflags=[ - '-std=c++14', - '-O2', - '-Wall' - ]) + cxxflags=crone_flags + ) diff --git a/wscript b/wscript index fec53f5c8..2113a6770 100644 --- a/wscript +++ b/wscript @@ -13,6 +13,7 @@ def get_version_hash(): def options(opt): opt.load('compiler_c compiler_cxx') opt.add_option('--desktop', action='store_true', default=False) + opt.add_option('--release', action='store_true', default=False) opt.add_option('--enable-ableton-link', action='store_true', default=True) opt.add_option('--profile-matron', action='store_true', default=False) @@ -57,6 +58,10 @@ def configure(conf): conf.define('NORNS_DESKTOP', True) conf.env.NORNS_DESKTOP = conf.options.desktop + if conf.options.release: + conf.define('NORNS_RELEASE', True) + conf.env.NORNS_RELEASE = conf.options.release + conf.env.ENABLE_ABLETON_LINK = conf.options.enable_ableton_link conf.define('HAVE_ABLETON_LINK', conf.options.enable_ableton_link)