Merge V8 5.3.332.45. DO NOT MERGE
Test: Manual
FPIIM-449
Change-Id: Id3254828b068abdea3cb10442e0172a8c9a98e03
(cherry picked from commit 13e2dadd00298019ed862f2b2fc5068bba730bcf)
diff --git a/build/OWNERS b/build/OWNERS
new file mode 100644
index 0000000..122b6e6
--- /dev/null
+++ b/build/OWNERS
@@ -0,0 +1,12 @@
+agrieve@chromium.org
+dpranke@chromium.org
+jbudorick@chromium.org
+jochen@chromium.org
+scottmg@chromium.org
+thakis@chromium.org
+brucedawson@chromium.org
+
+per-file mac_toolchain.py=erikchen@chromium.org
+per-file mac_toolchain.py=justincohen@chromium.org
+per-file package_mac_toolchain.py=erikchen@chromium.org
+per-file package_mac_toolchain.py=justincohen@chromium.org
diff --git a/build/all.gyp b/build/all.gyp
new file mode 100644
index 0000000..7520aab
--- /dev/null
+++ b/build/all.gyp
@@ -0,0 +1,1364 @@
+# Copyright (c) 2012 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': {
+ # A hook that can be overridden in other repositories to add additional
+ # compilation targets to 'All'.
+ 'app_targets%': [],
+ # For Android-specific targets.
+ 'android_app_targets%': [],
+ },
+ 'includes': [
+ '../third_party/openh264/openh264_args.gypi',
+ ],
+ 'targets': [
+ {
+ 'target_name': 'All',
+ 'type': 'none',
+ 'xcode_create_dependents_test_runner': 1,
+ 'dependencies': [
+ '<@(app_targets)',
+ 'some.gyp:*',
+ '../base/base.gyp:*',
+ '../components/components.gyp:*',
+ '../components/components_tests.gyp:*',
+ '../crypto/crypto.gyp:*',
+ '../net/net.gyp:*',
+ '../sdch/sdch.gyp:*',
+ '../sql/sql.gyp:*',
+ '../testing/gmock.gyp:*',
+ '../testing/gtest.gyp:*',
+ '../third_party/boringssl/boringssl.gyp:*',
+ '../third_party/icu/icu.gyp:*',
+ '../third_party/libxml/libxml.gyp:*',
+ '../third_party/sqlite/sqlite.gyp:*',
+ '../third_party/zlib/zlib.gyp:*',
+ '../ui/accessibility/accessibility.gyp:*',
+ '../ui/base/ui_base.gyp:*',
+ '../ui/display/display.gyp:display_unittests',
+ '../ui/snapshot/snapshot.gyp:*',
+ '../url/url.gyp:*',
+ ],
+ 'conditions': [
+ ['OS!="ios" and OS!="mac"', {
+ 'dependencies': [
+ '../ui/touch_selection/ui_touch_selection.gyp:*',
+ ],
+ }],
+ ['OS=="ios"', {
+ 'dependencies': [
+ '../ios/ios.gyp:*',
+ # NOTE: This list of targets is present because
+ # mojo_base.gyp:mojo_base cannot be built on iOS, as
+ # javascript-related targets cause v8 to be built.
+ # TODO(crbug.com/605508): http://crrev.com/1832703002 introduced
+ # a dependency on //third_party/WebKit that cause build failures
+ # when using Xcode version of clang (loading clang plugin fails).
+ # '../mojo/mojo_base.gyp:mojo_common_lib',
+ # '../mojo/mojo_base.gyp:mojo_common_unittests',
+ # '../mojo/mojo_edk.gyp:mojo_system_impl',
+ # '../mojo/mojo_edk_tests.gyp:mojo_public_bindings_unittests',
+ # '../mojo/mojo_edk_tests.gyp:mojo_public_system_unittests',
+ # '../mojo/mojo_edk_tests.gyp:mojo_system_unittests',
+ # '../mojo/mojo_public.gyp:mojo_cpp_bindings',
+ # '../mojo/mojo_public.gyp:mojo_public_test_utils',
+ # '../mojo/mojo_public.gyp:mojo_system',
+ '../google_apis/google_apis.gyp:google_apis_unittests',
+ '../skia/skia_tests.gyp:skia_unittests',
+ '../ui/base/ui_base_tests.gyp:ui_base_unittests',
+ '../ui/gfx/gfx_tests.gyp:gfx_unittests',
+ ],
+ }, { # 'OS!="ios"
+ 'dependencies': [
+ '../content/content.gyp:*',
+ '../device/bluetooth/bluetooth.gyp:*',
+ '../device/device_tests.gyp:*',
+ ],
+ }],
+ ['OS=="android"', {
+ 'dependencies': [
+ '../content/content_shell_and_tests.gyp:content_shell_apk',
+ '<@(android_app_targets)',
+ 'android_builder_tests',
+ '../third_party/catapult/telemetry/telemetry.gyp:*#host',
+ # TODO(nyquist) This should instead by a target for sync when all of
+ # the sync-related code for Android has been upstreamed.
+ # See http://crbug.com/159203
+ '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_javalib',
+ ],
+ 'conditions': [
+ ['chromecast==0', {
+ 'dependencies': [
+ '../android_webview/android_webview.gyp:android_webview_apk',
+ '../android_webview/android_webview_shell.gyp:system_webview_shell_apk',
+ '../chrome/android/chrome_apk.gyp:chrome_public_apk',
+ '../chrome/android/chrome_apk.gyp:chrome_sync_shell_apk',
+ ],
+ }],
+ ['chromecast==0 and use_webview_internal_framework==0', {
+ 'dependencies': [
+ '../android_webview/android_webview.gyp:system_webview_apk',
+ ],
+ }],
+ # TODO: Enable packed relocations for x64. See: b/20532404
+ ['target_arch != "x64"', {
+ 'dependencies': [
+ '../third_party/android_platform/relocation_packer.gyp:android_relocation_packer_unittests#host',
+ ],
+ }],
+ ],
+ }, {
+ 'dependencies': [
+ # TODO: This should build on Android and the target should move to the list above.
+ '../sync/sync.gyp:*',
+ ],
+ 'conditions': [
+ ['OS!="ios"', {
+ 'dependencies': [
+ '../content/content_shell_and_tests.gyp:*',
+ ],
+ }],
+ ],
+ }],
+ ['OS!="ios" and OS!="android" and chromecast==0', {
+ 'dependencies': [
+ '../third_party/re2/re2.gyp:re2',
+ '../chrome/chrome.gyp:*',
+ '../cc/blink/cc_blink_tests.gyp:*',
+ '../cc/cc_tests.gyp:*',
+ '../device/usb/usb.gyp:*',
+ '../extensions/extensions.gyp:*',
+ '../extensions/extensions_tests.gyp:*',
+ '../gin/gin.gyp:*',
+ '../gpu/gpu.gyp:*',
+ '../gpu/tools/tools.gyp:*',
+ '../ipc/ipc.gyp:*',
+ '../ipc/mojo/ipc_mojo.gyp:*',
+ '../jingle/jingle.gyp:*',
+ '../media/cast/cast.gyp:*',
+ '../media/media.gyp:*',
+ '../media/midi/midi.gyp:*',
+ '../mojo/mojo.gyp:*',
+ '../mojo/mojo_base.gyp:*',
+ '../ppapi/ppapi.gyp:*',
+ '../ppapi/ppapi_internal.gyp:*',
+ '../ppapi/tools/ppapi_tools.gyp:*',
+ '../services/shell/shell.gyp:*',
+ '../skia/skia.gyp:*',
+ '../sync/tools/sync_tools.gyp:*',
+ '../third_party/catapult/telemetry/telemetry.gyp:*',
+ '../third_party/WebKit/public/all.gyp:*',
+ '../third_party/cacheinvalidation/cacheinvalidation.gyp:*',
+ '../third_party/codesighs/codesighs.gyp:*',
+ '../third_party/ffmpeg/ffmpeg.gyp:*',
+ '../third_party/iccjpeg/iccjpeg.gyp:*',
+ '../third_party/libpng/libpng.gyp:*',
+ '../third_party/libusb/libusb.gyp:*',
+ '../third_party/libwebp/libwebp.gyp:*',
+ '../third_party/libxslt/libxslt.gyp:*',
+ '../third_party/lzma_sdk/lzma_sdk.gyp:*',
+ '../third_party/mesa/mesa.gyp:*',
+ '../third_party/modp_b64/modp_b64.gyp:*',
+ '../third_party/ots/ots.gyp:*',
+ '../third_party/pdfium/samples/samples.gyp:*',
+ '../third_party/qcms/qcms.gyp:*',
+ '../tools/battor_agent/battor_agent.gyp:*',
+ '../tools/gn/gn.gyp:*',
+ '../tools/perf/clear_system_cache/clear_system_cache.gyp:*',
+ '../v8/src/v8.gyp:*',
+ '<(libjpeg_gyp_path):*',
+ ],
+ }],
+ ['OS=="win" or OS=="ios" or OS=="linux"', {
+ 'dependencies': [
+ '../breakpad/breakpad.gyp:*',
+ ],
+ }],
+ ['OS=="mac"', {
+ 'dependencies': [
+ '../sandbox/sandbox.gyp:*',
+ '../third_party/crashpad/crashpad/crashpad.gyp:*',
+ '../third_party/ocmock/ocmock.gyp:*',
+ ],
+ 'conditions': [
+ ['enable_ipc_fuzzer==1', {
+ 'dependencies': [
+ '../tools/ipc_fuzzer/ipc_fuzzer.gyp:*',
+ ],
+ }],
+ ],
+ }],
+ ['OS=="linux"', {
+ 'dependencies': [
+ '../courgette/courgette.gyp:*',
+ '../sandbox/sandbox.gyp:*',
+ ],
+ 'conditions': [
+ ['branding=="Chrome"', {
+ 'dependencies': [
+ '../chrome/chrome.gyp:linux_packages_<(channel)',
+ ],
+ }],
+ ['enable_ipc_fuzzer==1', {
+ 'dependencies': [
+ '../tools/ipc_fuzzer/ipc_fuzzer.gyp:*',
+ ],
+ }],
+ ['use_dbus==1', {
+ 'dependencies': [
+ '../dbus/dbus.gyp:*',
+ ],
+ }],
+ ],
+ }],
+ ['chromecast==1', {
+ 'dependencies': [
+ '../chromecast/chromecast.gyp:*',
+ ],
+ }],
+ ['use_x11==1', {
+ 'dependencies': [
+ '../tools/xdisplaycheck/xdisplaycheck.gyp:*',
+ ],
+ }],
+ ['OS=="win"', {
+ 'dependencies': [
+ '../chrome_elf/chrome_elf.gyp:*',
+ '../courgette/courgette.gyp:*',
+ '../rlz/rlz.gyp:*',
+ '../sandbox/sandbox.gyp:*',
+ '<(angle_path)/src/angle.gyp:*',
+ '../third_party/bspatch/bspatch.gyp:*',
+ '../tools/win/static_initializers/static_initializers.gyp:*',
+ ],
+ }],
+ ['toolkit_views==1', {
+ 'dependencies': [
+ '../ui/views/controls/webview/webview.gyp:*',
+ '../ui/views/views.gyp:*',
+ ],
+ }],
+ ['use_aura==1', {
+ 'dependencies': [
+ '../ash/ash.gyp:*',
+ '../ui/aura/aura.gyp:*',
+ '../ui/aura_extra/aura_extra.gyp:*',
+ ],
+ }],
+ ['remoting==1', {
+ 'dependencies': [
+ '../remoting/remoting_all.gyp:remoting_all',
+ ],
+ }],
+ ['OS!="ios"', {
+ 'dependencies': [
+ '../third_party/boringssl/boringssl_tests.gyp:*',
+ ],
+ }],
+ ['enable_app_list==1', {
+ 'dependencies': [
+ '../ui/app_list/app_list.gyp:*',
+ ],
+ }],
+ ['OS!="android" and OS!="ios"', {
+ 'dependencies': [
+ '../google_apis/gcm/gcm.gyp:*',
+ ],
+ }],
+ ['(chromeos==1 or OS=="linux" or OS=="win" or OS=="mac") and chromecast==0', {
+ 'dependencies': [
+ '../extensions/shell/app_shell.gyp:*',
+ ],
+ }],
+ ['envoy==1', {
+ 'dependencies': [
+ '../envoy/envoy.gyp:*',
+ ],
+ }],
+ ['use_openh264==1', {
+ 'dependencies': [
+ '../third_party/openh264/openh264.gyp:*',
+ ],
+ }],
+ ['enable_basic_printing==1 or enable_print_preview==1', {
+ 'dependencies': [
+ '../printing/printing.gyp:*',
+ ],
+ }],
+ ],
+ }, # target_name: All
+ {
+ 'target_name': 'All_syzygy',
+ 'type': 'none',
+ 'conditions': [
+ ['OS=="win" and fastbuild==0 and target_arch=="ia32" and '
+ '(syzyasan==1 or syzygy_optimize==1)', {
+ 'dependencies': [
+ '../chrome/installer/mini_installer_syzygy.gyp:*',
+ ],
+ }],
+ ],
+ }, # target_name: All_syzygy
+ {
+ # Note: Android uses android_builder_tests below.
+ # TODO: Consider merging that with this target.
+ 'target_name': 'chromium_builder_tests',
+ 'type': 'none',
+ 'dependencies': [
+ '../base/base.gyp:base_unittests',
+ '../components/components_tests.gyp:components_unittests',
+ '../crypto/crypto.gyp:crypto_unittests',
+ '../net/net.gyp:net_unittests',
+ '../skia/skia_tests.gyp:skia_unittests',
+ '../sql/sql.gyp:sql_unittests',
+ '../sync/sync.gyp:sync_unit_tests',
+ '../ui/base/ui_base_tests.gyp:ui_base_unittests',
+ '../ui/display/display.gyp:display_unittests',
+ '../ui/gfx/gfx_tests.gyp:gfx_unittests',
+ '../url/url.gyp:url_unittests',
+ ],
+ 'conditions': [
+ ['OS!="ios"', {
+ 'dependencies': [
+ '../ui/gl/gl_tests.gyp:gl_unittests',
+ '../url/ipc/url_ipc.gyp:url_ipc_unittests',
+ ],
+ }],
+ ['OS!="ios" and OS!="mac"', {
+ 'dependencies': [
+ '../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests',
+ ],
+ }],
+ ['OS!="ios" and OS!="android"', {
+ 'dependencies': [
+ '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests',
+ '../cc/cc_tests.gyp:cc_unittests',
+ '../content/content_shell_and_tests.gyp:content_browsertests',
+ '../content/content_shell_and_tests.gyp:content_shell',
+ '../content/content_shell_and_tests.gyp:content_unittests',
+ '../device/device_tests.gyp:device_unittests',
+ '../gin/gin.gyp:gin_unittests',
+ '../google_apis/google_apis.gyp:google_apis_unittests',
+ '../gpu/gles2_conform_support/gles2_conform_support.gyp:gles2_conform_support',
+ '../gpu/gpu.gyp:gpu_unittests',
+ '../ipc/ipc.gyp:ipc_tests',
+ '../ipc/mojo/ipc_mojo.gyp:ipc_mojo_unittests',
+ '../jingle/jingle.gyp:jingle_unittests',
+ '../media/cast/cast.gyp:cast_unittests',
+ '../media/media.gyp:media_unittests',
+ '../media/midi/midi.gyp:midi_unittests',
+ '../mojo/mojo.gyp:mojo',
+ '../ppapi/ppapi_internal.gyp:ppapi_unittests',
+ '../remoting/remoting.gyp:remoting_unittests',
+ '../third_party/catapult/telemetry/telemetry.gyp:*',
+ '../third_party/WebKit/public/all.gyp:all_blink',
+ '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_unittests',
+ '../third_party/leveldatabase/leveldatabase.gyp:env_chromium_unittests',
+ '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput_unittests',
+ '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests',
+ ],
+ }],
+ ['OS!="ios" and OS!="android" and chromecast==0', {
+ 'dependencies': [
+ '../chrome/chrome.gyp:browser_tests',
+ '../chrome/chrome.gyp:chromedriver_tests',
+ '../chrome/chrome.gyp:chromedriver_unittests',
+ '../chrome/chrome.gyp:interactive_ui_tests',
+ '../chrome/chrome.gyp:sync_integration_tests',
+ '../chrome/chrome.gyp:unit_tests',
+ '../extensions/extensions_tests.gyp:extensions_browsertests',
+ '../extensions/extensions_tests.gyp:extensions_unittests',
+ ],
+ }],
+ ['OS=="win"', {
+ 'dependencies': [
+ '../chrome/chrome.gyp:installer_util_unittests',
+ '../chrome/chrome.gyp:setup_unittests',
+ # ../chrome/test/mini_installer requires mini_installer.
+ '../chrome/installer/mini_installer.gyp:mini_installer',
+ '../chrome_elf/chrome_elf.gyp:chrome_elf_unittests',
+ '../courgette/courgette.gyp:courgette_unittests',
+ '../sandbox/sandbox.gyp:sbox_integration_tests',
+ '../sandbox/sandbox.gyp:sbox_unittests',
+ '../sandbox/sandbox.gyp:sbox_validation_tests',
+ ],
+ 'conditions': [
+ # remoting_host_installation uses lots of non-trivial GYP that tend
+ # to break because of differences between ninja and msbuild. Make
+ # sure this target is built by the builders on the main waterfall.
+ # See http://crbug.com/180600.
+ ['wix_exists == "True" and sas_dll_exists == "True"', {
+ 'dependencies': [
+ '../remoting/remoting.gyp:remoting_host_installation',
+ ],
+ }],
+ ['syzyasan==1', {
+ 'variables': {
+ # Disable incremental linking for all modules.
+ # 0: inherit, 1: disabled, 2: enabled.
+ 'msvs_debug_link_incremental': '1',
+ 'msvs_large_module_debug_link_mode': '1',
+ # Disable RTC. Syzygy explicitly doesn't support RTC
+ # instrumented binaries for now.
+ 'win_debug_RuntimeChecks': '0',
+ },
+ 'defines': [
+ # Disable iterator debugging (huge speed boost).
+ '_HAS_ITERATOR_DEBUGGING=0',
+ ],
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ # Enable profile information (necessary for SyzyAsan
+ # instrumentation). This is incompatible with incremental
+ # linking.
+ 'Profile': 'true',
+ },
+ }
+ }],
+ ['component!="shared_library" or target_arch!="ia32"', {
+ 'dependencies': [
+ '../chrome/installer/mini_installer.gyp:next_version_mini_installer',
+ ],
+ }],
+ ],
+ }],
+ ['chromeos==1', {
+ 'dependencies': [
+ '../ui/chromeos/ui_chromeos.gyp:ui_chromeos_unittests',
+ '../ui/arc/arc.gyp:ui_arc_unittests',
+ ],
+ }],
+ ['OS=="linux"', {
+ 'dependencies': [
+ '../sandbox/sandbox.gyp:sandbox_linux_unittests',
+ ],
+ }],
+ ['OS=="linux" and use_dbus==1', {
+ 'dependencies': [
+ '../dbus/dbus.gyp:dbus_unittests',
+ ],
+ }],
+ ['OS=="mac"', {
+ 'dependencies': [
+ '../ui/message_center/message_center.gyp:*',
+ ],
+ }],
+ ['test_isolation_mode != "noop"', {
+ 'dependencies': [
+ 'chromium_swarm_tests',
+ ],
+ }],
+ ['OS!="android"', {
+ 'dependencies': [
+ '../google_apis/gcm/gcm.gyp:gcm_unit_tests',
+ ],
+ }],
+ ['enable_basic_printing==1 or enable_print_preview==1', {
+ 'dependencies': [
+ '../printing/printing.gyp:printing_unittests',
+ ],
+ }],
+ ['enable_app_list==1', {
+ 'dependencies': [
+ '../ui/app_list/app_list.gyp:app_list_unittests',
+ ],
+ }],
+ ['enable_app_list==1 and use_aura==1', {
+ 'dependencies': [
+ '../ui/app_list/presenter/app_list_presenter.gyp:app_list_presenter_unittests',
+ ],
+ }],
+ ['use_aura==1', {
+ 'dependencies': [
+ '../ash/ash.gyp:ash_unittests',
+ '../ui/aura/aura.gyp:aura_unittests',
+ '../ui/compositor/compositor.gyp:compositor_unittests',
+ ],
+ }],
+ ['use_aura==1 and chromecast==0', {
+ 'dependencies': [
+ '../ui/keyboard/keyboard.gyp:keyboard_unittests',
+ '../ui/views/views.gyp:views_unittests',
+ ],
+ }],
+ ['use_aura==1 or toolkit_views==1', {
+ 'dependencies': [
+ '../ui/events/events_unittests.gyp:events_unittests',
+ ],
+ }],
+ ['disable_nacl==0', {
+ 'dependencies': [
+ '../components/nacl.gyp:nacl_loader_unittests',
+ ],
+ }],
+ ['disable_nacl==0 and disable_nacl_untrusted==0 and enable_nacl_nonsfi_test==1', {
+ 'dependencies': [
+ '../components/nacl.gyp:nacl_helper_nonsfi_unittests',
+ ],
+ }],
+ ],
+ }, # target_name: chromium_builder_tests
+ ],
+ 'conditions': [
+ # TODO(GYP): make gn_migration.gypi work unconditionally.
+ ['OS=="mac" or OS=="win" or (OS=="android" and chromecast==0) or (OS=="linux" and target_arch=="x64" and chromecast==0)', {
+ 'includes': [
+ 'gn_migration.gypi',
+ ],
+ }],
+ ['OS!="ios"', {
+ 'targets': [
+ {
+ 'target_name': 'blink_tests',
+ 'type': 'none',
+ 'dependencies': [
+ '../third_party/WebKit/public/all.gyp:all_blink',
+ ],
+ 'conditions': [
+ ['OS=="android"', {
+ 'dependencies': [
+ '../content/content_shell_and_tests.gyp:content_shell_apk',
+ '../breakpad/breakpad.gyp:dump_syms#host',
+ '../breakpad/breakpad.gyp:minidump_stackwalk#host',
+ '../tools/imagediff/image_diff.gyp:image_diff#host',
+ ],
+ }, { # OS!="android"
+ 'dependencies': [
+ '../content/content_shell_and_tests.gyp:content_shell',
+ '../tools/imagediff/image_diff.gyp:image_diff',
+ ],
+ }],
+ ['OS=="win"', {
+ 'dependencies': [
+ '../components/test_runner/test_runner.gyp:layout_test_helper',
+ '../content/content_shell_and_tests.gyp:content_shell_crash_service',
+ ],
+ }],
+ ['OS!="win" and OS!="android"', {
+ 'dependencies': [
+ '../breakpad/breakpad.gyp:minidump_stackwalk',
+ ],
+ }],
+ ['OS=="mac"', {
+ 'dependencies': [
+ '../components/test_runner/test_runner.gyp:layout_test_helper',
+ '../breakpad/breakpad.gyp:dump_syms#host',
+ ],
+ }],
+ ['OS=="linux"', {
+ 'dependencies': [
+ '../breakpad/breakpad.gyp:dump_syms#host',
+ ],
+ }],
+ ],
+ }, # target_name: blink_tests
+ ],
+ }], # OS!=ios
+ ['OS!="ios" and OS!="android" and chromecast==0', {
+ 'targets': [
+ {
+ 'target_name': 'chromium_builder_nacl_win_integration',
+ 'type': 'none',
+ 'dependencies': [
+ 'chromium_builder_tests',
+ ],
+ }, # target_name: chromium_builder_nacl_win_integration
+ {
+ 'target_name': 'chromium_builder_perf',
+ 'type': 'none',
+ 'dependencies': [
+ '../cc/cc_tests.gyp:cc_perftests',
+ '../chrome/chrome.gyp:chrome',
+ '../chrome/chrome.gyp:load_library_perf_tests',
+ '../chrome/chrome.gyp:performance_browser_tests',
+ '../chrome/chrome.gyp:sync_performance_tests',
+ '../gpu/gpu.gyp:gpu_perftests',
+ '../media/media.gyp:media_perftests',
+ '../media/midi/midi.gyp:midi_unittests',
+ '../tools/perf/clear_system_cache/clear_system_cache.gyp:*',
+ '../third_party/catapult/telemetry/telemetry.gyp:*',
+ ],
+ 'conditions': [
+ ['OS!="ios" and OS!="win"', {
+ 'dependencies': [
+ '../breakpad/breakpad.gyp:minidump_stackwalk',
+ ],
+ }],
+ ['OS=="linux"', {
+ 'dependencies': [
+ '../chrome/chrome.gyp:linux_symbols'
+ ],
+ }],
+ ['OS=="win"', {
+ 'dependencies': [
+ '../chrome/installer/mini_installer.gyp:mini_installer',
+ '../gpu/gpu.gyp:angle_perftests',
+ ],
+ }],
+ ],
+ }, # target_name: chromium_builder_perf
+ {
+ 'target_name': 'chromium_gpu_builder',
+ 'type': 'none',
+ 'dependencies': [
+ '../chrome/chrome.gyp:chrome',
+ '../chrome/chrome.gyp:performance_browser_tests',
+ '../content/content_shell_and_tests.gyp:content_browsertests',
+ '../gpu/gles2_conform_support/gles2_conform_test.gyp:gles2_conform_test',
+ '../gpu/khronos_glcts_support/khronos_glcts_test.gyp:khronos_glcts_test',
+ '../gpu/gpu.gyp:gl_tests',
+ '../gpu/gpu.gyp:angle_unittests',
+ '../gpu/gpu.gyp:gpu_unittests',
+ '../gpu/gpu.gyp:command_buffer_gles2_tests',
+ '../third_party/catapult/telemetry/telemetry.gyp:*',
+ ],
+ 'conditions': [
+ ['OS!="ios" and OS!="win"', {
+ 'dependencies': [
+ '../breakpad/breakpad.gyp:minidump_stackwalk',
+ ],
+ }],
+ ['OS=="linux"', {
+ 'dependencies': [
+ '../chrome/chrome.gyp:linux_symbols'
+ ],
+ }],
+ ],
+ }, # target_name: chromium_gpu_builder
+ {
+ 'target_name': 'chromium_gpu_debug_builder',
+ 'type': 'none',
+ 'dependencies': [
+ '../chrome/chrome.gyp:chrome',
+ '../content/content_shell_and_tests.gyp:content_browsertests',
+ '../gpu/gles2_conform_support/gles2_conform_test.gyp:gles2_conform_test',
+ '../gpu/khronos_glcts_support/khronos_glcts_test.gyp:khronos_glcts_test',
+ '../gpu/gpu.gyp:gl_tests',
+ '../gpu/gpu.gyp:angle_unittests',
+ '../gpu/gpu.gyp:gpu_unittests',
+ '../gpu/gpu.gyp:command_buffer_gles2_tests',
+ '../third_party/catapult/telemetry/telemetry.gyp:*',
+ ],
+ 'conditions': [
+ ['OS!="ios" and OS!="win"', {
+ 'dependencies': [
+ '../breakpad/breakpad.gyp:minidump_stackwalk',
+ ],
+ }],
+ ['OS=="linux"', {
+ 'dependencies': [
+ '../chrome/chrome.gyp:linux_symbols'
+ ],
+ }],
+ ],
+ }, # target_name: chromium_gpu_debug_builder
+ {
+ # This target contains everything we need to run tests on the special
+ # device-equipped WebRTC bots. We have device-requiring tests in
+ # browser_tests and content_browsertests.
+ 'target_name': 'chromium_builder_webrtc',
+ 'type': 'none',
+ 'dependencies': [
+ 'chromium_builder_perf',
+ '../chrome/chrome.gyp:browser_tests',
+ '../content/content_shell_and_tests.gyp:content_browsertests',
+ '../content/content_shell_and_tests.gyp:content_unittests',
+ '../media/media.gyp:media_unittests',
+ '../media/midi/midi.gyp:midi_unittests',
+ '../third_party/webrtc/tools/tools.gyp:frame_analyzer',
+ '../third_party/webrtc/tools/tools.gyp:rgba_to_i420_converter',
+ ],
+ 'conditions': [
+ ['remoting==1', {
+ 'dependencies': [
+ '../remoting/remoting.gyp:*',
+ ],
+ }],
+ ],
+ }, # target_name: chromium_builder_webrtc
+ {
+ 'target_name': 'chromium_builder_chromedriver',
+ 'type': 'none',
+ 'dependencies': [
+ '../chrome/chrome.gyp:chromedriver',
+ '../chrome/chrome.gyp:chromedriver_tests',
+ '../chrome/chrome.gyp:chromedriver_unittests',
+ ],
+ }, # target_name: chromium_builder_chromedriver
+ {
+ 'target_name': 'chromium_builder_asan',
+ 'type': 'none',
+ 'dependencies': [
+ '../chrome/chrome.gyp:chrome',
+
+ # We refer to content_shell directly rather than blink_tests
+ # because we don't want the _unittests binaries.
+ '../content/content_shell_and_tests.gyp:content_shell',
+ ],
+ 'conditions': [
+ ['OS!="win"', {
+ 'dependencies': [
+ '../net/net.gyp:hpack_fuzz_wrapper',
+ '../net/net.gyp:dns_fuzz_stub',
+ '../skia/skia.gyp:filter_fuzz_stub',
+ ],
+ }],
+ ['enable_ipc_fuzzer==1 and component!="shared_library" and '
+ '(OS=="linux" or OS=="win" or OS=="mac")', {
+ 'dependencies': [
+ '../tools/ipc_fuzzer/ipc_fuzzer.gyp:*',
+ ],
+ }],
+ ['chromeos==0', {
+ 'dependencies': [
+ '../v8/samples/samples.gyp:v8_shell#host',
+ '../third_party/pdfium/samples/samples.gyp:pdfium_test',
+ ],
+ }],
+ ['internal_filter_fuzzer==1', {
+ 'dependencies': [
+ '../skia/tools/clusterfuzz-data/fuzzers/filter_fuzzer/filter_fuzzer.gyp:filter_fuzzer',
+ ],
+ }], # internal_filter_fuzzer
+ ['clang==1', {
+ 'dependencies': [
+ 'sanitizers/sanitizers.gyp:llvm-symbolizer',
+ ],
+ }],
+ ['OS=="win" and fastbuild==0 and target_arch=="ia32" and syzyasan==1', {
+ 'dependencies': [
+ '../chrome/chrome_syzygy.gyp:chrome_dll_syzygy',
+ '../content/content_shell_and_tests.gyp:content_shell_syzyasan',
+ ],
+ 'conditions': [
+ ['chrome_multiple_dll==1', {
+ 'dependencies': [
+ '../chrome/chrome_syzygy.gyp:chrome_child_dll_syzygy',
+ ],
+ }],
+ ],
+ }],
+ ],
+ },
+ {
+ 'target_name': 'chromium_builder_nacl_sdk',
+ 'type': 'none',
+ 'dependencies': [
+ '../chrome/chrome.gyp:chrome',
+ ],
+ 'conditions': [
+ ['OS=="win"', {
+ 'dependencies': [
+ '../chrome/chrome.gyp:chrome_nacl_win64',
+ ]
+ }],
+ ],
+ }, #target_name: chromium_builder_nacl_sdk
+ ], # targets
+ }], #OS!=ios and OS!=android
+ ['OS=="android"', {
+ 'targets': [
+ {
+ # The current list of tests for android. This is temporary
+ # until the full set supported.
+ #
+ # WARNING:
+ # Do not add targets here without communicating the implications
+ # on tryserver triggers and load. Discuss with
+ # chrome-infrastructure-team please.
+ 'target_name': 'android_builder_tests',
+ 'type': 'none',
+ 'dependencies': [
+ '../base/android/jni_generator/jni_generator.gyp:jni_generator_tests',
+ '../base/base.gyp:base_unittests',
+ '../breakpad/breakpad.gyp:breakpad_unittests_deps',
+ # Also compile the tools needed to deal with minidumps, they are
+ # needed to run minidump tests upstream.
+ '../breakpad/breakpad.gyp:dump_syms#host',
+ '../breakpad/breakpad.gyp:symupload#host',
+ '../breakpad/breakpad.gyp:minidump_dump#host',
+ '../breakpad/breakpad.gyp:minidump_stackwalk#host',
+ '../build/android/pylib/device/commands/commands.gyp:chromium_commands',
+ '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests',
+ '../cc/cc_tests.gyp:cc_perftests_apk',
+ '../cc/cc_tests.gyp:cc_unittests',
+ '../components/components_tests.gyp:components_unittests',
+ '../content/content_shell_and_tests.gyp:content_browsertests',
+ '../content/content_shell_and_tests.gyp:content_junit_tests',
+ '../content/content_shell_and_tests.gyp:chromium_linker_test_apk',
+ '../content/content_shell_and_tests.gyp:content_shell_test_apk',
+ '../content/content_shell_and_tests.gyp:content_unittests',
+ '../gpu/gpu.gyp:gl_tests',
+ '../gpu/gpu.gyp:gpu_perftests_apk',
+ '../gpu/gpu.gyp:gpu_unittests',
+ '../ipc/ipc.gyp:ipc_tests',
+ '../media/media.gyp:media_perftests_apk',
+ '../media/media.gyp:media_unittests',
+ '../media/midi/midi.gyp:midi_unittests_apk',
+ '../media/midi/midi.gyp:midi_unittests',
+ '../net/net.gyp:net_unittests',
+ '../sandbox/sandbox.gyp:sandbox_linux_unittests_deps',
+ '../skia/skia_tests.gyp:skia_unittests',
+ '../sql/sql.gyp:sql_unittests',
+ '../sync/sync.gyp:sync_unit_tests',
+ '../testing/android/junit/junit_test.gyp:junit_unit_tests',
+ '../third_party/leveldatabase/leveldatabase.gyp:env_chromium_unittests',
+ '../third_party/WebKit/public/all.gyp:*',
+ '../tools/android/android_tools.gyp:android_tools',
+ '../tools/android/android_tools.gyp:memconsumer',
+ '../tools/android/android_tools.gyp:push_apps_to_background',
+ '../tools/android/findbugs_plugin/findbugs_plugin.gyp:findbugs_plugin_test',
+ '../tools/cygprofile/cygprofile.gyp:cygprofile_unittests',
+ '../ui/android/ui_android.gyp:ui_android_unittests',
+ '../ui/base/ui_base_tests.gyp:ui_base_unittests',
+ '../ui/events/events_unittests.gyp:events_unittests',
+ '../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests',
+ # Unit test bundles packaged as an apk.
+ '../base/base.gyp:base_unittests_apk',
+ '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests_apk',
+ '../cc/cc_tests.gyp:cc_unittests_apk',
+ '../components/components_tests.gyp:components_browsertests_apk',
+ '../components/components_tests.gyp:components_unittests_apk',
+ '../content/content_shell_and_tests.gyp:content_browsertests_apk',
+ '../content/content_shell_and_tests.gyp:content_unittests_apk',
+ '../gpu/gpu.gyp:command_buffer_gles2_tests_apk',
+ '../gpu/gpu.gyp:gl_tests_apk',
+ '../gpu/gpu.gyp:gpu_unittests_apk',
+ '../ipc/ipc.gyp:ipc_tests_apk',
+ '../media/media.gyp:media_unittests_apk',
+ '../media/media.gyp:video_decode_accelerator_unittest_apk',
+ '../media/midi/midi.gyp:midi_unittests_apk',
+ '../net/net.gyp:net_unittests_apk',
+ '../skia/skia_tests.gyp:skia_unittests_apk',
+ '../sql/sql.gyp:sql_unittests_apk',
+ '../sync/sync.gyp:sync_unit_tests_apk',
+ '../tools/android/heap_profiler/heap_profiler.gyp:heap_profiler_unittests_apk',
+ '../ui/android/ui_android.gyp:ui_android_unittests_apk',
+ '../ui/android/ui_android.gyp:ui_junit_tests',
+ '../ui/base/ui_base_tests.gyp:ui_base_unittests_apk',
+ '../ui/events/events_unittests.gyp:events_unittests_apk',
+ '../ui/gfx/gfx_tests.gyp:gfx_unittests_apk',
+ '../ui/gl/gl_tests.gyp:gl_unittests_apk',
+ '../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests_apk',
+ ],
+ 'conditions': [
+ ['chromecast==0', {
+ 'dependencies': [
+ '../android_webview/android_webview.gyp:android_webview_unittests',
+ '../chrome/chrome.gyp:unit_tests',
+ # Unit test bundles packaged as an apk.
+ '../android_webview/android_webview.gyp:android_webview_test_apk',
+ '../android_webview/android_webview.gyp:android_webview_unittests_apk',
+ '../android_webview/android_webview_shell.gyp:system_webview_shell_layout_test_apk',
+ '../android_webview/android_webview_shell.gyp:system_webview_shell_page_cycler_apk',
+ '../chrome/android/chrome_apk.gyp:chrome_public_test_apk',
+ '../chrome/android/chrome_apk.gyp:chrome_sync_shell_test_apk',
+ '../chrome/chrome.gyp:chrome_junit_tests',
+ '../chrome/chrome.gyp:chromedriver_webview_shell_apk',
+ '../chrome/chrome.gyp:unit_tests_apk',
+ '../third_party/custom_tabs_client/custom_tabs_client.gyp:custom_tabs_client_example_apk',
+ ],
+ }],
+ ],
+ },
+ {
+ # WebRTC Chromium tests to run on Android.
+ 'target_name': 'android_builder_chromium_webrtc',
+ 'type': 'none',
+ 'dependencies': [
+ '../build/android/pylib/device/commands/commands.gyp:chromium_commands',
+ '../content/content_shell_and_tests.gyp:content_browsertests',
+ '../tools/android/android_tools.gyp:android_tools',
+ '../tools/android/android_tools.gyp:memconsumer',
+ '../content/content_shell_and_tests.gyp:content_browsertests_apk',
+ ],
+ }, # target_name: android_builder_chromium_webrtc
+ ], # targets
+ }], # OS="android"
+ ['OS=="mac"', {
+ 'targets': [
+ {
+ # Target to build everything plus the dmg. We don't put the dmg
+ # in the All target because developers really don't need it.
+ 'target_name': 'all_and_dmg',
+ 'type': 'none',
+ 'dependencies': [
+ 'All',
+ '../chrome/chrome.gyp:build_app_dmg',
+ ],
+ },
+ # These targets are here so the build bots can use them to build
+ # subsets of a full tree for faster cycle times.
+ {
+ 'target_name': 'chromium_builder_dbg',
+ 'type': 'none',
+ 'dependencies': [
+ '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests',
+ '../cc/cc_tests.gyp:cc_unittests',
+ '../chrome/chrome.gyp:browser_tests',
+ '../chrome/chrome.gyp:interactive_ui_tests',
+ '../chrome/chrome.gyp:sync_integration_tests',
+ '../chrome/chrome.gyp:unit_tests',
+ '../components/components_tests.gyp:components_unittests',
+ '../content/content_shell_and_tests.gyp:content_browsertests',
+ '../content/content_shell_and_tests.gyp:content_unittests',
+ '../device/device_tests.gyp:device_unittests',
+ '../google_apis/gcm/gcm.gyp:gcm_unit_tests',
+ '../gpu/gpu.gyp:gpu_unittests',
+ '../ipc/ipc.gyp:ipc_tests',
+ '../ipc/mojo/ipc_mojo.gyp:ipc_mojo_unittests',
+ '../jingle/jingle.gyp:jingle_unittests',
+ '../media/media.gyp:media_unittests',
+ '../media/midi/midi.gyp:midi_unittests',
+ '../ppapi/ppapi_internal.gyp:ppapi_unittests',
+ '../printing/printing.gyp:printing_unittests',
+ '../remoting/remoting.gyp:remoting_unittests',
+ '../rlz/rlz.gyp:*',
+ '../skia/skia_tests.gyp:skia_unittests',
+ '../sql/sql.gyp:sql_unittests',
+ '../sync/sync.gyp:sync_unit_tests',
+ '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_unittests',
+ '../third_party/leveldatabase/leveldatabase.gyp:env_chromium_unittests',
+ '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput_unittests',
+ '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests',
+ '../tools/perf/clear_system_cache/clear_system_cache.gyp:*',
+ '../third_party/catapult/telemetry/telemetry.gyp:*',
+ '../ui/base/ui_base_tests.gyp:ui_base_unittests',
+ '../ui/gfx/gfx_tests.gyp:gfx_unittests',
+ '../ui/gl/gl_tests.gyp:gl_unittests',
+ '../url/url.gyp:url_unittests',
+ ],
+ },
+ {
+ 'target_name': 'chromium_builder_rel',
+ 'type': 'none',
+ 'dependencies': [
+ '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests',
+ '../cc/cc_tests.gyp:cc_unittests',
+ '../chrome/chrome.gyp:browser_tests',
+ '../chrome/chrome.gyp:performance_browser_tests',
+ '../chrome/chrome.gyp:sync_integration_tests',
+ '../chrome/chrome.gyp:unit_tests',
+ '../components/components_tests.gyp:components_unittests',
+ '../content/content_shell_and_tests.gyp:content_browsertests',
+ '../content/content_shell_and_tests.gyp:content_unittests',
+ '../device/device_tests.gyp:device_unittests',
+ '../google_apis/gcm/gcm.gyp:gcm_unit_tests',
+ '../gpu/gpu.gyp:gpu_unittests',
+ '../ipc/ipc.gyp:ipc_tests',
+ '../ipc/mojo/ipc_mojo.gyp:ipc_mojo_unittests',
+ '../jingle/jingle.gyp:jingle_unittests',
+ '../media/media.gyp:media_unittests',
+ '../media/midi/midi.gyp:midi_unittests',
+ '../ppapi/ppapi_internal.gyp:ppapi_unittests',
+ '../printing/printing.gyp:printing_unittests',
+ '../remoting/remoting.gyp:remoting_unittests',
+ '../skia/skia_tests.gyp:skia_unittests',
+ '../sql/sql.gyp:sql_unittests',
+ '../sync/sync.gyp:sync_unit_tests',
+ '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_unittests',
+ '../third_party/leveldatabase/leveldatabase.gyp:env_chromium_unittests',
+ '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput_unittests',
+ '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests',
+ '../tools/perf/clear_system_cache/clear_system_cache.gyp:*',
+ '../third_party/catapult/telemetry/telemetry.gyp:*',
+ '../ui/base/ui_base_tests.gyp:ui_base_unittests',
+ '../ui/gfx/gfx_tests.gyp:gfx_unittests',
+ '../ui/gl/gl_tests.gyp:gl_unittests',
+ '../url/url.gyp:url_unittests',
+ ],
+ },
+ {
+ 'target_name': 'chromium_builder_dbg_tsan_mac',
+ 'type': 'none',
+ 'dependencies': [
+ '../base/base.gyp:base_unittests',
+ '../crypto/crypto.gyp:crypto_unittests',
+ '../ipc/ipc.gyp:ipc_tests',
+ '../jingle/jingle.gyp:jingle_unittests',
+ '../media/media.gyp:media_unittests',
+ '../media/midi/midi.gyp:midi_unittests',
+ '../net/net.gyp:net_unittests',
+ '../printing/printing.gyp:printing_unittests',
+ '../remoting/remoting.gyp:remoting_unittests',
+ '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_unittests',
+ '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput_unittests',
+ '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests',
+ '../url/url.gyp:url_unittests',
+ ],
+ },
+ ], # targets
+ }], # OS="mac"
+ ['OS=="win"', {
+ 'targets': [
+ # These targets are here so the build bots can use them to build
+ # subsets of a full tree for faster cycle times.
+ {
+ 'target_name': 'chromium_builder',
+ 'type': 'none',
+ 'dependencies': [
+ '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests',
+ '../cc/cc_tests.gyp:cc_unittests',
+ '../chrome/chrome.gyp:browser_tests',
+ '../chrome/chrome.gyp:gcapi_test',
+ '../chrome/chrome.gyp:installer_util_unittests',
+ '../chrome/chrome.gyp:interactive_ui_tests',
+ '../chrome/chrome.gyp:performance_browser_tests',
+ '../chrome/chrome.gyp:setup_unittests',
+ '../chrome/chrome.gyp:sync_integration_tests',
+ '../chrome/chrome.gyp:unit_tests',
+ '../components/components_tests.gyp:components_unittests',
+ '../content/content_shell_and_tests.gyp:content_browsertests',
+ '../content/content_shell_and_tests.gyp:content_unittests',
+ # ../chrome/test/mini_installer requires mini_installer.
+ '../chrome/installer/mini_installer.gyp:mini_installer',
+ '../courgette/courgette.gyp:courgette_unittests',
+ '../device/device_tests.gyp:device_unittests',
+ '../google_apis/gcm/gcm.gyp:gcm_unit_tests',
+ '../gpu/gpu.gyp:gpu_unittests',
+ '../ipc/ipc.gyp:ipc_tests',
+ '../ipc/mojo/ipc_mojo.gyp:ipc_mojo_unittests',
+ '../jingle/jingle.gyp:jingle_unittests',
+ '../media/media.gyp:media_unittests',
+ '../media/midi/midi.gyp:midi_unittests',
+ '../ppapi/ppapi_internal.gyp:ppapi_unittests',
+ '../printing/printing.gyp:printing_unittests',
+ '../remoting/remoting.gyp:remoting_unittests',
+ '../skia/skia_tests.gyp:skia_unittests',
+ '../sql/sql.gyp:sql_unittests',
+ '../sync/sync.gyp:sync_unit_tests',
+ '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_unittests',
+ '../third_party/leveldatabase/leveldatabase.gyp:env_chromium_unittests',
+ '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput_unittests',
+ '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests',
+ '../tools/perf/clear_system_cache/clear_system_cache.gyp:*',
+ '../third_party/catapult/telemetry/telemetry.gyp:*',
+ '../ui/base/ui_base_tests.gyp:ui_base_unittests',
+ '../ui/events/events_unittests.gyp:events_unittests',
+ '../ui/gfx/gfx_tests.gyp:gfx_unittests',
+ '../ui/gl/gl_tests.gyp:gl_unittests',
+ '../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests',
+ '../ui/views/views.gyp:views_unittests',
+ '../url/url.gyp:url_unittests',
+ ],
+ },
+ {
+ 'target_name': 'chromium_builder_dbg_tsan_win',
+ 'type': 'none',
+ 'dependencies': [
+ '../base/base.gyp:base_unittests',
+ '../components/components_tests.gyp:components_unittests',
+ '../content/content_shell_and_tests.gyp:content_unittests',
+ '../crypto/crypto.gyp:crypto_unittests',
+ '../ipc/ipc.gyp:ipc_tests',
+ '../jingle/jingle.gyp:jingle_unittests',
+ '../media/media.gyp:media_unittests',
+ '../media/midi/midi.gyp:midi_unittests',
+ '../net/net.gyp:net_unittests',
+ '../printing/printing.gyp:printing_unittests',
+ '../remoting/remoting.gyp:remoting_unittests',
+ '../sql/sql.gyp:sql_unittests',
+ '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_unittests',
+ '../third_party/leveldatabase/leveldatabase.gyp:env_chromium_unittests',
+ '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput_unittests',
+ '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests',
+ '../url/url.gyp:url_unittests',
+ ],
+ },
+ {
+ 'target_name': 'chromium_builder_lkgr_drmemory_win',
+ 'type': 'none',
+ 'dependencies': [
+ '../components/test_runner/test_runner.gyp:layout_test_helper',
+ '../content/content_shell_and_tests.gyp:content_shell',
+ '../content/content_shell_and_tests.gyp:content_shell_crash_service',
+ ],
+ },
+ {
+ 'target_name': 'chromium_builder_dbg_drmemory_win',
+ 'type': 'none',
+ 'dependencies': [
+ '../base/base.gyp:base_unittests',
+ '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests',
+ '../cc/cc_tests.gyp:cc_unittests',
+ '../chrome/chrome.gyp:browser_tests',
+ '../chrome/chrome.gyp:chrome_app_unittests',
+ '../chrome/chrome.gyp:chromedriver_unittests',
+ '../chrome/chrome.gyp:installer_util_unittests',
+ '../chrome/chrome.gyp:setup_unittests',
+ '../chrome/chrome.gyp:unit_tests',
+ '../chrome_elf/chrome_elf.gyp:chrome_elf_unittests',
+ '../components/components_tests.gyp:components_unittests',
+ '../components/test_runner/test_runner.gyp:layout_test_helper',
+ '../content/content_shell_and_tests.gyp:content_browsertests',
+ '../content/content_shell_and_tests.gyp:content_shell',
+ '../content/content_shell_and_tests.gyp:content_shell_crash_service',
+ '../content/content_shell_and_tests.gyp:content_unittests',
+ '../courgette/courgette.gyp:courgette_unittests',
+ '../crypto/crypto.gyp:crypto_unittests',
+ '../device/device_tests.gyp:device_unittests',
+ '../extensions/extensions_tests.gyp:extensions_browsertests',
+ '../extensions/extensions_tests.gyp:extensions_unittests',
+ '../gin/gin.gyp:gin_shell',
+ '../gin/gin.gyp:gin_unittests',
+ '../google_apis/gcm/gcm.gyp:gcm_unit_tests',
+ '../google_apis/google_apis.gyp:google_apis_unittests',
+ '../gpu/gpu.gyp:angle_unittests',
+ '../gpu/gpu.gyp:gpu_unittests',
+ '../ipc/ipc.gyp:ipc_tests',
+ '../ipc/mojo/ipc_mojo.gyp:ipc_mojo_unittests',
+ '../jingle/jingle.gyp:jingle_unittests',
+ '../media/cast/cast.gyp:cast_unittests',
+ '../media/media.gyp:media_unittests',
+ '../media/midi/midi.gyp:midi_unittests',
+ '../mojo/mojo.gyp:mojo',
+ '../net/net.gyp:net_unittests',
+ '../printing/printing.gyp:printing_unittests',
+ '../remoting/remoting.gyp:remoting_unittests',
+ '../skia/skia_tests.gyp:skia_unittests',
+ '../sql/sql.gyp:sql_unittests',
+ '../sync/sync.gyp:sync_unit_tests',
+ '../third_party/cacheinvalidation/cacheinvalidation.gyp:cacheinvalidation_unittests',
+ '../third_party/leveldatabase/leveldatabase.gyp:env_chromium_unittests',
+ '../third_party/libaddressinput/libaddressinput.gyp:libaddressinput_unittests',
+ '../third_party/libphonenumber/libphonenumber.gyp:libphonenumber_unittests',
+ '../third_party/WebKit/Source/platform/blink_platform_tests.gyp:blink_heap_unittests',
+ '../third_party/WebKit/Source/platform/blink_platform_tests.gyp:blink_platform_unittests',
+ '../ui/accessibility/accessibility.gyp:accessibility_unittests',
+ '../ui/aura/aura.gyp:aura_unittests',
+ '../ui/compositor/compositor.gyp:compositor_unittests',
+ '../ui/display/display.gyp:display_unittests',
+ '../ui/events/events_unittests.gyp:events_unittests',
+ '../ui/gfx/gfx_tests.gyp:gfx_unittests',
+ '../ui/gl/gl_tests.gyp:gl_unittests',
+ '../ui/keyboard/keyboard.gyp:keyboard_unittests',
+ '../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests',
+ '../url/url.gyp:url_unittests',
+ ],
+ },
+ ], # targets
+ 'conditions': [
+ ['branding=="Chrome"', {
+ 'targets': [
+ {
+ 'target_name': 'chrome_official_builder_no_unittests',
+ 'type': 'none',
+ 'dependencies': [
+ '../chrome/chrome.gyp:gcapi_dll',
+ '../chrome/chrome.gyp:pack_policy_templates',
+ '../chrome/installer/mini_installer.gyp:mini_installer',
+ '../courgette/courgette.gyp:courgette',
+ '../courgette/courgette.gyp:courgette64',
+ '../remoting/remoting.gyp:remoting_webapp',
+ '../third_party/widevine/cdm/widevine_cdm.gyp:widevinecdmadapter',
+ ],
+ 'conditions': [
+ ['component != "shared_library" and wix_exists == "True" and \
+ sas_dll_exists == "True"', {
+ 'dependencies': [
+ '../remoting/remoting.gyp:remoting_host_installation',
+ ],
+ }], # component != "shared_library"
+ ]
+ }, {
+ 'target_name': 'chrome_official_builder',
+ 'type': 'none',
+ 'dependencies': [
+ 'chrome_official_builder_no_unittests',
+ '../base/base.gyp:base_unittests',
+ '../chrome/chrome.gyp:browser_tests',
+ '../chrome/chrome.gyp:sync_integration_tests',
+ '../ipc/ipc.gyp:ipc_tests',
+ '../media/media.gyp:media_unittests',
+ '../media/midi/midi.gyp:midi_unittests',
+ '../net/net.gyp:net_unittests',
+ '../printing/printing.gyp:printing_unittests',
+ '../sql/sql.gyp:sql_unittests',
+ '../sync/sync.gyp:sync_unit_tests',
+ '../ui/base/ui_base_tests.gyp:ui_base_unittests',
+ '../ui/gfx/gfx_tests.gyp:gfx_unittests',
+ '../ui/gl/gl_tests.gyp:gl_unittests',
+ '../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests',
+ '../ui/views/views.gyp:views_unittests',
+ '../url/url.gyp:url_unittests',
+ ],
+ },
+ ], # targets
+ }], # branding=="Chrome"
+ ], # conditions
+ }], # OS="win"
+ ['chromeos==1', {
+ 'targets': [
+ {
+ 'target_name': 'chromiumos_preflight',
+ 'type': 'none',
+ 'dependencies': [
+ '../breakpad/breakpad.gyp:minidump_stackwalk',
+ '../chrome/chrome.gyp:chrome',
+ '../chrome/chrome.gyp:chromedriver',
+ '../media/media.gyp:media_unittests',
+ '../media/media.gyp:video_decode_accelerator_unittest',
+ '../media/media.gyp:video_encode_accelerator_unittest',
+ '../ppapi/ppapi_internal.gyp:ppapi_example_video_decode',
+ '../sandbox/sandbox.gyp:chrome_sandbox',
+ '../sandbox/sandbox.gyp:sandbox_linux_unittests',
+ '../third_party/catapult/telemetry/telemetry.gyp:bitmaptools#host',
+ '../third_party/mesa/mesa.gyp:osmesa',
+ '../tools/perf/clear_system_cache/clear_system_cache.gyp:clear_system_cache',
+ ],
+ 'conditions': [
+ ['disable_nacl==0', {
+ 'dependencies': [
+ '../components/nacl.gyp:nacl_helper',
+ '../native_client/src/trusted/service_runtime/linux/nacl_bootstrap.gyp:nacl_helper_bootstrap',
+ ],
+ }],
+ ],
+ },
+ ], # targets
+ }], # "chromeos==1"
+ ['use_aura==1', {
+ 'targets': [
+ {
+ 'target_name': 'aura_builder',
+ 'type': 'none',
+ 'dependencies': [
+ '../ash/ash.gyp:ash_shell_with_content',
+ '../ash/ash.gyp:ash_unittests',
+ '../cc/blink/cc_blink_tests.gyp:cc_blink_unittests',
+ '../cc/cc_tests.gyp:cc_unittests',
+ '../components/components_tests.gyp:components_unittests',
+ '../content/content_shell_and_tests.gyp:content_browsertests',
+ '../content/content_shell_and_tests.gyp:content_unittests',
+ '../device/device_tests.gyp:device_unittests',
+ '../google_apis/gcm/gcm.gyp:gcm_unit_tests',
+ '../ppapi/ppapi_internal.gyp:ppapi_unittests',
+ '../remoting/remoting.gyp:remoting_unittests',
+ '../skia/skia_tests.gyp:skia_unittests',
+ '../ui/aura/aura.gyp:*',
+ '../ui/aura_extra/aura_extra.gyp:*',
+ '../ui/base/ui_base_tests.gyp:ui_base_unittests',
+ '../ui/compositor/compositor.gyp:*',
+ '../ui/display/display.gyp:display_unittests',
+ '../ui/events/events.gyp:*',
+ '../ui/gfx/gfx_tests.gyp:gfx_unittests',
+ '../ui/gl/gl_tests.gyp:gl_unittests',
+ '../ui/keyboard/keyboard.gyp:*',
+ '../ui/snapshot/snapshot.gyp:snapshot_unittests',
+ '../ui/touch_selection/ui_touch_selection.gyp:ui_touch_selection_unittests',
+ '../ui/wm/wm.gyp:*',
+ 'blink_tests',
+ ],
+ 'conditions': [
+ ['OS=="linux"', {
+ # Tests that currently only work on Linux.
+ 'dependencies': [
+ '../base/base.gyp:base_unittests',
+ '../ipc/ipc.gyp:ipc_tests',
+ '../sql/sql.gyp:sql_unittests',
+ '../sync/sync.gyp:sync_unit_tests',
+ ],
+ }],
+ ['chromeos==1', {
+ 'dependencies': [
+ '../chromeos/chromeos.gyp:chromeos_unittests',
+ '../ui/chromeos/ui_chromeos.gyp:ui_chromeos_unittests',
+ ],
+ }],
+ ['use_ozone==1', {
+ 'dependencies': [
+ '../ui/ozone/ozone.gyp:*',
+ '../ui/ozone/demo/ozone_demos.gyp:*',
+ ],
+ }],
+ ['enable_app_list==1', {
+ 'dependencies': [
+ '../ui/app_list/app_list.gyp:*',
+ ],
+ }],
+ ['chromecast==0', {
+ 'dependencies': [
+ '../chrome/chrome.gyp:browser_tests',
+ '../chrome/chrome.gyp:chrome',
+ '../chrome/chrome.gyp:interactive_ui_tests',
+ '../chrome/chrome.gyp:unit_tests',
+ '../ui/message_center/message_center.gyp:*',
+ '../ui/views/examples/examples.gyp:views_examples_with_content_exe',
+ '../ui/views/views.gyp:views',
+ '../ui/views/views.gyp:views_unittests',
+ ],
+ }],
+ ],
+ },
+ ], # targets
+ }], # "use_aura==1"
+ ['test_isolation_mode != "noop"', {
+ 'targets': [
+ {
+ 'target_name': 'chromium_swarm_tests',
+ 'type': 'none',
+ 'dependencies': [
+ '../base/base.gyp:base_unittests_run',
+ '../content/content_shell_and_tests.gyp:content_browsertests_run',
+ '../content/content_shell_and_tests.gyp:content_unittests_run',
+ '../net/net.gyp:net_unittests_run',
+ ],
+ 'conditions': [
+ ['chromecast==0', {
+ 'dependencies': [
+ '../chrome/chrome.gyp:browser_tests_run',
+ '../chrome/chrome.gyp:interactive_ui_tests_run',
+ '../chrome/chrome.gyp:sync_integration_tests_run',
+ '../chrome/chrome.gyp:unit_tests_run',
+ ],
+ }],
+ ],
+ }, # target_name: chromium_swarm_tests
+ ],
+ }],
+ ['archive_chromoting_tests==1', {
+ 'targets': [
+ {
+ 'target_name': 'chromoting_swarm_tests',
+ 'type': 'none',
+ 'dependencies': [
+ '../testing/chromoting/integration_tests.gyp:*',
+ ],
+ }, # target_name: chromoting_swarm_tests
+ ]
+ }],
+ ['archive_media_router_tests==1', {
+ 'targets': [
+ {
+ 'target_name': 'media_router_swarming_tests',
+ 'type': 'none',
+ 'dependencies': [
+ '../chrome/test/media_router/e2e_tests.gyp:media_router_e2e_tests_run',
+ ],
+ }, # target_name: media_router_swarming_tests
+ {
+ 'target_name': 'media_router_swarming_perf_tests',
+ 'type': 'none',
+ 'dependencies': [
+ '../chrome/test/media_router/e2e_tests.gyp:media_router_perf_tests_run',
+ ],
+ }, # target_name: media_router_swarming_perf_tests
+ ]
+ }],
+ ['OS=="mac" and toolkit_views==1', {
+ 'targets': [
+ {
+ 'target_name': 'macviews_builder',
+ 'type': 'none',
+ 'dependencies': [
+ '../ui/views/examples/examples.gyp:views_examples_with_content_exe',
+ '../ui/views/views.gyp:views',
+ '../ui/views/views.gyp:views_unittests',
+ ],
+ }, # target_name: macviews_builder
+ ], # targets
+ }], # os=='mac' and toolkit_views==1
+ ], # conditions
+}
diff --git a/build/args/bots/official.desktop/blimp-engine.gn b/build/args/bots/official.desktop/blimp-engine.gn
index 2554c37..0f9cc6d 100644
--- a/build/args/bots/official.desktop/blimp-engine.gn
+++ b/build/args/bots/official.desktop/blimp-engine.gn
@@ -3,5 +3,8 @@
# Use release build to improve engine performance, especially WebP encoding.
is_debug = false
+# Designate this as an official build to pick up breakpad symbols.
+is_official_build = true
+
# Turn on DCHECK to find bugs.
dcheck_always_on = true
diff --git a/build/config/android/config.gni b/build/config/android/config.gni
index f775123..98b4aa6 100644
--- a/build/config/android/config.gni
+++ b/build/config/android/config.gni
@@ -21,6 +21,10 @@
extra_chrome_shared_library_configs = []
}
+ if (!defined(default_android_ndk_root)) {
+ default_android_ndk_root = "//third_party/android_tools/ndk"
+ }
+
if (!defined(default_android_sdk_root)) {
default_android_sdk_root = "//third_party/android_tools/sdk"
default_android_sdk_version = "23"
@@ -51,6 +55,8 @@
}
declare_args() {
+ android_ndk_root = default_android_ndk_root
+
android_sdk_root = default_android_sdk_root
android_sdk_version = default_android_sdk_version
android_sdk_build_tools_version = default_android_sdk_build_tools_version
@@ -147,7 +153,6 @@
android_sdk = "${android_sdk_root}/platforms/android-${android_sdk_version}"
# Path to the Android NDK and SDK.
- android_ndk_root = "//third_party/android_tools/ndk"
android_ndk_include_dir = "$android_ndk_root/usr/include"
android_sdk_tools = "${android_sdk_root}/tools"
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 5429f9f..267c920 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -501,14 +501,8 @@
}
} else if (current_cpu == "arm") {
if (is_clang && !is_android && !is_nacl) {
- cflags += [
- "-target",
- "arm-linux-gnueabihf",
- ]
- ldflags += [
- "-target",
- "arm-linux-gnueabihf",
- ]
+ cflags += [ "--target=arm-linux-gnueabihf" ]
+ ldflags += [ "--target=arm-linux-gnueabihf" ]
}
if (!is_nacl) {
cflags += [
@@ -530,14 +524,10 @@
if (mips_arch_variant == "r6") {
if (is_clang) {
cflags += [
- "-target",
- "mipsel-linux-gnu",
+ "--target=mipsel-linux-gnu",
"-march=mips32r6",
]
- ldflags += [
- "-target",
- "mipsel-linux-gnu",
- ]
+ ldflags += [ "--target=mipsel-linux-gnu" ]
} else {
cflags += [
"-mips32r6",
@@ -554,26 +544,18 @@
if (is_clang) {
if (is_android) {
cflags += [
- "-target",
- "mipsel-linux-android",
+ "--target=mipsel-linux-android",
"-march=mipsel",
"-mcpu=mips32r2",
]
- ldflags += [
- "-target",
- "mipsel-linux-android",
- ]
+ ldflags += [ "--target=mipsel-linux-android" ]
} else {
cflags += [
- "-target",
- "mipsel-linux-gnu",
+ "--target=mipsel-linux-gnu",
"-march=mipsel",
"-mcpu=mips32r2",
]
- ldflags += [
- "-target",
- "mipsel-linux-gnu",
- ]
+ ldflags += [ "--target=mipsel-linux-gnu" ]
}
} else {
cflags += [
@@ -588,26 +570,18 @@
if (is_clang) {
if (is_android) {
cflags += [
- "-target",
- "mipsel-linux-android",
+ "--target=mipsel-linux-android",
"-march=mipsel",
"-mcpu=mips32",
]
- ldflags += [
- "-target",
- "mipsel-linux-android",
- ]
+ ldflags += [ "--target=mipsel-linux-android" ]
} else {
cflags += [
- "-target",
- "mipsel-linux-gnu",
+ "--target=mipsel-linux-gnu",
"-march=mipsel",
"-mcpu=mips32",
]
- ldflags += [
- "-target",
- "mipsel-linux-gnu",
- ]
+ ldflags += [ "--target=mipsel-linux-gnu" ]
}
} else {
cflags += [
diff --git a/build/config/ios/rules.gni b/build/config/ios/rules.gni
index b628d26..0b4493e 100644
--- a/build/config/ios/rules.gni
+++ b/build/config/ios/rules.gni
@@ -176,9 +176,6 @@
bundle_resources_dir = bundle_root_dir
bundle_executable_dir = bundle_root_dir
bundle_plugins_dir = "$bundle_root_dir/Plugins"
- assert(
- product_type != "",
- "workaround to allow generation with version of gn that don't support product_type property for create_bundle target => remove once gn has rolled this change")
}
# TODO(crbug.com/297668):
diff --git a/build/config/win/msvs_dependencies.isolate b/build/config/win/msvs_dependencies.isolate
new file mode 100644
index 0000000..d33aec4
--- /dev/null
+++ b/build/config/win/msvs_dependencies.isolate
@@ -0,0 +1,179 @@
+# Copyright 2015 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.
+{
+ 'conditions': [
+ # Copy the VS runtime DLLs into the isolate so that they
+ # don't have to be preinstalled on the target machine.
+ #
+ # VS2013 runtimes
+ ['OS=="win" and msvs_version==2013 and component=="shared_library" and CONFIGURATION_NAME=="Debug"', {
+ 'variables': {
+ 'files': [
+ '<(PRODUCT_DIR)/x64/msvcp120d.dll',
+ '<(PRODUCT_DIR)/x64/msvcr120d.dll',
+ ],
+ },
+ }],
+ ['OS=="win" and msvs_version==2013 and component=="shared_library" and CONFIGURATION_NAME=="Release"', {
+ 'variables': {
+ 'files': [
+ '<(PRODUCT_DIR)/x64/msvcp120.dll',
+ '<(PRODUCT_DIR)/x64/msvcr120.dll',
+ ],
+ },
+ }],
+ ['OS=="win" and msvs_version==2013 and component=="shared_library" and (CONFIGURATION_NAME=="Debug" or CONFIGURATION_NAME=="Debug_x64")', {
+ 'variables': {
+ 'files': [
+ '<(PRODUCT_DIR)/msvcp120d.dll',
+ '<(PRODUCT_DIR)/msvcr120d.dll',
+ ],
+ },
+ }],
+ ['OS=="win" and msvs_version==2013 and component=="shared_library" and (CONFIGURATION_NAME=="Release" or CONFIGURATION_NAME=="Release_x64")', {
+ 'variables': {
+ 'files': [
+ '<(PRODUCT_DIR)/msvcp120.dll',
+ '<(PRODUCT_DIR)/msvcr120.dll',
+ ],
+ },
+ }],
+ # VS2015 runtimes
+ ['OS=="win" and msvs_version==2015 and component=="shared_library" and CONFIGURATION_NAME=="Debug"', {
+ 'variables': {
+ 'files': [
+ '<(PRODUCT_DIR)/x64/msvcp140d.dll',
+ '<(PRODUCT_DIR)/x64/vccorlib140d.dll',
+ '<(PRODUCT_DIR)/x64/vcruntime140d.dll',
+ '<(PRODUCT_DIR)/x64/ucrtbased.dll',
+ ],
+ },
+ }],
+ ['OS=="win" and msvs_version==2015 and component=="shared_library" and CONFIGURATION_NAME=="Release"', {
+ 'variables': {
+ 'files': [
+ '<(PRODUCT_DIR)/x64/msvcp140.dll',
+ '<(PRODUCT_DIR)/x64/vccorlib140.dll',
+ '<(PRODUCT_DIR)/x64/vcruntime140.dll',
+ '<(PRODUCT_DIR)/x64/ucrtbase.dll',
+ ],
+ },
+ }],
+ ['OS=="win" and msvs_version==2015 and component=="shared_library" and (CONFIGURATION_NAME=="Debug" or CONFIGURATION_NAME=="Debug_x64")', {
+ 'variables': {
+ 'files': [
+ '<(PRODUCT_DIR)/msvcp140d.dll',
+ '<(PRODUCT_DIR)/vccorlib140d.dll',
+ '<(PRODUCT_DIR)/vcruntime140d.dll',
+ '<(PRODUCT_DIR)/ucrtbased.dll',
+ ],
+ },
+ }],
+ ['OS=="win" and msvs_version==2015 and component=="shared_library" and (CONFIGURATION_NAME=="Release" or CONFIGURATION_NAME=="Release_x64")', {
+ 'variables': {
+ 'files': [
+ '<(PRODUCT_DIR)/msvcp140.dll',
+ '<(PRODUCT_DIR)/vccorlib140.dll',
+ '<(PRODUCT_DIR)/vcruntime140.dll',
+ '<(PRODUCT_DIR)/ucrtbase.dll',
+ ],
+ },
+ }],
+ ['OS=="win" and msvs_version==2015 and component=="shared_library" and target_arch=="ia32"', {
+ # 32-bit builds have an x64 directory which also needs Windows 10
+ # Universal C Runtime binaries copied over.
+ 'variables': {
+ 'files': [
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-console-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-datetime-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-debug-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-errorhandling-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-file-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-file-l1-2-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-file-l2-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-handle-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-heap-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-interlocked-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-libraryloader-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-localization-l1-2-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-memory-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-namedpipe-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-processenvironment-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-processthreads-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-processthreads-l1-1-1.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-profile-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-rtlsupport-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-string-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-synch-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-synch-l1-2-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-sysinfo-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-timezone-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-core-util-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-crt-conio-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-crt-convert-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-crt-environment-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-crt-filesystem-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-crt-heap-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-crt-locale-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-crt-math-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-crt-multibyte-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-crt-private-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-crt-process-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-crt-runtime-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-crt-stdio-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-crt-string-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-crt-time-l1-1-0.dll',
+ '<(PRODUCT_DIR)/x64/api-ms-win-crt-utility-l1-1-0.dll',
+ ],
+ },
+ }],
+ ['OS=="win" and msvs_version==2015 and component=="shared_library"', {
+ # Windows 10 Universal C Runtime binaries.
+ 'variables': {
+ 'files': [
+ '<(PRODUCT_DIR)/api-ms-win-core-console-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-datetime-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-debug-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-errorhandling-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-file-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-file-l1-2-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-file-l2-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-handle-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-heap-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-interlocked-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-libraryloader-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-localization-l1-2-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-memory-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-namedpipe-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-processenvironment-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-processthreads-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-processthreads-l1-1-1.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-profile-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-rtlsupport-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-string-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-synch-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-synch-l1-2-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-sysinfo-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-timezone-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-core-util-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-crt-conio-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-crt-convert-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-crt-environment-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-crt-filesystem-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-crt-heap-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-crt-locale-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-crt-math-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-crt-multibyte-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-crt-private-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-crt-process-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-crt-runtime-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-crt-stdio-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-crt-string-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-crt-time-l1-1-0.dll',
+ '<(PRODUCT_DIR)/api-ms-win-crt-utility-l1-1-0.dll',
+ ],
+ },
+ }],
+ ],
+}
diff --git a/build/download_gold_plugin.py b/build/download_gold_plugin.py
new file mode 100755
index 0000000..d4fb48b
--- /dev/null
+++ b/build/download_gold_plugin.py
@@ -0,0 +1,49 @@
+#!/usr/bin/env python
+# Copyright 2015 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.
+
+"""Script to download LLVM gold plugin from google storage."""
+
+import find_depot_tools
+import json
+import os
+import shutil
+import subprocess
+import sys
+import zipfile
+
+SCRIPT_DIR = os.path.dirname(os.path.realpath(__file__))
+CHROME_SRC = os.path.abspath(os.path.join(SCRIPT_DIR, os.pardir))
+
+
+DEPOT_PATH = find_depot_tools.add_depot_tools_to_path()
+GSUTIL_PATH = os.path.join(DEPOT_PATH, 'gsutil.py')
+
+LLVM_BUILD_PATH = os.path.join(CHROME_SRC, 'third_party', 'llvm-build',
+ 'Release+Asserts')
+CLANG_UPDATE_PY = os.path.join(CHROME_SRC, 'tools', 'clang', 'scripts',
+ 'update.py')
+CLANG_REVISION = os.popen(CLANG_UPDATE_PY + ' --print-revision').read().rstrip()
+
+CLANG_BUCKET = 'gs://chromium-browser-clang/Linux_x64'
+
+def main():
+ targz_name = 'llvmgold-%s.tgz' % CLANG_REVISION
+ remote_path = '%s/%s' % (CLANG_BUCKET, targz_name)
+
+ os.chdir(LLVM_BUILD_PATH)
+
+ # TODO(pcc): Fix gsutil.py cp url file < /dev/null 2>&0
+ # (currently aborts with exit code 1,
+ # https://github.com/GoogleCloudPlatform/gsutil/issues/289) or change the
+ # stdin->stderr redirect in update.py to do something else (crbug.com/494442).
+ subprocess.check_call(['python', GSUTIL_PATH,
+ 'cp', remote_path, targz_name],
+ stderr=open('/dev/null', 'w'))
+ subprocess.check_call(['tar', 'xzf', targz_name])
+ os.remove(targz_name)
+ return 0
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/build/get_landmines.py b/build/get_landmines.py
new file mode 100755
index 0000000..395c18f
--- /dev/null
+++ b/build/get_landmines.py
@@ -0,0 +1,88 @@
+#!/usr/bin/env python
+# Copyright 2013 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 file emits the list of reasons why a particular build needs to be clobbered
+(or a list of 'landmines').
+"""
+
+import sys
+
+import landmine_utils
+
+
+builder = landmine_utils.builder
+distributor = landmine_utils.distributor
+gyp_defines = landmine_utils.gyp_defines
+gyp_msvs_version = landmine_utils.gyp_msvs_version
+platform = landmine_utils.platform
+
+
+def print_landmines():
+ """
+ ALL LANDMINES ARE EMITTED FROM HERE.
+ """
+ # DO NOT add landmines as part of a regular CL. Landmines are a last-effort
+ # bandaid fix if a CL that got landed has a build dependency bug and all bots
+ # need to be cleaned up. If you're writing a new CL that causes build
+ # dependency problems, fix the dependency problems instead of adding a
+ # landmine.
+
+ if (distributor() == 'goma' and platform() == 'win32' and
+ builder() == 'ninja'):
+ print 'Need to clobber winja goma due to backend cwd cache fix.'
+ if platform() == 'android':
+ print 'Clobber: to handle new way of suppressing findbugs failures.'
+ print 'Clobber to fix gyp not rename package name (crbug.com/457038)'
+ if platform() == 'win' and builder() == 'ninja':
+ print 'Compile on cc_unittests fails due to symbols removed in r185063.'
+ if platform() == 'linux' and builder() == 'ninja':
+ print 'Builders switching from make to ninja will clobber on this.'
+ if platform() == 'mac':
+ print 'Switching from bundle to unbundled dylib (issue 14743002).'
+ if platform() in ('win', 'mac'):
+ print ('Improper dependency for create_nmf.py broke in r240802, '
+ 'fixed in r240860.')
+ if (platform() == 'win' and builder() == 'ninja' and
+ gyp_msvs_version() == '2012' and
+ gyp_defines().get('target_arch') == 'x64' and
+ gyp_defines().get('dcheck_always_on') == '1'):
+ print "Switched win x64 trybots from VS2010 to VS2012."
+ if (platform() == 'win' and builder() == 'ninja' and
+ gyp_msvs_version().startswith('2013')):
+ print "Switch to VS2013"
+ if (platform() == 'win' and gyp_msvs_version().startswith('2015')):
+ print 'Switch to VS2015 Update 2'
+ print 'Need to clobber everything due to an IDL change in r154579 (blink)'
+ print 'Need to clobber everything due to gen file moves in r175513 (Blink)'
+ if (platform() != 'ios'):
+ print 'Clobber to get rid of obselete test plugin after r248358'
+ print 'Clobber to rebuild GN files for V8'
+ print 'Clobber to get rid of stale generated mojom.h files'
+ print 'Need to clobber everything due to build_nexe change in nacl r13424'
+ print '[chromium-dev] PSA: clobber build needed for IDR_INSPECTOR_* compil...'
+ print 'blink_resources.grd changed: crbug.com/400860'
+ print 'ninja dependency cycle: crbug.com/408192'
+ print 'Clobber to fix missing NaCl gyp dependencies (crbug.com/427427).'
+ print 'Another clobber for missing NaCl gyp deps (crbug.com/427427).'
+ print 'Clobber to fix GN not picking up increased ID range (crbug.com/444902)'
+ print 'Remove NaCl toolchains from the output dir (crbug.com/456902)'
+ if platform() == 'ios':
+ print 'Clobber iOS to workaround Xcode deps bug (crbug.com/485435)'
+ if platform() == 'win':
+ print 'Clobber to delete stale generated files (crbug.com/510086)'
+ if platform() == 'android' and gyp_defines().get('target_arch') == 'arm64':
+ print 'Clobber to support new location/infra for chrome_sync_shell_apk'
+ if platform() == 'mac':
+ print 'Clobber to get rid of evil libsqlite3.dylib (crbug.com/526208)'
+
+
+def main():
+ print_landmines()
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/build/gyp_environment.py b/build/gyp_environment.py
new file mode 100644
index 0000000..199023a
--- /dev/null
+++ b/build/gyp_environment.py
@@ -0,0 +1,35 @@
+# Copyright 2014 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.
+
+"""
+Sets up various automatic gyp environment variables. These are used by
+gyp_chromium and landmines.py which run at different stages of runhooks. To
+make sure settings are consistent between them, all setup should happen here.
+"""
+
+import gyp_helper
+import mac_toolchain
+import os
+import sys
+import vs_toolchain
+
+def SetEnvironment():
+ """Sets defaults for GYP_* variables."""
+ gyp_helper.apply_chromium_gyp_env()
+
+ # Default to ninja on linux and windows, but only if no generator has
+ # explicitly been set.
+ # Also default to ninja on mac, but only when not building chrome/ios.
+ # . -f / --format has precedence over the env var, no need to check for it
+ # . set the env var only if it hasn't been set yet
+ # . chromium.gyp_env has been applied to os.environ at this point already
+ if sys.platform.startswith(('linux', 'win', 'freebsd')) and \
+ not os.environ.get('GYP_GENERATORS'):
+ os.environ['GYP_GENERATORS'] = 'ninja'
+ elif sys.platform == 'darwin' and not os.environ.get('GYP_GENERATORS') and \
+ not 'OS=ios' in os.environ.get('GYP_DEFINES', []):
+ os.environ['GYP_GENERATORS'] = 'ninja'
+
+ vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
+ mac_toolchain.SetToolchainEnvironment()
diff --git a/build/isolate.gypi b/build/isolate.gypi
new file mode 100644
index 0000000..197e455
--- /dev/null
+++ b/build/isolate.gypi
@@ -0,0 +1,129 @@
+# Copyright (c) 2012 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 file is meant to be included into a target to provide a rule
+# to "build" .isolate files into a .isolated file.
+#
+# To use this, create a gyp target with the following form:
+# 'conditions': [
+# ['test_isolation_mode != "noop"', {
+# 'targets': [
+# {
+# 'target_name': 'foo_test_run',
+# 'type': 'none',
+# 'dependencies': [
+# 'foo_test',
+# ],
+# 'includes': [
+# '../build/isolate.gypi',
+# ],
+# 'sources': [
+# 'foo_test.isolate',
+# ],
+# },
+# ],
+# }],
+# ],
+#
+# Note: foo_test.isolate is included and a source file. It is an inherent
+# property of the .isolate format. This permits to define GYP variables but is
+# a stricter format than GYP so isolate.py can read it.
+#
+# The generated .isolated file will be:
+# <(PRODUCT_DIR)/foo_test.isolated
+#
+# See http://dev.chromium.org/developers/testing/isolated-testing/for-swes
+# for more information.
+
+{
+ 'rules': [
+ {
+ 'rule_name': 'isolate',
+ 'extension': 'isolate',
+ 'inputs': [
+ # Files that are known to be involved in this step.
+ '<(DEPTH)/tools/isolate_driver.py',
+ '<(DEPTH)/tools/swarming_client/isolate.py',
+ '<(DEPTH)/tools/swarming_client/run_isolated.py',
+ ],
+ 'outputs': [],
+ 'action': [
+ 'python',
+ '<(DEPTH)/tools/isolate_driver.py',
+ '<(test_isolation_mode)',
+ '--isolated', '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated',
+ '--isolate', '<(RULE_INPUT_PATH)',
+
+ # Variables should use the -V FOO=<(FOO) form so frequent values,
+ # like '0' or '1', aren't stripped out by GYP. Run 'isolate.py help' for
+ # more details.
+
+ # Path variables are used to replace file paths when loading a .isolate
+ # file
+ '--path-variable', 'DEPTH', '<(DEPTH)',
+ '--path-variable', 'PRODUCT_DIR', '<(PRODUCT_DIR) ',
+
+ # Note: This list must match DefaultConfigVariables()
+ # in build/android/pylib/utils/isolator.py
+ '--config-variable', 'CONFIGURATION_NAME=<(CONFIGURATION_NAME)',
+ '--config-variable', 'OS=<(OS)',
+ '--config-variable', 'asan=<(asan)',
+ '--config-variable', 'branding=<(branding)',
+ '--config-variable', 'chromeos=<(chromeos)',
+ '--config-variable', 'component=<(component)',
+ '--config-variable', 'disable_nacl=<(disable_nacl)',
+ '--config-variable', 'enable_pepper_cdms=<(enable_pepper_cdms)',
+ '--config-variable', 'enable_plugins=<(enable_plugins)',
+ '--config-variable', 'fastbuild=<(fastbuild)',
+ '--config-variable', 'icu_use_data_file_flag=<(icu_use_data_file_flag)',
+ # TODO(kbr): move this to chrome_tests.gypi:gles2_conform_tests_run
+ # once support for user-defined config variables is added.
+ '--config-variable',
+ 'internal_gles2_conform_tests=<(internal_gles2_conform_tests)',
+ '--config-variable', 'kasko=<(kasko)',
+ '--config-variable', 'lsan=<(lsan)',
+ '--config-variable', 'msan=<(msan)',
+ '--config-variable', 'target_arch=<(target_arch)',
+ '--config-variable', 'tsan=<(tsan)',
+ '--config-variable', 'use_custom_libcxx=<(use_custom_libcxx)',
+ '--config-variable', 'use_instrumented_libraries=<(use_instrumented_libraries)',
+ '--config-variable',
+ 'use_prebuilt_instrumented_libraries=<(use_prebuilt_instrumented_libraries)',
+ '--config-variable', 'use_ozone=<(use_ozone)',
+ '--config-variable', 'use_x11=<(use_x11)',
+ '--config-variable', 'v8_use_external_startup_data=<(v8_use_external_startup_data)',
+ ],
+ 'conditions': [
+ # Note: When gyp merges lists, it appends them to the old value.
+ # Extra variables are replaced on the 'command' entry and on paths in
+ # the .isolate file but are not considered relative paths.
+ ['OS=="mac"', {
+ 'action': [
+ '--extra-variable', 'mac_product_name=<(mac_product_name)',
+ ],
+ }],
+ ["test_isolation_mode == 'prepare'", {
+ 'outputs': [
+ '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated.gen.json',
+ ],
+ }, {
+ 'outputs': [
+ '<(PRODUCT_DIR)/<(RULE_INPUT_ROOT).isolated',
+ ],
+ }],
+ ['OS=="win"', {
+ 'includes': ['../build/util/version.gypi'],
+ 'action': [
+ '--extra-variable', 'version_full=<(version_full)',
+ '--config-variable', 'msvs_version=<(MSVS_VERSION)',
+ ],
+ }, {
+ 'action': [
+ '--config-variable', 'msvs_version=0',
+ ],
+ }],
+ ],
+ },
+ ],
+}
diff --git a/build/landmine_utils.py b/build/landmine_utils.py
new file mode 100644
index 0000000..6d18b6d
--- /dev/null
+++ b/build/landmine_utils.py
@@ -0,0 +1,120 @@
+# Copyright 2013 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.
+
+
+import functools
+import logging
+import os
+import shlex
+import sys
+
+
+def memoize(default=None):
+ """This decorator caches the return value of a parameterless pure function"""
+ def memoizer(func):
+ val = []
+ @functools.wraps(func)
+ def inner():
+ if not val:
+ ret = func()
+ val.append(ret if ret is not None else default)
+ if logging.getLogger().isEnabledFor(logging.INFO):
+ print '%s -> %r' % (func.__name__, val[0])
+ return val[0]
+ return inner
+ return memoizer
+
+
+@memoize()
+def IsWindows():
+ return sys.platform in ['win32', 'cygwin']
+
+
+@memoize()
+def IsLinux():
+ return sys.platform.startswith(('linux', 'freebsd', 'openbsd'))
+
+
+@memoize()
+def IsMac():
+ return sys.platform == 'darwin'
+
+
+@memoize()
+def gyp_defines():
+ """Parses and returns GYP_DEFINES env var as a dictionary."""
+ return dict(arg.split('=', 1)
+ for arg in shlex.split(os.environ.get('GYP_DEFINES', '')))
+
+@memoize()
+def gyp_generator_flags():
+ """Parses and returns GYP_GENERATOR_FLAGS env var as a dictionary."""
+ return dict(arg.split('=', 1)
+ for arg in shlex.split(os.environ.get('GYP_GENERATOR_FLAGS', '')))
+
+@memoize()
+def gyp_msvs_version():
+ return os.environ.get('GYP_MSVS_VERSION', '')
+
+@memoize()
+def distributor():
+ """
+ Returns a string which is the distributed build engine in use (if any).
+ Possible values: 'goma', 'ib', ''
+ """
+ if 'goma' in gyp_defines():
+ return 'goma'
+ elif IsWindows():
+ if 'CHROME_HEADLESS' in os.environ:
+ return 'ib' # use (win and !goma and headless) as approximation of ib
+
+
+@memoize()
+def platform():
+ """
+ Returns a string representing the platform this build is targetted for.
+ Possible values: 'win', 'mac', 'linux', 'ios', 'android'
+ """
+ if 'OS' in gyp_defines():
+ if 'android' in gyp_defines()['OS']:
+ return 'android'
+ else:
+ return gyp_defines()['OS']
+ elif IsWindows():
+ return 'win'
+ elif IsLinux():
+ return 'linux'
+ else:
+ return 'mac'
+
+
+@memoize()
+def builder():
+ """
+ Returns a string representing the build engine (not compiler) to use.
+ Possible values: 'make', 'ninja', 'xcode', 'msvs', 'scons'
+ """
+ if 'GYP_GENERATORS' in os.environ:
+ # for simplicity, only support the first explicit generator
+ generator = os.environ['GYP_GENERATORS'].split(',')[0]
+ if generator.endswith('-android'):
+ return generator.split('-')[0]
+ elif generator.endswith('-ninja'):
+ return 'ninja'
+ else:
+ return generator
+ else:
+ if platform() == 'android':
+ # Good enough for now? Do any android bots use make?
+ return 'ninja'
+ elif platform() == 'ios':
+ return 'xcode'
+ elif IsWindows():
+ return 'ninja'
+ elif IsLinux():
+ return 'ninja'
+ elif IsMac():
+ return 'ninja'
+ else:
+ assert False, 'Don\'t know what builder we\'re using!'
diff --git a/build/landmines.py b/build/landmines.py
new file mode 100755
index 0000000..031c309
--- /dev/null
+++ b/build/landmines.py
@@ -0,0 +1,148 @@
+#!/usr/bin/env python
+# Copyright (c) 2012 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 script runs every build as the first hook (See DEPS). If it detects that
+the build should be clobbered, it will delete the contents of the build
+directory.
+
+A landmine is tripped when a builder checks out a different revision, and the
+diff between the new landmines and the old ones is non-null. At this point, the
+build is clobbered.
+"""
+
+import difflib
+import errno
+import gyp_environment
+import logging
+import optparse
+import os
+import sys
+import subprocess
+import time
+
+import clobber
+import landmine_utils
+
+
+def get_build_dir(build_tool, src_dir, is_iphone=False):
+ """
+ Returns output directory absolute path dependent on build and targets.
+ Examples:
+ r'c:\b\build\slave\win\build\src\out'
+ '/mnt/data/b/build/slave/linux/build/src/out'
+ '/b/build/slave/ios_rel_device/build/src/xcodebuild'
+
+ Keep this function in sync with tools/build/scripts/slave/compile.py
+ """
+ ret = None
+ if build_tool == 'xcode':
+ ret = os.path.join(src_dir, 'xcodebuild')
+ elif build_tool in ['make', 'ninja', 'ninja-ios']: # TODO: Remove ninja-ios.
+ if 'CHROMIUM_OUT_DIR' in os.environ:
+ output_dir = os.environ.get('CHROMIUM_OUT_DIR').strip()
+ if not output_dir:
+ raise Error('CHROMIUM_OUT_DIR environment variable is set but blank!')
+ else:
+ output_dir = landmine_utils.gyp_generator_flags().get('output_dir', 'out')
+ ret = os.path.join(src_dir, output_dir)
+ else:
+ raise NotImplementedError('Unexpected GYP_GENERATORS (%s)' % build_tool)
+ return os.path.abspath(ret)
+
+
+def clobber_if_necessary(new_landmines, src_dir):
+ """Does the work of setting, planting, and triggering landmines."""
+ out_dir = get_build_dir(landmine_utils.builder(), src_dir)
+ landmines_path = os.path.normpath(os.path.join(src_dir, '.landmines'))
+ try:
+ os.makedirs(out_dir)
+ except OSError as e:
+ if e.errno == errno.EEXIST:
+ pass
+
+ if os.path.exists(landmines_path):
+ with open(landmines_path, 'r') as f:
+ old_landmines = f.readlines()
+ if old_landmines != new_landmines:
+ old_date = time.ctime(os.stat(landmines_path).st_ctime)
+ diff = difflib.unified_diff(old_landmines, new_landmines,
+ fromfile='old_landmines', tofile='new_landmines',
+ fromfiledate=old_date, tofiledate=time.ctime(), n=0)
+ sys.stdout.write('Clobbering due to:\n')
+ sys.stdout.writelines(diff)
+ sys.stdout.flush()
+
+ clobber.clobber(out_dir)
+
+ # Save current set of landmines for next time.
+ with open(landmines_path, 'w') as f:
+ f.writelines(new_landmines)
+
+
+def process_options():
+ """Returns an options object containing the configuration for this script."""
+ parser = optparse.OptionParser()
+ parser.add_option(
+ '-s', '--landmine-scripts', action='append',
+ help='Path to the script which emits landmines to stdout. The target '
+ 'is passed to this script via option -t. Note that an extra '
+ 'script can be specified via an env var EXTRA_LANDMINES_SCRIPT.')
+ parser.add_option('-d', '--src-dir',
+ help='Path of the source root dir. Overrides the default location of the '
+ 'source root dir when calculating the build directory.')
+ parser.add_option('-v', '--verbose', action='store_true',
+ default=('LANDMINES_VERBOSE' in os.environ),
+ help=('Emit some extra debugging information (default off). This option '
+ 'is also enabled by the presence of a LANDMINES_VERBOSE environment '
+ 'variable.'))
+
+ options, args = parser.parse_args()
+
+ if args:
+ parser.error('Unknown arguments %s' % args)
+
+ logging.basicConfig(
+ level=logging.DEBUG if options.verbose else logging.ERROR)
+
+ if options.src_dir:
+ if not os.path.isdir(options.src_dir):
+ parser.error('Cannot find source root dir at %s' % options.src_dir)
+ logging.debug('Overriding source root dir. Using: %s', options.src_dir)
+ else:
+ options.src_dir = \
+ os.path.dirname(os.path.dirname(os.path.realpath(__file__)))
+
+ if not options.landmine_scripts:
+ options.landmine_scripts = [os.path.join(options.src_dir, 'build',
+ 'get_landmines.py')]
+
+ extra_script = os.environ.get('EXTRA_LANDMINES_SCRIPT')
+ if extra_script:
+ options.landmine_scripts += [extra_script]
+
+ return options
+
+
+def main():
+ options = process_options()
+
+ if landmine_utils.builder() in ('dump_dependency_json', 'eclipse'):
+ return 0
+
+ gyp_environment.SetEnvironment()
+
+ landmines = []
+ for s in options.landmine_scripts:
+ proc = subprocess.Popen([sys.executable, s], stdout=subprocess.PIPE)
+ output, _ = proc.communicate()
+ landmines.extend([('%s\n' % l.strip()) for l in output.splitlines()])
+ clobber_if_necessary(landmines, options.src_dir)
+
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/build/mac/asan.gyp b/build/mac/asan.gyp
new file mode 100644
index 0000000..a66d118
--- /dev/null
+++ b/build/mac/asan.gyp
@@ -0,0 +1,53 @@
+# Copyright (c) 2013 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.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'asan_dynamic_runtime',
+ 'type': 'none',
+ 'variables': {
+ # Every target is going to depend on asan_dynamic_runtime, so allow
+ # this one to depend on itself.
+ 'prune_self_dependency': 1,
+ # Path is relative to this GYP file.
+ 'asan_rtl_mask_path':
+ '../../third_party/llvm-build/Release+Asserts/lib/clang/<!(python ../../tools/clang/scripts/update.py --print-clang-version)/lib/darwin',
+ 'asan_osx_dynamic':
+ '<(asan_rtl_mask_path)/libclang_rt.asan_osx_dynamic.dylib',
+ 'asan_iossim_dynamic':
+ '<(asan_rtl_mask_path)/libclang_rt.asan_iossim_dynamic.dylib',
+ },
+ 'conditions': [
+ ['OS=="mac"', {
+ 'copies': [
+ {
+ 'destination': '<(PRODUCT_DIR)',
+ 'files': [
+ '<!(/bin/ls <(asan_osx_dynamic))',
+ ],
+ },
+ ],
+ }],
+ # ASan works with iOS simulator only, not bare-metal iOS.
+ ['OS=="ios" and target_arch=="ia32"', {
+ 'toolsets': ['host', 'target'],
+ 'copies': [
+ {
+ 'destination': '<(PRODUCT_DIR)',
+ 'target_conditions': [
+ ['_toolset=="host"', {
+ 'files': [ '<!(/bin/ls <(asan_osx_dynamic))'],
+ }],
+ ['_toolset=="target"', {
+ 'files': [ '<!(/bin/ls <(asan_iossim_dynamic))'],
+ }],
+ ],
+ },
+ ],
+ }],
+ ],
+ },
+ ],
+}
diff --git a/build/secondary/third_party/crashpad/crashpad/util/BUILD.gn b/build/secondary/third_party/crashpad/crashpad/util/BUILD.gn
index d29076f..9d519b7 100644
--- a/build/secondary/third_party/crashpad/crashpad/util/BUILD.gn
+++ b/build/secondary/third_party/crashpad/crashpad/util/BUILD.gn
@@ -9,7 +9,7 @@
# Allows the source set to inject ldflags for targets that link to it.
config("util_link_config") {
if (is_mac) {
- ldflags = [ "/usr/lib/libbsm.dylib" ]
+ libs = [ "bsm" ]
}
}
diff --git a/build/shim_headers.gypi b/build/shim_headers.gypi
new file mode 100644
index 0000000..56d8d3a
--- /dev/null
+++ b/build/shim_headers.gypi
@@ -0,0 +1,60 @@
+# Copyright (c) 2012 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 file is meant to be included into a target to handle shim headers
+# in a consistent manner. To use this the following variables need to be
+# defined:
+# headers_root_path: string: path to directory containing headers
+# header_filenames: list: list of header file names
+
+{
+ 'variables': {
+ 'shim_headers_path': '<(SHARED_INTERMEDIATE_DIR)/shim_headers/<(_target_name)/<(_toolset)',
+ 'shim_generator_additional_args%': [],
+ },
+ 'include_dirs++': [
+ '<(shim_headers_path)',
+ ],
+ 'all_dependent_settings': {
+ # Repeating this with different numbers of plusses is unfortunately required
+ # to make sure that even if this include is inside nested conditions/etc, it
+ # still gets inserted at the beginning of the include_dirs list. See
+ # http://crbug.com/263818 for details.
+ 'include_dirs+++': [
+ '<(shim_headers_path)',
+ ],
+ 'include_dirs++++': [
+ '<(shim_headers_path)',
+ ],
+ 'include_dirs+++++': [
+ '<(shim_headers_path)',
+ ],
+ },
+ 'actions': [
+ {
+ 'variables': {
+ 'generator_path': '<(DEPTH)/tools/generate_shim_headers/generate_shim_headers.py',
+ 'generator_args': [
+ '--headers-root', '<(headers_root_path)',
+ '--output-directory', '<(shim_headers_path)',
+ '<@(shim_generator_additional_args)',
+ '<@(header_filenames)',
+ ],
+ },
+ 'action_name': 'generate_<(_target_name)_shim_headers',
+ 'inputs': [
+ '<(generator_path)',
+ ],
+ 'outputs': [
+ '<!@pymod_do_main(generate_shim_headers <@(generator_args) --outputs)',
+ ],
+ 'action': ['python',
+ '<(generator_path)',
+ '<@(generator_args)',
+ '--generate',
+ ],
+ 'message': 'Generating <(_target_name) shim headers',
+ },
+ ],
+}
diff --git a/build/vs_toolchain.py b/build/vs_toolchain.py
new file mode 100755
index 0000000..ddff24a
--- /dev/null
+++ b/build/vs_toolchain.py
@@ -0,0 +1,382 @@
+#!/usr/bin/env python
+# Copyright 2014 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.
+
+import glob
+import json
+import os
+import pipes
+import shutil
+import subprocess
+import sys
+
+
+script_dir = os.path.dirname(os.path.realpath(__file__))
+chrome_src = os.path.abspath(os.path.join(script_dir, os.pardir))
+SRC_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+sys.path.insert(0, os.path.join(chrome_src, 'tools', 'gyp', 'pylib'))
+json_data_file = os.path.join(script_dir, 'win_toolchain.json')
+
+
+import gyp
+
+
+# Use MSVS2015 as the default toolchain.
+CURRENT_DEFAULT_TOOLCHAIN_VERSION = '2015'
+
+
+def SetEnvironmentAndGetRuntimeDllDirs():
+ """Sets up os.environ to use the depot_tools VS toolchain with gyp, and
+ returns the location of the VS runtime DLLs so they can be copied into
+ the output directory after gyp generation.
+ """
+ vs_runtime_dll_dirs = None
+ depot_tools_win_toolchain = \
+ bool(int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', '1')))
+ # When running on a non-Windows host, only do this if the SDK has explicitly
+ # been downloaded before (in which case json_data_file will exist).
+ if ((sys.platform in ('win32', 'cygwin') or os.path.exists(json_data_file))
+ and depot_tools_win_toolchain):
+ if ShouldUpdateToolchain():
+ Update()
+ with open(json_data_file, 'r') as tempf:
+ toolchain_data = json.load(tempf)
+
+ toolchain = toolchain_data['path']
+ version = toolchain_data['version']
+ win_sdk = toolchain_data.get('win_sdk')
+ if not win_sdk:
+ win_sdk = toolchain_data['win8sdk']
+ wdk = toolchain_data['wdk']
+ # TODO(scottmg): The order unfortunately matters in these. They should be
+ # split into separate keys for x86 and x64. (See CopyVsRuntimeDlls call
+ # below). http://crbug.com/345992
+ vs_runtime_dll_dirs = toolchain_data['runtime_dirs']
+
+ os.environ['GYP_MSVS_OVERRIDE_PATH'] = toolchain
+ os.environ['GYP_MSVS_VERSION'] = version
+ # We need to make sure windows_sdk_path is set to the automated
+ # toolchain values in GYP_DEFINES, but don't want to override any
+ # otheroptions.express
+ # values there.
+ gyp_defines_dict = gyp.NameValueListToDict(gyp.ShlexEnv('GYP_DEFINES'))
+ gyp_defines_dict['windows_sdk_path'] = win_sdk
+ os.environ['GYP_DEFINES'] = ' '.join('%s=%s' % (k, pipes.quote(str(v)))
+ for k, v in gyp_defines_dict.iteritems())
+ os.environ['WINDOWSSDKDIR'] = win_sdk
+ os.environ['WDK_DIR'] = wdk
+ # Include the VS runtime in the PATH in case it's not machine-installed.
+ runtime_path = os.path.pathsep.join(vs_runtime_dll_dirs)
+ os.environ['PATH'] = runtime_path + os.path.pathsep + os.environ['PATH']
+ elif sys.platform == 'win32' and not depot_tools_win_toolchain:
+ if not 'GYP_MSVS_OVERRIDE_PATH' in os.environ:
+ os.environ['GYP_MSVS_OVERRIDE_PATH'] = DetectVisualStudioPath()
+ if not 'GYP_MSVS_VERSION' in os.environ:
+ os.environ['GYP_MSVS_VERSION'] = GetVisualStudioVersion()
+
+ return vs_runtime_dll_dirs
+
+
+def _RegistryGetValueUsingWinReg(key, value):
+ """Use the _winreg module to obtain the value of a registry key.
+
+ Args:
+ key: The registry key.
+ value: The particular registry value to read.
+ Return:
+ contents of the registry key's value, or None on failure. Throws
+ ImportError if _winreg is unavailable.
+ """
+ import _winreg
+ try:
+ root, subkey = key.split('\\', 1)
+ assert root == 'HKLM' # Only need HKLM for now.
+ with _winreg.OpenKey(_winreg.HKEY_LOCAL_MACHINE, subkey) as hkey:
+ return _winreg.QueryValueEx(hkey, value)[0]
+ except WindowsError:
+ return None
+
+
+def _RegistryGetValue(key, value):
+ try:
+ return _RegistryGetValueUsingWinReg(key, value)
+ except ImportError:
+ raise Exception('The python library _winreg not found.')
+
+
+def GetVisualStudioVersion():
+ """Return GYP_MSVS_VERSION of Visual Studio.
+ """
+ return os.environ.get('GYP_MSVS_VERSION', CURRENT_DEFAULT_TOOLCHAIN_VERSION)
+
+
+def DetectVisualStudioPath():
+ """Return path to the GYP_MSVS_VERSION of Visual Studio.
+ """
+
+ # Note that this code is used from
+ # build/toolchain/win/setup_toolchain.py as well.
+ version_as_year = GetVisualStudioVersion()
+ year_to_version = {
+ '2013': '12.0',
+ '2015': '14.0',
+ }
+ if version_as_year not in year_to_version:
+ raise Exception(('Visual Studio version %s (from GYP_MSVS_VERSION)'
+ ' not supported. Supported versions are: %s') % (
+ version_as_year, ', '.join(year_to_version.keys())))
+ version = year_to_version[version_as_year]
+ keys = [r'HKLM\Software\Microsoft\VisualStudio\%s' % version,
+ r'HKLM\Software\Wow6432Node\Microsoft\VisualStudio\%s' % version]
+ for key in keys:
+ path = _RegistryGetValue(key, 'InstallDir')
+ if not path:
+ continue
+ path = os.path.normpath(os.path.join(path, '..', '..'))
+ return path
+
+ raise Exception(('Visual Studio Version %s (from GYP_MSVS_VERSION)'
+ ' not found.') % (version_as_year))
+
+
+def _VersionNumber():
+ """Gets the standard version number ('120', '140', etc.) based on
+ GYP_MSVS_VERSION."""
+ vs_version = GetVisualStudioVersion()
+ if vs_version == '2013':
+ return '120'
+ elif vs_version == '2015':
+ return '140'
+ else:
+ raise ValueError('Unexpected GYP_MSVS_VERSION')
+
+
+def _CopyRuntimeImpl(target, source, verbose=True):
+ """Copy |source| to |target| if it doesn't already exist or if it needs to be
+ updated (comparing last modified time as an approximate float match as for
+ some reason the values tend to differ by ~1e-07 despite being copies of the
+ same file... https://crbug.com/603603).
+ """
+ if (os.path.isdir(os.path.dirname(target)) and
+ (not os.path.isfile(target) or
+ abs(os.stat(target).st_mtime - os.stat(source).st_mtime) >= 0.01)):
+ if verbose:
+ print 'Copying %s to %s...' % (source, target)
+ if os.path.exists(target):
+ os.unlink(target)
+ shutil.copy2(source, target)
+
+
+def _CopyRuntime2013(target_dir, source_dir, dll_pattern):
+ """Copy both the msvcr and msvcp runtime DLLs, only if the target doesn't
+ exist, but the target directory does exist."""
+ for file_part in ('p', 'r'):
+ dll = dll_pattern % file_part
+ target = os.path.join(target_dir, dll)
+ source = os.path.join(source_dir, dll)
+ _CopyRuntimeImpl(target, source)
+
+
+def _CopyRuntime2015(target_dir, source_dir, dll_pattern, suffix):
+ """Copy both the msvcp and vccorlib runtime DLLs, only if the target doesn't
+ exist, but the target directory does exist."""
+ for file_part in ('msvcp', 'vccorlib', 'vcruntime'):
+ dll = dll_pattern % file_part
+ target = os.path.join(target_dir, dll)
+ source = os.path.join(source_dir, dll)
+ _CopyRuntimeImpl(target, source)
+ ucrt_src_dir = os.path.join(source_dir, 'api-ms-win-*.dll')
+ for ucrt_src_file in glob.glob(ucrt_src_dir):
+ file_part = os.path.basename(ucrt_src_file)
+ ucrt_dst_file = os.path.join(target_dir, file_part)
+ _CopyRuntimeImpl(ucrt_dst_file, ucrt_src_file, False)
+ _CopyRuntimeImpl(os.path.join(target_dir, 'ucrtbase' + suffix),
+ os.path.join(source_dir, 'ucrtbase' + suffix))
+
+
+def _CopyRuntime(target_dir, source_dir, target_cpu, debug):
+ """Copy the VS runtime DLLs, only if the target doesn't exist, but the target
+ directory does exist. Handles VS 2013 and VS 2015."""
+ suffix = "d.dll" if debug else ".dll"
+ if GetVisualStudioVersion() == '2015':
+ _CopyRuntime2015(target_dir, source_dir, '%s140' + suffix, suffix)
+ else:
+ _CopyRuntime2013(target_dir, source_dir, 'msvc%s120' + suffix)
+
+ # Copy the PGO runtime library to the release directories.
+ if not debug and os.environ.get('GYP_MSVS_OVERRIDE_PATH'):
+ pgo_x86_runtime_dir = os.path.join(os.environ.get('GYP_MSVS_OVERRIDE_PATH'),
+ 'VC', 'bin')
+ pgo_x64_runtime_dir = os.path.join(pgo_x86_runtime_dir, 'amd64')
+ pgo_runtime_dll = 'pgort' + _VersionNumber() + '.dll'
+ if target_cpu == "x86":
+ source_x86 = os.path.join(pgo_x86_runtime_dir, pgo_runtime_dll)
+ if os.path.exists(source_x86):
+ _CopyRuntimeImpl(os.path.join(target_dir, pgo_runtime_dll), source_x86)
+ elif target_cpu == "x64":
+ source_x64 = os.path.join(pgo_x64_runtime_dir, pgo_runtime_dll)
+ if os.path.exists(source_x64):
+ _CopyRuntimeImpl(os.path.join(target_dir, pgo_runtime_dll),
+ source_x64)
+ else:
+ raise NotImplementedError("Unexpected target_cpu value:" + target_cpu)
+
+
+def CopyVsRuntimeDlls(output_dir, runtime_dirs):
+ """Copies the VS runtime DLLs from the given |runtime_dirs| to the output
+ directory so that even if not system-installed, built binaries are likely to
+ be able to run.
+
+ This needs to be run after gyp has been run so that the expected target
+ output directories are already created.
+
+ This is used for the GYP build and gclient runhooks.
+ """
+ x86, x64 = runtime_dirs
+ out_debug = os.path.join(output_dir, 'Debug')
+ out_debug_nacl64 = os.path.join(output_dir, 'Debug', 'x64')
+ out_release = os.path.join(output_dir, 'Release')
+ out_release_nacl64 = os.path.join(output_dir, 'Release', 'x64')
+ out_debug_x64 = os.path.join(output_dir, 'Debug_x64')
+ out_release_x64 = os.path.join(output_dir, 'Release_x64')
+
+ if os.path.exists(out_debug) and not os.path.exists(out_debug_nacl64):
+ os.makedirs(out_debug_nacl64)
+ if os.path.exists(out_release) and not os.path.exists(out_release_nacl64):
+ os.makedirs(out_release_nacl64)
+ _CopyRuntime(out_debug, x86, "x86", debug=True)
+ _CopyRuntime(out_release, x86, "x86", debug=False)
+ _CopyRuntime(out_debug_x64, x64, "x64", debug=True)
+ _CopyRuntime(out_release_x64, x64, "x64", debug=False)
+ _CopyRuntime(out_debug_nacl64, x64, "x64", debug=True)
+ _CopyRuntime(out_release_nacl64, x64, "x64", debug=False)
+
+
+def CopyDlls(target_dir, configuration, target_cpu):
+ """Copy the VS runtime DLLs into the requested directory as needed.
+
+ configuration is one of 'Debug' or 'Release'.
+ target_cpu is one of 'x86' or 'x64'.
+
+ The debug configuration gets both the debug and release DLLs; the
+ release config only the latter.
+
+ This is used for the GN build.
+ """
+ vs_runtime_dll_dirs = SetEnvironmentAndGetRuntimeDllDirs()
+ if not vs_runtime_dll_dirs:
+ return
+
+ x64_runtime, x86_runtime = vs_runtime_dll_dirs
+ runtime_dir = x64_runtime if target_cpu == 'x64' else x86_runtime
+ _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=False)
+ if configuration == 'Debug':
+ _CopyRuntime(target_dir, runtime_dir, target_cpu, debug=True)
+
+
+def _GetDesiredVsToolchainHashes():
+ """Load a list of SHA1s corresponding to the toolchains that we want installed
+ to build with."""
+ if GetVisualStudioVersion() == '2015':
+ if bool(int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN_PRERELEASE', '0'))):
+ # Update 3 pre-release, May 16th.
+ return ['283cc362f57dbe240e0d21f48ae45f9d834a425a']
+ else:
+ # Update 2.
+ return ['95ddda401ec5678f15eeed01d2bee08fcbc5ee97']
+ else:
+ return ['03a4e939cd325d6bc5216af41b92d02dda1366a6']
+
+
+def ShouldUpdateToolchain():
+ """Check if the toolchain should be upgraded."""
+ if not os.path.exists(json_data_file):
+ return True
+ with open(json_data_file, 'r') as tempf:
+ toolchain_data = json.load(tempf)
+ version = toolchain_data['version']
+ env_version = GetVisualStudioVersion()
+ # If there's a mismatch between the version set in the environment and the one
+ # in the json file then the toolchain should be updated.
+ return version != env_version
+
+
+def Update(force=False):
+ """Requests an update of the toolchain to the specific hashes we have at
+ this revision. The update outputs a .json of the various configuration
+ information required to pass to gyp which we use in |GetToolchainDir()|.
+ """
+ if force != False and force != '--force':
+ print >>sys.stderr, 'Unknown parameter "%s"' % force
+ return 1
+ if force == '--force' or os.path.exists(json_data_file):
+ force = True
+
+ depot_tools_win_toolchain = \
+ bool(int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', '1')))
+ if ((sys.platform in ('win32', 'cygwin') or force) and
+ depot_tools_win_toolchain):
+ import find_depot_tools
+ depot_tools_path = find_depot_tools.add_depot_tools_to_path()
+ # Necessary so that get_toolchain_if_necessary.py will put the VS toolkit
+ # in the correct directory.
+ os.environ['GYP_MSVS_VERSION'] = GetVisualStudioVersion()
+ get_toolchain_args = [
+ sys.executable,
+ os.path.join(depot_tools_path,
+ 'win_toolchain',
+ 'get_toolchain_if_necessary.py'),
+ '--output-json', json_data_file,
+ ] + _GetDesiredVsToolchainHashes()
+ if force:
+ get_toolchain_args.append('--force')
+ subprocess.check_call(get_toolchain_args)
+
+ return 0
+
+
+def NormalizePath(path):
+ while path.endswith("\\"):
+ path = path[:-1]
+ return path
+
+
+def GetToolchainDir():
+ """Gets location information about the current toolchain (must have been
+ previously updated by 'update'). This is used for the GN build."""
+ runtime_dll_dirs = SetEnvironmentAndGetRuntimeDllDirs()
+
+ # If WINDOWSSDKDIR is not set, search the default SDK path and set it.
+ if not 'WINDOWSSDKDIR' in os.environ:
+ default_sdk_path = 'C:\\Program Files (x86)\\Windows Kits\\10'
+ if os.path.isdir(default_sdk_path):
+ os.environ['WINDOWSSDKDIR'] = default_sdk_path
+
+ print '''vs_path = "%s"
+sdk_path = "%s"
+vs_version = "%s"
+wdk_dir = "%s"
+runtime_dirs = "%s"
+''' % (
+ NormalizePath(os.environ['GYP_MSVS_OVERRIDE_PATH']),
+ NormalizePath(os.environ['WINDOWSSDKDIR']),
+ GetVisualStudioVersion(),
+ NormalizePath(os.environ.get('WDK_DIR', '')),
+ os.path.pathsep.join(runtime_dll_dirs or ['None']))
+
+
+def main():
+ commands = {
+ 'update': Update,
+ 'get_toolchain_dir': GetToolchainDir,
+ 'copy_dlls': CopyDlls,
+ }
+ if len(sys.argv) < 2 or sys.argv[1] not in commands:
+ print >>sys.stderr, 'Expected one of: %s' % ', '.join(commands)
+ return 1
+ return commands[sys.argv[1]](*sys.argv[2:])
+
+
+if __name__ == '__main__':
+ sys.exit(main())