aboutsummaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2012-01-02 10:22:12 -0800
committerAlon Zakai <alonzakai@gmail.com>2012-01-02 10:22:12 -0800
commit8950ba2d235173749bc97da1f635e2a2d7a6bc32 (patch)
tree6fbded7267c8511a51b28760ccf8aa94c0c87dd4 /tools
parenta914110dac09b399d2022440f441a0847b7f745d (diff)
load default settings into Settings on reset
Diffstat (limited to 'tools')
-rw-r--r--tools/shared.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/shared.py b/tools/shared.py
index b8f76a0d..2b3ac951 100644
--- a/tools/shared.py
+++ b/tools/shared.py
@@ -288,7 +288,7 @@ class Settings:
# Given some emcc-type args (-O3, -s X=Y, etc.), fill Settings with the right settings
@classmethod
- def load(self, args):
+ def load(self, args=[]):
# Load the JS defaults into python
settings = open(path_from_root('src', 'settings.js')).read().replace('var ', 'Settings.').replace('//', '#')
exec settings in globals()
@@ -326,8 +326,11 @@ class Settings:
Settings.I64_MODE = 0
Settings.DOUBLE_MODE = 0
if noisy: print >> sys.stderr, 'Warning: Applying some potentially unsafe optimizations! (Use -O2 if this fails.)'
+
global Settings
Settings = Settings2
+ Settings.load() # load defaults
+
Settings.reset()
# Building