From 6a1d7d7ebc60dccc5705e1b80a6a746a17c64ef8 Mon Sep 17 00:00:00 2001 From: "sgk@google.com" Date: Fri, 13 Mar 2009 19:42:26 +0000 Subject: Have the gyp build use base SCons, not Hammer components, so it can control the Alias namespace directly and set appropriate default targets. This currently switches within the various Chrome*() calls. Review URL: http://codereview.chromium.org/46037 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11657 0039d316-1c4b-4281-b951-d872f2087c98 --- site_scons/site_tools/chromium_builders.py | 42 ++++++++++++++++++++++++------ 1 file changed, 34 insertions(+), 8 deletions(-) (limited to 'site_scons/site_tools/chromium_builders.py') 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'): -- cgit v1.1