Index: ppapi/native_client/native_client.gyp |
diff --git a/ppapi/native_client/native_client.gyp b/ppapi/native_client/native_client.gyp |
index d1c579d719dee22cf96f2547c5a419d252921686..ee83999a444fcca64e226c903458f6009f4ba188 100644 |
--- a/ppapi/native_client/native_client.gyp |
+++ b/ppapi/native_client/native_client.gyp |
@@ -88,16 +88,16 @@ |
], |
}, |
{ |
- 'target_name': 'nacl_irt', |
+ 'target_name': 'nacl_irt_raw', |
'type': 'none', |
'variables': { |
- 'nexe_target': 'nacl_irt', |
+ 'nexe_target': 'nacl_irt_raw', |
# These out_* fields override the default filenames, which |
# include a "_newlib" suffix and places them in the target |
# directory. |
- 'out_newlib64': '<(SHARED_INTERMEDIATE_DIR)/nacl_irt_x86_64.nexe', |
- 'out_newlib32': '<(SHARED_INTERMEDIATE_DIR)/nacl_irt_x86_32.nexe', |
- 'out_newlib_arm': '<(SHARED_INTERMEDIATE_DIR)/nacl_irt_arm.nexe', |
+ 'out_newlib64': '<(SHARED_INTERMEDIATE_DIR)/nacl_irt_x86_64_raw.nexe', |
+ 'out_newlib32': '<(SHARED_INTERMEDIATE_DIR)/nacl_irt_x86_32_raw.nexe', |
+ 'out_newlib_arm': '<(SHARED_INTERMEDIATE_DIR)/nacl_irt_arm_raw.nexe', |
'build_glibc': 0, |
'build_newlib': 0, |
'build_irt': 1, |
@@ -234,6 +234,130 @@ |
'../../native_client/src/shared/gio/gio.gyp:gio_lib', |
], |
}, |
+ { |
+ 'target_name': 'nacl_irt', |
+ 'type': 'none', |
+ 'dependencies': [ |
+ '../../native_client/src/tools/tls_edit/tls_edit.gyp:tls_edit#host', |
+ 'nacl_irt_raw' |
+ ], |
+ 'conditions': [ |
+ ['target_arch=="arm"', { |
+ 'actions': [ |
+ { |
+ 'action_name': 'tls_edit_nacl_irt_arm', |
+ 'message': 'Patching TLS for nacl_irt (arm)', |
+ 'inputs': [ |
+ '<(PRODUCT_DIR)/tls_edit', |
+ '<(SHARED_INTERMEDIATE_DIR)/nacl_irt_arm_raw.nexe', |
+ ], |
+ 'outputs': [ |
+ '<(PRODUCT_DIR)/nacl_irt_arm.nexe', |
+ ], |
+ 'action': ['<@(_inputs)', '<@(_outputs)'], |
+ }, |
+ |
+ # The non-stripped nacl_irt debug file must also go through |
+ # tls_edit, however gyp does not know anything about the |
+ # debug file since it is built as a side effect. We |
+ # must depend on the nacl_irt_raw.nexe and use the |
+ # nacl_irt_raw.nexe.debug file as the input to tls_edit. |
+ { |
+ 'action_name': 'tls_edit_nacl_irt_debug_arm', |
+ 'message': 'Patching TLS for nacl_irt.debug (arm)', |
+ 'inputs': [ |
+ '<(PRODUCT_DIR)/tls_edit', |
+ '<(SHARED_INTERMEDIATE_DIR)/nacl_irt_arm_raw.nexe', |
+ ], |
+ 'outputs': [ |
+ '<(PRODUCT_DIR)/nacl_irt_arm.nexe.debug', |
+ ], |
+ 'action': [ |
+ '<(PRODUCT_DIR)/tls_edit', |
+ '<(SHARED_INTERMEDIATE_DIR)/nacl_irt_arm_raw.nexe.debug', |
+ '<@(_outputs)', |
+ ], |
+ }, |
+ ], |
+ }], |
+ ['target_arch=="x64" or OS=="win"', { |
+ 'actions': [ |
+ { |
+ 'action_name': 'tls_edit_nacl_irt_x86_64', |
+ 'message': 'Patching TLS for nacl_irt (x86-64)', |
+ 'inputs': [ |
+ '<(PRODUCT_DIR)/tls_edit', |
+ '<(SHARED_INTERMEDIATE_DIR)/nacl_irt_x86_64_raw.nexe', |
+ ], |
+ 'outputs': [ |
+ '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe', |
+ ], |
+ 'action': ['<@(_inputs)', '<@(_outputs)'], |
+ }, |
+ |
+ # The non-stripped nacl_irt debug file must also go through |
+ # tls_edit, however gyp does not know anything about the |
+ # debug file since it is built as a side effect. We |
+ # must depend on the nacl_irt_raw.nexe and use the |
+ # nacl_irt_raw.nexe.debug file as the input to tls_edit. |
+ { |
+ 'action_name': 'tls_edit_nacl_irt_debug_x86_64', |
+ 'message': 'Patching TLS for nacl_irt.debug (x86-64)', |
+ 'inputs': [ |
+ '<(PRODUCT_DIR)/tls_edit', |
+ '<(SHARED_INTERMEDIATE_DIR)/nacl_irt_x86_64_raw.nexe', |
+ ], |
+ 'outputs': [ |
+ '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe.debug', |
+ ], |
+ 'action': [ |
+ '<(PRODUCT_DIR)/tls_edit', |
+ '<(SHARED_INTERMEDIATE_DIR)/nacl_irt_x86_64_raw.nexe.debug', |
+ '<@(_outputs)', |
+ ], |
+ }, |
+ ], |
+ }], |
+ ['target_arch=="ia32"', { |
+ 'actions': [ |
+ { |
+ 'action_name': 'tls_edit_nacl_irt_x86_32', |
+ 'message': 'Patching TLS for nacl_irt (x86-32)', |
+ 'inputs': [ |
+ '<(PRODUCT_DIR)/tls_edit', |
+ '<(SHARED_INTERMEDIATE_DIR)/nacl_irt_x86_32_raw.nexe', |
+ ], |
+ 'outputs': [ |
+ '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe', |
+ ], |
+ 'action': ['<@(_inputs)', '<@(_outputs)'], |
+ }, |
+ |
+ # The non-stripped nacl_irt debug file must also go through |
+ # tls_edit, however gyp does not know anything about the |
+ # debug file since it is built as a side effect. We |
+ # must depend on the nacl_irt_raw.nexe and use the |
+ # nacl_irt_raw.nexe.debug file as the input to tls_edit. |
+ { |
+ 'action_name': 'tls_edit_nacl_irt_debug_x86_32', |
+ 'message': 'Patching TLS for nacl_irt.debug (x86-32)', |
+ 'inputs': [ |
+ '<(PRODUCT_DIR)/tls_edit', |
+ '<(SHARED_INTERMEDIATE_DIR)/nacl_irt_x86_32_raw.nexe', |
+ ], |
+ 'outputs': [ |
+ '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe.debug', |
+ ], |
+ 'action': [ |
+ '<(PRODUCT_DIR)/tls_edit', |
+ '<(SHARED_INTERMEDIATE_DIR)/nacl_irt_x86_32_raw.nexe.debug', |
+ '<@(_outputs)', |
+ ], |
+ }, |
+ ], |
+ }], |
+ ], |
+ }, |
], |
}], |
], |