summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--DEPS2
-rw-r--r--build/SConscript.main44
-rw-r--r--site_scons/site_tools/chromium_builders.py42
3 files changed, 60 insertions, 28 deletions
diff --git a/DEPS b/DEPS
index 3578a01..1a157c5 100644
--- a/DEPS
+++ b/DEPS
@@ -26,7 +26,7 @@ deps = {
# TODO(mark): Remove once this has moved into depot_tools.
"src/tools/gyp":
- "http://gyp.googlecode.com/svn/trunk@364",
+ "http://gyp.googlecode.com/svn/trunk@365",
"src/v8":
"http://v8.googlecode.com/svn/trunk@1458",
diff --git a/build/SConscript.main b/build/SConscript.main
index 4289b43d..50d4a9e 100644
--- a/build/SConscript.main
+++ b/build/SConscript.main
@@ -63,14 +63,20 @@ clvars.AddVariables(
)
+if ARGUMENTS.get('_GYP'):
+ tool_list = ['chromium_builders']
+else:
+ tool_list = ['component_setup',
+ 'chromium_builders',
+ 'chromium_load_component',
+ 'MSVSNew']
+
+
root_env = Environment(
# MSVSNew in the base environment? Yes, the point is we can (and
# want to) generate Visual Studio project and solution files from
# any platform.
- tools = ['component_setup',
- 'chromium_builders',
- 'chromium_load_component',
- 'MSVSNew'],
+ tools = tool_list,
variables = clvars,
# Requested list of system (shared) libraries, from the comma separated
@@ -190,6 +196,7 @@ components = []
# The keyword arguments in the call below (base, breakpad, etc.) can be
# specified in the LOAD= argument to cut down on the build.
+Default(None) # Reset default target to empty.
if root_env.get('_GYP'):
webkit_sconscript = '$WEBKIT_DIR/tools/test_shell/test_shell_main${_GYP}.scons'
else:
@@ -789,21 +796,20 @@ BuildComponents(environment_list)
# -------------------------------------------------------------------------
-Default(None) # Reset default target to empty.
-
-modes = GetTargetModes().keys()
-
-if set(modes) - set(['msvs', 'xcode']):
- # There's at least one mode being built besides the platform-
- # independent 'msvs' or 'xcode' modes. Build the current
- # build_component's Alias as default--that is, "base" when we're
- # in the base/ subdirectory, "chrome" under chrome/, etc.
- Import('build_component')
- Default(Alias(build_component)) # Set default target based on where built.
-
-if 'msvs' in modes:
- # We're in --mode=msvs, so add its Alias(es) to the default targets.
- Default(Alias('msvs'))
+if not root_env.get('_GYP'):
+ modes = GetTargetModes().keys()
+
+ if set(modes) - set(['msvs', 'xcode']):
+ # There's at least one mode being built besides the platform-
+ # independent 'msvs' or 'xcode' modes. Build the current
+ # build_component's Alias as default--that is, "base" when we're
+ # in the base/ subdirectory, "chrome" under chrome/, etc.
+ Import('build_component')
+ Default(Alias(build_component)) # Set default target based on where built.
+
+ if 'msvs' in modes:
+ # We're in --mode=msvs, so add its Alias(es) to the default targets.
+ Default(Alias('msvs'))
# -------------------------------------------------------------------------
diff --git a/site_scons/site_tools/chromium_builders.py b/site_scons/site_tools/chromium_builders.py
index 56d32f2..c1a6b077 100644
--- a/site_scons/site_tools/chromium_builders.py
+++ b/site_scons/site_tools/chromium_builders.py
@@ -90,37 +90,63 @@ def compilable_files(env, sources):
def ChromeProgram(env, target, source, *args, **kw):
source = compilable_files(env, source)
- result = env.ComponentProgram(target, source, *args, **kw)
+ if env.get('_GYP'):
+ prog = env.Program(target, source, *args, **kw)
+ result = env.Install('$DESTINATION_ROOT', prog)
+ else:
+ result = env.ComponentProgram(target, source, *args, **kw)
if env.get('INCREMENTAL'):
env.Precious(result)
return result
def ChromeTestProgram(env, target, source, *args, **kw):
source = compilable_files(env, source)
- result = env.ComponentTestProgram(target, source, *args, **kw)
+ if env.get('_GYP'):
+ prog = env.Program(target, source, *args, **kw)
+ result = env.Install('$DESTINATION_ROOT', prog)
+ else:
+ result = env.ComponentTestProgram(target, source, *args, **kw)
if env.get('INCREMENTAL'):
env.Precious(*result)
return result
def ChromeLibrary(env, target, source, *args, **kw):
source = compilable_files(env, source)
- return env.ComponentLibrary(target, source, *args, **kw)
+ if env.get('_GYP'):
+ lib = env.Library(target, source, *args, **kw)
+ result = env.Install('$DESTINATION_ROOT/$BUILD_TYPE/lib', lib)
+ else:
+ result = env.ComponentLibrary(target, source, *args, **kw)
+ return result
def ChromeStaticLibrary(env, target, source, *args, **kw):
source = compilable_files(env, source)
- kw['COMPONENT_STATIC'] = True
- return env.ComponentLibrary(target, source, *args, **kw)
+ if env.get('_GYP'):
+ lib = env.StaticLibrary(target, source, *args, **kw)
+ result = env.Install('$DESTINATION_ROOT/$BUILD_TYPE/lib', lib)
+ else:
+ kw['COMPONENT_STATIC'] = True
+ result = env.ComponentLibrary(target, source, *args, **kw)
+ return result
def ChromeSharedLibrary(env, target, source, *args, **kw):
source = compilable_files(env, source)
- kw['COMPONENT_STATIC'] = False
- result = [env.ComponentLibrary(target, source, *args, **kw)[0]]
+ if env.get('_GYP'):
+ lib = env.SharedLibrary(target, source, *args, **kw)
+ result = env.Install('$DESTINATION_ROOT/$BUILD_TYPE/lib', lib)
+ else:
+ kw['COMPONENT_STATIC'] = False
+ result = [env.ComponentLibrary(target, source, *args, **kw)[0]]
if env.get('INCREMENTAL'):
env.Precious(result)
return result
def ChromeObject(env, *args, **kw):
- return env.ComponentObject(*args, **kw)
+ if env.get('_GYP'):
+ result = env.Object(target, source, *args, **kw)
+ else:
+ result = env.ComponentObject(*args, **kw)
+ return result
def ChromeMSVSFolder(env, *args, **kw):
if not env.Bit('msvs'):