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

Unified Diff: src/untrusted/pnacl_irt_shim/nacl.scons

Issue 8776023: Switch the nop pnacl x86-64 IRT shim to the real one generated from IDL. (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client
Patch Set: Created 9 years, 1 month 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
Index: src/untrusted/pnacl_irt_shim/nacl.scons
diff --git a/src/untrusted/pnacl_irt_shim/nacl.scons b/src/untrusted/pnacl_irt_shim/nacl.scons
index c410c4e92aa316906ee11d786446aff15833499c..404dc563d6e8438eb583f89df5701209b48709a8 100644
--- a/src/untrusted/pnacl_irt_shim/nacl.scons
+++ b/src/untrusted/pnacl_irt_shim/nacl.scons
@@ -5,16 +5,34 @@
Import('env')
-# This library is part of the pnacl toolchain only, and is used to match the
-# pnacl ABI to the IRT ABI. It was necessitated by problems in passing
-# structures by value on x86-64. The library must be compiled with nacl-gcc.
-if env.Bit('bitcode') or not env.Bit('target_x86_64'):
+# This library is part of the pnacl x86-64 toolchain only, and is used
+# to match the pnacl ABI to the IRT ABI. It was necessitated by problems
+# in passing structures by value on x86-64.
+if not env.Bit('bitcode') or not env.Bit('target_x86_64'):
Return()
-pnacl_irt_shim = env.ComponentLibrary('pnacl_irt_shim', [
+# The library must be compiled with nacl-gcc.
+nacl_gcc_env = env.PNaClGetNNaClEnv()
+
+# Generate a 'pnacl_shim.c'
+generated_file_c = nacl_gcc_env.Command(
+ 'pnacl_shim.c',
+ # This Glob doesn't quite work for picking up input dependencies.
robertm 2011/12/01 22:55:43 so how do we work around it not working
jvoung - send to chromium... 2011/12/01 23:35:34 duh, should have been env.Glob() instead of Glob()
+ (Glob('${SOURCE_ROOT}/ppapi/api/*.idl') +
+ Glob('${SOURCE_ROOT}/ppapi/api/dev/*.idl') +
+ Glob('${SOURCE_ROOT}/ppapi/generators/*.py')),
+ ('${PYTHON} ' +
+ '${SOURCE_ROOT}/ppapi/generators/generator.py ' +
+ '--srcroot=${SOURCE_ROOT}/ppapi/api ' +
+ '--wnone --pnacl --pnaclshim=${TARGETS} '))
+
+pnacl_irt_shim = nacl_gcc_env.ComponentLibrary('pnacl_irt_shim', [
+ generated_file_c,
'shim_entry.c',
'shim_ppapi.c',
])
+
+# However, the library is part of the pnacl sdk (use original env).
env.AddLibraryToSdk(pnacl_irt_shim)
env.AddObjectToSdk(['libpnacl_irt_shim.a'])

Powered by Google App Engine
This is Rietveld 408576698