Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(4)

Unified Diff: build/SConscript.v8

Issue 10857: Add OPT=1 flag to build optimized on Linux. (Closed)
Patch Set: alles ist gut Created 12 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/SConscript.main ('k') | build/using_v8.scons » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/SConscript.v8
diff --git a/build/SConscript.v8 b/build/SConscript.v8
index 1e7cfb0f6063bc33693f73aab3bc850d7fcd8543..22717b83ee495222871386256af9440799aca572 100644
--- a/build/SConscript.v8
+++ b/build/SConscript.v8
@@ -13,8 +13,14 @@ try:
except AttributeError:
cpu_flag = ''
+# The v8 build script wants a 'debug'/'release' string to tell it whether
+# to build optimized. Convert our build flags into that form.
+mode = 'release'
+if env['TARGET_DEBUG']:
+ mode = 'debug'
+
env = env.Clone(
- V8_MODE = 'debug',
+ V8_MODE = mode,
V8_MODE_DIR = '$V8_DIR/obj/$V8_MODE',
V8_SCONS_COM = '$PYTHON $SCONS $SCONSFLAGS mode=$V8_MODE',
SCONS='$CHROME_SRC_DIR/third_party/scons/scons.py',
@@ -36,9 +42,14 @@ if not os.path.exists(env.Dir('$OBJ_ROOT/v8').abspath):
Mkdir(env.Dir('$OBJ_ROOT/v8').abspath)
+# v8 builds all outputs "foo" instead as "foo_g" in debug mode.
+binsuffix = ''
+if env['TARGET_DEBUG']:
+ binsuffix = '_g'
+
v8_scons_targets_off = [
- '$V8_DIR/shell_g${PROGSUFFIX}',
- '$V8_DIR/${LIBPREFIX}v8_g${LIBSUFFIX}',
+ '$V8_DIR/shell%s${PROGSUFFIX}' % binsuffix,
+ '$V8_DIR/${LIBPREFIX}v8%s${LIBSUFFIX}' % binsuffix,
'$V8_MODE_DIR/mksnapshot${PROGSUFFIX}',
'$V8_MODE_DIR/libraries${OBJSUFFIX}',
'$V8_MODE_DIR/snapshot-empty${OBJSUFFIX}',
« no previous file with comments | « build/SConscript.main ('k') | build/using_v8.scons » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698