diff options
author | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-13 19:42:26 +0000 |
---|---|---|
committer | sgk@google.com <sgk@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-13 19:42:26 +0000 |
commit | 6a1d7d7ebc60dccc5705e1b80a6a746a17c64ef8 (patch) | |
tree | b10b11c7597d36cdecaf03736485dd3c6b4b91f1 /site_scons | |
parent | fa2e32bada9bb65f8aa595569d2f41c02715bc63 (diff) | |
download | chromium_src-6a1d7d7ebc60dccc5705e1b80a6a746a17c64ef8.zip chromium_src-6a1d7d7ebc60dccc5705e1b80a6a746a17c64ef8.tar.gz chromium_src-6a1d7d7ebc60dccc5705e1b80a6a746a17c64ef8.tar.bz2 |
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
Diffstat (limited to 'site_scons')
-rw-r--r-- | site_scons/site_tools/chromium_builders.py | 42 |
1 files changed, 34 insertions, 8 deletions
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'): |