summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authornoelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-12 00:24:40 +0000
committernoelallen@google.com <noelallen@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2011-11-12 00:24:40 +0000
commit7d36c295404f4d57607fea402cd1809568f72082 (patch)
treed950890d24e622dbd02ee26a5f29e129d63a959b
parent05f75566c6d87d434aaf5a98d3c1511f61599f44 (diff)
downloadchromium_src-7d36c295404f4d57607fea402cd1809568f72082.zip
chromium_src-7d36c295404f4d57607fea402cd1809568f72082.tar.gz
chromium_src-7d36c295404f4d57607fea402cd1809568f72082.tar.bz2
Enable untrusted GYP builds in Chrome (irt via gyp)
Reconstruct of CL to enable untrsuted builds see: http://codereview.chromium.org/8416025. This CL will enable untrusted builds in Chrome. The first step is to enable enable building the IRT via this technique instead of using scons. DEPS: We bump NaCl deps to fix untrusted.gypi in NaCl Repo ppapi/ppapi_cpp.gypi+ Add ppapi_cpp library for NEXE ppapi/native_client/native_client.gyp Add ppapi library for NEXE (copy linker script to toolchain dir) Add nacl_irt target (the actual IRT.NEXE) ppapi/ppapi.gyp & ppapi/ppapi_internal.gyp Pull in untrusted.gypi from NaCl repo ppapi/native_client/src/shared/ppapi_proxy/ppapi_proxy.gyp Add ppruntime library for NEXE chrome/nacl.gypi Remove scons header scan and scons irt build Add dependency to untrusted IRT build in native_client.gyp BUG= http://code.google.com/p/chromium/issues/detail?id=96782 TEST= try TBR=dmichael@chromium.org Review URL: http://codereview.chromium.org/8502036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@109739 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--DEPS2
-rw-r--r--chrome/nacl.gypi77
-rw-r--r--ppapi/native_client/native_client.gyp90
-rw-r--r--ppapi/native_client/src/shared/ppapi_proxy/ppapi_proxy.gyp94
-rw-r--r--ppapi/ppapi.gyp1
-rw-r--r--ppapi/ppapi_cpp.gypi141
-rw-r--r--ppapi/ppapi_internal.gyp1
7 files changed, 332 insertions, 74 deletions
diff --git a/DEPS b/DEPS
index 3694baa..61a39af 100644
--- a/DEPS
+++ b/DEPS
@@ -8,7 +8,7 @@ vars = {
"webkit_revision": "99956",
"chromium_git": "http://git.chromium.org/git",
"swig_revision": "69281",
- "nacl_revision": "7139",
+ "nacl_revision": "7141",
# After changing nacl_revision, run 'glient sync' and check native_client/DEPS
# to update other nacl_*_revision's.
"nacl_tools_revision": "7088", # native_client/DEPS: tools_rev
diff --git a/chrome/nacl.gypi b/chrome/nacl.gypi
index 3474b2d..83bd431 100644
--- a/chrome/nacl.gypi
+++ b/chrome/nacl.gypi
@@ -3,6 +3,9 @@
# found in the LICENSE file.
{
+ 'include': [
+ '../native_client/build/untrusted.gypi',
+ ],
'target_defaults': {
'variables': {
'nacl_target': 0,
@@ -62,16 +65,12 @@
'type': 'static_library',
'variables': {
'nacl_target': 1,
- 'irt_build_cmd': [
- 'python', 'build_nacl_irt.py', '--outdir', '<(PRODUCT_DIR)',
- ],
- 'irt_inputs_cmd':
- 'python build_nacl_irt.py --inputs',
},
'dependencies': [
'chrome_resources.gyp:chrome_resources',
'chrome_resources.gyp:chrome_strings',
'common',
+ '../ppapi/native_client/native_client.gyp:nacl_irt',
'../webkit/support/webkit_support.gyp:glue',
'../ppapi/native_client/src/trusted/plugin/plugin.gyp:ppGoogleNaClPluginChrome',
'../native_client/src/trusted/service_runtime/service_runtime.gyp:sel',
@@ -84,74 +83,6 @@
'<@(nacl_defines)',
],
},
- 'conditions': [
- ['OS=="win"', {
- # Windows needs both the x86-32 and x86-64 IRT.
- 'actions': [
- {
- 'action_name': 'nacl_irt',
- 'message': 'Building NaCl IRT',
- 'inputs': [
- '<!@(<(irt_inputs_cmd) --platform=x86-32 --platform=x86-64)',
- ],
- 'outputs': ['<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
- '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe'],
- 'action': [
- '<@(irt_build_cmd)',
- '--platform', 'x86-32',
- '--platform', 'x86-64',
- ],
- },
- ],
- }],
- ['OS!="win" and target_arch=="ia32"', {
- # Linux-x86-32 and OSX need only the x86-32 IRT.
- 'actions': [
- {
- 'action_name': 'nacl_irt',
- 'message': 'Building NaCl IRT',
- 'inputs': [
- '<!@(<(irt_inputs_cmd) --platform=x86-32)',
- ],
- 'outputs': ['<(PRODUCT_DIR)/nacl_irt_x86_32.nexe'],
- 'action': [
- '<@(irt_build_cmd)', '--platform', 'x86-32',
- ],
- },
- ],
- }],
- ['OS!="win" and target_arch=="x64"', {
- # Linux-x86-64 needs only the x86-64 IRT.
- 'actions': [
- {
- 'action_name': 'nacl_irt',
- 'message': 'Building NaCl IRT',
- 'inputs': [
- '<!@(<(irt_inputs_cmd) --platform=x86-64)',
- ],
- 'outputs': ['<(PRODUCT_DIR)/nacl_irt_x86_64.nexe'],
- 'action': [
- '<@(irt_build_cmd)', '--platform', 'x86-64',
- ],
- },
- ],
- }],
- ['OS!="win" and target_arch=="arm"', {
- 'actions': [
- {
- 'action_name': 'nacl_irt',
- 'message': 'Building NaCl IRT',
- 'inputs': [
- '<!@(<(irt_inputs_cmd) --platform=arm)',
- ],
- 'outputs': ['<(PRODUCT_DIR)/nacl_irt_arm.nexe'],
- 'action': [
- '<@(irt_build_cmd)', '--platform', 'arm',
- ],
- },
- ],
- }],
- ],
},
],
'conditions': [
diff --git a/ppapi/native_client/native_client.gyp b/ppapi/native_client/native_client.gyp
new file mode 100644
index 0000000..ab31742
--- /dev/null
+++ b/ppapi/native_client/native_client.gyp
@@ -0,0 +1,90 @@
+# 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.
+
+{
+ 'includes': [
+ '../../native_client/build/common.gypi',
+ ],
+ 'conditions': [
+ ['disable_nacl!=1', {
+ 'targets': [
+ {
+ 'target_name': 'ppapi_lib',
+ 'type': 'none',
+ 'dependencies': [
+ '../../native_client/src/untrusted/pthread/pthread.gyp:pthread_lib',
+ '../../native_client/src/untrusted/irt_stub/irt_stub.gyp:ppapi_stub_lib',
+ ],
+ 'copies': [
+ {
+ 'destination': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib32',
+ 'files': [
+ '<(DEPTH)/native_client/src/untrusted/irt_stub/libppapi.a',
+ ],
+ },
+ {
+ 'destination': '<(SHARED_INTERMEDIATE_DIR)/tc_newlib/lib64',
+ 'files': [
+ '<(DEPTH)/native_client/src/untrusted/irt_stub/libppapi.a',
+ ],
+ },
+ ],
+ },
+ {
+ 'target_name': 'nacl_irt',
+ 'type': 'none',
+ 'variables': {
+ 'nexe_target': 'nacl_irt',
+ 'out64': '<(PRODUCT_DIR)/nacl_irt_x86_64.nexe',
+ 'out32': '<(PRODUCT_DIR)/nacl_irt_x86_32.nexe',
+ 'build_glibc': 0,
+ 'build_newlib': 1,
+ 'include_dirs': [
+ 'lib/gl/include',
+ '..',
+ ],
+ # Link offsets taken from native_client/build/untrusted.gypi
+ 'link_flags': [
+ '-lirt_browser',
+ '-lppruntime',
+ '-lsrpc',
+ '-limc_syscalls',
+ '-lplatform',
+ '-lgio',
+ '-lm',
+ '-Wl,--section-start,.rodata=<(NACL_IRT_DATA_START)',
+ '-Wl,-Ttext-segment=<(NACL_IRT_TEXT_START)',
+ ],
+ 'sources': [
+ ],
+ 'extra_deps64': [
+ '<(PRODUCT_DIR)/obj/gen/tc_newlib/lib64/libppruntime.a',
+ '<(PRODUCT_DIR)/obj/gen/tc_newlib/lib64/libirt_browser.a',
+ '<(PRODUCT_DIR)/obj/gen/tc_newlib/lib64/libsrpc.a',
+ '<(PRODUCT_DIR)/obj/gen/tc_newlib/lib64/libplatform.a',
+ '<(PRODUCT_DIR)/obj/gen/tc_newlib/lib64/libimc_syscalls.a',
+ '<(PRODUCT_DIR)/obj/gen/tc_newlib/lib64/libgio.a',
+ ],
+ 'extra_deps32': [
+ '<(PRODUCT_DIR)/obj/gen/tc_newlib/lib32/libppruntime.a',
+ '<(PRODUCT_DIR)/obj/gen/tc_newlib/lib32/libirt_browser.a',
+ '<(PRODUCT_DIR)/obj/gen/tc_newlib/lib32/libsrpc.a',
+ '<(PRODUCT_DIR)/obj/gen/tc_newlib/lib32/libplatform.a',
+ '<(PRODUCT_DIR)/obj/gen/tc_newlib/lib32/libimc_syscalls.a',
+ '<(PRODUCT_DIR)/obj/gen/tc_newlib/lib32/libgio.a',
+ ],
+ },
+ 'dependencies': [
+ 'src/shared/ppapi_proxy/ppapi_proxy.gyp:ppruntime_lib',
+ '../../native_client/src/untrusted/irt/irt.gyp:irt_browser_lib',
+ '../../native_client/src/shared/srpc/srpc.gyp:srpc_lib',
+ '../../native_client/src/shared/platform/platform.gyp:platform_lib',
+ '../../native_client/src/untrusted/nacl/nacl.gyp:imc_syscalls_lib',
+ '../../native_client/src/shared/gio/gio.gyp:gio_lib',
+ ],
+ },
+ ],
+ }],
+ ],
+}
diff --git a/ppapi/native_client/src/shared/ppapi_proxy/ppapi_proxy.gyp b/ppapi/native_client/src/shared/ppapi_proxy/ppapi_proxy.gyp
index b071b0a..26ff85e 100644
--- a/ppapi/native_client/src/shared/ppapi_proxy/ppapi_proxy.gyp
+++ b/ppapi/native_client/src/shared/ppapi_proxy/ppapi_proxy.gyp
@@ -68,5 +68,99 @@
'<(DEPTH)/ppapi/ppapi.gyp:ppapi_c',
],
},
+ {
+ 'target_name': 'ppruntime_lib',
+ 'type': 'none',
+ 'dependencies': [
+ '<(DEPTH)/native_client/tools.gyp:prep_toolchain'
+ ],
+ 'variables': {
+ 'nlib_target': 'libppruntime.a',
+ 'build_glibc': 0,
+ 'build_newlib': 1,
+ 'include_dirs': [
+ '<(DEPTH)/gpu',
+ '<(DEPTH)/ppapi/native_client/src/shared/ppapi_proxy/untrusted',
+ ],
+ 'sources': [
+ '<(DEPTH)/gpu/command_buffer/common/cmd_buffer_common.cc',
+ '<(DEPTH)/gpu/command_buffer/common/gles2_cmd_format.cc',
+ '<(DEPTH)/gpu/command_buffer/common/gles2_cmd_utils.cc',
+ '<(DEPTH)/gpu/command_buffer/common/logging.cc',
+
+ '<(DEPTH)/gpu/command_buffer/client/cmd_buffer_helper.cc',
+ '<(DEPTH)/gpu/command_buffer/client/fenced_allocator.cc',
+ '<(DEPTH)/gpu/command_buffer/client/gles2_c_lib.cc',
+ '<(DEPTH)/gpu/command_buffer/client/gles2_cmd_helper.cc',
+ '<(DEPTH)/gpu/command_buffer/client/gles2_implementation.cc',
+ '<(DEPTH)/gpu/command_buffer/client/program_info_manager.cc',
+ '<(DEPTH)/gpu/command_buffer/client/gles2_lib.cc',
+ '<(DEPTH)/gpu/command_buffer/client/mapped_memory.cc',
+ '<(DEPTH)/gpu/command_buffer/client/ring_buffer.cc',
+ '<(DEPTH)/gpu/command_buffer/common/id_allocator.cc',
+
+ 'command_buffer_nacl.cc',
+ 'input_event_data.cc',
+ 'object_serialize.cc',
+ 'plugin_callback.cc',
+ 'plugin_globals.cc',
+ 'plugin_instance_data.cc',
+ 'plugin_main.cc',
+ 'plugin_nacl_file.cc',
+ 'plugin_opengles.cc',
+ 'plugin_ppb.cc',
+ 'plugin_ppb_audio.cc',
+ 'plugin_ppb_audio_config.cc',
+ 'plugin_ppb_buffer.cc',
+ 'plugin_ppb_core.cc',
+ 'plugin_ppb_cursor_control.cc',
+ 'plugin_ppb_file_io.cc',
+ 'plugin_ppb_file_system.cc',
+ 'plugin_ppb_file_ref.cc',
+ 'plugin_ppb_find.cc',
+ 'plugin_ppb_font.cc',
+ 'plugin_ppb_fullscreen.cc',
+ 'plugin_ppb_graphics_2d.cc',
+ 'plugin_ppb_graphics_3d.cc',
+ 'plugin_ppb_image_data.cc',
+ 'plugin_ppb_input_event.cc',
+ 'plugin_ppb_instance.cc',
+ 'plugin_ppb_memory.cc',
+ 'plugin_ppb_messaging.cc',
+ 'plugin_ppb_mouse_lock.cc',
+ 'plugin_ppb_pdf.cc',
+ 'plugin_ppb_scrollbar.cc',
+ 'plugin_ppb_testing.cc',
+ 'plugin_ppb_url_loader.cc',
+ 'plugin_ppb_url_request_info.cc',
+ 'plugin_ppb_url_response_info.cc',
+ 'plugin_ppb_var.cc',
+ 'plugin_ppb_widget.cc',
+ 'plugin_ppb_zoom.cc',
+ 'plugin_ppp_find_rpc_server.cc',
+ 'plugin_ppp_input_event_rpc_server.cc',
+ 'plugin_ppp_instance_rpc_server.cc',
+ 'plugin_ppp_messaging_rpc_server.cc',
+ 'plugin_ppp_mouse_lock_rpc_server.cc',
+ 'plugin_ppp_printing_rpc_server.cc',
+ 'plugin_ppp_scrollbar_rpc_server.cc',
+ 'plugin_ppp_selection_rpc_server.cc',
+ 'plugin_ppp_widget_rpc_server.cc',
+ 'plugin_ppp_zoom_rpc_server.cc',
+ 'plugin_ppp_rpc_server.cc',
+ 'plugin_resource.cc',
+ 'plugin_resource_tracker.cc',
+ 'plugin_threading.cc',
+ 'plugin_upcall.cc',
+ 'proxy_var.cc',
+ 'proxy_var_cache.cc',
+ 'utility.cc',
+ # Autogenerated files
+ 'ppp_rpc_server.cc',
+ 'ppb_rpc_client.cc',
+ 'upcall_client.cc'
+ ],
+ },
+ },
],
}
diff --git a/ppapi/ppapi.gyp b/ppapi/ppapi.gyp
index f1eb48f..7adbf5a 100644
--- a/ppapi/ppapi.gyp
+++ b/ppapi/ppapi.gyp
@@ -28,6 +28,7 @@
],
},
'includes': [
+ '../native_client/build/untrusted.gypi',
'ppapi_cpp.gypi',
'ppapi_gl.gypi',
],
diff --git a/ppapi/ppapi_cpp.gypi b/ppapi/ppapi_cpp.gypi
index 9771de3..918c659 100644
--- a/ppapi/ppapi_cpp.gypi
+++ b/ppapi/ppapi_cpp.gypi
@@ -310,4 +310,145 @@
],
},
],
+ 'conditions': [
+ ['disable_nacl!=1', {
+ 'targets' : [
+ {
+ 'target_name': 'ppapi_cpp_lib',
+ 'type': 'none',
+ 'variables': {
+ 'nlib_target': 'libppapi_cpp.a',
+ 'build_glibc': 0,
+ 'build_newlib': 1,
+ 'sources': [
+ 'cpp/audio.cc',
+ 'cpp/audio.h',
+ 'cpp/audio_config.cc',
+ 'cpp/audio_config.h',
+ 'cpp/completion_callback.cc',
+ 'cpp/completion_callback.h',
+ 'cpp/core.cc',
+ 'cpp/core.h',
+ 'cpp/file_io.cc',
+ 'cpp/file_io.h',
+ 'cpp/file_ref.cc',
+ 'cpp/file_ref.h',
+ 'cpp/file_system.cc',
+ 'cpp/file_system.h',
+ 'cpp/fullscreen.cc',
+ 'cpp/fullscreen.h',
+ 'cpp/graphics_2d.cc',
+ 'cpp/graphics_2d.h',
+ 'cpp/graphics_3d.cc',
+ 'cpp/graphics_3d.h',
+ 'cpp/graphics_3d_client.cc',
+ 'cpp/graphics_3d_client.h',
+ 'cpp/image_data.cc',
+ 'cpp/image_data.h',
+ 'cpp/input_event.cc',
+ 'cpp/input_event.h',
+ 'cpp/instance.cc',
+ 'cpp/instance.h',
+ 'cpp/logging.h',
+ 'cpp/module.cc',
+ 'cpp/module.h',
+ 'cpp/module_impl.h',
+ 'cpp/mouse_lock.cc',
+ 'cpp/mouse_lock.h',
+ 'cpp/non_thread_safe_ref_count.h',
+ 'cpp/paint_aggregator.cc',
+ 'cpp/paint_aggregator.h',
+ 'cpp/paint_manager.cc',
+ 'cpp/paint_manager.h',
+ 'cpp/point.h',
+ 'cpp/rect.cc',
+ 'cpp/rect.h',
+ 'cpp/resource.cc',
+ 'cpp/resource.h',
+ 'cpp/size.h',
+ 'cpp/url_loader.cc',
+ 'cpp/url_loader.h',
+ 'cpp/url_request_info.cc',
+ 'cpp/url_request_info.h',
+ 'cpp/url_response_info.cc',
+ 'cpp/url_response_info.h',
+ 'cpp/var.cc',
+ 'cpp/var.h',
+
+ # Dev interfaces.
+ 'cpp/dev/buffer_dev.cc',
+ 'cpp/dev/buffer_dev.h',
+ 'cpp/dev/context_3d_dev.cc',
+ 'cpp/dev/context_3d_dev.h',
+ 'cpp/dev/directory_entry_dev.cc',
+ 'cpp/dev/directory_entry_dev.h',
+ 'cpp/dev/directory_reader_dev.cc',
+ 'cpp/dev/directory_reader_dev.h',
+ 'cpp/dev/file_chooser_dev.cc',
+ 'cpp/dev/file_chooser_dev.h',
+ 'cpp/dev/find_dev.cc',
+ 'cpp/dev/find_dev.h',
+ 'cpp/dev/font_dev.cc',
+ 'cpp/dev/font_dev.h',
+ 'cpp/dev/fullscreen_dev.cc',
+ 'cpp/dev/fullscreen_dev.h',
+ 'cpp/dev/ime_input_event_dev.cc',
+ 'cpp/dev/ime_input_event_dev.h',
+ 'cpp/dev/memory_dev.cc',
+ 'cpp/dev/memory_dev.h',
+ 'cpp/dev/printing_dev.cc',
+ 'cpp/dev/printing_dev.h',
+ 'cpp/dev/scrollbar_dev.cc',
+ 'cpp/dev/scrollbar_dev.h',
+ 'cpp/dev/selection_dev.cc',
+ 'cpp/dev/selection_dev.h',
+ 'cpp/dev/surface_3d_dev.cc',
+ 'cpp/dev/surface_3d_dev.h',
+ 'cpp/dev/text_input_dev.cc',
+ 'cpp/dev/text_input_dev.h',
+ 'cpp/dev/url_util_dev.cc',
+ 'cpp/dev/url_util_dev.h',
+ 'cpp/dev/video_capture_client_dev.cc',
+ 'cpp/dev/video_capture_client_dev.h',
+ 'cpp/dev/video_capture_dev.cc',
+ 'cpp/dev/video_capture_dev.h',
+ 'cpp/dev/video_decoder_client_dev.cc',
+ 'cpp/dev/video_decoder_client_dev.h',
+ 'cpp/dev/video_decoder_dev.cc',
+ 'cpp/dev/video_decoder_dev.h',
+ 'cpp/dev/widget_client_dev.cc',
+ 'cpp/dev/widget_client_dev.h',
+ 'cpp/dev/widget_dev.cc',
+ 'cpp/dev/widget_dev.h',
+ 'cpp/dev/zoom_dev.cc',
+ 'cpp/dev/zoom_dev.h',
+
+ # Deprecated interfaces.
+ 'cpp/dev/scriptable_object_deprecated.h',
+ 'cpp/dev/scriptable_object_deprecated.cc',
+
+ # Private interfaces.
+ 'cpp/private/flash_fullscreen.cc',
+ 'cpp/private/flash_fullscreen.h',
+ 'cpp/private/instance_private.cc',
+ 'cpp/private/instance_private.h',
+ 'cpp/private/var_private.cc',
+ 'cpp/private/var_private.h',
+
+ # Trusted interfaces.
+ 'cpp/trusted/file_chooser_trusted.cc',
+ 'cpp/trusted/file_chooser_trusted.h',
+
+ # Entrypoints
+ 'cpp/module_embedder.h',
+ 'cpp/ppp_entrypoints.cc',
+ ],
+ },
+ 'dependencies': [
+ '<(DEPTH)/native_client/tools.gyp:prep_toolchain',
+ ],
+ },
+ ],
+ }],
+ ],
}
diff --git a/ppapi/ppapi_internal.gyp b/ppapi/ppapi_internal.gyp
index 5714516..3ee98fc 100644
--- a/ppapi/ppapi_internal.gyp
+++ b/ppapi/ppapi_internal.gyp
@@ -24,6 +24,7 @@
],
},
'includes': [
+ '../native_client/build/untrusted.gypi',
'ppapi_proxy.gypi',
'ppapi_shared.gypi',
'ppapi_tests.gypi',