summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorsgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-28 23:48:10 +0000
committersgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2008-10-28 23:48:10 +0000
commitc434599a4961ff7ff047b8a918a10ea3defb46d3 (patch)
treeb5ce11fd1993ec837f9531d31efca59b5923e377 /build
parentdd49900aefff27c2fbbec1f0f0464a5c57bbad0f (diff)
downloadchromium_src-c434599a4961ff7ff047b8a918a10ea3defb46d3.zip
chromium_src-c434599a4961ff7ff047b8a918a10ea3defb46d3.tar.gz
chromium_src-c434599a4961ff7ff047b8a918a10ea3defb46d3.tar.bz2
Re-apply 4099, v8 build dir change (after manual buildbot cleaning).
Review URL: http://codereview.chromium.org/8688 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4108 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r--build/SConscript.v856
1 files changed, 27 insertions, 29 deletions
diff --git a/build/SConscript.v8 b/build/SConscript.v8
index a3eb983..aadb4b7 100644
--- a/build/SConscript.v8
+++ b/build/SConscript.v8
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import os
+
Import('env')
# Grab the -j flag from the outer environment, if available.
@@ -13,11 +15,12 @@ except AttributeError:
env = env.Clone(
V8_MODE = 'release',
- V8_SRC_DIR = '$CHROME_SRC_DIR/v8',
- V8_MODE_DIR = '$V8_SRC_DIR/obj/$V8_MODE',
- V8_SCONS_COM = 'cd $CHROME_SRC_DIR/v8 && $PYTHON $SCONS $SCONSFLAGS mode=$V8_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',
SCONSFLAGS = ('-Q '
+ '-C $OBJ_ROOT/v8 '
+ '-Y $CHROME_SRC_DIR/v8 '
'--warn=no-deprecated '
'--warn=no-no-parallel-support' + cpu_flag),
)
@@ -25,31 +28,30 @@ env = env.Clone(
# Rather than build v8 with our own commands, we just shell out to v8's
# own SCons-based build, since their build system is complicated.
# This SConscript just declares dependencies on the outputs of that build.
+#
+# Arrange to make sure the build directory exists, since the subsidiary
+# SCons we invoke will chdir there of its own accord.
+
+if not os.path.exists(env.Dir('$OBJ_ROOT/v8').abspath):
+ Mkdir(env.Dir('$OBJ_ROOT/v8').abspath)
-mksnapshot_exe = env.File('$V8_MODE_DIR/mksnapshot${PROGSUFFIX}')
-libraries_obj = env.File('$V8_MODE_DIR/libraries${OBJSUFFIX}')
-libraries_empty_obj = env.File('$V8_MODE_DIR/libraries-empty${OBJSUFFIX}')
-snapshot_obj = env.File('$V8_MODE_DIR/snapshot${OBJSUFFIX}')
-snapshot_empty_obj = env.File('$V8_MODE_DIR/snapshot-empty${OBJSUFFIX}')
-v8_bin = env.File('$V8_SRC_DIR/shell${PROGSUFFIX}')
-v8_lib = env.File('$V8_SRC_DIR/${LIBPREFIX}v8${LIBSUFFIX}'),
v8_scons_targets_off = [
- mksnapshot_exe,
- libraries_obj,
- snapshot_empty_obj,
- v8_bin,
- v8_lib,
+ '$V8_DIR/shell${PROGSUFFIX}',
+ '$V8_DIR/${LIBPREFIX}v8${LIBSUFFIX}',
+ '$V8_MODE_DIR/mksnapshot${PROGSUFFIX}',
+ '$V8_MODE_DIR/libraries${OBJSUFFIX}',
+ '$V8_MODE_DIR/snapshot-empty${OBJSUFFIX}',
]
v8_scons_targets_on = [
- libraries_empty_obj,
- snapshot_obj,
+ '$V8_MODE_DIR/libraries-empty${OBJSUFFIX}',
+ '$V8_MODE_DIR/snapshot${OBJSUFFIX}',
]
if env['PLATFORM'] == 'win32':
v8_scons_targets_off.extend([
- env.File('$CHROME_SRC_DIR/v8/vc80.pdb')
+ env.File('$V8_DIR/vc80.pdb')
])
v8 = env.Command(v8_scons_targets_off + v8_scons_targets_on,
@@ -64,20 +66,16 @@ env.AlwaysBuild(v8)
# rebuild them (thereby causing us to always rebuild their dependents).
env.Precious(v8)
-env.Install('$V8_DIR', v8)
-
-
-i = env.Install('$LIBS_DIR', v8_lib)
-env.Alias('webkit', i)
-i = env.Install('$TARGET_ROOT', v8_bin)
-env.Alias('chrome', i)
+env.Install('$TARGET_ROOT', v8[0])
+env.Install('$LIBS_DIR', v8[1])
+env.Install('$V8_DIR', '$V8_MODE_DIR/snapshot-empty${OBJSUFFIX}')
# To satisfy tests expecting the following .exe name.
if env['PLATFORM'] == 'win32':
# TODO(evanm): this may be necessary on other platforms(?)
- i = env.InstallAs('$TARGET_ROOT/v8_shell_sample${PROGSUFFIX}', v8_bin)
- env.Alias('chrome', i)
+ i = env.InstallAs('$TARGET_ROOT/v8_shell_sample${PROGSUFFIX}', v8[0])
-env.ChromeStaticLibrary('v8_snapshot',
- [libraries_empty_obj, snapshot_obj])
+env.ChromeStaticLibrary('$V8_DIR/v8_snapshot',
+ ['$V8_MODE_DIR/libraries-empty${OBJSUFFIX}',
+ '$V8_MODE_DIR/snapshot${OBJSUFFIX}'])