Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1176)

Unified Diff: site_scons/site_tools/component_builders.py

Issue 7265001: Build and use libraries locally in the nacl build, not requiring "partial SDK" (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: final fix for pnacl Created 9 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « SConstruct ('k') | site_scons/site_tools/naclsdk.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: site_scons/site_tools/component_builders.py
diff --git a/site_scons/site_tools/component_builders.py b/site_scons/site_tools/component_builders.py
index 25a2ca23d44123b1225299cdfe02b9ffd328acb5..5e138896f41a1dd75e2cf624b377d88ee594d506 100755
--- a/site_scons/site_tools/component_builders.py
+++ b/site_scons/site_tools/component_builders.py
@@ -133,7 +133,10 @@ def _ComponentPlatformSetup(env, builder_name, **kwargs):
# approach allows us to use an unmodified version of SCons.
# In general, the use of EXTRA_LIBS is discouraged.
if 'EXTRA_LIBS' in env:
- env['LIBS'] = env['EXTRA_LIBS'] + env['LIBS']
+ # The SubstList2 method expands and flattens so that scons will
+ # correctly know about the library dependencies in cases like
+ # EXTRA_LIBS=['${FOO_LIBS}', 'bar'].
+ env['LIBS'] = env.SubstList2('${EXTRA_LIBS}', '${LIBS}')
# Call platform-specific component setup function, if any
if env.get('COMPONENT_PLATFORM_SETUP'):
@@ -476,6 +479,12 @@ def ComponentProgram(self, prog_name, *args, **kwargs):
# Add dependencies on includes
env.Depends(out_nodes, env['INCLUDES'])
+ # Add dependencies on libraries marked as implicitly included in the link.
+ # These are libraries that are not passed on the command line, but are
+ # always linked in by the toolchain, i.e. startup files and -lc and such.
+ if 'IMPLICIT_LIBS' in env:
+ env.Depends(out_nodes, env['IMPLICIT_LIBS'])
+
# Publish output
env.Publish(prog_name, 'run', out_nodes[0])
env.Publish(prog_name, 'debug', out_nodes[1:])
@@ -635,4 +644,3 @@ def generate(env):
AddTargetGroup('run_small_tests', 'small tests can be run')
AddTargetGroup('run_medium_tests', 'medium tests can be run')
AddTargetGroup('run_large_tests', 'large tests can be run')
-
« no previous file with comments | « SConstruct ('k') | site_scons/site_tools/naclsdk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698