aboutsummaryrefslogtreecommitdiff
path: root/tools/shared.py
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-02-26 10:48:32 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-02-26 10:48:32 -0800
commitce0eabbbec5184380d3c98feac5b523be7c06b78 (patch)
tree4f51d0efc837337bd9111f6ea8939d8723379f33 /tools/shared.py
parentb649dec4101d0639d5df1b399c0fcfb63399fb57 (diff)
do not use -std-compile-opts, which is not really meant to be used
Diffstat (limited to 'tools/shared.py')
-rw-r--r--tools/shared.py9
1 files changed, 4 insertions, 5 deletions
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