From 2b87d5add61be79fa9232af2c8841801b922e551 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 13 Jul 2014 09:10:41 -0700 Subject: [PATCH 1/4] Use -O3 for production --- SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 396d50c..8d00119 100644 --- a/SConstruct +++ b/SConstruct @@ -165,7 +165,7 @@ beta_env = create_env('beta', { release_env = create_env('release', { 'CPPDEFINES': ['NRELEASE'], - 'CCFLAGS': ['-O2'] + 'CCFLAGS': ['-O3'] }) From 882f5614aed89a967a6eb359e709851252b3ccf7 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 13 Jul 2014 09:12:08 -0700 Subject: [PATCH 2/4] Add build_env (as env) to sconscript environment --- SConstruct | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 8d00119..02dc2b7 100644 --- a/SConstruct +++ b/SConstruct @@ -149,7 +149,7 @@ def do_sconscript(env, build_env, src_dir, out_dir): sconscript = src_dir.File('SConscript') print 'Reading {}'.format(sconscript) env.SConscript(sconscript, - {'env': build_env}, + {'env': build_env, 'build_env': env}, variant_dir=out_dir) From 9b00e03b2d0204e022035174a85eaa047d73ef67 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 13 Jul 2014 09:21:11 -0700 Subject: [PATCH 3/4] Get rid of broken check for lib dir existence --- SConstruct | 2 -- 1 file changed, 2 deletions(-) diff --git a/SConstruct b/SConstruct index 02dc2b7..203cfb1 100644 --- a/SConstruct +++ b/SConstruct @@ -195,8 +195,6 @@ for mode in build_modes: # Process all lib dirs. for lib in os.listdir(LIB_DIR.abspath): lib_out_dir = out_dir.Dir('lib').Dir(lib) - if not os.path.isdir(lib_out_dir.abspath): - continue do_sconscript(env, lib_env, LIB_DIR.Dir(lib), lib_out_dir) env.Append(LIBPATH=[lib_out_dir]) From a0edcab26d30d0822386931e2d09003994da2bb8 Mon Sep 17 00:00:00 2001 From: Eryn Wells Date: Sun, 13 Jul 2014 09:22:53 -0700 Subject: [PATCH 4/4] Comment about swapping env and build_env in do_sconscript() --- SConstruct | 3 +++ 1 file changed, 3 insertions(+) diff --git a/SConstruct b/SConstruct index 203cfb1..140ab6a 100644 --- a/SConstruct +++ b/SConstruct @@ -148,6 +148,9 @@ def create_env(name, appends=None): def do_sconscript(env, build_env, src_dir, out_dir): sconscript = src_dir.File('SConscript') print 'Reading {}'.format(sconscript) + # Swapping env and build_env here is a bit wacky. Doing so means that env is + # always the Environment that the SConscript should be building with, while + # build_env is the Environment we're using to put everything together. env.SConscript(sconscript, {'env': build_env, 'build_env': env}, variant_dir=out_dir)