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

Unified Diff: native_client_sdk/src/build_tools/build_projects.py

Issue 240493003: Support static/dynamic for bionic (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix issues. Created 6 years, 8 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 | « no previous file | native_client_sdk/src/build_tools/build_sdk.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: native_client_sdk/src/build_tools/build_projects.py
diff --git a/native_client_sdk/src/build_tools/build_projects.py b/native_client_sdk/src/build_tools/build_projects.py
index dd8ec1c2cc949d685c8301644a22b5cdd786a853..ab3752cbedb43db58e6d921c7b052d82aeca7142 100755
--- a/native_client_sdk/src/build_tools/build_projects.py
+++ b/native_client_sdk/src/build_tools/build_projects.py
@@ -94,6 +94,26 @@ def ValidateToolchains(toolchains):
buildbot_common.ErrorExit('Invalid toolchain(s): %s' % (
', '.join(invalid_toolchains)))
+def GetDeps(projects):
+ out = {}
+
+ # Build list of all project names
+ localtargets = [proj['NAME'] for proj in projects]
+
+ # For each project
+ for proj in projects:
+ deplist = []
+ # generate a list of dependencies
+ for targ in proj.get('TARGETS', []):
+ deplist.extend(targ.get('DEPS', []) + targ.get('LIBS', []))
+
+ # and add dependencies to targets built in this subtree
+ localdeps = [dep for dep in deplist if dep in localtargets]
+ if localdeps:
+ out[proj['NAME']] = localdeps
+
+ return out
+
def UpdateProjects(pepperdir, project_tree, toolchains,
clobber=False, configs=None, first_toolchain=False):
@@ -123,11 +143,12 @@ def UpdateProjects(pepperdir, project_tree, toolchains,
buildbot_common.RemoveDir(dirpath)
buildbot_common.MakeDir(dirpath)
targets = [desc['NAME'] for desc in projects]
+ deps = GetDeps(projects)
# Generate master make for this branch of projects
generate_make.GenerateMasterMakefile(pepperdir,
os.path.join(pepperdir, branch),
- targets)
+ targets, deps)
if branch.startswith('examples') and not landing_page:
landing_page = LandingPage()
@@ -156,7 +177,7 @@ def UpdateProjects(pepperdir, project_tree, toolchains,
branch_name = 'examples'
generate_make.GenerateMasterMakefile(pepperdir,
os.path.join(pepperdir, branch_name),
- targets)
+ targets, {})
def BuildProjectsBranch(pepperdir, branch, deps, clean, config, args=None):
« no previous file with comments | « no previous file | native_client_sdk/src/build_tools/build_sdk.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698