diff options
-rwxr-xr-x | tests/runner.py | 6 | ||||
-rw-r--r-- | tools/shared.py | 9 |
2 files changed, 7 insertions, 8 deletions
diff --git a/tests/runner.py b/tests/runner.py index 4aa15510..6964fab0 100755 --- a/tests/runner.py +++ b/tests/runner.py @@ -4013,9 +4013,9 @@ def process(filename): printf( "%i %i %i", one, two, three ); } ''' - #for linkable in [0]: - # Settings.LINKABLE = linkable # regression check for issue #273 - self.do_run(src, "1 2 3") + for linkable in [0, 1]: + Settings.LINKABLE = linkable # regression check for issue #273 + self.do_run(src, "1 2 3") def test_readdir(self): add_pre_run = ''' diff --git a/tools/shared.py b/tools/shared.py index b5ae1ae1..fd51282b 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -607,11 +607,10 @@ set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)''' \ if unsafe: if not Building.can_inline(): opts.append('-disable-inlining') - # -Ox opts do -globaldce, which removes stuff that is needed for libraries and linkables - if Building.can_build_standalone(): - opts.append('-O%d' % optimization_level) - else: - opts.append('-std-compile-opts') + if not Building.can_build_standalone(): + # -O1 does not have -gobaldce, which removes stuff that is needed for libraries and linkables + optimization_level = min(1, optimization_level) + opts.append('-O%d' % optimization_level) #print '[unsafe: %s]' % ','.join(opts) else: allow_nonportable = False |