diff options
author | Alon Zakai <alonzakai@gmail.com> | 2012-01-20 21:44:11 -0800 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2012-01-20 21:44:11 -0800 |
commit | 5af4bf3e7b83e5a31705d3a0052d1f2cfdfa2015 (patch) | |
tree | 9b0a32d68b5cad6f1ad93e3bd007a2178dc12377 /tools/shared.py | |
parent | b1c105e0af173d59452fbd58f7c83e3b26f128a1 (diff) |
fix bug with Settings.default values not including -O, so comparisons were wrong in some cases
Diffstat (limited to 'tools/shared.py')
-rw-r--r-- | tools/shared.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/shared.py b/tools/shared.py index 5d6f3a72..07c473da 100644 --- a/tools/shared.py +++ b/tools/shared.py @@ -297,7 +297,6 @@ class Settings: # Load the JS defaults into python settings = open(path_from_root('src', 'settings.js')).read().replace('var ', 'Settings.').replace('//', '#') exec settings in globals() - Settings.defaults = copy.copy(Settings.__dict__) # save the defaults for later comparisons # Apply additional settings. First -O, then -s for i in range(len(args)): @@ -308,6 +307,11 @@ class Settings: if args[i] == '-s': exec 'Settings.' + args[i+1] in globals() # execute the setting + # Save the defaults for later comparisons, including the -O changes. This way + # we only pass the relevant -s flags that actually change things after -O to emcc + # in the test runner + Settings.defaults = copy.copy(Settings.__dict__) + # Transforms the Settings information into emcc-compatible args (-s X=Y, etc.). Basically # the reverse of load_settings, except for -Ox which is relevant there but not here @classmethod |