Index: ppapi/pnacl_irt_shim.gyp |
diff --git a/ppapi/pnacl_irt_shim.gyp b/ppapi/pnacl_irt_shim.gyp |
new file mode 100644 |
index 0000000000000000000000000000000000000000..4033eb28d13800b109fc1a6454e8e15717f87178 |
--- /dev/null |
+++ b/ppapi/pnacl_irt_shim.gyp |
@@ -0,0 +1,94 @@ |
+# Copyright (c) 2011 The Chromium Authors. All rights reserved. |
+# Use of this source code is governed by a BSD-style license that can be |
+# found in the LICENSE file. |
+ |
+# This builds the PNaCl IRT shim with nacl-gcc for x64. |
+# Since it is built by nacl-gcc, it will be in the nacl-gcc build |
+# directory. This means that PNaCl tests will need to pull this build |
+# artifact out of the nacl-gcc build directory, and nacl-gcc will need |
+# to ignore this build artifact when packaging the nacl-gcc SDK... |
+ |
+# This should not build if 'disable_nacl=1'. |
+ |
+{ |
+ 'variables': { |
+ # Define p2p_apis for ppapi_sources.gypi, in case it wasn't already defined. |
+ # Somehow other gyp files get away with not defining this. |
+ 'p2p_apis': 1, |
+ 'glob_files': [ |
+ '>(python_exe)', '<(DEPTH)/native_client/build/gyp_glob.py', |
+ ], |
+ }, |
+ 'includes': [ |
+ '../native_client/build/common.gypi', |
+ 'ppapi_sources.gypi', |
+ ], |
+ 'conditions': [ |
+ # This library is only for x86-64 for now |
+ # (the windows build always includes 64-bit). |
+ # We may introduce a dummy shim to make it uniform. |
+ ['target_arch=="x64" or OS=="win"', { |
+ 'targets' : [ |
+ { |
+ 'target_name': 'shim_generated_source', |
+ 'type': 'none', |
+ 'actions' : [ |
+ { |
+ 'action_name': 'generate_shim_source', |
+ 'msvs_cygwin_shell': 0, |
+ 'description': 'generating the pnacl IRT shim', |
+ 'inputs': [ |
+ # Potentially all python scripts in the generators directory. |
+ '>!@(<(glob_files) generators/ *.py)', |
+ # Potentially all IDL files in the API and DEV-API directory. |
+ '>!@(<(glob_files) api/ *.idl)', |
+ '>!@(<(glob_files) api/dev/ *.idl)', |
+ ], |
+ 'outputs': [ |
+ '<(SHARED_INTERMEDIATE_DIR)/pnacl_shim.c', |
+ ], |
+ 'action': [ |
+ '>(python_exe)', |
+ 'generators/generator.py', |
+ '--srcroot=api', |
+ '--wnone', |
+ '--pnacl', |
+ '--pnaclshim=<(SHARED_INTERMEDIATE_DIR)/pnacl_shim.c', |
+ ], |
+ }, |
+ ], |
+ }, |
+ { |
+ 'target_name': 'pnacl_irt_shim_lib', |
+ 'type': 'none', |
+ 'variables': { |
+ 'nlib_target': 'libpnacl_irt_shim.a', |
+ 'build_glibc': 1, |
+ 'build_newlib': 1, |
+ 'generated_sources': ['<(SHARED_INTERMEDIATE_DIR)/pnacl_shim.c'], |
+ 'generated_src_deps': [ |
+ 'generators/pnacl_shim.h', |
+ # <@(c_sources) will list the checked-in ppapi headers. |
+ # TODO(jvoung): If we decide to generate the headers as a |
+ # build step, instead of using the checked-in headers, list |
+ # that builder as a dependency instead. |
+ '<@(c_sources)', |
+ ], |
+ 'sources': [ |
+ '<(DEPTH)/native_client/src/untrusted/pnacl_irt_shim/shim_entry.c', |
+ '<(DEPTH)/native_client/src/untrusted/pnacl_irt_shim/shim_ppapi.c', |
+ ], |
+ 'include_dirs': [ |
+ '.', |
+ './generators', |
+ ], |
+ }, |
+ 'dependencies': [ |
+ 'shim_generated_source', |
+ '<(DEPTH)/native_client/tools.gyp:prep_toolchain', |
+ ], |
+ }, |
+ ], |
+ }], |
+ ], |
+} |