diff options
author | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-02 22:26:04 +0000 |
---|---|---|
committer | tc@google.com <tc@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-02 22:26:04 +0000 |
commit | 8654036d617cd47db19b21a8c6cafb9c6bbf29f1 (patch) | |
tree | 041ee068ed7e52bb66a1f046907f7fbaa720a7d5 /site_scons | |
parent | dd85a65a32ead68e280372c7f550d599cd06135b (diff) | |
download | chromium_src-8654036d617cd47db19b21a8c6cafb9c6bbf29f1.zip chromium_src-8654036d617cd47db19b21a8c6cafb9c6bbf29f1.tar.gz chromium_src-8654036d617cd47db19b21a8c6cafb9c6bbf29f1.tar.bz2 |
Save space and time by having files build directly in their final
destination rather than once in obj then copied to the top level
src directory.
Roll deps to pick up DISTCC/CCACHE fix.
Review URL: http://codereview.chromium.org/56194
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@13042 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'site_scons')
-rw-r--r-- | site_scons/site_tools/chromium_builders.py | 37 |
1 files changed, 5 insertions, 32 deletions
diff --git a/site_scons/site_tools/chromium_builders.py b/site_scons/site_tools/chromium_builders.py index d64e92f..fb9deba 100644 --- a/site_scons/site_tools/chromium_builders.py +++ b/site_scons/site_tools/chromium_builders.py @@ -188,33 +188,21 @@ def compilable_files(env, sources): def ChromeProgram(env, target, source, *args, **kw): source = compilable_files(env, source) - if env.get('_GYP'): - prog = env.Program(target, source, *args, **kw) - result = env.ChromeInstall('$TOP_BUILDDIR', prog) - else: - result = env.ComponentProgram(target, source, *args, **kw) + result = env.Program('$TOP_BUILDDIR/' + str(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) - if env.get('_GYP'): - prog = env.Program(target, source, *args, **kw) - result = env.ChromeInstall('$TOP_BUILDDIR', prog) - else: - result = env.ComponentTestProgram(target, source, *args, **kw) + result = env.Program('$TOP_BUILDDIR/' + str(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) - if env.get('_GYP'): - lib = env.Library(target, source, *args, **kw) - result = env.ChromeInstall('$LIB_DIR', lib) - else: - result = env.ComponentLibrary(target, source, *args, **kw) + result = env.Library('$LIB_DIR/' + str(target), source, *args, **kw) return result def ChromeLoadableModule(env, target, source, *args, **kw): @@ -229,8 +217,7 @@ def ChromeLoadableModule(env, target, source, *args, **kw): def ChromeStaticLibrary(env, target, source, *args, **kw): source = compilable_files(env, source) if env.get('_GYP'): - lib = env.StaticLibrary(target, source, *args, **kw) - result = env.ChromeInstall('$LIB_DIR', lib) + result = env.StaticLibrary('$LIB_DIR/' + str(target), source, *args, **kw) else: kw['COMPONENT_STATIC'] = True result = env.ComponentLibrary(target, source, *args, **kw) @@ -239,8 +226,7 @@ def ChromeStaticLibrary(env, target, source, *args, **kw): def ChromeSharedLibrary(env, target, source, *args, **kw): source = compilable_files(env, source) if env.get('_GYP'): - lib = env.SharedLibrary(target, source, *args, **kw) - result = env.ChromeInstall('$LIB_DIR', lib) + result = env.SharedLibrary('$LIB_DIR/' + str(target), source, *args, **kw) else: kw['COMPONENT_STATIC'] = False result = [env.ComponentLibrary(target, source, *args, **kw)[0]] @@ -255,18 +241,6 @@ def ChromeObject(env, *args, **kw): result = env.ComponentObject(*args, **kw) return result -def ChromeInstall(env, target, source): - """ - Replacement for the stock SCons Install() builder to use the - external cp utility instead of Python internals. - """ - result = [] - copy_action = Action('cp $SOURCE $TARGET', 'Copying $TARGET') - for s in source: - dest = str(target) + '/' + os.path.split(str(s))[1] - result.extend(env.Command(dest, s, copy_action)) - return result - def generate(env): env.AddMethod(ChromeProgram) env.AddMethod(ChromeTestProgram) @@ -275,7 +249,6 @@ def generate(env): env.AddMethod(ChromeStaticLibrary) env.AddMethod(ChromeSharedLibrary) env.AddMethod(ChromeObject) - env.AddMethod(ChromeInstall) env.AddMethod(FilterOut) |