diff options
author | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-28 22:22:47 +0000 |
---|---|---|
committer | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-10-28 22:22:47 +0000 |
commit | 40e74d052d348405d46da48f5e664571bf9ccad7 (patch) | |
tree | 94a621ca95f2bf5ea1a29747c97a6c68ac5fbaa5 /build | |
parent | 8e046856c677c2aa12df194f80930785df78d24b (diff) | |
download | chromium_src-40e74d052d348405d46da48f5e664571bf9ccad7.zip chromium_src-40e74d052d348405d46da48f5e664571bf9ccad7.tar.gz chromium_src-40e74d052d348405d46da48f5e664571bf9ccad7.tar.bz2 |
build/SConscript.v8 update, plus fixes:
* Use SCons -C to invoke the v8 build from our own build directory,
using the -Y option to pull all source files from the v8 source
directory, to avoid building things under src/v8.
* Make sure the build directory exists before we invoke the subsidiary
SCons that will chdir there.
* Build libv8_snapshot.a in the obj/v8 directory, not src/build.
* Remove the svn:ignore property from src/build (specifically libv8snapshot.a).
* Correct the $LIBS_DIR location of libv8.a.
* Use the actual file names involved instead of local Python variables.
* Don't forcibly add our targets to other component's Aliases.
Review URL: http://codereview.chromium.org/8851
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@4099 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'build')
-rw-r--r-- | build/SConscript.v8 | 56 |
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}']) |