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

Unified Diff: site_scons/site_tools/naclsdk.py

Issue 8366024: Add pnacl-gcc generated code back into the callingconv test mix (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: '' Created 9 years, 2 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 | tests/callingconv/callingconv.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: site_scons/site_tools/naclsdk.py
===================================================================
--- site_scons/site_tools/naclsdk.py (revision 6994)
+++ site_scons/site_tools/naclsdk.py (working copy)
@@ -334,6 +334,19 @@
LINKFLAGS=['--pnacl-allow-native'])
env['SHLINK'] = '${LINK}'
+# Get an environment for a different frontend when in
+# PNaCl mode.
+def PNaClChangeFrontend(env, frontend):
+ assert(env.Bit('bitcode'))
+ assert(frontend in ('clang','dragonegg','llvmgcc'))
+
+ # This is kind of a hack.
+ alt_env = env.Clone()
+ alt_env['PNACL_FRONTEND'] = frontend
+ alt_env = alt_env.Clone(tools = ['naclsdk'])
+ return alt_env
+
+
# Get an environment for nacl-gcc when in PNaCl mode.
def PNaClGetNNaClEnv(env):
assert(env.Bit('bitcode'))
@@ -463,6 +476,7 @@
env.AddMethod(AddBiasForPNaCl)
env.AddMethod(PNaClForceNative)
env.AddMethod(PNaClGetNNaClEnv)
+ env.AddMethod(PNaClChangeFrontend)
sdk_mode = SCons.Script.ARGUMENTS.get('naclsdk_mode', 'download')
« no previous file with comments | « no previous file | tests/callingconv/callingconv.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698