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

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

Issue 10826171: Incorporate shimming into the irt (Closed) Base URL: svn://svn.chromium.org/native_client/trunk/src/native_client/
Patch Set: Created 8 years, 4 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 | « src/untrusted/irt/irt_shim.h ('k') | src/untrusted/irt/shim_dummy.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/untrusted/irt/nacl.scons
===================================================================
--- src/untrusted/irt/nacl.scons (revision 9585)
+++ src/untrusted/irt/nacl.scons (working copy)
@@ -3,6 +3,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import os
Import('env')
@@ -11,7 +12,11 @@
raise UserError('src/untrusted/irt/nacl.scons in the wrong environment?')
blob_env = env.Clone()
-blob_env.Append(LINKFLAGS='-Wl,--section-start,.rodata=${IRT_BLOB_DATA_START}')
+blob_env.Append(LINKFLAGS='-Wl,--section-start,.rodata=${IRT_BLOB_DATA_START}',
+ # TODO(robertm): This define should be removed once
+ # the IRT shim build has migrated to the Chrome tree.
+ CPPDEFINES=['ENABLE_NACL_IRT_PPAPIHOOK_SHIMMED'])
+
# The PNaCl linker (gold) does not implement the "-Ttext-segment"
# option. However, with the linker for x86, the "-Ttext" option does
# not affect the executable's base address.
@@ -112,9 +117,34 @@
'm',
]
+# We may want to move this into ppruntime in the future to limit
+# visibility to ppapi/generators
+def GetPNaClShimSource(env):
+ if not env.Bit('target_x86_64'):
+ return 'shim_dummy.c'
+
+ # Generate a 'pnacl_shim.c'
+ # API code
+ api_glob = env.Glob('${SOURCE_ROOT}/ppapi/api/*.idl')
+ api_dev_glob = env.Glob('${SOURCE_ROOT}/ppapi/api/dev/*.idl')
+ all_api = [f.abspath for f in api_glob + api_dev_glob]
+ # Python code
+ generators_glob = env.Glob('${SOURCE_ROOT}/ppapi/generators/*.py')
+ return env.Command(
+ 'pnacl_irt_shim.c',
+ (api_glob + api_dev_glob + generators_glob),
+ ('${PYTHON} ' +
+ '${SOURCE_ROOT}/ppapi/generators/generator.py ' +
+ '--srcroot=' + os.path.join('${SOURCE_ROOT}', 'ppapi', 'api') + ' ' +
+ '--wnone --pnacl --pnaclshim=${TARGETS} ' + ' '.join(all_api)))
+
+irt_shim_obj = blob_env.ComponentObject(GetPNaClShimSource(blob_env))
+
+
def LinkIrt(output, files, libs):
return blob_env.ComponentProgram(output,
- [irt_entry_obj] + irt_support_objs + files,
+ [irt_entry_obj, irt_shim_obj] +
+ irt_support_objs + files,
EXTRA_LIBS=libs + irt_libs)
irt_core_library = LinkIrt('irt_core', irt_nonbrowser, [])
« no previous file with comments | « src/untrusted/irt/irt_shim.h ('k') | src/untrusted/irt/shim_dummy.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698