Chromium Code Reviews| Index: src/untrusted/irt/nacl.scons |
| =================================================================== |
| --- src/untrusted/irt/nacl.scons (revision 9574) |
| +++ src/untrusted/irt/nacl.scons (working copy) |
| @@ -1,8 +1,9 @@ |
| # -*- python -*- |
| -# Copyright (c) 2012 The Native Client Authors. All rights reserved. |
| +# Copyright 2012 The Native Client Authors. All rights reserved. |
| # Use of this source code is governed by a BSD-style license that can be |
| # found in the LICENSE file. |
| +import os |
| Import('env') |
| @@ -20,6 +21,29 @@ |
| else: |
| blob_env.Append(LINKFLAGS='-Wl,-Ttext-segment=${IRT_BLOB_CODE_START}') |
| +# 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' |
|
Nick Bray (chromium)
2012/08/27 23:00:02
So I realize this is from irt_stubs, but why can't
Robert Muth (chromium)
2012/08/28 14:18:01
This has to wait until the new irt is fully functi
|
| + # 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)) |
| + |
| irt_support_sources = [ |
| 'irt_malloc.c', |
| 'irt_private_pthread.c', |
| @@ -108,7 +132,8 @@ |
| 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, []) |