diff options
author | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-01 17:04:56 +0000 |
---|---|---|
committer | dmichael@chromium.org <dmichael@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-11-01 17:04:56 +0000 |
commit | d7dc149ffb61885e940bfbf150708b694f816eca (patch) | |
tree | b3e602c01d1779ea72cae76d87689b85837ba4f9 | |
parent | 89f1ecc6808585f9b0b02c712d5fc3c1454db7dc (diff) | |
download | chromium_src-d7dc149ffb61885e940bfbf150708b694f816eca.zip chromium_src-d7dc149ffb61885e940bfbf150708b694f816eca.tar.gz chromium_src-d7dc149ffb61885e940bfbf150708b694f816eca.tar.bz2 |
Revert 108116 - Use GYP to build nacl_irt
Converts Chrome from using scons to using GYP when building nacl_irt.
This change causes chrome to use GYP based components for untrusted
code. As a benifit, GYP will no longer need to run and scrape scons
output to determine irt dependencies. This also allows us to avoid
invoking scons during the build process.
We roll NaCl deps to get a fix for a simultaneous 32/64 bit build
issue on Windows.
TEST= try
BUG= http://code.google.com/p/chromium/issues/detail?id=96782
Review URL: http://codereview.chromium.org/8416025
TBR=noelallen@google.com
Review URL: http://codereview.chromium.org/8440003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@108119 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | DEPS | 2 | ||||
-rwxr-xr-x | build/scan_sources.py | 2 | ||||
-rw-r--r-- | chrome/nacl.gypi | 85 | ||||
-rw-r--r-- | ppapi/native_client/native_client.gyp | 62 | ||||
-rw-r--r-- | ppapi/native_client/src/shared/ppapi_proxy/ppapi_proxy.gyp | 91 | ||||
-rw-r--r-- | ppapi/ppapi_tests.gypi | 72 |
6 files changed, 76 insertions, 238 deletions
@@ -8,7 +8,7 @@ vars = { "webkit_revision": "98950", "chromium_git": "http://git.chromium.org/git", "swig_revision": "69281", - "nacl_revision": "7047", + "nacl_revision": "6965", # After changing nacl_revision, run 'glient sync' and check native_client/DEPS # to update other nacl_*_revision's. # TODO(brettw) We should use the "From" syntax to avoid hardcoding the diff --git a/build/scan_sources.py b/build/scan_sources.py index 5ff3f62..60febef 100755 --- a/build/scan_sources.py +++ b/build/scan_sources.py @@ -227,7 +227,7 @@ def Main(argv): sorted_list = workQ.Run() for pathname in sorted_list: - sys.stdout.write(pathname + '\n') + sys.stderr.write(pathname + '\n') return 0 diff --git a/chrome/nacl.gypi b/chrome/nacl.gypi index bd1a272..0e717b8 100644 --- a/chrome/nacl.gypi +++ b/chrome/nacl.gypi @@ -3,12 +3,6 @@ # found in the LICENSE file. { - 'variables': { - 'disable_untrusted%': 0 - }, - 'includes': [ - '../native_client/build/untrusted.gypi', - ], 'target_defaults': { 'variables': { 'nacl_target': 0, @@ -68,15 +62,16 @@ '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': [ - # TODO(gregoryd): chrome_resources and chrome_strings could be - # shared with the 64-bit target, but it does not work due to a gyp - #issue 'chrome_resources', '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', @@ -89,6 +84,74 @@ '<@(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 deleted file mode 100644 index 01f8527..0000000 --- a/ppapi/native_client/native_client.gyp +++ /dev/null @@ -1,62 +0,0 @@ -# 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. - -{ - 'variables': { - 'disable_untrusted%': 0 - }, - 'includes': [ - '../../native_client/build/untrusted.gypi', - ], - 'conditions': [ - ['disable_nacl!=1', { - 'targets': [ - { - '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_flags': [ - '-lirt_browser', - '-lppruntime', - '-lsrpc', - '-limc_syscalls', - '-lplatform', - '-lgio', - '-lm', - ], - 'sources': [ - ], - }, - 'conditions': [ - ['target_arch=="x64" or target_arch == "ia32"', { - 'variables': { - 'link_flags': [ - '-Wl,--section-start,.rodata=0x3ef00000', - '-Wl,-Ttext-segment=0x0fc00000', - ], - }, - }], - ], - '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 f91e71a..b071b0a 100644 --- a/ppapi/native_client/src/shared/ppapi_proxy/ppapi_proxy.gyp +++ b/ppapi/native_client/src/shared/ppapi_proxy/ppapi_proxy.gyp @@ -68,96 +68,5 @@ '<(DEPTH)/ppapi/ppapi.gyp:ppapi_c', ], }, - { - 'target_name': 'ppruntime_lib', - 'type': 'none', - '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_tests.gypi b/ppapi/ppapi_tests.gypi index 676b88f..352cfd1 100644 --- a/ppapi/ppapi_tests.gypi +++ b/ppapi/ppapi_tests.gypi @@ -188,78 +188,6 @@ # }, # ], }, - { - 'target_name': 'ppapi_nacl_tests', - 'type': 'none', - 'dependencies': [ - 'native_client/native_client.gyp:nacl_irt', - ], - 'variables': { - 'nexe_target': 'ppapi_nacl_tests', - 'build_glibc': 0, - 'build_newlib': 1, - 'include_dirs': [ - 'lib/gl/include', - '..', - ], - 'sources': [ - # Common test files - 'tests/test_case.cc', - 'tests/test_utils.cc', - 'tests/testing_instance.cc', - - # Compile-time tests - 'tests/test_c_includes.c', - 'tests/test_cpp_includes.cc', - 'tests/test_struct_sizes.c', - - # Test cases (PLEASE KEEP THIS SECTION IN ALPHABETICAL ORDER) - # Add/uncomment PPAPI interfaces below when they get proxied. - # Not yet proxied. - #'test_broker.cc', - # Not yet proxied. - #'test_buffer.cc', - # Not yet proxied. - #'test_char_set.cc', - 'tests/test_cursor_control.cc', - # Fails in DeleteDirectoryRecursively. - # BUG: http://code.google.com/p/nativeclient/issues/detail?id=2107 - #'test_directory_reader.cc', - 'tests/test_file_io.cc', - 'tests/test_file_ref.cc', - 'tests/test_file_system.cc', - 'tests/test_memory.cc', - 'tests/test_graphics_2d.cc', - 'tests/test_image_data.cc', - 'tests/test_paint_aggregator.cc', - # test_post_message.cc relies on synchronous scripting, which is not - # available for untrusted tests. - # Does not compile under nacl (uses private interface ExecuteScript). - #'test_post_message.cc', - 'tests/test_scrollbar.cc', - # Not yet proxied. - #'tests/test_transport.cc', - # Not yet proxied. - #'tests/test_uma.cc', - # Activating the URL loader test requires a test httpd that - # understands HTTP POST, which our current httpd.py doesn't. - # It also requires deactivating the tests that use FileIOTrusted - # when running in NaCl. - #'tests/test_url_loader.cc', - # Does not compile under nacl (uses VarPrivate). - #'test_url_util.cc', - # Not yet proxied. - #'test_video_decoder.cc', - 'tests/test_var.cc', - - # Deprecated test cases. - #'tests/test_instance_deprecated.cc', - # Var_deprecated fails in TestPassReference, and we probably won't - # fix it. - #'tests/test_var_deprecated.cc' - ], - }, - }, { 'target_name': 'ppapi_unittests', 'type': 'executable', |