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

Unified Diff: ports/pnacl/compiler_wrapper.py

Issue 1607793004: Update pnacl toolchain version (Closed) Base URL: https://chromium.googlesource.com/webports.git@master
Patch Set: Created 4 years, 11 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 | « ports/pnacl/build.sh ('k') | ports/pnacl/hello.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ports/pnacl/compiler_wrapper.py
diff --git a/ports/pnacl/compiler_wrapper.py b/ports/pnacl/compiler_wrapper.py
index 9ef2fe719def25dfa5a1bff3ca12a0ba9acfc42e..b1ce27eddc37454f66a3823da3efd6f0d6adb09b 100755
--- a/ports/pnacl/compiler_wrapper.py
+++ b/ports/pnacl/compiler_wrapper.py
@@ -16,9 +16,16 @@ import sys
cmd = sys.argv[1:]
-# Add extra libs when linking
+is_configuring = 'conftest.c' in cmd or 'conftest.pexe' in cmd
is_linking = '-c' not in cmd and '-E' not in cmd
-if is_linking:
- cmd += os.environ['EXTRA_LIBS'].split()
+is_shared = '-shared' in cmd
+
+# Add extra libs when linking executables
+if is_linking and not is_shared:
+ cmd += os.environ['WEBPORTS_EXTRA_LIBS'].split()
+
+if is_configuring:
+ cmd.remove('-include')
+ cmd.remove('spawn.h')
sys.exit(subprocess.call(cmd))
« no previous file with comments | « ports/pnacl/build.sh ('k') | ports/pnacl/hello.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698