summaryrefslogtreecommitdiffstats
path: root/chromium/build
diff options
context:
space:
mode:
authorJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-08 14:30:41 +0200
committerJocelyn Turcotte <jocelyn.turcotte@digia.com>2014-08-12 13:49:54 +0200
commitab0a50979b9eb4dfa3320eff7e187e41efedf7a9 (patch)
tree498dfb8a97ff3361a9f7486863a52bb4e26bb898 /chromium/build
parent4ce69f7403811819800e7c5ae1318b2647e778d1 (diff)
Update Chromium to beta version 37.0.2062.68
Change-Id: I188e3b5aff1bec75566014291b654eb19f5bc8ca Reviewed-by: Andras Becsi <andras.becsi@digia.com>
Diffstat (limited to 'chromium/build')
-rw-r--r--chromium/build/all.gyp439
-rw-r--r--chromium/build/all_android.gyp187
-rw-r--r--chromium/build/android/dex_action.gypi14
-rw-r--r--chromium/build/android/finalize_apk_action.gypi22
-rw-r--r--chromium/build/android/rezip.gyp23
-rw-r--r--chromium/build/apk_fake_jar.gypi10
-rw-r--r--chromium/build/apk_test.gypi5
-rw-r--r--chromium/build/build_config.h35
-rwxr-xr-xchromium/build/check_return_value.py17
-rw-r--r--chromium/build/common.gypi1712
-rw-r--r--chromium/build/compiled_action.gni148
-rwxr-xr-xchromium/build/compiler_version.py138
-rw-r--r--chromium/build/config/BUILD.gn217
-rw-r--r--chromium/build/config/BUILDCONFIG.gn321
-rw-r--r--chromium/build/config/allocator.gni14
-rw-r--r--chromium/build/config/android/BUILD.gn20
-rw-r--r--chromium/build/config/android/config.gni128
-rw-r--r--chromium/build/config/android/internal_rules.gni25
-rw-r--r--chromium/build/config/android/rules.gni240
-rw-r--r--chromium/build/config/arm.gni55
-rw-r--r--chromium/build/config/clang/BUILD.gn40
-rw-r--r--chromium/build/config/clang/clang.gni9
-rw-r--r--chromium/build/config/compiler/BUILD.gn656
-rw-r--r--chromium/build/config/crypto.gni22
-rw-r--r--chromium/build/config/features.gni74
-rw-r--r--chromium/build/config/gcc/BUILD.gn41
-rw-r--r--chromium/build/config/gcc/gcc_version.gni9
-rw-r--r--chromium/build/config/ios/BUILD.gn19
-rw-r--r--chromium/build/config/ios/ios_sdk.gni30
-rw-r--r--chromium/build/config/ios/ios_sdk.py19
-rw-r--r--chromium/build/config/linux/BUILD.gn161
-rw-r--r--chromium/build/config/linux/pkg-config.py123
-rw-r--r--chromium/build/config/linux/pkg_config.gni38
-rw-r--r--chromium/build/config/linux/sysroot.gni27
-rw-r--r--chromium/build/config/linux/sysroot_ld_path.py20
-rw-r--r--chromium/build/config/mac/BUILD.gn25
-rw-r--r--chromium/build/config/mac/mac_sdk.gni34
-rw-r--r--chromium/build/config/sysroot.gni50
-rw-r--r--chromium/build/config/ui.gni63
-rw-r--r--chromium/build/config/win/BUILD.gn120
-rw-r--r--chromium/build/config/win/get_msvc_config.py77
-rw-r--r--chromium/build/config/win/get_msvc_config_real.py575
-rw-r--r--chromium/build/config/win/visual_studio_version.gni40
-rw-r--r--chromium/build/copy_test_data_ios.gypi7
-rwxr-xr-xchromium/build/detect_host_arch.py40
-rwxr-xr-xchromium/build/dir_exists.py10
-rwxr-xr-xchromium/build/download_nacl_toolchains.py37
-rw-r--r--chromium/build/filename_rules.gypi11
-rwxr-xr-xchromium/build/find_isolated_tests.py78
-rwxr-xr-xchromium/build/gdb-add-index36
-rwxr-xr-xchromium/build/get_landmines.py12
-rwxr-xr-xchromium/build/get_syzygy_binaries.py410
-rwxr-xr-xchromium/build/git-hooks/pre-commit30
-rw-r--r--chromium/build/gn_helpers.py39
-rw-r--r--chromium/build/gn_run_binary.py22
-rw-r--r--chromium/build/grit_action.gypi7
-rwxr-xr-xchromium/build/gyp_chromium272
-rw-r--r--chromium/build/gyp_helper.py1
-rw-r--r--chromium/build/gypi_to_gn.py167
-rwxr-xr-xchromium/build/install-build-deps-android.sh82
-rwxr-xr-xchromium/build/install-build-deps.sh142
-rw-r--r--chromium/build/internal/release_impl_official.gypi1
-rwxr-xr-xchromium/build/inverse_depth.py24
-rw-r--r--chromium/build/ios/PRESUBMIT.py9
-rw-r--r--chromium/build/ios/grit_whitelist.txt461
-rw-r--r--chromium/build/isolate.gypi54
-rw-r--r--chromium/build/jar_file_jni_generator.gypi6
-rw-r--r--chromium/build/java.gypi160
-rw-r--r--chromium/build/java_aidl.gypi2
-rw-r--r--chromium/build/java_apk.gypi451
-rw-r--r--chromium/build/java_prebuilt.gypi33
-rw-r--r--chromium/build/java_strings_grd.gypi62
-rw-r--r--chromium/build/jni_generator.gypi13
-rw-r--r--chromium/build/json_schema.gni140
-rw-r--r--chromium/build/json_schema_bundle_compile.gypi6
-rw-r--r--chromium/build/json_schema_compile.gypi15
-rw-r--r--chromium/build/landmine_utils.py4
-rwxr-xr-xchromium/build/landmines.py18
-rw-r--r--chromium/build/linux/bin/eu-strip.sha11
-rwxr-xr-xchromium/build/linux/install-arm-sysroot.py11
-rwxr-xr-xchromium/build/linux/pkg-config-wrapper8
-rwxr-xr-xchromium/build/linux/python_arch.sh43
-rwxr-xr-xchromium/build/linux/sysroot_ld_path.sh22
-rw-r--r--chromium/build/linux/system.gyp531
-rw-r--r--chromium/build/linux/unbundle/harfbuzz.gyp9
-rw-r--r--chromium/build/linux/unbundle/libXNVCtrl.gyp35
-rwxr-xr-xchromium/build/linux/unbundle/replace_gyp_files.py1
-rw-r--r--chromium/build/mac/asan.gyp31
-rwxr-xr-xchromium/build/mac/edit_xibs.sh4
-rwxr-xr-xchromium/build/mac/find_sdk.py7
-rwxr-xr-xchromium/build/mac/tweak_info_plist.py57
-rw-r--r--chromium/build/protoc.gypi1
-rw-r--r--chromium/build/release.gypi12
-rw-r--r--chromium/build/repack_action.gypi30
-rw-r--r--chromium/build/sanitize-win-build-log.sed1
-rw-r--r--chromium/build/secondary/chrome/BUILD.gn299
-rw-r--r--chromium/build/secondary/testing/BUILD.gn11
-rw-r--r--chromium/build/secondary/testing/gmock/BUILD.gn45
-rw-r--r--chromium/build/secondary/testing/gtest/BUILD.gn109
-rw-r--r--chromium/build/secondary/third_party/WebKit/Source/platform/BUILD.gn73
-rw-r--r--chromium/build/secondary/third_party/WebKit/Source/wtf/BUILD.gn364
-rw-r--r--chromium/build/secondary/third_party/android_tools/BUILD.gn17
-rw-r--r--chromium/build/secondary/third_party/angle/BUILD.gn644
-rw-r--r--chromium/build/secondary/third_party/angle/angle_commit.h8
-rw-r--r--chromium/build/secondary/third_party/flac/BUILD.gn76
-rw-r--r--chromium/build/secondary/third_party/freetype/BUILD.gn52
-rw-r--r--chromium/build/secondary/third_party/icu/BUILD.gn444
-rw-r--r--chromium/build/secondary/third_party/leveldatabase/BUILD.gn338
-rw-r--r--chromium/build/secondary/third_party/libjpeg_turbo/BUILD.gn216
-rw-r--r--chromium/build/secondary/third_party/nss/BUILD.gn1159
-rw-r--r--chromium/build/secondary/third_party/ots/BUILD.gn90
-rw-r--r--chromium/build/secondary/third_party/sfntly/BUILD.gn129
-rw-r--r--chromium/build/secondary/third_party/trace-viewer/BUILD.gn320
-rw-r--r--chromium/build/secondary/tools/grit/grit_rule.gni153
-rw-r--r--chromium/build/secondary/ui/BUILD.gn11
-rw-r--r--chromium/build/toolchain/android/BUILD.gn67
-rw-r--r--chromium/build/toolchain/android/find_android_compiler.py41
-rw-r--r--chromium/build/toolchain/clang.gni9
-rw-r--r--chromium/build/toolchain/gcc_toolchain.gni111
-rw-r--r--chromium/build/toolchain/goma.gni31
-rw-r--r--chromium/build/toolchain/linux/BUILD.gn222
-rw-r--r--chromium/build/toolchain/mac/BUILD.gn187
-rw-r--r--chromium/build/toolchain/nacl/BUILD.gn1
-rw-r--r--chromium/build/toolchain/win/BUILD.gn38
-rw-r--r--chromium/build/toolchain/win/midl.gni94
-rw-r--r--chromium/build/toolchain/win/setup_toolchain.py97
-rw-r--r--chromium/build/toolchain_vs2013.hash2
-rw-r--r--chromium/build/uiautomator_test.gypi25
-rw-r--r--chromium/build/util/BUILD.gn31
-rw-r--r--chromium/build/util/LASTCHANGE2
-rw-r--r--chromium/build/util/LASTCHANGE.blink2
-rw-r--r--chromium/build/util/version.gypi20
-rwxr-xr-xchromium/build/util/version.py166
-rw-r--r--chromium/build/vs_toolchain.py173
-rw-r--r--chromium/build/whitespace_file.txt61
-rw-r--r--chromium/build/win/importlibs/create_import_lib.gypi1
-rwxr-xr-xchromium/build/win/reorder-imports.py57
-rw-r--r--chromium/build/win/setup_cygwin_mount.py20
138 files changed, 12186 insertions, 3538 deletions
diff --git a/chromium/build/all.gyp b/chromium/build/all.gyp
index 0942a1c8c1d..7d212b455f7 100644
--- a/chromium/build/all.gyp
+++ b/chromium/build/all.gyp
@@ -3,6 +3,11 @@
# found in the LICENSE file.
{
+ 'variables': {
+ # A hook that can be overridden in other repositories to add additional
+ # compilation targets to 'All'. Only used on Android.
+ 'android_app_targets%': [],
+ },
'targets': [
{
'target_name': 'All',
@@ -11,16 +16,13 @@
'dependencies': [
'some.gyp:*',
'../base/base.gyp:*',
- '../chrome/chrome.gyp:*',
'../components/components.gyp:*',
'../components/components_tests.gyp:*',
'../content/content.gyp:*',
- '../content/content_shell_and_tests.gyp:*',
'../crypto/crypto.gyp:*',
'../net/net.gyp:*',
'../sdch/sdch.gyp:*',
'../sql/sql.gyp:*',
- '../sync/sync.gyp:*',
'../testing/gmock.gyp:*',
'../testing/gtest.gyp:*',
'../third_party/icu/icu.gyp:*',
@@ -28,13 +30,46 @@
'../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:*',
- '../ui/ui.gyp:*',
'../url/url.gyp:*',
],
'conditions': [
- ['OS!="ios"', {
+ ['OS=="ios"', {
'dependencies': [
+ '../ios/ios.gyp:*',
+ '../ui/gfx/gfx_tests.gyp:gfx_unittests',
+ '../ui/ui_unittests.gyp:ui_unittests',
+ ],
+ }],
+ ['OS=="android"', {
+ 'dependencies': [
+ '../content/content_shell_and_tests.gyp:content_shell_apk',
+ '../mojo/mojo.gyp:mojo_shell_apk',
+ '../mojo/mojo.gyp:mojo_test_apk',
+ '<@(android_app_targets)',
+ 'android_builder_tests',
+ '../android_webview/android_webview.gyp:android_webview_apk',
+ '../chrome/chrome.gyp:chrome_shell_apk',
+ '../remoting/remoting.gyp:remoting_apk',
+ '../tools/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',
+ ],
+ }, {
+ 'dependencies': [
+ '../content/content_shell_and_tests.gyp:*',
+ # TODO: This should build on Android and the target should move to the list above.
+ '../sync/sync.gyp:*',
+ ],
+ }],
+ ['OS!="ios" and OS!="android"', {
+ 'dependencies': [
+ '../third_party/re2/re2.gyp:re2',
+ '../chrome/chrome.gyp:*',
'../cc/cc_tests.gyp:*',
'../device/bluetooth/bluetooth.gyp:*',
'../device/device_tests.gyp:*',
@@ -49,8 +84,11 @@
'../mojo/mojo.gyp:*',
'../ppapi/ppapi.gyp:*',
'../ppapi/ppapi_internal.gyp:*',
+ '../ppapi/tools/ppapi_tools.gyp:*',
'../printing/printing.gyp:*',
'../skia/skia.gyp:*',
+ '../sync/tools/sync_tools.gyp:*',
+ '../third_party/WebKit/public/all.gyp:*',
'../third_party/cacheinvalidation/cacheinvalidation.gyp:*',
'../third_party/codesighs/codesighs.gyp:*',
'../third_party/ffmpeg/ffmpeg.gyp:*',
@@ -64,32 +102,21 @@
'../third_party/modp_b64/modp_b64.gyp:*',
'../third_party/npapi/npapi.gyp:*',
'../third_party/ots/ots.gyp:*',
+ '../third_party/pdfium/samples/samples.gyp:*',
'../third_party/qcms/qcms.gyp:*',
- '../third_party/re2/re2.gyp:re2',
- '../third_party/WebKit/public/all.gyp:*',
'../tools/gn/gn.gyp:*',
'../tools/perf/clear_system_cache/clear_system_cache.gyp:*',
+ '../tools/telemetry/telemetry.gyp:*',
'../v8/tools/gyp/v8.gyp:*',
- '../webkit/glue/webkit_glue.gyp:*',
'../webkit/renderer/compositor_bindings/compositor_bindings_tests.gyp:*',
'<(libjpeg_gyp_path):*',
],
- }, { # 'OS=="ios"'
- 'dependencies': [
- '../ios/ios.gyp:*',
- '../ui/ui_unittests.gyp:ui_unittests',
- ],
}],
['OS!="android" and OS!="ios"', {
'dependencies': [
'../chrome/tools/profile_reset/jtl_compiler.gyp:*',
],
}],
- ['os_posix==1 and OS!="android" and OS!="ios"', {
- 'dependencies': [
- '../third_party/yasm/yasm.gyp:*#host',
- ],
- }],
['OS=="mac" or OS=="ios" or OS=="win"', {
'dependencies': [
'../third_party/nss/nss.gyp:*',
@@ -102,6 +129,7 @@
}],
['OS=="mac"', {
'dependencies': [
+ '../sandbox/sandbox.gyp:*',
'../third_party/ocmock/ocmock.gyp:*',
],
}],
@@ -117,13 +145,6 @@
'../chrome/chrome.gyp:linux_packages_<(channel)',
],
}],
- ['chromeos==0', {
- 'dependencies': [
- '../third_party/cros_dbus_cplusplus/cros_dbus_cplusplus.gyp:*',
- '../third_party/libmtp/libmtp.gyp:*',
- '../third_party/mtpd/mtpd.gyp:*',
- ],
- }],
['enable_ipc_fuzzer==1', {
'dependencies': [
'../tools/ipc_fuzzer/ipc_fuzzer.gyp:*',
@@ -136,11 +157,6 @@
'../tools/xdisplaycheck/xdisplaycheck.gyp:*',
],
}],
- ['toolkit_uses_gtk==1', {
- 'dependencies': [
- '../tools/gtk_clipboard_dump/gtk_clipboard_dump.gyp:*',
- ],
- }],
['OS=="win"', {
'conditions': [
['win_use_allocator_shim==1', {
@@ -148,13 +164,6 @@
'../base/allocator/allocator.gyp:*',
],
}],
- # Don't enable dependencies that don't work on Win64.
- ['target_arch!="x64"', {
- 'dependencies': [
- # TODO(jschuh) Enable Win64 Memory Watcher. crbug.com/176877
- '../tools/memory_watcher/memory_watcher.gyp:*',
- ],
- }],
],
'dependencies': [
'../chrome_elf/chrome_elf.gyp:*',
@@ -164,6 +173,7 @@
'../sandbox/sandbox.gyp:*',
'<(angle_path)/src/build_angle.gyp:*',
'../third_party/bspatch/bspatch.gyp:*',
+ '../tools/win/static_initializers/static_initializers.gyp:*',
],
}, {
'dependencies': [
@@ -179,7 +189,6 @@
['use_aura==1', {
'dependencies': [
'../ui/aura/aura.gyp:*',
- '../ui/oak/oak.gyp:*',
],
}],
['use_ash==1', {
@@ -207,13 +216,24 @@
'../google_apis/gcm/gcm.gyp:*',
],
}],
+ ['chromeos==1 or (OS=="linux" and use_aura==1)', {
+ 'dependencies': [
+ '../apps/shell/app_shell.gyp:*',
+ ],
+ }],
+ ['chromeos==1', {
+ 'dependencies': [
+ '../athena/main/athena_main.gyp:*',
+ ],
+ }],
],
}, # target_name: All
{
'target_name': 'All_syzygy',
'type': 'none',
'conditions': [
- ['OS=="win" and fastbuild==0 and target_arch=="ia32"', {
+ ['OS=="win" and fastbuild==0 and target_arch=="ia32" and '
+ '(syzyasan==1 or syzygy_optimize==1)', {
'dependencies': [
'../chrome/installer/mini_installer_syzygy.gyp:*',
],
@@ -221,6 +241,8 @@
],
}, # 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': [
@@ -230,18 +252,18 @@
'../net/net.gyp:net_unittests',
'../sql/sql.gyp:sql_unittests',
'../sync/sync.gyp:sync_unit_tests',
+ '../ui/display/display.gyp:display_unittests',
+ '../ui/gfx/gfx_tests.gyp:gfx_unittests',
'../ui/ui_unittests.gyp:ui_unittests',
'../url/url.gyp:url_unittests',
],
'conditions': [
- ['OS!="ios"', {
+ ['OS!="ios" and OS!="android"', {
'dependencies': [
'../cc/cc_tests.gyp:cc_unittests',
'../chrome/chrome.gyp:browser_tests',
'../chrome/chrome.gyp:chromedriver_tests',
'../chrome/chrome.gyp:chromedriver_unittests',
- # TODO(kkania): Remove these after infra no longer depends on them.
- '../chrome/chrome.gyp:chromedriver2_unittests',
'../chrome/chrome.gyp:interactive_ui_tests',
'../chrome/chrome.gyp:sync_integration_tests',
'../chrome/chrome.gyp:unit_tests',
@@ -250,20 +272,24 @@
'../content/content_shell_and_tests.gyp:content_shell',
'../content/content_shell_and_tests.gyp:content_unittests',
'../device/device_tests.gyp:device_unittests',
+ '../extensions/extensions.gyp:extensions_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',
'../jingle/jingle.gyp:jingle_unittests',
+ '../media/cast/cast.gyp:cast_unittests',
'../media/media.gyp:media_unittests',
'../mojo/mojo.gyp:mojo',
'../ppapi/ppapi_internal.gyp:ppapi_unittests',
'../remoting/remoting.gyp:remoting_unittests',
'../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',
+ '../tools/telemetry/telemetry.gyp:*',
'../webkit/renderer/compositor_bindings/compositor_bindings_tests.gyp:webkit_compositor_bindings_unittests',
],
}],
@@ -271,18 +297,15 @@
'dependencies': [
'../chrome/chrome.gyp:crash_service',
'../chrome/chrome.gyp:installer_util_unittests',
- '../chrome/chrome.gyp:mini_installer_test',
- # mini_installer_tests depends on mini_installer. This should be
- # defined in installer.gyp.
+ # ../chrome/test/mini_installer requires mini_installer.
'../chrome/installer/mini_installer.gyp:mini_installer',
'../chrome_elf/chrome_elf.gyp:chrome_elf_unittests',
+ '../content/content_shell_and_tests.gyp:copy_test_netscape_plugin',
'../courgette/courgette.gyp:courgette_unittests',
'../sandbox/sandbox.gyp:sbox_integration_tests',
'../sandbox/sandbox.gyp:sbox_unittests',
'../sandbox/sandbox.gyp:sbox_validation_tests',
- '../third_party/WebKit/public/blink_test_plugin.gyp:blink_test_plugin',
'../ui/app_list/app_list.gyp:app_list_unittests',
- '../ui/views/views.gyp:views_unittests',
],
'conditions': [
# remoting_host_installation uses lots of non-trivial GYP that tend
@@ -294,7 +317,7 @@
'../remoting/remoting.gyp:remoting_host_installation',
],
}],
- ['asan==1', {
+ ['syzyasan==1', {
'variables': {
# Disable incremental linking for all modules.
# 0: inherit, 1: disabled, 2: enabled.
@@ -310,7 +333,7 @@
],
'msvs_settings': {
'VCLinkerTool': {
- # Enable profile information (necessary for asan
+ # Enable profile information (necessary for SyzyAsan
# instrumentation). This is incompatible with incremental
# linking.
'Profile': 'true',
@@ -321,8 +344,8 @@
}],
['OS=="linux"', {
'dependencies': [
- '../sandbox/sandbox.gyp:sandbox_linux_unittests',
'../dbus/dbus.gyp:dbus_unittests',
+ '../sandbox/sandbox.gyp:sandbox_linux_unittests',
],
}],
['OS=="mac"', {
@@ -336,7 +359,7 @@
'chromium_swarm_tests',
],
}],
- ['OS!="android" and OS!="ios"', {
+ ['OS!="android"', {
'dependencies': [
'../google_apis/gcm/gcm.gyp:gcm_unit_tests',
],
@@ -348,9 +371,11 @@
}],
['use_aura==1', {
'dependencies': [
+ '../ui/app_list/app_list.gyp:app_list_unittests',
'../ui/aura/aura.gyp:aura_unittests',
'../ui/compositor/compositor.gyp:compositor_unittests',
'../ui/keyboard/keyboard.gyp:keyboard_unittests',
+ '../ui/views/views.gyp:views_unittests',
],
}],
['use_aura==1 or toolkit_views==1', {
@@ -363,15 +388,13 @@
'../ash/ash.gyp:ash_unittests',
],
}],
+ ['disable_nacl==0', {
+ 'dependencies': [
+ '../components/nacl.gyp:nacl_loader_unittests',
+ ],
+ }],
],
}, # target_name: chromium_builder_tests
- {
- 'target_name': 'chromium_2010_builder_tests',
- 'type': 'none',
- 'dependencies': [
- 'chromium_builder_tests',
- ],
- }, # target_name: chromium_2010_builder_tests
],
'conditions': [
['OS!="ios"', {
@@ -381,14 +404,26 @@
'type': 'none',
'dependencies': [
'../third_party/WebKit/public/all.gyp:all_blink',
- '../content/content_shell_and_tests.gyp:content_shell',
],
'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',
+ ],
+ }, { # OS!="android"
+ 'dependencies': [
+ '../content/content_shell_and_tests.gyp:content_shell',
+ ],
+ }],
['OS=="win"', {
'dependencies': [
'../content/content_shell_and_tests.gyp:content_shell_crash_service',
+ '../content/content_shell_and_tests.gyp:layout_test_helper',
],
- }, { # OS!="win"
+ }],
+ ['OS!="win" and OS!="android"', {
'dependencies': [
'../breakpad/breakpad.gyp:minidump_stackwalk',
],
@@ -396,6 +431,7 @@
['OS=="mac"', {
'dependencies': [
'../breakpad/breakpad.gyp:dump_syms#host',
+ '../content/content_shell_and_tests.gyp:layout_test_helper',
],
}],
['OS=="linux"', {
@@ -405,15 +441,10 @@
}],
],
}, # target_name: blink_tests
- {
- # TODO(jochen): Eventually remove this target after everybody and
- # the bots started to use blink_tests only.
- 'target_name': 'all_webkit',
- 'type': 'none',
- 'dependencies': [
- 'blink_tests',
- ],
- }, # target_name: all_webkit
+ ],
+ }], # OS!=ios
+ ['OS!="ios" and OS!="android"', {
+ 'targets': [
{
'target_name': 'chromium_builder_nacl_win_integration',
'type': 'none',
@@ -428,11 +459,12 @@
'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:performance_ui_tests',
'../chrome/chrome.gyp:sync_performance_tests',
'../media/media.gyp:media_perftests',
'../tools/perf/clear_system_cache/clear_system_cache.gyp:*',
+ '../tools/telemetry/telemetry.gyp:*',
],
'conditions': [
['OS!="ios" and OS!="win"', {
@@ -463,12 +495,12 @@
'dependencies': [
'../chrome/chrome.gyp:chrome',
'../chrome/chrome.gyp:performance_browser_tests',
- '../chrome/chrome.gyp:performance_ui_tests',
'../content/content_shell_and_tests.gyp:content_browsertests',
'../content/content_shell_and_tests.gyp:content_gl_tests',
'../gpu/gles2_conform_support/gles2_conform_test.gyp:gles2_conform_test',
'../gpu/gpu.gyp:gl_tests',
'../gpu/gpu.gyp:angle_unittests',
+ '../tools/telemetry/telemetry.gyp:*',
],
'conditions': [
['OS!="ios" and OS!="win"', {
@@ -503,6 +535,7 @@
'../gpu/gles2_conform_support/gles2_conform_test.gyp:gles2_conform_test',
'../gpu/gpu.gyp:gl_tests',
'../gpu/gpu.gyp:angle_unittests',
+ '../tools/telemetry/telemetry.gyp:*',
],
'conditions': [
['OS!="ios" and OS!="win"', {
@@ -534,7 +567,6 @@
'../chrome/chrome.gyp:chrome',
# Dependencies of pyauto_functional tests.
'../remoting/remoting.gyp:remoting_webapp',
- '../chrome/chrome.gyp:pyautolib',
],
'conditions': [
['OS=="mac"', {
@@ -570,15 +602,14 @@
{
# This target contains everything we need to run tests on the special
# device-equipped WebRTC bots. We have device-requiring tests in
- # PyAuto, browser_tests and content_browsertests.
+ # browser_tests and content_browsertests.
'target_name': 'chromium_builder_webrtc',
'type': 'none',
'dependencies': [
- 'chromium_builder_qa', # needed for perf pyauto tests
+ 'chromium_builder_qa', # TODO(phoglund): not sure if needed?
'../chrome/chrome.gyp:browser_tests',
'../content/content_shell_and_tests.gyp:content_browsertests',
'../content/content_shell_and_tests.gyp:content_unittests',
- '../third_party/libjingle/libjingle.gyp:peerconnection_server',
'../third_party/webrtc/tools/tools.gyp:frame_analyzer',
'../third_party/webrtc/tools/tools.gyp:rgba_to_i420_converter',
],
@@ -612,24 +643,32 @@
'conditions': [
['OS!="win"', {
'dependencies': [
+ '../net/net.gyp:hpack_fuzz_wrapper',
'../net/net.gyp:dns_fuzz_stub',
'../skia/skia.gyp:filter_fuzz_stub',
],
}],
- ['OS=="linux" and enable_ipc_fuzzer==1', {
+ ['enable_ipc_fuzzer==1 and OS=="linux" and component!="shared_library"', {
'dependencies': [
'../tools/ipc_fuzzer/ipc_fuzzer.gyp:*',
],
}],
+ ['chromeos==0', {
+ 'dependencies': [
+ '../v8/src/d8.gyp:d8#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
- ['OS=="win" and fastbuild==0 and target_arch=="ia32"', {
+ ['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',
+ '../pdf/pdf.gyp:pdf_syzyasan',
],
'conditions': [
['chrome_multiple_dll==1', {
@@ -641,8 +680,132 @@
}],
],
},
+ {
+ '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. If adding a new test here,
+ # please also add it to build/android/pylib/gtest/gtest_config.py,
+ # else the test is not run.
+ #
+ # 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': [
+ '../android_webview/android_webview.gyp:android_webview_unittests',
+ '../base/android/jni_generator/jni_generator.gyp:jni_generator_tests',
+ '../base/base.gyp:base_unittests',
+ '../breakpad/breakpad.gyp:breakpad_unittests_stripped',
+ # 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/tests/multiple_proguards/multiple_proguards.gyp:multiple_proguards_test_apk',
+ '../cc/cc_tests.gyp:cc_perftests_apk',
+ '../cc/cc_tests.gyp:cc_unittests',
+ '../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_gl_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_unittests',
+ '../ipc/ipc.gyp:ipc_tests',
+ '../media/media.gyp:media_perftests_apk',
+ '../media/media.gyp:media_unittests',
+ '../net/net.gyp:net_unittests',
+ '../sandbox/sandbox.gyp:sandbox_linux_unittests_stripped',
+ '../sql/sql.gyp:sql_unittests',
+ '../sync/sync.gyp:sync_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/findbugs_plugin/findbugs_plugin.gyp:findbugs_plugin_test',
+ '../ui/events/events.gyp:events_unittests',
+ '../ui/ui_unittests.gyp:ui_unittests',
+ # 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',
+ '../base/base.gyp:base_unittests_apk',
+ '../cc/cc_tests.gyp:cc_unittests_apk',
+ '../chrome/chrome.gyp:chrome_shell_test_apk',
+ '../chrome/chrome.gyp:chrome_shell_uiautomator_tests',
+ '../chrome/chrome.gyp:unit_tests_apk',
+ '../components/components_tests.gyp:components_unittests_apk',
+ '../content/content_shell_and_tests.gyp:content_browsertests_apk',
+ '../content/content_shell_and_tests.gyp:content_gl_tests_apk',
+ '../content/content_shell_and_tests.gyp:content_unittests_apk',
+ '../content/content_shell_and_tests.gyp:video_decode_accelerator_unittest_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',
+ '../net/net.gyp:net_unittests_apk',
+ '../sandbox/sandbox.gyp:sandbox_linux_jni_unittests_apk',
+ '../sql/sql.gyp:sql_unittests_apk',
+ '../sync/sync.gyp:sync_unit_tests_apk',
+ '../ui/events/events.gyp:events_unittests_apk',
+ '../ui/gfx/gfx_tests.gyp:gfx_unittests_apk',
+ '../ui/ui_unittests.gyp:ui_unittests_apk',
+ '../webkit/renderer/compositor_bindings/compositor_bindings_tests.gyp:webkit_compositor_bindings_unittests_apk',
+ ],
+ },
+ {
+ # WebRTC Android APK tests.
+ 'target_name': 'android_builder_webrtc',
+ 'type': 'none',
+ 'variables': {
+ # Set default value for include_tests to '0'. It is normally only
+ # used in WebRTC GYP files. It is set to '1' only when building
+ # WebRTC for Android, inside a Chromium checkout.
+ 'include_tests%': 0,
+ },
+ 'conditions': [
+ ['include_tests==1', {
+ 'dependencies': [
+ '../third_party/webrtc/build/apk_tests.gyp:*',
+ ],
+ }],
+ ],
+ }, # target_name: android_builder_webrtc
+ {
+ # WebRTC Chromium tests to run on Android.
+ 'target_name': 'android_builder_chromium_webrtc',
+ 'type': 'none',
+ 'dependencies': [
+ '../content/content_shell_and_tests.gyp:content_browsertests',
+ '../tools/android/android_tools.gyp:android_tools',
+ '../tools/android/android_tools.gyp:memconsumer',
+ # Unit test bundles packaged as an apk.
+ '../content/content_shell_and_tests.gyp:content_browsertests_apk',
+ ],
+ }, # target_name: android_builder_chromium_webrtc
+ ], # targets
+ }], # OS="android"
['OS=="mac"', {
'targets': [
{
@@ -683,12 +846,14 @@
'../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:*',
+ '../tools/telemetry/telemetry.gyp:*',
+ '../ui/gfx/gfx_tests.gyp:gfx_unittests',
'../ui/ui_unittests.gyp:ui_unittests',
'../url/url.gyp:url_unittests',
- '../webkit/renderer/compositor_bindings/compositor_bindings_tests.gyp:webkit_compositor_bindings_unittests',
],
},
{
@@ -698,7 +863,6 @@
'../cc/cc_tests.gyp:cc_unittests',
'../chrome/chrome.gyp:browser_tests',
'../chrome/chrome.gyp:performance_browser_tests',
- '../chrome/chrome.gyp:performance_ui_tests',
'../chrome/chrome.gyp:sync_integration_tests',
'../chrome/chrome.gyp:unit_tests',
'../cloud_print/cloud_print.gyp:cloud_print_unittests',
@@ -717,9 +881,12 @@
'../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:*',
+ '../tools/telemetry/telemetry.gyp:*',
+ '../ui/gfx/gfx_tests.gyp:gfx_unittests',
'../ui/ui_unittests.gyp:ui_unittests',
'../url/url.gyp:url_unittests',
'../webkit/renderer/compositor_bindings/compositor_bindings_tests.gyp:webkit_compositor_bindings_unittests',
@@ -745,14 +912,6 @@
],
},
{
- # TODO(dpranke): Update the bots to refer to 'chromium_builder_asan'.
- 'target_name': 'chromium_builder_asan_mac',
- 'type': 'none',
- 'dependencies': [
- 'chromium_builder_asan'
- ],
- },
- {
'target_name': 'chromium_builder_dbg_valgrind_mac',
'type': 'none',
'dependencies': [
@@ -773,8 +932,10 @@
'../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',
+ '../ui/gfx/gfx_tests.gyp:gfx_unittests',
'../ui/ui_unittests.gyp:ui_unittests',
'../url/url.gyp:url_unittests',
],
@@ -791,20 +952,19 @@
'dependencies': [
'../cc/cc_tests.gyp:cc_unittests',
'../chrome/chrome.gyp:browser_tests',
+ '../chrome/chrome.gyp:crash_service',
'../chrome/chrome.gyp:gcapi_test',
'../chrome/chrome.gyp:installer_util_unittests',
'../chrome/chrome.gyp:interactive_ui_tests',
- '../chrome/chrome.gyp:mini_installer_test',
'../chrome/chrome.gyp:performance_browser_tests',
- '../chrome/chrome.gyp:performance_ui_tests',
'../chrome/chrome.gyp:sync_integration_tests',
'../chrome/chrome.gyp:unit_tests',
'../cloud_print/cloud_print.gyp:cloud_print_unittests',
'../components/components_tests.gyp:components_unittests',
'../content/content_shell_and_tests.gyp:content_browsertests',
'../content/content_shell_and_tests.gyp:content_unittests',
- # mini_installer_tests depends on mini_installer. This should be
- # defined in installer.gyp.
+ '../content/content_shell_and_tests.gyp:copy_test_netscape_plugin',
+ # ../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',
@@ -819,15 +979,24 @@
'../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:*',
+ '../tools/telemetry/telemetry.gyp:*',
'../ui/events/events.gyp:events_unittests',
+ '../ui/gfx/gfx_tests.gyp:gfx_unittests',
'../ui/ui_unittests.gyp:ui_unittests',
'../ui/views/views.gyp:views_unittests',
'../url/url.gyp:url_unittests',
'../webkit/renderer/compositor_bindings/compositor_bindings_tests.gyp:webkit_compositor_bindings_unittests',
- '../third_party/WebKit/public/blink_test_plugin.gyp:blink_test_plugin',
+ ],
+ 'conditions': [
+ ['target_arch=="ia32"', {
+ 'dependencies': [
+ '../chrome/chrome.gyp:crash_service_win64',
+ ],
+ }],
],
},
{
@@ -865,18 +1034,26 @@
'../chrome/chrome.gyp:browser_tests',
'../cloud_print/cloud_print.gyp:cloud_print_unittests',
'../components/components_tests.gyp:components_unittests',
+ '../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:layout_test_helper',
'../content/content_shell_and_tests.gyp:content_unittests',
'../crypto/crypto.gyp:crypto_unittests',
'../device/device_tests.gyp:device_unittests',
'../ipc/ipc.gyp:ipc_tests',
'../jingle/jingle.gyp:jingle_unittests',
'../media/media.gyp:media_unittests',
+ '../mojo/mojo.gyp:mojo',
'../net/net.gyp:net_unittests',
'../google_apis/gcm/gcm.gyp:gcm_unit_tests',
+ '../gpu/gpu.gyp:gpu_unittests',
'../printing/printing.gyp:printing_unittests',
'../remoting/remoting.gyp:remoting_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',
'../url/url.gyp:url_unittests',
@@ -897,28 +1074,32 @@
'target_name': 'chrome_official_builder',
'type': 'none',
'dependencies': [
+ '../base/base.gyp:base_unittests',
+ '../chrome/chrome.gyp:browser_tests',
'../chrome/chrome.gyp:crash_service',
'../chrome/chrome.gyp:gcapi_dll',
'../chrome/chrome.gyp:pack_policy_templates',
- '../courgette/courgette.gyp:courgette64',
'../chrome/installer/mini_installer.gyp:mini_installer',
- '../courgette/courgette.gyp:courgette',
'../cloud_print/cloud_print.gyp:cloud_print',
+ '../courgette/courgette.gyp:courgette',
+ '../courgette/courgette.gyp:courgette64',
+ '../ipc/ipc.gyp:ipc_tests',
+ '../media/media.gyp:media_unittests',
+ '../net/net.gyp:net_unittests_run',
+ '../printing/printing.gyp:printing_unittests',
'../remoting/remoting.gyp:remoting_webapp',
+ '../sql/sql.gyp:sql_unittests',
+ '../sync/sync.gyp:sync_unit_tests',
'../third_party/widevine/cdm/widevine_cdm.gyp:widevinecdmadapter',
- '../chrome/chrome.gyp:pyautolib',
+ '../ui/gfx/gfx_tests.gyp:gfx_unittests',
+ '../ui/ui_unittests.gyp:ui_unittests',
+ '../ui/views/views.gyp:views_unittests',
+ '../url/url.gyp:url_unittests',
],
'conditions': [
- ['internal_pdf', {
- 'dependencies': [
- '../pdf/pdf.gyp:pdf',
- ],
- }], # internal_pdf
['target_arch=="ia32"', {
'dependencies': [
'../chrome/chrome.gyp:crash_service_win64',
- # Omitting tests from Win64 to speed up cycle times.
- '../chrome/chrome.gyp:interactive_ui_tests',
],
}],
['component != "shared_library" and wix_exists == "True" and \
@@ -948,19 +1129,23 @@
'../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',
'../ui/app_list/app_list.gyp:*',
'../ui/aura/aura.gyp:*',
'../ui/compositor/compositor.gyp:*',
+ '../ui/display/display.gyp:display_unittests',
'../ui/events/events.gyp:*',
+ '../ui/gfx/gfx_tests.gyp:gfx_unittests',
+ '../ui/keyboard/keyboard.gyp:*',
'../ui/message_center/message_center.gyp:*',
- '../ui/ui_unittests.gyp:ui_unittests',
'../ui/snapshot/snapshot.gyp:snapshot_unittests',
+ '../ui/ui_unittests.gyp:ui_unittests',
+ '../ui/views/examples/examples.gyp:views_examples_with_content_exe',
'../ui/views/views.gyp:views',
- '../ui/views/views.gyp:views_examples_with_content_exe',
'../ui/views/views.gyp:views_unittests',
- '../ui/keyboard/keyboard.gyp:*',
+ '../ui/wm/wm.gyp:*',
'../webkit/renderer/compositor_bindings/compositor_bindings_tests.gyp:webkit_compositor_bindings_unittests',
'blink_tests',
],
@@ -993,11 +1178,35 @@
['chromeos==1', {
'dependencies': [
'../chromeos/chromeos.gyp:chromeos_unittests',
+ '../athena/main/athena_main.gyp:*',
+ ],
+ }],
+ ['use_ozone==1', {
+ 'dependencies': [
+ '../ui/ozone/ozone.gyp:*',
+ ],
+ 'dependencies!': [
+ '../chrome/chrome.gyp:interactive_ui_tests', # crbug.com/362166
],
}],
],
},
], # targets
+ }, {
+ 'conditions': [
+ ['OS=="linux"', {
+ # TODO(thakis): Remove this once the linux gtk bot no longer references
+ # it (probably after the first aura release on linux), see r249162
+ 'targets': [
+ {
+ 'target_name': 'aura_builder',
+ 'type': 'none',
+ 'dependencies': [
+ '../chrome/chrome.gyp:chrome',
+ ],
+ },
+ ], # targets
+ }]], # OS=="linux"
}], # "use_aura==1"
['test_isolation_mode != "noop"', {
'targets': [
@@ -1008,12 +1217,26 @@
'../base/base.gyp:base_unittests_run',
'../chrome/chrome.gyp:browser_tests_run',
'../chrome/chrome.gyp:interactive_ui_tests_run',
- '../chrome/chrome.gyp:sync_integration_tests_run',
+ # http://crbug.com/157234
+ #'../chrome/chrome.gyp:sync_integration_tests_run',
'../chrome/chrome.gyp:unit_tests_run',
'../net/net.gyp:net_unittests_run',
],
}, # target_name: chromium_swarm_tests
],
}],
- ], # conditions
+ ['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/chromium/build/all_android.gyp b/chromium/build/all_android.gyp
deleted file mode 100644
index 748571a832f..00000000000
--- a/chromium/build/all_android.gyp
+++ /dev/null
@@ -1,187 +0,0 @@
-# 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 is all.gyp file for Android to prevent breakage in Android and other
-# platform; It will be churning a lot in the short term and eventually be merged
-# into all.gyp.
-
-{
- 'variables': {
- # A hook that can be overridden in other repositories to add additional
- # compilation targets to 'All'
- 'android_app_targets%': [],
- },
- 'targets': [
- {
- 'target_name': 'All',
- 'type': 'none',
- 'dependencies': [
- '../content/content_shell_and_tests.gyp:content_shell_apk',
- '../mojo/mojo.gyp:mojo_shell_apk',
- '<@(android_app_targets)',
- 'android_builder_tests',
- '../android_webview/android_webview.gyp:android_webview_apk',
- '../chrome/chrome.gyp:chromium_testshell',
- '../remoting/remoting.gyp:remoting_apk',
- # 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',
- ],
- }, # target_name: All
- {
- 'target_name': 'blink_tests',
- 'type': 'none',
- 'dependencies': [
- '../third_party/WebKit/public/all.gyp:all_blink',
- '../content/content_shell_and_tests.gyp:content_shell_apk',
- '../breakpad/breakpad.gyp:dump_syms#host',
- '../breakpad/breakpad.gyp:minidump_stackwalk#host',
- ],
- }, # target_name: blink_tests
- {
- # TODO(jochen): Eventually remove this target after everybody and the
- # bots started to use blink_tests only.
- 'target_name': 'all_webkit',
- 'type': 'none',
- 'dependencies': [
- 'blink_tests',
- ],
- }, # target_name: all_webkit
- {
- # The current list of tests for android. This is temporary
- # until the full set supported. If adding a new test here,
- # please also add it to build/android/pylib/gtest/gtest_config.py,
- # else the test is not run.
- #
- # WARNING:
- # Do not add targets here without communicating the implications
- # on tryserver triggers and load. Discuss with jrg please.
- 'target_name': 'android_builder_tests',
- 'type': 'none',
- 'dependencies': [
- '../android_webview/android_webview.gyp:android_webview_unittests',
- '../base/android/jni_generator/jni_generator.gyp:jni_generator_tests',
- '../base/base.gyp:base_unittests',
- '../breakpad/breakpad.gyp:breakpad_unittests',
- # 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/tests/multiple_proguards/multiple_proguards.gyp:multiple_proguards_test_apk',
- '../cc/cc_tests.gyp:cc_perftests_apk',
- '../cc/cc_tests.gyp:cc_unittests',
- '../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_gl_tests',
- '../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_unittests',
- '../ipc/ipc.gyp:ipc_tests',
- '../media/media.gyp:media_perftests_apk',
- '../media/media.gyp:media_unittests',
- '../net/net.gyp:net_unittests',
- '../sandbox/sandbox.gyp:sandbox_linux_unittests',
- '../sql/sql.gyp:sql_unittests',
- '../sync/sync.gyp:sync_unit_tests',
- '../third_party/WebKit/public/all.gyp:*',
- '../tools/android/android_tools.gyp:android_tools',
- '../tools/android/android_tools.gyp:memconsumer',
- '../tools/android/findbugs_plugin/findbugs_plugin.gyp:findbugs_plugin_test',
- '../ui/ui_unittests.gyp:ui_unittests',
- # Required by ui_unittests.
- # TODO(wangxianzhu): It'd better let ui_unittests depend on it, but
- # this would cause circular gyp dependency which needs refactoring the
- # gyps to resolve.
- '../chrome/chrome_resources.gyp:packed_resources',
- ],
- 'conditions': [
- ['"<(gtest_target_type)"=="shared_library"', {
- 'dependencies': [
- # Unit test bundles packaged as an apk.
- '../android_webview/android_webview.gyp:android_webview_unittests_apk',
- '../base/base.gyp:base_unittests_apk',
- '../cc/cc_tests.gyp:cc_unittests_apk',
- '../chrome/chrome.gyp:unit_tests_apk',
- '../components/components_tests.gyp:components_unittests_apk',
- '../content/content_shell_and_tests.gyp:content_browsertests_apk',
- '../content/content_shell_and_tests.gyp:content_gl_tests_apk',
- '../content/content_shell_and_tests.gyp:content_unittests_apk',
- '../content/content_shell_and_tests.gyp:video_decode_accelerator_unittest_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',
- '../net/net.gyp:net_unittests_apk',
- '../sandbox/sandbox.gyp:sandbox_linux_jni_unittests_apk',
- '../sql/sql.gyp:sql_unittests_apk',
- '../sync/sync.gyp:sync_unit_tests_apk',
- '../ui/ui_unittests.gyp:ui_unittests_apk',
- '../android_webview/android_webview.gyp:android_webview_test_apk',
- '../chrome/chrome.gyp:chromium_testshell_test_apk',
- '../chrome/chrome.gyp:chromium_testshell_uiautomator_tests',
- '../webkit/renderer/compositor_bindings/compositor_bindings_tests.gyp:webkit_compositor_bindings_unittests_apk'
- ],
- }],
- ],
- },
- {
- # WebRTC Android APK tests.
- 'target_name': 'android_builder_webrtc',
- 'type': 'none',
- 'variables': {
- # Set default value for include_tests to '0'. It is normally only
- # used in WebRTC GYP files. It is set to '1' only when building
- # WebRTC for Android, inside a Chromium checkout.
- 'include_tests%': 0,
- },
- 'conditions': [
- ['"<(gtest_target_type)"=="shared_library" and include_tests==1', {
- 'dependencies': [
- '../third_party/webrtc/build/apk_tests.gyp:*',
- ],
- }],
- ],
- }, # target_name: android_builder_webrtc
- {
- # WebRTC Chromium tests to run on Android.
- 'target_name': 'android_builder_chromium_webrtc',
- 'type': 'none',
- 'dependencies': [
- '../content/content_shell_and_tests.gyp:content_browsertests',
- '../tools/android/android_tools.gyp:android_tools',
- '../tools/android/android_tools.gyp:memconsumer',
- ],
- 'conditions': [
- ['"<(gtest_target_type)"=="shared_library"', {
- 'dependencies': [
- # Unit test bundles packaged as an apk.
- '../content/content_shell_and_tests.gyp:content_browsertests_apk',
- ],
- }],
- ],
- }, # target_name: android_builder_chromium_webrtc
- {
- # Experimental / in-progress targets that are expected to fail
- # but we still try to compile them on bots (turning the stage
- # orange, not red).
- 'target_name': 'android_experimental',
- 'type': 'none',
- 'dependencies': [
- ],
- },
- {
- # In-progress targets that are expected to fail and are NOT run
- # on any bot.
- 'target_name': 'android_in_progress',
- 'type': 'none',
- 'dependencies': [
- ],
- },
- ], # targets
-}
diff --git a/chromium/build/android/dex_action.gypi b/chromium/build/android/dex_action.gypi
index 9b640d6c43d..9ea3e714d9b 100644
--- a/chromium/build/android/dex_action.gypi
+++ b/chromium/build/android/dex_action.gypi
@@ -14,7 +14,6 @@
# 'variables': {
# 'dex_input_paths': [ 'files to dex (when proguard is not used) and add to input paths' ],
# 'dex_generated_input_dirs': [ 'dirs that contain generated files to dex' ],
-# 'input_paths': [ 'additional files to be added to the list of inputs' ],
#
# # For targets that use proguard:
# 'proguard_enabled': 'true',
@@ -30,33 +29,30 @@
'variables': {
'dex_input_paths': [],
'dex_generated_input_dirs': [],
- 'input_paths': [],
'proguard_enabled%': 'false',
'proguard_enabled_input_path%': '',
'dex_no_locals%': 0,
+ 'dex_additional_options': [],
},
'inputs': [
'<(DEPTH)/build/android/gyp/util/build_utils.py',
'<(DEPTH)/build/android/gyp/util/md5_check.py',
'<(DEPTH)/build/android/gyp/dex.py',
- '>@(input_paths)',
'>@(dex_input_paths)',
],
'outputs': [
'<(output_path)',
+ '<(output_path).inputs',
],
'action': [
'python', '<(DEPTH)/build/android/gyp/dex.py',
'--dex-path=<(output_path)',
'--android-sdk-tools=<(android_sdk_tools)',
'--configuration-name=<(CONFIGURATION_NAME)',
- '--proguard-enabled=<(proguard_enabled)',
+ '--proguard-enabled=>(proguard_enabled)',
'--proguard-enabled-input-path=<(proguard_enabled_input_path)',
- '--no-locals=<(dex_no_locals)',
-
- # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
- '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
-
+ '--no-locals=>(dex_no_locals)',
+ '>@(dex_additional_options)',
'>@(dex_input_paths)',
'>@(dex_generated_input_dirs)',
]
diff --git a/chromium/build/android/finalize_apk_action.gypi b/chromium/build/android/finalize_apk_action.gypi
index b88bbba2cc7..bfb7ccdb7b0 100644
--- a/chromium/build/android/finalize_apk_action.gypi
+++ b/chromium/build/android/finalize_apk_action.gypi
@@ -9,7 +9,6 @@
# {
# 'action_name': 'some descriptive action name',
# 'variables': {
-# 'inputs': [ 'input_path1', 'input_path2' ],
# 'input_apk_path': 'relative/path/to/input.apk',
# 'output_apk_path': 'relative/path/to/output.apk',
# },
@@ -20,27 +19,34 @@
{
'message': 'Signing/aligning <(_target_name) APK: <(input_apk_path)',
'variables': {
- 'inputs': [],
'keystore_path%': '<(DEPTH)/build/android/ant/chromium-debug.keystore',
+ 'keystore_name%': 'chromiumdebugkey',
+ 'keystore_password%': 'chromium',
+ 'conditions': [
+ # Webview doesn't use zipalign.
+ ['android_webview_build==0', {
+ 'zipalign_path%': ['<!@(find <(android_sdk_root) -name zipalign)'],
+ }, {
+ 'zipalign_path%': "",
+ }],
+ ],
},
'inputs': [
'<(DEPTH)/build/android/gyp/util/build_utils.py',
'<(DEPTH)/build/android/gyp/finalize_apk.py',
'<(keystore_path)',
'<(input_apk_path)',
- '>@(inputs)',
],
'outputs': [
'<(output_apk_path)',
],
'action': [
'python', '<(DEPTH)/build/android/gyp/finalize_apk.py',
- '--android-sdk-root=<(android_sdk_root)',
+ '--zipalign-path=<(zipalign_path)',
'--unsigned-apk-path=<(input_apk_path)',
'--final-apk-path=<(output_apk_path)',
- '--keystore-path=<(keystore_path)',
-
- # TODO(newt): remove this once crbug.com/177552 is fixed in ninja.
- '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
+ '--key-path=<(keystore_path)',
+ '--key-name=<(keystore_name)',
+ '--key-passwd=<(keystore_password)',
],
}
diff --git a/chromium/build/android/rezip.gyp b/chromium/build/android/rezip.gyp
new file mode 100644
index 00000000000..b06ac52cb24
--- /dev/null
+++ b/chromium/build/android/rezip.gyp
@@ -0,0 +1,23 @@
+# 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.
+
+# Build the rezip build tool.
+{
+ 'targets': [
+ {
+ 'target_name': 'rezip',
+ 'type': 'executable',
+ 'toolsets': [ 'host' ],
+ 'dependencies': [
+ '<(DEPTH)/third_party/zlib/zlib.gyp:minizip',
+ ],
+ 'include_dirs': [
+ '<(DEPTH)',
+ ],
+ 'sources': [
+ 'rezip/rezip.cc',
+ ],
+ }
+ ],
+}
diff --git a/chromium/build/apk_fake_jar.gypi b/chromium/build/apk_fake_jar.gypi
index 2787691c342..128b84cc2fa 100644
--- a/chromium/build/apk_fake_jar.gypi
+++ b/chromium/build/apk_fake_jar.gypi
@@ -12,14 +12,4 @@
'library_dexed_jars_paths': ['>(apk_output_jar_path)'],
},
},
- # Add an action with the appropriate output. This allows the generated
- # buildfiles to determine which target the output corresponds to.
- 'actions': [
- {
- 'action_name': 'fake_generate_jar',
- 'inputs': [],
- 'outputs': ['>(apk_output_jar_path)'],
- 'action': [],
- },
- ],
}
diff --git a/chromium/build/apk_test.gypi b/chromium/build/apk_test.gypi
index 8ec23a21fd1..95cce377d06 100644
--- a/chromium/build/apk_test.gypi
+++ b/chromium/build/apk_test.gypi
@@ -11,7 +11,6 @@
# 'type': 'none',
# 'variables': {
# 'test_suite_name': 'test_suite_name', # string
-# 'input_shlib_path' : '/path/to/test_suite.so', # string
# 'input_jars_paths': ['/path/to/test_suite.jar', ... ], # list
# },
# 'includes': ['path/to/this/gypi/file'],
@@ -24,7 +23,7 @@
'<(DEPTH)/tools/android/android_tools.gyp:android_tools',
],
'conditions': [
- ['OS == "android" and gtest_target_type == "shared_library"', {
+ ['OS == "android"', {
'variables': {
# These are used to configure java_apk.gypi included below.
'apk_name': '<(test_suite_name)',
@@ -36,6 +35,6 @@
'gyp_managed_install': 0,
},
'includes': [ 'java_apk.gypi' ],
- }], # 'OS == "android" and gtest_target_type == "shared_library"
+ }], # 'OS == "android"
], # conditions
}
diff --git a/chromium/build/build_config.h b/chromium/build/build_config.h
index 143cf3e5b45..6e31a730918 100644
--- a/chromium/build/build_config.h
+++ b/chromium/build/build_config.h
@@ -4,7 +4,7 @@
// This file adds defines about the platform we're currently building on.
// Operating System:
-// OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX)
+// OS_WIN / OS_MACOSX / OS_LINUX / OS_POSIX (MACOSX or LINUX) / OS_NACL
// Compiler:
// COMPILER_MSVC / COMPILER_GCC
// Processor:
@@ -19,37 +19,35 @@
#endif
// A set of macros to use for platform detection.
-#if defined(ANDROID)
+#if defined(__native_client__)
+// __native_client__ must be first, so that other OS_ defines are not set.
+#define OS_NACL 1
+#elif defined(ANDROID)
#define OS_ANDROID 1
#elif defined(__APPLE__)
#define OS_MACOSX 1
#if defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
#define OS_IOS 1
#endif // defined(TARGET_OS_IPHONE) && TARGET_OS_IPHONE
-#elif defined(__native_client__)
-#define OS_NACL 1
#elif defined(__linux__)
#define OS_LINUX 1
-// Use TOOLKIT_GTK on linux if TOOLKIT_VIEWS isn't defined.
-#if !defined(TOOLKIT_VIEWS) && defined(USE_X11) && !defined(USE_AURA)
-#define TOOLKIT_GTK
-#endif
+// include a system header to pull in features.h for glibc/uclibc macros.
+#include <unistd.h>
#if defined(__GLIBC__) && !defined(__UCLIBC__)
// we really are using glibc, not uClibc pretending to be glibc
-#define LIBC_GLIBC
+#define LIBC_GLIBC 1
#endif
#elif defined(_WIN32)
#define OS_WIN 1
#define TOOLKIT_VIEWS 1
#elif defined(__FreeBSD__)
#define OS_FREEBSD 1
-#define TOOLKIT_GTK
#elif defined(__OpenBSD__)
#define OS_OPENBSD 1
-#define TOOLKIT_GTK
#elif defined(__sun)
#define OS_SOLARIS 1
-#define TOOLKIT_GTK
+#elif defined(__QNXNTO__)
+#define OS_QNX 1
#else
#error Please add support for your platform in build/build_config.h
#endif
@@ -68,7 +66,7 @@
// more specific macro.
#if defined(OS_MACOSX) || defined(OS_LINUX) || defined(OS_FREEBSD) || \
defined(OS_OPENBSD) || defined(OS_SOLARIS) || defined(OS_ANDROID) || \
- defined(OS_NACL)
+ defined(OS_NACL) || defined(OS_QNX)
#define OS_POSIX 1
#endif
@@ -106,6 +104,11 @@
#define ARCH_CPU_ARMEL 1
#define ARCH_CPU_32_BITS 1
#define ARCH_CPU_LITTLE_ENDIAN 1
+#elif defined(__aarch64__)
+#define ARCH_CPU_ARM_FAMILY 1
+#define ARCH_CPU_ARM64 1
+#define ARCH_CPU_64_BITS 1
+#define ARCH_CPU_LITTLE_ENDIAN 1
#elif defined(__pnacl__)
#define ARCH_CPU_32_BITS 1
#define ARCH_CPU_LITTLE_ENDIAN 1
@@ -137,12 +140,6 @@
#error Please add support for your compiler in build/build_config.h
#endif
-#if defined(__ARMEL__) && !defined(OS_IOS)
-#define WCHAR_T_IS_UNSIGNED 1
-#elif defined(__MIPSEL__)
-#define WCHAR_T_IS_UNSIGNED 0
-#endif
-
#if defined(OS_ANDROID)
// The compiler thinks std::string::const_iterator and "const char*" are
// equivalent types.
diff --git a/chromium/build/check_return_value.py b/chromium/build/check_return_value.py
new file mode 100755
index 00000000000..c659d1e9674
--- /dev/null
+++ b/chromium/build/check_return_value.py
@@ -0,0 +1,17 @@
+#!/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.
+
+"""This program wraps an arbitrary command and prints "1" if the command ran
+successfully."""
+
+import os
+import subprocess
+import sys
+
+devnull = open(os.devnull, 'wb')
+if not subprocess.call(sys.argv[1:], stdout=devnull, stderr=devnull):
+ print 1
+else:
+ print 0
diff --git a/chromium/build/common.gypi b/chromium/build/common.gypi
index d7b385cc0ee..5e14a3b351f 100644
--- a/chromium/build/common.gypi
+++ b/chromium/build/common.gypi
@@ -35,6 +35,15 @@
# Configure the build for small devices. See crbug.com/318413
'embedded%': 0,
+
+ 'conditions': [
+ # Compute the architecture that we're building on.
+ ['OS=="win" or OS=="mac" or OS=="ios"', {
+ 'host_arch%': 'ia32',
+ }, {
+ 'host_arch%': '<!pymod_do_main(detect_host_arch)',
+ }],
+ ],
},
# Copy conditionally-set variables out one scope.
'chromeos%': '<(chromeos)',
@@ -43,22 +52,26 @@
'use_cras%': '<(use_cras)',
'use_ozone%': '<(use_ozone)',
'embedded%': '<(embedded)',
+ 'host_arch%': '<(host_arch)',
# Whether we are using Views Toolkit
'toolkit_views%': 0,
- # Use OpenSSL instead of NSS. Under development: see http://crbug.com/62803
+ # Use OpenSSL instead of NSS as the underlying SSL and crypto
+ # implementation. Certificate verification will in most cases be
+ # handled by the OS. If OpenSSL's struct X509 is used to represent
+ # certificates, use_openssl_certs must be set.
'use_openssl%': 0,
+ # Typedef X509Certificate::OSCertHandle to OpenSSL's struct X509*.
+ 'use_openssl_certs%': 0,
+
# Disable viewport meta tag by default.
'enable_viewport%': 0,
# Enable HiDPI support.
'enable_hidpi%': 0,
- # Enable touch optimized art assets and metrics.
- 'enable_touch_ui%': 0,
-
# Override buildtype to select the desired build flavor.
# Dev - everyday build for development/testing
# Official - release build (generally implies additional processing)
@@ -74,7 +87,7 @@
'conditions': [
# ChromeOS and Windows use Aura and Ash.
- ['chromeos==1 or OS=="win"', {
+ ['chromeos==1 or OS=="win" or OS=="linux"', {
'use_ash%': 1,
'use_aura%': 1,
}],
@@ -91,27 +104,23 @@
'desktop_linux%': 0,
}],
- # Compute the architecture that we're building on.
- ['OS=="win" or OS=="mac" or OS=="ios"', {
- 'host_arch%': 'ia32',
- }, {
- # This handles the Unix platforms for which there is some support.
- # Anything else gets passed through, which probably won't work
- # very well; such hosts should pass an explicit target_arch to
- # gyp.
- 'host_arch%':
- '<!(uname -m | sed -e "s/i.86/ia32/;s/x86_64/x64/;s/amd64/x64/;s/arm.*/arm/;s/i86pc/ia32/")',
- }],
-
# Embedded implies ozone.
['embedded==1', {
'use_ozone%': 1,
}],
+ ['embedded==1', {
+ 'use_system_fontconfig%': 0,
+ }, {
+ 'use_system_fontconfig%': 1,
+ }],
+
['OS=="android"', {
- 'android_goma_dir%': '<!(echo "${GOMA_DIR}")',
+ 'target_arch%': 'arm',
}, {
- 'android_goma_dir%': ''
+ # Default architecture we're building for is the architecture we're
+ # building on, and possibly sub-architecture (for iOS builds).
+ 'target_arch%': '<(host_arch)',
}],
],
},
@@ -124,16 +133,16 @@
'use_ozone%': '<(use_ozone)',
'embedded%': '<(embedded)',
'use_openssl%': '<(use_openssl)',
+ 'use_openssl_certs%': '<(use_openssl_certs)',
+ 'use_system_fontconfig%': '<(use_system_fontconfig)',
'enable_viewport%': '<(enable_viewport)',
'enable_hidpi%': '<(enable_hidpi)',
- 'enable_touch_ui%': '<(enable_touch_ui)',
'buildtype%': '<(buildtype)',
'branding%': '<(branding)',
'host_arch%': '<(host_arch)',
+ 'target_arch%': '<(target_arch)',
- # Default architecture we're building for is the architecture we're
- # building on.
- 'target_arch%': '<(host_arch)',
+ 'target_subarch%': '',
# This is set when building the Android WebView inside the Android
# build system, using the 'android' gyp backend. The WebView code is
@@ -141,9 +150,6 @@
# build system.
'android_webview_build%': 0,
- # Sets whether chrome is built for google tv device.
- 'google_tv%': 0,
-
# Set ARM architecture version.
'arm_version%': 7,
@@ -156,6 +162,13 @@
'use_goma%': 0,
'gomadir%': '',
+ # The system root for cross-compiles. Default: none.
+ 'sysroot%': '',
+ 'chroot_cmd%': '',
+
+ # The system libdir used for this ABI.
+ 'system_libdir%': 'lib',
+
'conditions': [
# Ash needs Aura.
['use_aura==0', {
@@ -176,23 +189,11 @@
'toolkit_views%': 0,
}],
- # Set toolkit_uses_gtk for the Chromium browser on Linux.
- ['desktop_linux==1 and use_aura==0 and use_ozone==0', {
- 'toolkit_uses_gtk%': 1,
- }, {
- 'toolkit_uses_gtk%': 0,
- }],
-
- # Enable HiDPI on Mac OS and Chrome OS.
- ['OS=="mac" or chromeos==1', {
+ # Enable HiDPI on Mac OS, Chrome OS and Windows.
+ ['OS=="mac" or chromeos==1 or OS=="win"', {
'enable_hidpi%': 1,
}],
- # Enable touch UI on Metro.
- ['OS=="win"', {
- 'enable_touch_ui%': 1,
- }],
-
# Enable App Launcher on ChromeOS, Windows and OSX.
# On Linux, enable App Launcher for the Aura build.
['use_ash==1 or OS=="win" or OS=="mac" or (desktop_linux==1 and use_aura==1)', {
@@ -216,14 +217,21 @@
# Set default gomadir.
['OS=="win"', {
'gomadir': 'c:\\goma\\goma-win',
- }],
- ['android_goma_dir!=""', {
- 'use_goma': 1,
- 'gomadir': '<(android_goma_dir)',
- }],
- ['OS!="win" and android_goma_dir==""', {
+ }, {
'gomadir': '<!(/bin/echo -n ${HOME}/goma)',
}],
+
+ # Set the default "target_subarch" on iOS. Valid values are "arm32",
+ # "arm64" and "both" (meaning a fat binary).
+ #
+ # TODO(sdefresne): change the default from "arm32" to "both" for
+ # "target_subarch" once http://crbug.com/339477 is fixed.
+ #
+ # TODO(sdefresne): set the "target_arch" to "arm" once compilation
+ # of skia has been fixed for simulator. http://crbug.com/342377
+ ['OS=="ios"', {
+ 'target_subarch%': 'arm32',
+ }],
],
},
@@ -231,8 +239,8 @@
'chromeos%': '<(chromeos)',
'host_arch%': '<(host_arch)',
'target_arch%': '<(target_arch)',
+ 'target_subarch%': '<(target_subarch)',
'toolkit_views%': '<(toolkit_views)',
- 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
'desktop_linux%': '<(desktop_linux)',
'use_aura%': '<(use_aura)',
'use_ash%': '<(use_ash)',
@@ -242,11 +250,11 @@
'use_clipboard_aurax11%': '<(use_clipboard_aurax11)',
'embedded%': '<(embedded)',
'use_openssl%': '<(use_openssl)',
+ 'use_openssl_certs%': '<(use_openssl_certs)',
+ 'use_system_fontconfig%': '<(use_system_fontconfig)',
'enable_viewport%': '<(enable_viewport)',
'enable_hidpi%': '<(enable_hidpi)',
- 'enable_touch_ui%': '<(enable_touch_ui)',
'android_webview_build%': '<(android_webview_build)',
- 'google_tv%': '<(google_tv)',
'use_goma%': '<(use_goma)',
'gomadir%': '<(gomadir)',
'enable_app_list%': '<(enable_app_list)',
@@ -254,49 +262,42 @@
'buildtype%': '<(buildtype)',
'branding%': '<(branding)',
'arm_version%': '<(arm_version)',
+ 'sysroot%': '<(sysroot)',
+ 'chroot_cmd%': '<(chroot_cmd)',
+ 'system_libdir%': '<(system_libdir)',
# Set to 1 to enable fast builds. Set to 2 for even faster builds
# (it disables debug info for fastest compilation - only for use
# on compile-only bots).
'fastbuild%': 0,
- # Set to 1 to enable dcheck in release without having to use the flag.
- 'dcheck_always_on%': 0,
+ # Set to 1 to not store any build metadata (this isn't working yet but
+ # this flag will help us to get there). See http://crbug.com/314403.
+ # TODO(sebmarchand): Update this comment once this flag guarantee that
+ # there's no build metadata in the build artifacts.
+ 'dont_embed_build_metadata%': 0,
- # Set to 1 to make a build that logs like an official build, but is not
- # necessarily an official build, ie DCHECK and DLOG are disabled and
- # removed completely in release builds, to minimize binary footprint.
- # Note: this setting is ignored if buildtype=="Official".
- 'logging_like_official_build%': 0,
+ # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
+ # This is useful for parallel compilation tools which can't support /Zi.
+ # Only used on Windows.
+ 'win_z7%' : 0,
+
+ # Set to 1 to enable dcheck in release.
+ 'dcheck_always_on%': 0,
# Set to 1 to make a build that disables unshipped tracing events.
# Note: this setting is ignored if buildtype=="Official".
'tracing_like_official_build%': 0,
- # Disable file manager component extension by default.
- 'file_manager_extension%': 0,
-
# Disable image loader component extension by default.
'image_loader_extension%': 0,
- # Python version.
- 'python_ver%': '2.6',
-
# Set NEON compilation flags.
'arm_neon%': 1,
# Detect NEON support at run-time.
'arm_neon_optional%': 0,
- # The system root for cross-compiles. Default: none.
- 'sysroot%': '',
-
- # The system libdir used for this ABI.
- 'system_libdir%': 'lib',
-
- # On Linux, we build with sse2 for Chromium builds.
- 'disable_sse2%': 0,
-
# Use libjpeg-turbo as the JPEG codec used by Chromium.
'use_libjpeg_turbo%': 1,
@@ -330,6 +331,8 @@
'safe_browsing%': 1,
# Speech input is compiled in by default. Set to 0 to disable.
+ # TODO(tommyw): Speech Input doesn't exist anymore. Clarify the scope
+ # of this flag (and probably rename it).
'input_speech%': 1,
# Notifications are compiled in by default. Set to 0 to disable.
@@ -349,27 +352,49 @@
# -fsanitize=address only works with clang, but asan=1 implies clang=1
# See https://sites.google.com/a/chromium.org/dev/developers/testing/addresssanitizer
'asan%': 0,
+ # Enable coverage gathering instrumentation in ASan. This flag also
+ # controls coverage granularity (experimental).
+ 'asan_coverage%': 0,
+
+ # Enable Chromium overrides of the default configurations for various
+ # dynamic tools (like ASan).
+ 'use_sanitizer_options%': 1,
+
+ # Enable building with SyzyAsan.
+ # See https://code.google.com/p/sawbuck/wiki/SyzyASanHowTo
+ 'syzyasan%': 0,
# Enable building with LSan (Clang's -fsanitize=leak option).
# -fsanitize=leak only works with clang, but lsan=1 implies clang=1
# See https://sites.google.com/a/chromium.org/dev/developers/testing/leaksanitizer
'lsan%': 0,
- # Enable building with TSAN (Clang's -fsanitize=thread option).
+ # Enable building with TSan (Clang's -fsanitize=thread option).
# -fsanitize=thread only works with clang, but tsan=1 implies clang=1
# See http://clang.llvm.org/docs/ThreadSanitizer.html
'tsan%': 0,
'tsan_blacklist%': '<(PRODUCT_DIR)/../../tools/valgrind/tsan_v2/ignores.txt',
- # Enable building with MSAN (Clang's -fsanitize=memory option).
+ # Enable building with MSan (Clang's -fsanitize=memory option).
# MemorySanitizer only works with clang, but msan=1 implies clang=1
# See http://clang.llvm.org/docs/MemorySanitizer.html
'msan%': 0,
+ 'msan_blacklist%': '<(PRODUCT_DIR)/../../tools/msan/blacklist.txt',
+
+ # Enable building with UBSan (Clang's -fsanitize=undefined option).
+ # -fsanitize=undefined only works with clang, but ubsan=1 implies clang=1
+ # See http://clang.llvm.org/docs/UsersManual.html
+ 'ubsan%': 0,
# Use the dynamic libraries instrumented by one of the sanitizers
# instead of the standard system libraries.
'use_instrumented_libraries%': 0,
+ # Use libc++ (third_party/libc++ and third_party/libc++abi) instead of
+ # stdlibc++ as standard library. This is intended to use for instrumented
+ # builds.
+ 'use_custom_libcxx%': 0,
+
# Use a modified version of Clang to intercept allocated types and sizes
# for allocated objects. clang_type_profiler=1 implies clang=1.
# See http://dev.chromium.org/developers/deep-memory-profiler/cpp-object-type-identifier
@@ -393,12 +418,12 @@
# Whether one-click signin is enabled or not.
'enable_one_click_signin%': 0,
+ # Whether to back up data before sync.
+ 'enable_pre_sync_backup%': 0,
+
# Enable Chrome browser extensions
'enable_extensions%': 1,
- # Enable browser automation.
- 'enable_automation%': 1,
-
# Enable Google Now.
'enable_google_now%': 1,
@@ -409,12 +434,38 @@
# print, UI, etc.
'enable_printing%': 1,
+ # Windows prints using a PDF as the metafile from the renderer.
+ 'win_pdf_metafile_for_printing%': 1,
+
# Set the version of CLD.
# 0: Don't specify the version. This option is for the Finch testing.
# 1: Use only CLD1.
# 2: Use only CLD2.
'cld_version%': 2,
+ # For CLD2, the size of the tables that should be included in the build
+ # Only evaluated if cld_version == 2 or if building the CLD2 dynamic data
+ # tool explicitly.
+ # See third_party/cld_2/cld_2.gyp for more information.
+ # 0: Small tables, lower accuracy
+ # 1: Medium tables, medium accuracy
+ # 2: Large tables, high accuracy
+ 'cld2_table_size%': 2,
+
+ # Set the way CLD is compiled. Only evaluated if cld_version == 2.
+ # 0: static, language scoring tables compiled into the binary
+ # 1: dynamic, language scoring tables live in a data file that must
+ # be loaded at runtime.
+ 'cld2_dynamic%': 0,
+
+ # Whether CLD2 is a component. Only evaluated if cld_version == 2 and
+ # cld2_dynamic == 1.
+ # 0: Not a component. If cld2_dynamic == 1, it is up to the distribution
+ # to ensure that the data file is provided if desired.
+ # 1: Componentized. CLD data should be obtained via the Component
+ # Updater.
+ 'cld2_is_component%': 0,
+
# Enable spell checker.
'enable_spellcheck%': 1,
@@ -432,15 +483,29 @@
# Enables autofill dialog and associated features; disabled by default.
'enable_autofill_dialog%' : 0,
+ # Defaults Wallet integration in Autofill dialog to use production
+ # servers. Unofficial builds won't have the proper API keys.
+ 'enable_prod_wallet_service%': 0,
+
# Enables support for background apps.
'enable_background%': 1,
# Enable the task manager by default.
'enable_task_manager%': 1,
+ # Enables used resource whitelist generation; disabled by default.
+ 'enable_resource_whitelist_generation%': 0,
+
+ # Enable FILE support by default.
+ 'disable_file_support%': 0,
+
# Enable FTP support by default.
'disable_ftp_support%': 0,
+ # Use native android functions in place of ICU. Not supported by most
+ # components.
+ 'use_icu_alternatives_on_android%': 0,
+
# XInput2 multitouch support is enabled by default (use_xi2_mt=2).
# Setting to zero value disables XI2 MT. When XI2 MT is enabled,
# the input value also defines the required XI2 minor minimum version.
@@ -465,11 +530,6 @@
# Enable plug-in installation by default.
'enable_plugin_installation%': 1,
- # Enable PPAPI and NPAPI by default.
- # TODO(nileshagrawal): Make this flag enable/disable NPAPI as well
- # as PPAPI; see crbug.com/162667.
- 'enable_plugins%': 1,
-
# Specifies whether to use canvas_skia.cc in place of platform
# specific implementations of gfx::Canvas. Affects text drawing in the
# Chrome UI.
@@ -500,12 +560,29 @@
'native_memory_pressure_signals%': 0,
'data_reduction_fallback_host%' : '',
+ 'data_reduction_dev_host%' : '',
'spdy_proxy_auth_origin%' : '',
'spdy_proxy_auth_property%' : '',
'spdy_proxy_auth_value%' : '',
'data_reduction_proxy_probe_url%' : '',
+ 'data_reduction_proxy_warmup_url%' : '',
+ 'data_reduction_proxy_ssl_origin%' : '',
+ 'data_reduction_proxy_alt_origin%' : '',
+ 'data_reduction_proxy_alt_fallback_origin%' : '',
'enable_mdns%' : 0,
- 'enable_enhanced_bookmarks%': 0,
+ 'enable_service_discovery%': 0,
+ 'enable_wifi_bootstrapping%': 0,
+ 'enable_hangout_services_extension%': 0,
+
+ # Enable the Syzygy optimization step.
+ 'syzygy_optimize%': 0,
+
+ # Enable hole punching for the protected video.
+ 'video_hole%': 0,
+
+ # Automatically select platforms under ozone. Turn this off to
+ # build only explicitly selected platforms.
+ 'ozone_auto_platforms%': 1,
'conditions': [
# A flag for POSIX platforms
@@ -522,15 +599,6 @@
'os_bsd%': 0,
}],
- # Set armv7 for backward compatibility.
- # TODO(mostynb@opera.com): remove armv7 once all uses are
- # removed http://crbug.com/234135
- ['arm_version==7', {
- 'armv7': 1,
- }, {
- 'armv7': 0,
- }],
-
# NSS usage.
['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==0', {
'use_nss%': 1,
@@ -538,6 +606,14 @@
'use_nss%': 0,
}],
+ # When OpenSSL is used for SSL and crypto on Unix-like systems, use
+ # OpenSSL's certificate definition.
+ ['(OS=="linux" or OS=="freebsd" or OS=="openbsd" or OS=="solaris") and use_openssl==1', {
+ 'use_openssl_certs%': 1,
+ }, {
+ 'use_openssl_certs%': 0,
+ }],
+
# libudev usage. This currently only affects the content layer.
['OS=="linux" and embedded==0', {
'use_udev%': 1,
@@ -552,12 +628,8 @@
'use_x11%': 1,
}],
- ['OS=="linux" and use_aura==1 and chromeos==0', {
- 'use_clipboard_aurax11%': 1,
- }],
-
# Flags to use glib.
- ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or embedded==1', {
+ ['OS=="win" or OS=="mac" or OS=="ios" or OS=="android" or use_ozone==1', {
'use_glib%': 0,
}, {
'use_glib%': 1,
@@ -590,35 +662,35 @@
# on gnome-keyring. If that dependency is disabled, no gnome-keyring
# support will be available. This option is useful
# for Linux distributions and for Aura.
- ['OS!="linux" or chromeos==1 or use_aura==1', {
+ ['OS!="linux" or chromeos==1', {
'use_gnome_keyring%': 0,
}, {
'use_gnome_keyring%': 1,
}],
- ['toolkit_uses_gtk==1 or OS=="mac" or OS=="ios"', {
- # GTK+, Mac and iOS want Title Case strings
+ ['OS=="mac" or OS=="ios"', {
+ # Mac and iOS want Title Case strings
'use_titlecase_in_grd_files%': 1,
}],
- # Enable file manager and image loader extensions on Chrome OS.
+ # Enable loader extensions on Chrome OS.
['chromeos==1', {
- 'file_manager_extension%': 1,
'image_loader_extension%': 1,
}, {
- 'file_manager_extension%': 0,
'image_loader_extension%': 0,
}],
['OS=="win" or OS=="mac" or (OS=="linux" and chromeos==0)', {
'enable_one_click_signin%': 1,
+ 'enable_pre_sync_backup%': 1,
}],
['OS=="android"', {
- 'enable_automation%': 0,
'enable_extensions%': 0,
'enable_google_now%': 0,
'cld_version%': 1,
+ 'cld2_dynamic%': 0,
+ 'cld2_is_component%': 0,
'enable_spellcheck%': 0,
'enable_themes%': 0,
'remoting%': 0,
@@ -627,6 +699,11 @@
'native_discardable_memory%': 1,
'native_memory_pressure_signals%': 1,
'enable_printing%': 2,
+ 'enable_task_manager%':0,
+ # Set to 1 once we have a notification system for Android.
+ # http://crbug.com/115320
+ 'notifications%': 0,
+ 'video_hole%': 1,
}],
# Android OS includes support for proprietary codecs regardless of
@@ -645,27 +722,25 @@
# Enable autofill dialog for Android, Mac and Views-enabled platforms.
['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS=="mac"', {
- 'enable_autofill_dialog%': 1
- }],
+ 'enable_autofill_dialog%': 1,
- ['OS=="android" and android_webview_build==0', {
- 'enable_webrtc%': 1,
+ 'conditions': [
+ ['buildtype=="Official"', {
+ 'enable_prod_wallet_service%': 1,
+ }],
+ ]
}],
- # Disable WebRTC for building WebView as part of Android system.
- # TODO(boliu): Decide if we want WebRTC, and if so, also merge
- # the necessary third_party repositories.
- ['OS=="android" and android_webview_build==1', {
- 'enable_webrtc%': 0,
+ ['OS=="android"', {
+ 'enable_webrtc%': 1,
}],
['OS=="ios"', {
- 'configuration_policy%': 0,
'disable_ftp_support%': 1,
- 'enable_automation%': 0,
'enable_extensions%': 0,
'enable_google_now%': 0,
'cld_version%': 1,
+ 'cld2_dynamic%': 0,
'enable_printing%': 0,
'enable_session_service%': 0,
'enable_themes%': 0,
@@ -674,6 +749,7 @@
'remoting%': 0,
'safe_browsing%': 0,
'enable_managed_users%': 0,
+ 'enable_task_manager%': 0,
}],
# Use GPU accelerated cross process image transport by default
@@ -689,36 +765,60 @@
'chromium_win_pch%': 1
}],
- ['chromeos==1 or OS=="android" or OS=="ios"', {
+ ['chromeos==1 or OS=="android" or OS=="ios" or desktop_linux==1', {
'enable_plugin_installation%': 0,
}, {
'enable_plugin_installation%': 1,
}],
- ['(OS=="android" and google_tv!=1) or OS=="ios" or embedded==1', {
+ # Whether PPAPI is enabled.
+ ['OS=="android" or OS=="ios" or embedded==1', {
'enable_plugins%': 0,
}, {
'enable_plugins%': 1,
}],
- # linux_use_gold_binary: whether to use the binary checked into
- # third_party/gold. Gold is not used for 32-bit linux builds
- # as it runs out of address space.
+ # linux_use_bundled_gold: whether to use the gold linker binary checked
+ # into third_party/binutils. Force this off via GYP_DEFINES when you
+ # are using a custom toolchain and need to control -B in ldflags.
+ # Do not use 32-bit gold on 32-bit hosts as it runs out address space
+ # for component=static_library builds.
['OS=="linux" and (target_arch=="x64" or target_arch=="arm")', {
- 'linux_use_gold_binary%': 1,
+ 'linux_use_bundled_gold%': 1,
+ }, {
+ 'linux_use_bundled_gold%': 0,
+ }],
+
+ # linux_use_bundled_binutils: whether to use the binary binutils
+ # checked into third_party/binutils. These are not multi-arch so cannot
+ # be used except on x86 and x86-64 (the only two architectures which
+ # are currently checke in). Force this off via GYP_DEFINES when you
+ # are using a custom toolchain and need to control -B in cflags.
+ ['OS=="linux" and (target_arch=="x64")', {
+ 'linux_use_bundled_binutils%': 1,
}, {
- 'linux_use_gold_binary%': 0,
+ 'linux_use_bundled_binutils%': 0,
}],
# linux_use_gold_flags: whether to use build flags that rely on gold.
- # On by default for x64 Linux. Temporarily off for ChromeOS as
- # it failed on a buildbot.
- ['OS=="linux" and target_arch=="x64" and chromeos==0', {
+ # On by default for x64 Linux.
+ ['OS=="linux" and target_arch=="x64"', {
'linux_use_gold_flags%': 1,
}, {
'linux_use_gold_flags%': 0,
}],
+ # linux_use_debug_fission: whether to use split DWARF debug info
+ # files. This can reduce link time significantly, but is incompatible
+ # with some utilities such as icecc and ccache. Requires gold and
+ # gcc >= 4.8 or clang.
+ # http://gcc.gnu.org/wiki/DebugFission
+ ['OS=="linux" and target_arch=="x64"', {
+ 'linux_use_debug_fission%': 1,
+ }, {
+ 'linux_use_debug_fission%': 0,
+ }],
+
['OS=="android" or OS=="ios"', {
'enable_captive_portal_detection%': 0,
}, {
@@ -754,7 +854,7 @@
['OS=="linux" and target_arch=="arm" and chromeos==0', {
# Set some defaults for arm/linux chrome builds
- 'linux_use_tcmalloc%': 0,
+ 'use_allocator%': 'none',
# sysroot needs to be an absolute path otherwise it generates
# incorrect results when passed to pkg-config
'sysroot%': '<!(cd <(DEPTH) && pwd -P)/arm-sysroot',
@@ -784,23 +884,21 @@
# overriden with GYP_DEFINES.
# TODO(maruel): Remove the conditions as more configurations are
# supported.
- # TODO(csharp): Remove OS!="mac" once xcode can run the isolate code
- # again.
# NOTE: The check for disable_nacl==0 and component=="static_library"
# can't be used here because these variables are not defined yet, but it
# is still not supported.
- ['OS!="mac" and OS!="ios" and OS!="android" and chromeos==0', {
+ ['OS!="ios" and OS!="android" and chromeos==0', {
'test_isolation_mode%': 'check',
}, {
'test_isolation_mode%': 'noop',
}],
- # Whether Android ARM or x86 build uses OpenMAX DL FFT.
- ['OS=="android" and ((target_arch=="arm" and arm_version >= 7) or target_arch=="ia32") and android_webview_build==0', {
- # Currently only supported on Android ARMv7+, or ia32
- # without webview. When enabled, this will also enable
- # WebAudio support on Android ARM and ia32. Default is
- # enabled. Whether WebAudio is actually available depends
- # on runtime settings and flags.
+ # Whether Android build uses OpenMAX DL FFT.
+ ['OS=="android" and ((target_arch=="arm" and arm_version >= 7) or target_arch=="ia32" or target_arch=="x64" or target_arch=="arm64" or target_arch=="mipsel")', {
+ # Currently only supported on Android ARMv7+, ARM64, ia32, x64 and mipsel.
+ # When enabled, this will also enable WebAudio support on
+ # Android for these architectures. Default is enabled. Whether
+ # WebAudio is actually available depends on runtime settings
+ # and flags.
'use_openmax_dl_fft%': 1,
}, {
'use_openmax_dl_fft%': 0,
@@ -823,6 +921,29 @@
'remoting%': 0,
'enable_printing%': 0,
}],
+
+ # By default, use ICU data file (icudtl.dat) on all platforms
+ # except when building Android WebView.
+ # TODO(jshin): Handle 'use_system_icu' on Linux (Chromium).
+ # Set the data reduction proxy origin for Android Webview.
+ ['android_webview_build==0', {
+ 'icu_use_data_file_flag%' : 1,
+ 'spdy_proxy_auth_origin%': '',
+ 'data_reduction_proxy_probe_url%': '',
+ 'data_reduction_proxy_warmup_url%': '',
+ 'data_reduction_dev_host%': '',
+ 'data_reduction_fallback_host%': '',
+ }, {
+ 'icu_use_data_file_flag%' : 0,
+ 'spdy_proxy_auth_origin%': 'https://proxy.googlezip.net:443/',
+ 'data_reduction_proxy_probe_url%': 'http://check.googlezip.net/connect',
+ 'data_reduction_proxy_warmup_url%': 'http://www.gstatic.com/generate_204',
+ 'data_reduction_dev_host%': 'http://proxy-dev.googlezip.net:80/',
+ 'data_reduction_fallback_host%': 'http://compress.googlezip.net:80/',
+ }],
+ ['OS=="win" or OS=="mac"', {
+ 'enable_wifi_bootstrapping%' : 1,
+ }],
],
# Set this to 1 to enable use of concatenated impulse responses
@@ -873,12 +994,15 @@
'google_api_key%': '',
'google_default_client_id%': '',
'google_default_client_secret%': '',
+ # Native Client is enabled by default.
+ 'disable_nacl%': '0',
},
# Copy conditionally-set variables out one scope.
'branding%': '<(branding)',
'buildtype%': '<(buildtype)',
'target_arch%': '<(target_arch)',
+ 'target_subarch%': '<(target_subarch)',
'host_arch%': '<(host_arch)',
'toolkit_views%': '<(toolkit_views)',
'ui_compositor_image_transport%': '<(ui_compositor_image_transport)',
@@ -886,6 +1010,7 @@
'use_ash%': '<(use_ash)',
'use_cras%': '<(use_cras)',
'use_openssl%': '<(use_openssl)',
+ 'use_openssl_certs%': '<(use_openssl_certs)',
'use_nss%': '<(use_nss)',
'use_udev%': '<(use_udev)',
'os_bsd%': '<(os_bsd)',
@@ -897,7 +1022,7 @@
'use_ozone%': '<(use_ozone)',
'use_ozone_evdev%': '<(use_ozone_evdev)',
'use_clipboard_aurax11%': '<(use_clipboard_aurax11)',
- 'toolkit_uses_gtk%': '<(toolkit_uses_gtk)',
+ 'use_system_fontconfig%': '<(use_system_fontconfig)',
'desktop_linux%': '<(desktop_linux)',
'use_x11%': '<(use_x11)',
'use_gnome_keyring%': '<(use_gnome_keyring)',
@@ -905,26 +1030,26 @@
'chromeos%': '<(chromeos)',
'enable_viewport%': '<(enable_viewport)',
'enable_hidpi%': '<(enable_hidpi)',
- 'enable_touch_ui%': '<(enable_touch_ui)',
'use_xi2_mt%':'<(use_xi2_mt)',
- 'file_manager_extension%': '<(file_manager_extension)',
'image_loader_extension%': '<(image_loader_extension)',
'fastbuild%': '<(fastbuild)',
+ 'dont_embed_build_metadata%': '<(dont_embed_build_metadata)',
+ 'win_z7%': '<(win_z7)',
'dcheck_always_on%': '<(dcheck_always_on)',
- 'logging_like_official_build%': '<(logging_like_official_build)',
'tracing_like_official_build%': '<(tracing_like_official_build)',
- 'python_ver%': '<(python_ver)',
'arm_version%': '<(arm_version)',
- 'armv7%': '<(armv7)',
'arm_neon%': '<(arm_neon)',
'arm_neon_optional%': '<(arm_neon_optional)',
'sysroot%': '<(sysroot)',
+ 'chroot_cmd%': '<(chroot_cmd)',
'system_libdir%': '<(system_libdir)',
'component%': '<(component)',
+ 'enable_resource_whitelist_generation%': '<(enable_resource_whitelist_generation)',
'use_titlecase_in_grd_files%': '<(use_titlecase_in_grd_files)',
'use_third_party_translations%': '<(use_third_party_translations)',
'remoting%': '<(remoting)',
'enable_one_click_signin%': '<(enable_one_click_signin)',
+ 'enable_pre_sync_backup%': '<(enable_pre_sync_backup)',
'enable_webrtc%': '<(enable_webrtc)',
'chromium_win_pch%': '<(chromium_win_pch)',
'configuration_policy%': '<(configuration_policy)',
@@ -934,11 +1059,18 @@
'clang_use_chrome_plugins%': '<(clang_use_chrome_plugins)',
'mac_want_real_dsym%': '<(mac_want_real_dsym)',
'asan%': '<(asan)',
+ 'asan_coverage%': '<(asan_coverage)',
+ 'use_sanitizer_options%': '<(use_sanitizer_options)',
+ 'syzyasan%': '<(syzyasan)',
+ 'syzygy_optimize%': '<(syzygy_optimize)',
'lsan%': '<(lsan)',
'msan%': '<(msan)',
+ 'msan_blacklist%': '<(msan_blacklist)',
'tsan%': '<(tsan)',
'tsan_blacklist%': '<(tsan_blacklist)',
+ 'ubsan%': '<(ubsan)',
'use_instrumented_libraries%': '<(use_instrumented_libraries)',
+ 'use_custom_libcxx%': '<(use_custom_libcxx)',
'clang_type_profiler%': '<(clang_type_profiler)',
'order_profiling%': '<(order_profiling)',
'order_text_section%': '<(order_text_section)',
@@ -948,29 +1080,37 @@
'enable_session_service%': '<(enable_session_service)',
'enable_themes%': '<(enable_themes)',
'enable_autofill_dialog%': '<(enable_autofill_dialog)',
+ 'enable_prod_wallet_service%': '<(enable_prod_wallet_service)',
'enable_background%': '<(enable_background)',
- 'linux_use_gold_binary%': '<(linux_use_gold_binary)',
+ 'linux_use_bundled_gold%': '<(linux_use_bundled_gold)',
+ 'linux_use_bundled_binutils%': '<(linux_use_bundled_binutils)',
'linux_use_gold_flags%': '<(linux_use_gold_flags)',
+ 'linux_use_debug_fission%': '<(linux_use_debug_fission)',
'use_canvas_skia%': '<(use_canvas_skia)',
'test_isolation_mode%': '<(test_isolation_mode)',
'test_isolation_outdir%': '<(test_isolation_outdir)',
'test_isolation_fail_on_missing': '<(test_isolation_fail_on_missing)',
- 'enable_automation%': '<(enable_automation)',
'enable_printing%': '<(enable_printing)',
+ 'win_pdf_metafile_for_printing%': '<(win_pdf_metafile_for_printing)',
'enable_spellcheck%': '<(enable_spellcheck)',
'enable_google_now%': '<(enable_google_now)',
'cld_version%': '<(cld_version)',
+ 'cld2_table_size%': '<(cld2_table_size)',
+ 'cld2_dynamic%': '<(cld2_dynamic)',
+ 'cld2_is_component%': '<(cld2_is_component)',
'enable_captive_portal_detection%': '<(enable_captive_portal_detection)',
+ 'disable_file_support%': '<(disable_file_support)',
'disable_ftp_support%': '<(disable_ftp_support)',
+ 'use_icu_alternatives_on_android%': '<(use_icu_alternatives_on_android)',
'enable_task_manager%': '<(enable_task_manager)',
'sas_dll_path%': '<(sas_dll_path)',
'wix_path%': '<(wix_path)',
'use_libjpeg_turbo%': '<(use_libjpeg_turbo)',
'use_system_libjpeg%': '<(use_system_libjpeg)',
'android_webview_build%': '<(android_webview_build)',
+ 'icu_use_data_file_flag%': '<(icu_use_data_file_flag)',
'gyp_managed_install%': 0,
'create_standalone_apk%': 1,
- 'google_tv%': '<(google_tv)',
'enable_app_list%': '<(enable_app_list)',
'use_default_render_theme%': '<(use_default_render_theme)',
'enable_settings_app%': '<(enable_settings_app)',
@@ -981,19 +1121,24 @@
'native_discardable_memory%': '<(native_discardable_memory)',
'native_memory_pressure_signals%': '<(native_memory_pressure_signals)',
'data_reduction_fallback_host%': '<(data_reduction_fallback_host)',
+ 'data_reduction_dev_host%': '<(data_reduction_dev_host)',
'spdy_proxy_auth_origin%': '<(spdy_proxy_auth_origin)',
'spdy_proxy_auth_property%': '<(spdy_proxy_auth_property)',
'spdy_proxy_auth_value%': '<(spdy_proxy_auth_value)',
'data_reduction_proxy_probe_url%': '<(data_reduction_proxy_probe_url)',
+ 'data_reduction_proxy_warmup_url%': '<(data_reduction_proxy_warmup_url)',
+ 'data_reduction_proxy_ssl_origin%' : '<(data_reduction_proxy_ssl_origin)',
+ 'data_reduction_proxy_alt_origin%' : '<(data_reduction_proxy_alt_origin)',
+ 'data_reduction_proxy_alt_fallback_origin%' : '<(data_reduction_proxy_alt_fallback_origin)',
'enable_mdns%' : '<(enable_mdns)',
- 'enable_enhanced_bookmarks%' : '<(enable_enhanced_bookmarks)',
+ 'enable_service_discovery%' : '<(enable_service_discovery)',
+ 'enable_wifi_bootstrapping%': '<(enable_wifi_bootstrapping)',
+ 'enable_hangout_services_extension%' : '<(enable_hangout_services_extension)',
'v8_optimized_debug%': '<(v8_optimized_debug)',
'proprietary_codecs%': '<(proprietary_codecs)',
'use_goma%': '<(use_goma)',
'gomadir%': '<(gomadir)',
-
- # Use system nspr instead of the bundled one.
- 'use_system_nspr%': 0,
+ 'video_hole%': '<(video_hole)',
# Use system protobuf instead of bundled one.
'use_system_protobuf%': 0,
@@ -1039,11 +1184,6 @@
# Set to 1 to enable running Android lint on java/class files.
'android_lint%': 0,
- # Set to 1 to force Visual C++ to use legacy debug information format /Z7.
- # This is useful for parallel compilation tools which can't support /Zi.
- # Only used on Windows.
- 'win_z7%' : 0,
-
# Although base/allocator lets you select a heap library via an
# environment variable, the libcmt shim it uses sometimes gets in
# the way. To disable it entirely, and switch to normal msvcrt, do e.g.
@@ -1081,6 +1221,9 @@
# process type.
'chrome_multiple_dll%': '0',
+ # Experimental setting to optimize Chrome's DLLs with PGO.
+ 'chrome_pgo_phase%': '0',
+
# The default settings for third party code for treating
# warnings-as-errors. Ideally, this would not be required, however there
# is some third party code that takes a long time to fix/roll. So, this
@@ -1093,6 +1236,12 @@
'clang%': '<(clang)',
'make_clang_dir%': 'third_party/llvm-build/Release+Asserts',
+ # Control which version of clang to use when building for iOS. If set to
+ # '1', uses the version of clang that ships with Xcode. If set to '0', uses
+ # the version of clang that ships with the Chromium source. This variable
+ # is automatically set to '1' when using the Xcode generator.
+ 'clang_xcode%': 0,
+
# These two variables can be set in GYP_DEFINES while running
# |gclient runhooks| to let clang run a plugin in every compilation.
# Only has an effect if 'clang=1' is in GYP_DEFINES as well.
@@ -1102,6 +1251,11 @@
'clang_load%': '',
'clang_add_plugin%': '',
+ # Tell ld64 to write map files describing binary layout. Useful
+ # for looking at what contributes to binary size, e.g. with
+ # https://github.com/nico/bloat
+ 'mac_write_linker_maps%': 0,
+
# The default type of gtest.
'gtest_target_type%': 'executable',
@@ -1117,10 +1271,17 @@
'linux_strip_binary%': 0,
# Strip the test binaries needed for Linux reliability tests.
'linux_strip_reliability_tests%': 0,
+ # If we want stack unwind support for backtrace().
+ 'debug_unwind_tables%': 1,
+ 'release_unwind_tables%': 1,
+
+ # Override where to find binutils
+ 'binutils_version%': 0,
+ 'binutils_dir%': '',
# Enable TCMalloc.
- 'linux_use_tcmalloc%': 1,
- 'android_use_tcmalloc%': 0,
+ # Default of 'use_allocator' is set to 'none' if OS=='android' later.
+ 'use_allocator%': 'tcmalloc',
# Set to 1 to link against libgnome-keyring instead of using dlopen().
'linux_link_gnome_keyring%': 0,
@@ -1128,7 +1289,7 @@
'linux_link_gsettings%': 0,
# Default arch variant for MIPS.
- 'mips_arch_variant%': 'mips32r2',
+ 'mips_arch_variant%': 'mips32r1',
# Enable use of OpenMAX DL FFT routines.
'use_openmax_dl_fft%': '<(use_openmax_dl_fft)',
@@ -1145,13 +1306,17 @@
# whether warnings are treated as errors.
'chromium_code%': 0,
+ # Disable fatal linker warnings, similarly to how we make it possible
+ # to disable -Werror (e.g. for different toolchain versions).
+ 'disable_fatal_linker_warnings%': 0,
+
'release_valgrind_build%': 0,
# TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
'enable_wexit_time_destructors%': 0,
- # Set to 1 to compile with the built in pdf viewer.
- 'internal_pdf%': 0,
+ # Build libpeerconnection as a static library by default.
+ 'libpeer_target_type%': 'static_library',
# Set to 1 to compile with the OpenGL ES 2.0 conformance tests.
'internal_gles2_conform_tests%': 0,
@@ -1199,11 +1364,8 @@
# Disable Dart by default.
'enable_dart%': 0,
- # The desired version of Windows SDK can be set in ~/.gyp/include.gypi.
- 'msbuild_toolset%': '',
-
- # Native Client is enabled by default.
- 'disable_nacl%': 0,
+ # Copy out the setting of disable_nacl.
+ 'disable_nacl%': '<(disable_nacl)',
# Portable Native Client is enabled by default.
'disable_pnacl%': 0,
@@ -1222,8 +1384,8 @@
# Contains data about the attached devices for gyp_managed_install.
'build_device_config_path': '<(PRODUCT_DIR)/build_devices.cfg',
- 'sas_dll_exists': '<!(python <(DEPTH)/build/dir_exists.py "<(sas_dll_path)")',
- 'wix_exists': '<!(python <(DEPTH)/build/dir_exists.py "<(wix_path)")',
+ 'sas_dll_exists': '<!pymod_do_main(dir_exists "<(sas_dll_path)")',
+ 'wix_exists': '<!pymod_do_main(dir_exists "<(wix_path)")',
'windows_sdk_default_path': '<(DEPTH)/third_party/platformsdk_win8/files',
'directx_sdk_default_path': '<(DEPTH)/third_party/directxsdk/files',
@@ -1235,6 +1397,12 @@
# Turns on the i18n support in V8.
'v8_enable_i18n_support': 1,
+ # Compile d8 for the host toolset.
+ 'v8_toolset_for_d8': 'host',
+
+ # Compiles v8 without its platform library.
+ 'v8_use_default_platform': 0,
+
# Use the chromium skia by default.
'use_system_skia%': '0',
@@ -1247,49 +1415,123 @@
# IPC fuzzer is disabled by default.
'enable_ipc_fuzzer%': 0,
- # Whether or not to use "icu*.dat" file for ICU data.
- # Do not use it by default.
- 'icu_use_data_file_flag%': 0,
# Force disable libstdc++ debug mode.
'disable_glibcxx_debug%': 0,
+ # Set to 1 to compile with MSE support for MPEG2 TS
+ 'enable_mpeg2ts_stream_parser%': 0,
+
+ # Support ChromeOS touchpad gestures with ozone.
+ 'use_evdev_gestures%': 0,
+
+ # Default ozone platform (if no --ozone-platform flag).
+ 'ozone_platform%': "",
+
+ # Ozone platforms to include in the build.
+ 'ozone_platform_caca%': 0,
+ 'ozone_platform_dri%': 0,
+ 'ozone_platform_egltest%': 0,
+ 'ozone_platform_gbm%': 0,
+ 'ozone_platform_ozonex%': 0,
+ 'ozone_platform_test%': 0,
+
+ # Chrome OS: whether to build ChromeVox from sources in the Chromium
+ # repository rather than using precompiled JavaScript in
+ # chrome/third_party/chromevox. This is still experimental.
+ 'use_migrated_chromevox%': 0,
+
+ # Chrome OS: whether to also build the upcoming version of
+ # ChromeVox, which can then be enabled via a command-line switch.
+ 'use_chromevox_next%': 0,
+
'conditions': [
+ # Enable the Syzygy optimization step for the official builds.
+ ['OS=="win" and buildtype=="Official" and syzyasan!=1', {
+ 'syzygy_optimize%': 1,
+ }, {
+ 'syzygy_optimize%': 0,
+ }],
+ # Get binutils version so we can enable debug fission if we can.
+ ['os_posix==1 and OS!="mac" and OS!="ios"', {
+ 'conditions': [
+ # compiler_version doesn't work with clang
+ # TODO(mithro): Land https://codereview.chromium.org/199793014/ so
+ # compiler_version works with clang.
+ # TODO(glider): set clang to 1 earlier for ASan and TSan builds so
+ # that it takes effect here.
+ ['clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0 and ubsan==0', {
+ 'binutils_version%': '<!pymod_do_main(compiler_version target assembler)',
+ }],
+ # On Android we know the binutils version in the toolchain.
+ ['OS=="android"', {
+ 'binutils_version%': 222,
+ }],
+ ['host_arch=="x64"', {
+ 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin',
+ }],
+ ['host_arch=="ia32"', {
+ 'binutils_dir%': 'third_party/binutils/Linux_ia32/Release/bin',
+ }],
+ # Our version of binutils in third_party/binutils
+ ['linux_use_bundled_binutils==1', {
+ 'binutils_version%': 224,
+ }],
+ ],
+ }, {
+ 'binutils_version%': 0,
+ }],
# The version of GCC in use, set later in platforms that use GCC and have
# not explicitly chosen to build with clang. Currently, this means all
# platforms except Windows, Mac and iOS.
# TODO(glider): set clang to 1 earlier for ASan and TSan builds so that
# it takes effect here.
['os_posix==1 and OS!="mac" and OS!="ios" and clang==0 and asan==0 and lsan==0 and tsan==0 and msan==0', {
- 'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
+ 'conditions': [
+ ['OS=="android"', {
+ # We directly set the gcc versions since we know what we use.
+ 'gcc_version%': 48,
+ }, {
+ 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)',
+ }],
+ ['android_webview_build==1', {
+ # Android WebView uses a hermetic toolchain even for host, so set it
+ # manually here.
+ 'conditions': [
+ ['host_os=="mac"', {
+ 'host_gcc_version%': 42,
+ }, { # linux
+ 'host_gcc_version%': 46,
+ }],
+ ],
+ }, { # android_webview_build!=1
+ 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler)',
+ }],
+ ],
}, {
+ 'host_gcc_version%': 0,
'gcc_version%': 0,
}],
- ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(windows_sdk_default_path))"=="True"', {
+ ['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"=="True"', {
'windows_sdk_path%': '<(windows_sdk_default_path)',
}, {
'windows_sdk_path%': 'C:/Program Files (x86)/Windows Kits/8.0',
}],
- ['OS=="win" and "<!(python <(DEPTH)/build/dir_exists.py <(directx_sdk_default_path))"=="True"', {
+ ['OS=="win" and "<!pymod_do_main(dir_exists <(directx_sdk_default_path))"=="True"', {
'directx_sdk_path%': '<(directx_sdk_default_path)',
}, {
'directx_sdk_path%': '$(DXSDK_DIR)',
}],
['OS=="win"', {
'windows_driver_kit_path%': '$(WDK_DIR)',
- # Set the python arch to prevent conflicts with pyauto on Win64 build.
- # TODO(jschuh): crbug.com/177664 Investigate Win64 pyauto build.
- 'python_arch%': 'ia32',
}],
['os_posix==1 and OS!="mac" and OS!="ios"', {
- # Figure out the python architecture to decide if we build pyauto.
- 'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/<(system_libdir)/libpython<(python_ver).so.1.0)',
'conditions': [
['target_arch=="mipsel"', {
'werror%': '',
'disable_nacl%': 1,
'nacl_untrusted_build%': 0,
- 'linux_use_tcmalloc%': 0,
+ 'use_allocator%': 'none',
}],
['OS=="linux" and target_arch=="mipsel"', {
'sysroot%': '<(sysroot)',
@@ -1299,14 +1541,28 @@
# symbols from official builds.
['(branding=="Chrome" and buildtype=="Official")', {
'linux_dump_symbols%': 1,
+
+ # Omit unwind support in official release builds to save space. We
+ # can use breakpad for these builds.
+ 'release_unwind_tables%': 0,
+
+ 'conditions': [
+ # For official builds, use a 64-bit linker to avoid running out
+ # of address space. The buildbots should have a 64-bit kernel
+ # and a 64-bit libc installed.
+ ['host_arch=="ia32" and target_arch=="ia32"', {
+ 'linux_use_bundled_gold%': '1',
+ 'binutils_dir%': 'third_party/binutils/Linux_x64/Release/bin',
+ }],
+ ],
}],
],
}], # os_posix==1 and OS!="mac" and OS!="ios"
['OS=="ios"', {
'disable_nacl%': 1,
'enable_background%': 0,
- 'enable_task_manager%': 0,
'icu_use_data_file_flag%': 1,
+ 'input_speech%': 0,
'use_system_libxml%': 1,
'use_system_sqlite%': 1,
'locales==': [
@@ -1349,25 +1605,27 @@
# Location of Android NDK.
'variables': {
'variables': {
- # Unfortuantely we have to use absolute paths to the SDK/NDK beause
- # they're passed to ant which uses a different relative path from
- # gyp.
- 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
- 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
- 'android_host_arch%': '<!(uname -m)',
- # Android API-level of the SDK used for compilation.
- 'android_sdk_version%': '<!(/bin/echo -n ${ANDROID_SDK_VERSION})',
- # Android SDK build tools (e.g. dx, aapt, aidl)
- 'android_sdk_tools%': '<!(/bin/echo -n ${ANDROID_SDK_TOOLS})',
+ # Unfortunately we have to use absolute paths to the SDK/NDK because
+ # they're passed to ant which uses a different relative path from
+ # gyp.
+ 'android_ndk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/ndk/',
+ 'android_sdk_root%': '<!(cd <(DEPTH) && pwd -P)/third_party/android_tools/sdk/',
+ 'android_host_arch%': '<!(uname -m)',
+ # Android API-level of the SDK used for compilation.
+ 'android_sdk_version%': '20',
+ 'android_sdk_build_tools_version%': '20.0.0',
+ 'host_os%': "<!(uname -s | sed -e 's/Linux/linux/;s/Darwin/mac/')",
},
# Copy conditionally-set variables out one scope.
'android_ndk_root%': '<(android_ndk_root)',
'android_sdk_root%': '<(android_sdk_root)',
'android_sdk_version%': '<(android_sdk_version)',
- 'android_sdk_tools%': '<(android_sdk_tools)',
'android_stlport_root': '<(android_ndk_root)/sources/cxx-stl/stlport',
+ 'host_os%': '<(host_os)',
'android_sdk%': '<(android_sdk_root)/platforms/android-<(android_sdk_version)',
+ # Android SDK build tools (e.g. dx, aapt, aidl)
+ 'android_sdk_tools%': '<(android_sdk_root)/build-tools/<(android_sdk_build_tools_version)',
# Android API level 14 is ICS (Android 4.0) which is the minimum
# platform requirement for Chrome on Android, we use it for native
@@ -1377,7 +1635,15 @@
'android_app_abi%': 'x86',
'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86/gdbserver/gdbserver',
'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-x86',
- 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
+ 'android_ndk_lib_dir%': 'usr/lib',
+ 'android_toolchain%': '<(android_ndk_root)/toolchains/x86-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin',
+ }],
+ ['target_arch == "x64"', {
+ 'android_app_abi%': 'x86_64',
+ 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-x86_64/gdbserver/gdbserver',
+ 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-L/arch-x86_64',
+ 'android_ndk_lib_dir%': 'usr/lib64',
+ 'android_toolchain%': '<(android_ndk_root)/toolchains/x86_64-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
}],
['target_arch=="arm"', {
'conditions': [
@@ -1389,13 +1655,22 @@
],
'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm/gdbserver/gdbserver',
'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-arm',
- 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
+ 'android_ndk_lib_dir%': 'usr/lib',
+ 'android_toolchain%': '<(android_ndk_root)/toolchains/arm-linux-androideabi-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin',
+ }],
+ ['target_arch == "arm64"', {
+ 'android_app_abi%': 'arm64-v8a',
+ 'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-arm64/gdbserver/gdbserver',
+ 'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-L/arch-arm64',
+ 'android_ndk_lib_dir%': 'usr/lib',
+ 'android_toolchain%': '<(android_ndk_root)/toolchains/aarch64-linux-android-4.9/prebuilt/<(host_os)-<(android_host_arch)/bin',
}],
['target_arch == "mipsel"', {
'android_app_abi%': 'mips',
'android_gdbserver%': '<(android_ndk_root)/prebuilt/android-mips/gdbserver/gdbserver',
'android_ndk_sysroot%': '<(android_ndk_root)/platforms/android-14/arch-mips',
- 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.6/prebuilt/<(host_os)-<(android_host_arch)/bin',
+ 'android_ndk_lib_dir%': 'usr/lib',
+ 'android_toolchain%': '<(android_ndk_root)/toolchains/mipsel-linux-android-4.8/prebuilt/<(host_os)-<(android_host_arch)/bin',
}],
],
},
@@ -1403,13 +1678,13 @@
'android_app_abi%': '<(android_app_abi)',
'android_gdbserver%': '<(android_gdbserver)',
'android_ndk_root%': '<(android_ndk_root)',
- 'android_ndk_sysroot': '<(android_ndk_sysroot)',
+ 'android_ndk_sysroot%': '<(android_ndk_sysroot)',
'android_sdk_root%': '<(android_sdk_root)',
'android_sdk_version%': '<(android_sdk_version)',
'android_toolchain%': '<(android_toolchain)',
'android_ndk_include': '<(android_ndk_sysroot)/usr/include',
- 'android_ndk_lib': '<(android_ndk_sysroot)/usr/lib',
+ 'android_ndk_lib': '<(android_ndk_sysroot)/<(android_ndk_lib_dir)',
'android_sdk_tools%': '<(android_sdk_tools)',
'android_sdk%': '<(android_sdk)',
'android_sdk_jar%': '<(android_sdk)/android.jar',
@@ -1417,6 +1692,7 @@
'android_stlport_root': '<(android_stlport_root)',
'android_stlport_include': '<(android_stlport_root)/stlport',
'android_stlport_libs_dir': '<(android_stlport_root)/libs/<(android_app_abi)',
+ 'host_os%': '<(host_os)',
# Location of the "strip" binary, used by both gyp and scripts.
'android_strip%' : '<!(/bin/echo -n <(android_toolchain)/*-strip)',
@@ -1432,15 +1708,14 @@
# Always uses openssl.
'use_openssl%': 1,
+ 'use_openssl_certs%': 1,
'proprietary_codecs%': '<(proprietary_codecs)',
- 'enable_task_manager%': 0,
'safe_browsing%': 2,
'input_speech%': 0,
- 'enable_automation%': 0,
'java_bridge%': 1,
'build_ffmpegsumo%': 0,
- 'linux_use_tcmalloc%': 0,
+ 'use_allocator%': 'none',
# Disable Native Client.
'disable_nacl%': 1,
@@ -1451,10 +1726,6 @@
# Sessions are store separately in the Java side.
'enable_session_service%': 0,
- # Set to 1 once we have a notification system for Android.
- # http://crbug.com/115320
- 'notifications%': 0,
-
'p2p_apis%' : 0,
'gtest_target_type%': 'shared_library',
@@ -1479,8 +1750,6 @@
'jni_generator_jarjar_file': '../android_webview/build/jarjar-rules.txt',
}],
['OS=="mac"', {
- # Enable clang on mac by default!
- 'clang%': 1,
'conditions': [
# All Chrome builds have breakpad symbols, but only process the
# symbols from official builds.
@@ -1490,6 +1759,8 @@
],
}], # OS=="mac"
['OS=="mac" or OS=="ios"', {
+ 'clang%': 1,
+
'variables': {
# Mac OS X SDK and deployment target support. The SDK identifies
# the version of the system headers that will be used, and
@@ -1567,6 +1838,9 @@
# Turn on multiple dll by default on Windows when in static_library.
'chrome_multiple_dll%': 1,
}],
+ ['asan==1', {
+ 'win_use_allocator_shim%': 0,
+ }],
['component=="shared_library" and "<(GENERATOR)"=="ninja"', {
# Only enabled by default for ninja because it's buggy in VS.
# Not enabled for component=static_library because some targets
@@ -1582,7 +1856,7 @@
},{
'msvs_large_module_debug_link_mode%': '2', # Yes
}],
- ['MSVS_VERSION=="2012e" or MSVS_VERSION=="2010e"', {
+ ['MSVS_VERSION=="2013e"', {
'msvs_express%': 1,
'secure_atl%': 0,
},{
@@ -1603,12 +1877,18 @@
'use_cups%': 0,
}],
- ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win" or google_tv==1)', {
+ ['enable_plugins==1 and (OS=="linux" or OS=="mac" or OS=="win")', {
'enable_pepper_cdms%': 1,
}, {
'enable_pepper_cdms%': 0,
}],
+ ['OS=="android"', {
+ 'enable_browser_cdms%': 1,
+ }, {
+ 'enable_browser_cdms%': 0,
+ }],
+
# Native Client glibc toolchain is enabled
# by default except on arm and mips.
['target_arch=="arm" or target_arch=="mipsel"', {
@@ -1617,13 +1897,6 @@
'disable_glibc%': 0,
}],
- # Disable SSE2 when building for ARM or MIPS.
- ['target_arch=="arm" or target_arch=="mipsel"', {
- 'disable_sse2%': 1,
- }, {
- 'disable_sse2%': '<(disable_sse2)',
- }],
-
# Set the relative path from this file to the GYP file of the JPEG
# library used by Chromium.
['use_system_libjpeg==1 or use_libjpeg_turbo==0', {
@@ -1674,9 +1947,6 @@
['use_ozone==1', {
'grit_defines': ['-D', 'use_ozone'],
}],
- ['file_manager_extension==1', {
- 'grit_defines': ['-D', 'file_manager_extension'],
- }],
['image_loader_extension==1', {
'grit_defines': ['-D', 'image_loader_extension'],
}],
@@ -1686,11 +1956,6 @@
['use_titlecase_in_grd_files==1', {
'grit_defines': ['-D', 'use_titlecase'],
}],
- ['OS=="android" and target_arch=="ia32"', {
- # WebAudio on Android/x86 is disabled by default, unlike
- # everywhere else, so use appropriate message.
- 'grit_defines': ['-D', 'use_webaudio_enable_message'],
- }],
['use_third_party_translations==1', {
'grit_defines': ['-D', 'use_third_party_translations'],
'locales': [
@@ -1701,11 +1966,6 @@
['OS=="android"', {
'grit_defines': ['-t', 'android',
'-E', 'ANDROID_JAVA_TAGGED_ONLY=true'],
- 'conditions': [
- ['google_tv==1', {
- 'grit_defines': ['-D', 'google_tv'],
- }],
- ],
}],
['OS=="mac" or OS=="ios"', {
'grit_defines': ['-D', 'scale_factors=2x'],
@@ -1717,24 +1977,31 @@
'-w', '<(DEPTH)/build/ios/grit_whitelist.txt'
],
- # Enable clang and host builds when generating with ninja-ios.
+ # Enable host builds when generating with ninja-ios.
'conditions': [
['"<(GENERATOR)"=="ninja"', {
- 'clang%': 1,
'host_os%': "mac",
- }]
+ }],
+
+ # TODO(sdefresne): Remove the target_subarch check once Apple has
+ # upstreamed the support for "arm64". http://crbug.com/341453
+ ['target_subarch!="arm32" or "<(GENERATOR)"=="xcode"', {
+ 'clang_xcode%': 1,
+ }],
],
}],
['enable_extensions==1', {
'grit_defines': ['-D', 'enable_extensions'],
}],
['enable_plugins!=0', {
-
'grit_defines': ['-D', 'enable_plugins'],
}],
['enable_printing!=0', {
'grit_defines': ['-D', 'enable_printing'],
}],
+ ['enable_printing==1', {
+ 'grit_defines': ['-D', 'enable_full_printing'],
+ }],
['enable_themes==1', {
'grit_defines': ['-D', 'enable_themes'],
}],
@@ -1753,11 +2020,27 @@
['enable_webrtc==1', {
'grit_defines': ['-D', 'enable_webrtc'],
}],
- ['enable_mdns==1', {
- 'grit_defines': ['-D', 'enable_mdns'],
+ ['enable_hangout_services_extension==1', {
+ 'grit_defines': ['-D', 'enable_hangout_services_extension'],
+ }],
+ ['enable_task_manager==1', {
+ 'grit_defines': ['-D', 'enable_task_manager'],
+ }],
+ ['notifications==1', {
+ 'grit_defines': ['-D', 'enable_notifications'],
+ }],
+ ['enable_wifi_bootstrapping==1', {
+ 'grit_defines': ['-D', 'enable_wifi_bootstrapping'],
+ }],
+ ['enable_resource_whitelist_generation==1 and OS!="win"', {
+ 'grit_rc_header_format': ['-h', '#define {textual_id} _Pragma("whitelisted_resource_{numeric_id}") {numeric_id}'],
}],
- ['enable_enhanced_bookmarks==1', {
- 'grit_defines': ['-D', 'enable_enhanced_bookmarks'],
+ ['enable_resource_whitelist_generation==1 and OS=="win"', {
+ 'grit_rc_header_format': ['-h', '#define {textual_id} __pragma(message("whitelisted_resource_{numeric_id}")) {numeric_id}'],
+ }],
+ ['enable_mdns==1 or OS=="mac"', {
+ 'grit_defines': ['-D', 'enable_service_discovery'],
+ 'enable_service_discovery%': 1
}],
['clang_use_chrome_plugins==1 and OS!="win"', {
'clang_chrome_plugins_flags': [
@@ -1765,7 +2048,11 @@
],
}],
- ['asan==1 and OS!="win"', {
+ ['asan==1 or msan==1 or lsan==1 or tsan==1', {
+ 'clang%': 1,
+ 'use_allocator%': 'none',
+ }],
+ ['ubsan==1', {
'clang%': 1,
}],
['asan==1 and OS=="mac"', {
@@ -1773,14 +2060,18 @@
# runtime is fully adopted. See http://crbug.com/242503.
'mac_strip_release': 0,
}],
- ['lsan==1', {
- 'clang%': 1,
- }],
['tsan==1', {
- 'clang%': 1,
+ 'use_custom_libcxx%': 1,
}],
['msan==1', {
- 'clang%': 1,
+ # Use a just-built, MSan-instrumented libc++ instead of the system-wide
+ # libstdc++. This is required to avoid false positive reports whenever
+ # the C++ standard library is used.
+ 'use_custom_libcxx%': 1,
+ # Running the V8-generated code on an ARM simulator is a powerful hack
+ # that allows the tool to see the memory accesses from JITted code.
+ # Without this flag, JS code causes false positive reports from MSan.
+ 'v8_target_arch': 'arm64',
}],
['OS=="linux" and clang_type_profiler==1', {
@@ -1800,6 +2091,12 @@
],
}],
+ ['OS=="win"', {
+ # The Clang plugins don't currently work on Windows.
+ # TODO(hans): One day, this will work. (crbug.com/82385)
+ 'clang_use_chrome_plugins%': 0,
+ }],
+
# On valgrind bots, override the optimizer settings so we don't inline too
# much and make the stacks harder to figure out.
#
@@ -1824,7 +2121,7 @@
'win_release_InlineFunctionExpansion': '0',
'win_release_OmitFramePointers': '0',
- 'linux_use_tcmalloc': 1,
+ 'use_allocator': 'tcmalloc',
'release_valgrind_build': 1,
'werror': '',
'component': 'static_library',
@@ -1868,7 +2165,7 @@
}],
['arm_version==7 and android_webview_build==0', {
'arm_arch%': 'armv7-a',
- 'arm_tune%': 'cortex-a8',
+ 'arm_tune%': 'generic-armv7-a',
'conditions': [
['arm_neon==1', {
'arm_fpu%': 'neon',
@@ -1895,27 +2192,52 @@
'use_brlapi%': 1,
}],
- ['use_ozone==1', {
- # This is the default platform
- 'ozone_platform%': "test",
+ ['use_ozone==1 and ozone_auto_platforms==1', {
+ # Use test as the default platform.
+ 'ozone_platform%': 'test',
- # Enable built-in ozone platforms if ozone is enabled.
+ # Build all platforms whose deps are in install-build-deps.sh.
+ # Only these platforms will be compile tested by buildbots.
'ozone_platform_dri%': 1,
'ozone_platform_test%': 1,
- }, { # use_ozone==0
- 'ozone_platform_dri%': 0,
- 'ozone_platform_test%': 0,
+ 'ozone_platform_egltest%': 1,
}],
+
+ ['use_ozone==1 and ozone_auto_platforms==1 and chromeos==1', {
+ # Use dri as the default platform.
+ 'ozone_platform%': 'dri',
+ }],
+
+ ['desktop_linux==1 and use_aura==1 and use_x11==1', {
+ 'use_clipboard_aurax11%': 1,
+ }],
+
['OS=="win" and use_goma==1', {
# goma doesn't support pch yet.
'chromium_win_pch': 0,
# goma doesn't support PDB yet, so win_z7=1 or fastbuild=1.
'conditions': [
- ['fastbuild==0', {
- 'win_z7': 1,
+ ['win_z7==0', {
+ 'fastbuild': 1,
}],
],
}],
+
+ ['OS=="win" and (clang==1 or asan==1)', {
+ 'chromium_win_pch': 0,
+ }],
+
+ # The seccomp-bpf sandbox is only supported on three architectures
+ # currently.
+ # Do not disable seccomp_bpf anywhere without talking to
+ # security@chromium.org!
+ ['((OS=="linux" or OS=="android") and '
+ '(target_arch=="ia32" or target_arch=="x64" or '
+ 'target_arch=="arm"))', {
+ 'use_seccomp_bpf%': 1,
+ }, {
+ 'use_seccomp_bpf%': 0,
+ }],
],
# The path to the ANGLE library.
@@ -1956,6 +2278,8 @@
# processing.
'chromium_code%': '<(chromium_code)',
+ 'component%': '<(component)',
+
# See http://msdn.microsoft.com/en-us/library/aa652360(VS.71).aspx
'win_release_Optimization%': '2', # 2 = /Os
'win_debug_Optimization%': '0', # 0 = /Od
@@ -1985,12 +2309,6 @@
'win_exe_compatibility_manifest%':
'<(DEPTH)\\build\\win\\compatibility.manifest',
- # Set to 1 to generate external manifest instead of embedding it for
- # 'executable' target. Does nothing for other target type. This flag is
- # used to make mini_installer compatible with the component build.
- # See http://crbug.com/127233
- 'win_use_external_manifest%': 0,
-
'release_extra_cflags%': '',
'debug_extra_cflags%': '',
@@ -2041,11 +2359,19 @@
'mac_release_optimization%': '3', # Use -O3 unless overridden
'mac_debug_optimization%': '0', # Use -O0 unless overridden
}],
+ ['OS=="android"', {
+ 'host_os%': '<(host_os)', # See comment above chromium_code.
+ }],
],
},
'defines': [
# Don't use deprecated V8 APIs anywhere.
'V8_DEPRECATION_WARNINGS',
+ # Temporary suppression until Blink code can be removed.
+ 'BLINK_SCALE_FILTERS_AT_RECORD_TIME',
+ ],
+ 'include_dirs': [
+ '<(SHARED_INTERMEDIATE_DIR)',
],
'conditions': [
['(OS=="mac" or OS=="ios") and asan==1', {
@@ -2053,7 +2379,7 @@
'<(DEPTH)/build/mac/asan.gyp:asan_dynamic_runtime',
],
}],
- ['OS=="linux" and linux_use_tcmalloc==1 and clang_type_profiler==1', {
+ ['OS=="linux" and use_allocator!="none" and clang_type_profiler==1', {
'cflags_cc!': ['-fno-rtti'],
'cflags_cc+': [
'-frtti',
@@ -2070,9 +2396,6 @@
# See http://crbug.com/162818.
'cflags+': ['-Wno-sentinel'],
}],
- ['OS=="win" and "<(msbuild_toolset)"!=""', {
- 'msbuild_toolset': '<(msbuild_toolset)',
- }],
['branding=="Chrome"', {
'defines': ['GOOGLE_CHROME_BUILD'],
}, { # else: branding!="Chrome"
@@ -2089,6 +2412,14 @@
],
},
}],
+ ['clang==1 and OS!="win"', {
+ # This is here so that all files get recompiled after a clang roll and
+ # when turning clang on or off.
+ # (defines are passed via the command line, and build systems rebuild
+ # things when their commandline changes). Nothing should ever read this
+ # define.
+ 'defines': ['CR_CLANG_REVISION=<!(<(DEPTH)/tools/clang/scripts/update.sh --print-revision)'],
+ }],
['enable_rlz==1', {
'defines': ['ENABLE_RLZ'],
}],
@@ -2125,9 +2456,6 @@
['use_libjpeg_turbo==1', {
'defines': ['USE_LIBJPEG_TURBO=1'],
}],
- ['use_nss==1', {
- 'defines': ['USE_NSS=1'],
- }],
['use_x11==1', {
'defines': ['USE_X11=1'],
}],
@@ -2137,26 +2465,12 @@
['enable_one_click_signin==1', {
'defines': ['ENABLE_ONE_CLICK_SIGNIN'],
}],
- ['toolkit_uses_gtk==1 and toolkit_views==0', {
- # TODO(erg): We are progressively sealing up use of deprecated features
- # in gtk in preparation for an eventual porting to gtk3.
- 'defines': ['GTK_DISABLE_SINGLE_INCLUDES=1'],
- }],
- ['chromeos==1', {
- 'defines': ['OS_CHROMEOS=1'],
- }],
- ['google_tv==1', {
- 'defines': [
- 'GOOGLE_TV=1',
- 'VIDEO_HOLE=1',
- ],
+ ['enable_pre_sync_backup==1', {
+ 'defines': ['ENABLE_PRE_SYNC_BACKUP'],
}],
['use_xi2_mt!=0 and use_x11==1', {
'defines': ['USE_XI2_MT=<(use_xi2_mt)'],
}],
- ['file_manager_extension==1', {
- 'defines': ['FILE_MANAGER_EXTENSION=1'],
- }],
['image_loader_extension==1', {
'defines': ['IMAGE_LOADER_EXTENSION=1'],
}],
@@ -2178,12 +2492,12 @@
['enable_pepper_cdms==1', {
'defines': ['ENABLE_PEPPER_CDMS'],
}],
+ ['enable_browser_cdms==1', {
+ 'defines': ['ENABLE_BROWSER_CDMS'],
+ }],
['configuration_policy==1', {
'defines': ['ENABLE_CONFIGURATION_POLICY'],
}],
- ['input_speech==1', {
- 'defines': ['ENABLE_INPUT_SPEECH'],
- }],
['notifications==1', {
'defines': ['ENABLE_NOTIFICATIONS'],
}],
@@ -2199,23 +2513,12 @@
['use_udev==1', {
'defines': ['USE_UDEV'],
}],
- ['icu_use_data_file_flag==1', {
- 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_FILE'],
- }, { # else icu_use_data_file_flag !=1
- 'conditions': [
- ['OS=="win"', {
- 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_SHARED'],
- }, {
- 'defines': ['ICU_UTIL_DATA_IMPL=ICU_UTIL_DATA_STATIC'],
- }],
- ],
- }],
['fastbuild!=0', {
'xcode_settings': {
'GCC_GENERATE_DEBUGGING_SYMBOLS': 'NO',
},
'conditions': [
- ['clang==1', {
+ ['clang==1 and asan==0 and msan==0 and tsan==0', {
# Clang creates chubby debug information, which makes linking very
# slow. For now, don't create debug information with clang. See
# http://crbug.com/70000
@@ -2285,12 +2588,14 @@
}], # clang!=1
],
}], # fastbuild!=0
+ ['dont_embed_build_metadata==1', {
+ 'defines': [
+ 'DONT_EMBED_BUILD_METADATA',
+ ],
+ }], # dont_embed_build_metadata==1
['dcheck_always_on!=0', {
'defines': ['DCHECK_ALWAYS_ON=1'],
}], # dcheck_always_on!=0
- ['logging_like_official_build!=0', {
- 'defines': ['LOGGING_IS_OFFICIAL_BUILD=1'],
- }], # logging_like_official_build!=0
['tracing_like_official_build!=0', {
'defines': ['TRACING_IS_OFFICIAL_BUILD=1'],
}], # tracing_like_official_build!=0
@@ -2301,29 +2606,29 @@
}],
],
}],
- ['use_openssl==1', {
+ ['enable_eglimage==1', {
'defines': [
- 'USE_OPENSSL=1',
+ 'ENABLE_EGLIMAGE=1',
],
}],
- ['enable_eglimage==1', {
+ ['asan==1', {
'defines': [
- 'ENABLE_EGLIMAGE=1',
+ 'ADDRESS_SANITIZER',
+ 'MEMORY_TOOL_REPLACES_ALLOCATOR',
],
}],
- ['asan==1 and OS=="win"', {
- # Since asan on windows uses Syzygy, we need /PROFILE turned on to
- # produce appropriate pdbs.
+ ['syzyasan==1', {
+ # SyzyAsan needs /PROFILE turned on to produce appropriate pdbs.
'msvs_settings': {
'VCLinkerTool': {
'Profile': 'true',
},
},
'defines': [
- 'ADDRESS_SANITIZER',
+ 'SYZYASAN',
'MEMORY_TOOL_REPLACES_ALLOCATOR',
],
- }], # asan==1 and OS=="win"
+ }],
['OS=="win"', {
'defines': [
'__STD_C',
@@ -2351,16 +2656,6 @@
}
}
}],
- ['"<(GENERATOR)"=="msvs"', {
- 'msvs_settings': {
- 'VCLinkerTool': {
- # Make the pdb name sane. Otherwise foo.exe and foo.dll both
- # have foo.pdb. The ninja generator already defaults to this and
- # can't handle the $(TargetPath) macro.
- 'ProgramDatabaseFile': '$(TargetPath).pdb',
- }
- },
- }],
], # win_z7!=0
}], # OS==win
['enable_task_manager==1', {
@@ -2394,24 +2689,33 @@
['enable_autofill_dialog==1', {
'defines': ['ENABLE_AUTOFILL_DIALOG=1'],
}],
+ ['enable_prod_wallet_service==1', {
+ 'defines': ['ENABLE_PROD_WALLET_SERVICE=1'],
+ }],
['enable_background==1', {
'defines': ['ENABLE_BACKGROUND=1'],
}],
- ['enable_automation==1', {
- 'defines': ['ENABLE_AUTOMATION=1'],
- }],
['enable_google_now==1', {
'defines': ['ENABLE_GOOGLE_NOW=1'],
}],
['cld_version!=0', {
'defines': ['CLD_VERSION=<(cld_version)'],
}],
+ ['cld2_dynamic!=0', {
+ 'defines': ['CLD2_DYNAMIC_MODE=1'],
+ }],
+ ['cld2_is_component!=0', {
+ 'defines': ['CLD2_IS_COMPONENT=1'],
+ }],
['enable_printing==1', {
'defines': ['ENABLE_FULL_PRINTING=1', 'ENABLE_PRINTING=1'],
}],
['enable_printing==2', {
'defines': ['ENABLE_PRINTING=1'],
}],
+ ['OS=="win" and win_pdf_metafile_for_printing==1', {
+ 'defines': ['WIN_PDF_METAFILE_FOR_PRINTING=1'],
+ }],
['enable_spellcheck==1', {
'defines': ['ENABLE_SPELLCHECK=1'],
}],
@@ -2424,9 +2728,15 @@
['enable_settings_app==1', {
'defines': ['ENABLE_SETTINGS_APP=1'],
}],
+ ['disable_file_support==1', {
+ 'defines': ['DISABLE_FILE_SUPPORT=1'],
+ }],
['disable_ftp_support==1', {
'defines': ['DISABLE_FTP_SUPPORT=1'],
}],
+ ['use_icu_alternatives_on_android==1', {
+ 'defines': ['USE_ICU_ALTERNATIVES_ON_ANDROID=1'],
+ }],
['enable_managed_users==1', {
'defines': ['ENABLE_MANAGED_USERS=1'],
}],
@@ -2434,6 +2744,10 @@
'defines': [
'DATA_REDUCTION_FALLBACK_HOST="<(data_reduction_fallback_host)"'],
}],
+ ['data_reduction_dev_host != ""', {
+ 'defines': [
+ 'DATA_REDUCTION_DEV_HOST="<(data_reduction_dev_host)"'],
+ }],
['spdy_proxy_auth_origin != ""', {
'defines': ['SPDY_PROXY_AUTH_ORIGIN="<(spdy_proxy_auth_origin)"'],
}],
@@ -2447,17 +2761,60 @@
'defines': [
'DATA_REDUCTION_PROXY_PROBE_URL="<(data_reduction_proxy_probe_url)"'],
}],
+ ['data_reduction_proxy_warmup_url != ""', {
+ 'defines': [
+ 'DATA_REDUCTION_PROXY_WARMUP_URL="<(data_reduction_proxy_warmup_url)"'],
+ }],
+ ['data_reduction_proxy_ssl_origin != ""', {
+ 'defines': [
+ 'DATA_REDUCTION_PROXY_SSL_ORIGIN="<(data_reduction_proxy_ssl_origin)"'],
+ }],
+ ['data_reduction_proxy_alt_origin != ""', {
+ 'defines': [
+ 'DATA_REDUCTION_PROXY_ALT_ORIGIN="<(data_reduction_proxy_alt_origin)"'],
+ }],
+ ['data_reduction_proxy_alt_fallback_origin != ""', {
+ 'defines': [
+ 'DATA_REDUCTION_PROXY_ALT_FALLBACK_ORIGIN="<(data_reduction_proxy_alt_fallback_origin)"'],
+ }],
['enable_mdns==1', {
'defines': ['ENABLE_MDNS=1'],
}],
- ['enable_enhanced_bookmarks==1', {
- 'defines': ['ENABLE_ENHANCED_BOOKMARKS=1'],
+ ['enable_service_discovery==1', {
+ 'defines' : [ 'ENABLE_SERVICE_DISCOVERY=1' ],
+ }],
+ ['enable_wifi_bootstrapping==1', {
+ 'defines' : [ 'ENABLE_WIFI_BOOTSTRAPPING=1' ],
+ }],
+ ['enable_hangout_services_extension==1', {
+ 'defines': ['ENABLE_HANGOUT_SERVICES_EXTENSION=1'],
}],
['enable_ipc_fuzzer==1', {
'defines': ['ENABLE_IPC_FUZZER=1'],
}],
+ ['video_hole==1', {
+ 'defines': ['VIDEO_HOLE=1'],
+ }],
], # conditions for 'target_defaults'
'target_conditions': [
+ ['<(use_openssl)==1', {
+ 'defines': ['USE_OPENSSL=1'],
+ }],
+ ['<(use_openssl_certs)==1', {
+ 'defines': ['USE_OPENSSL_CERTS=1'],
+ }],
+ ['>(nacl_untrusted_build)==1', {
+ 'defines': [
+ 'USE_OPENSSL=1',
+ 'USE_OPENSSL_CERTS=1',
+ ],
+ }],
+ ['<(use_nss)==1 and >(nacl_untrusted_build)==0', {
+ 'defines': ['USE_NSS=1'],
+ }],
+ ['<(chromeos)==1 and >(nacl_untrusted_build)==0', {
+ 'defines': ['OS_CHROMEOS=1'],
+ }],
['enable_wexit_time_destructors==1', {
'conditions': [
[ 'clang==1', {
@@ -2531,6 +2888,11 @@
'VCCLCompilerTool': { 'WarnAsError': 'false' },
}
}],
+ ['clang==1', {
+ 'msvs_settings': {
+ 'VCCLCompilerTool': { 'WarnAsError': 'false' },
+ }
+ }],
],
}],
# TODO(darin): Unfortunately, some third_party code depends on base.
@@ -2636,6 +2998,7 @@
'abstract': 1,
'msvs_settings': {
'VCLinkerTool': {
+ 'MinimumRequiredVersion': '5.01', # XP.
'TargetMachine': '1',
},
'VCLibrarianTool': {
@@ -2649,6 +3012,9 @@
'msvs_configuration_platform': 'x64',
'msvs_settings': {
'VCLinkerTool': {
+ # Make sure to understand http://crbug.com/361720 if you want to
+ # increase this.
+ 'MinimumRequiredVersion': '5.02', # Server 2003.
'TargetMachine': '17', # x86 - 64
'AdditionalLibraryDirectories!':
['<(windows_sdk_path)/Lib/win8/um/x86'],
@@ -2747,10 +3113,7 @@
# TODO(phajdan.jr): Should we enable this for all of POSIX?
'defines': ['_GLIBCXX_DEBUG=1',],
}],
- # Disabled on iOS because it was causing a crash on startup.
- # TODO(michelea): investigate, create a reduced test and possibly
- # submit a radar.
- ['release_valgrind_build==0 and OS!="ios"', {
+ ['release_valgrind_build==0', {
'xcode_settings': {
'OTHER_CFLAGS': [
'-fstack-protector-all', # Implies -fstack-protector
@@ -2838,7 +3201,11 @@
['win_use_allocator_shim==0', {
'defines': ['NO_TCMALLOC'],
}],
- ['os_posix==1', {
+ # _FORTIFY_SOURCE isn't really supported by Clang now, see
+ # http://llvm.org/bugs/show_bug.cgi?id=16821.
+ # TODO(glider): once the bug is fixed, disable source fortification
+ # under the sanitizer tools only.
+ ['os_posix==1 and (OS!="linux" or clang!=1)', {
'target_conditions': [
['chromium_code==1', {
# Non-chromium code is not guaranteed to compile cleanly
@@ -2857,6 +3224,13 @@
'cflags': [
'<@(release_extra_cflags)',
],
+ 'conditions': [
+ ['enable_resource_whitelist_generation==1', {
+ 'cflags': [
+ '-Wunknown-pragmas -Wno-error=unknown-pragmas',
+ ],
+ }],
+ ],
}],
],
}],
@@ -2877,6 +3251,24 @@
'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
},
'conditions': [
+ [ 'OS=="ios"', {
+ 'Profile': {
+ 'inherit_from': ['Common_Base', 'x86_Base', 'Release_Base'],
+ 'target_conditions': [
+ [ '_type=="executable"', {
+ # To get a real .dSYM bundle produced by dsymutil, set the
+ # debug information format to dwarf-with-dsym. Since
+ # strip_from_xcode will not be used, set Xcode to do the
+ # stripping as well.
+ 'xcode_settings': {
+ 'DEBUG_INFORMATION_FORMAT': 'dwarf-with-dsym',
+ 'DEPLOYMENT_POSTPROCESSING': 'YES',
+ 'STRIP_INSTALLED_PRODUCT': 'YES',
+ },
+ }],
+ ],
+ },
+ }],
[ 'OS=="win"', {
# TODO(bradnelson): add a gyp mechanism to make this more graceful.
'Debug_x64': {
@@ -2898,6 +3290,14 @@
],
},
}],
+ # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
+ ['os_posix==1 and disable_fatal_linker_warnings==0 and use_evdev_gestures==0 and (chromeos==0 or target_arch!="arm")', {
+ 'target_defaults': {
+ 'ldflags': [
+ '-Wl,--fatal-warnings',
+ ],
+ },
+ }],
['os_posix==1 and chromeos==0', {
# Chrome OS enables -fstack-protector-strong via its build wrapper,
# and we want to avoid overriding this, so stack-protector is only
@@ -2970,11 +3370,6 @@
'conditions' : [
['OS=="android"', {
'ldflags': [
- '-Wl,--fatal-warnings',
- # Only link with needed input sections. This is to avoid
- # getting undefined reference to __cxa_bad_typeid in the CDU
- # library.
- '-Wl,--gc-sections',
# Warn in case of text relocations.
'-Wl,--warn-shared-textrel',
],
@@ -2986,7 +3381,6 @@
'debug_optimize%': 's',
},
'cflags': [
- '-fomit-frame-pointer',
'-fdata-sections',
'-ffunction-sections',
],
@@ -2995,11 +3389,30 @@
'-Wl,--as-needed',
],
}],
+ ['OS=="android" and android_full_debug==0 and target_arch!="arm64"', {
+ # We don't omit frame pointers on arm64 since they are required
+ # to correctly unwind stackframes which contain system library
+ # function frames (crbug.com/391706).
+ 'cflags': [
+ '-fomit-frame-pointer',
+ ],
+ }],
['OS=="linux" and target_arch=="ia32"', {
'ldflags': [
'-Wl,--no-as-needed',
],
}],
+ ['debug_unwind_tables==1', {
+ 'cflags': ['-funwind-tables'],
+ }, {
+ 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'],
+ }],
+ # TODO(mostynb): shuffle clang/gcc_version/binutils_version
+ # definitions in to the right scope to use them when setting
+ # linux_use_debug_fission, so it can be used here alone.
+ ['linux_use_debug_fission==1 and linux_use_gold_flags==1 and (clang==1 or gcc_version>=48) and binutils_version>=223', {
+ 'cflags': ['-gsplit-dwarf'],
+ }],
],
},
'Release_Base': {
@@ -3039,15 +3452,19 @@
'-Wl,--gc-sections',
],
}],
+ ['OS=="android" and target_arch!="arm64"', {
+ # We don't omit frame pointers on arm64 since they are required
+ # to correctly unwind stackframes which contain system library
+ # function frames (crbug.com/391706).
+ 'cflags': [
+ '-fomit-frame-pointer',
+ ]
+ }],
['OS=="android"', {
'variables': {
'release_optimize%': 's',
},
- 'cflags': [
- '-fomit-frame-pointer',
- ],
'ldflags': [
- '-Wl,--fatal-warnings',
# Warn in case of text relocations.
'-Wl,--warn-shared-textrel',
],
@@ -3071,13 +3488,10 @@
}],
],
}],
- # Can be omitted to reduce output size. Does not seem to affect
- # crash reporting.
- ['target_arch=="ia32"', {
- 'cflags': [
- '-fno-unwind-tables',
- '-fno-asynchronous-unwind-tables',
- ],
+ ['release_unwind_tables==1', {
+ 'cflags': ['-funwind-tables'],
+ }, {
+ 'cflags': ['-fno-unwind-tables', '-fno-asynchronous-unwind-tables'],
}],
],
},
@@ -3116,29 +3530,23 @@
# value used during computation does not change depending on
# how the compiler optimized the code, since the value is
# always kept in its specified precision.
+ #
+ # Refer to http://crbug.com/348761 for rationale behind SSE2
+ # being a minimum requirement for 32-bit Linux builds and
+ # http://crbug.com/313032 for an example where this has "bit"
+ # us in the past.
+ 'cflags': [
+ '-msse2',
+ '-mfpmath=sse',
+ '-mmmx', # Allows mmintrin.h for MMX intrinsics.
+ '-m32',
+ ],
+ 'ldflags': [
+ '-m32',
+ ],
'conditions': [
- ['branding=="Chromium" and disable_sse2==0', {
- 'cflags': [
- '-march=pentium4',
- '-msse2',
- '-mfpmath=sse',
- ],
- }],
- # ChromeOS targets Pinetrail, which is sse3, but most of the
- # benefit comes from sse2 so this setting allows ChromeOS
- # to build on other CPUs. In the future -march=atom would
- # help but requires a newer compiler.
- ['chromeos==1 and disable_sse2==0', {
- 'cflags': [
- '-msse2',
- '-mfpmath=sse',
- ],
- }],
# Use gold linker for Android ia32 target.
['OS=="android"', {
- 'cflags': [
- '-fuse-ld=gold',
- ],
'ldflags': [
'-fuse-ld=gold',
],
@@ -3155,14 +3563,26 @@
],
}],
],
- # -mmmx allows mmintrin.h to be used for mmx intrinsics.
- # video playback is mmx and sse2 optimized.
+ }],
+ ],
+ }],
+ ['target_arch=="x64"', {
+ 'target_conditions': [
+ ['_toolset=="target"', {
+ 'conditions': [
+ # Use gold linker for Android x64 target.
+ ['OS=="android"', {
+ 'ldflags': [
+ '-fuse-ld=gold',
+ ],
+ }],
+ ],
'cflags': [
- '-m32',
- '-mmmx',
+ '-m64',
+ '-march=x86-64',
],
'ldflags': [
- '-m32',
+ '-m64',
],
}],
],
@@ -3207,7 +3627,7 @@
# Most of the following flags are derived from what Android
# uses by default when building for arm, reference for which
# can be found in the following file in the Android NDK:
- # toolchains/arm-linux-androideabi-4.4.3/setup.mk
+ # toolchains/arm-linux-androideabi-4.8/setup.mk
'cflags': [
# The tree-sra optimization (scalar replacement for
# aggregates enabling subsequent optimizations) leads to
@@ -3215,7 +3635,15 @@
# compiler (r5-r7). This can be verified using
# webkit_unit_tests' WTF.Checked_int8_t test.
'-fno-tree-sra',
- '-fuse-ld=gold',
+ # The following 6 options are disabled to save on
+ # binary size in gcc 4.8.
+ # TODO(fdegans) Reevaluate when we upgrade GCC.
+ '-fno-partial-inlining',
+ '-fno-early-inlining',
+ '-fno-tree-copy-prop',
+ '-fno-tree-loop-optimize',
+ '-fno-move-loop-invariants',
+ '-fno-caller-saves',
'-Wno-psabi',
],
# Android now supports .relro sections properly.
@@ -3233,8 +3661,16 @@
}],
['profiling==1', {
'cflags': [
- '-marm', # Probably reduntant, but recommend by "perf" docs.
- '-mapcs-frame', # Seems required by -fno-omit-frame-pointer.
+ # Thumb code with frame pointer makes chrome crash
+ # early.
+ '-marm',
+ '-mapcs-frame', # Required by -fno-omit-frame-pointer.
+ # The perf report sometimes incorrectly attributes
+ # code from tail calls.
+ '-fno-optimize-sibling-calls',
+ ],
+ 'cflags!': [
+ '-fomit-frame-pointer',
],
}],
['clang==1', {
@@ -3243,13 +3679,34 @@
'-mthumb-interwork',
'-finline-limit=64',
'-fno-tree-sra',
- '-fuse-ld=gold',
+ '-fno-partial-inlining',
+ '-fno-early-inlining',
+ '-fno-tree-copy-prop',
+ '-fno-tree-loop-optimize',
+ '-fno-move-loop-invariants',
+ '-fno-caller-saves',
'-Wno-psabi',
],
+ 'cflags': [
+ # TODO(hans) Enable integrated-as (crbug.com/124610).
+ '-no-integrated-as',
+ '-B<(android_toolchain)', # Else /usr/bin/as gets picked up.
+ ],
+
'ldflags!': [
# Clang does not support the following options.
'-fuse-ld=gold',
],
+ 'ldflags': [
+ # As long as -fuse-ld=gold doesn't work, add a dummy directory
+ # with an 'ld' that redirects to gold, so that clang uses gold.
+ '-B<!(cd <(DEPTH) && pwd -P)/build/android/arm-linux-androideabi-gold',
+ ],
+ }],
+ ['asan==1', {
+ 'cflags': [
+ '-marm', # Required for frame pointer based stack traces.
+ ],
}],
],
}],
@@ -3257,6 +3714,19 @@
}],
],
}],
+ ['target_arch=="arm64"', {
+ 'target_conditions': [
+ ['_toolset=="target"', {
+ 'conditions': [
+ ['OS=="android"', {
+ 'cflags!': [
+ '-fstack-protector', # stack protector is always enabled on arm64.
+ ],
+ }],
+ ],
+ }],
+ ],
+ }],
['target_arch=="mipsel"', {
'target_conditions': [
['_toolset=="target"', {
@@ -3387,13 +3857,22 @@
}],
# Common options for AddressSanitizer, LeakSanitizer,
# ThreadSanitizer and MemorySanitizer.
- ['asan==1 or lsan==1 or tsan==1 or msan==1', {
+ ['asan==1 or lsan==1 or tsan==1 or msan==1 or ubsan==1', {
'target_conditions': [
['_toolset=="target"', {
'cflags': [
'-fno-omit-frame-pointer',
'-gline-tables-only',
],
+ 'cflags!': [
+ '-fomit-frame-pointer',
+ ],
+ }],
+ ],
+ }],
+ ['asan==1 or lsan==1 or tsan==1 or msan==1', {
+ 'target_conditions': [
+ ['_toolset=="target"', {
'ldflags!': [
# Functions interposed by the sanitizers can make ld think
# that some libraries aren't needed when they actually are,
@@ -3404,10 +3883,12 @@
'MEMORY_TOOL_REPLACES_ALLOCATOR',
],
}],
- ['_toolset=="target" and OS=="linux"', {
- 'ldflags': [
- # http://crbug.com/234010.
- '-lrt',
+ ],
+ # TODO(glider): enable the default options on other systems.
+ 'conditions': [
+ ['use_sanitizer_options==1 and OS=="linux" and (chromeos==0 or target_arch!="ia32")', {
+ 'dependencies': [
+ '<(DEPTH)/base/base.gyp:sanitizer_options',
],
}],
],
@@ -3422,8 +3903,38 @@
'ldflags': [
'-fsanitize=address',
],
- 'defines': [
- 'ADDRESS_SANITIZER',
+ }],
+ ],
+ 'conditions': [
+ ['OS=="mac"', {
+ 'cflags': [
+ '-mllvm -asan-globals=0', # http://crbug.com/352073
+ ],
+ }],
+ ],
+ }],
+ ['ubsan==1', {
+ 'target_conditions': [
+ ['_toolset=="target"', {
+ 'cflags': [
+ '-fsanitize=undefined',
+ # -fsanitize=vptr is incompatible with -fno-rtti.
+ '-fno-sanitize=vptr',
+ '-w', # http://crbug.com/162783
+ ],
+ 'ldflags': [
+ '-fsanitize=undefined',
+ # -fsanitize=vptr is incompatible with -fno-rtti.
+ '-fno-sanitize=vptr',
+ ],
+ }],
+ ],
+ }],
+ ['asan_coverage!=0', {
+ 'target_conditions': [
+ ['_toolset=="target"', {
+ 'cflags': [
+ '-mllvm -asan-coverage=<(asan_coverage)',
],
}],
],
@@ -3450,7 +3961,7 @@
'cflags': [
'-fsanitize=thread',
'-fPIC',
- '-mllvm', '-tsan-blacklist=<(tsan_blacklist)',
+ '-fsanitize-blacklist=<(tsan_blacklist)',
],
'ldflags': [
'-fsanitize=thread',
@@ -3477,6 +3988,7 @@
'-fsanitize=memory',
'-fsanitize-memory-track-origins',
'-fPIC',
+ '-fsanitize-blacklist=<(msan_blacklist)',
],
'ldflags': [
'-fsanitize=memory',
@@ -3498,33 +4010,17 @@
'dependencies': [
'<(DEPTH)/third_party/instrumented_libraries/instrumented_libraries.gyp:instrumented_libraries',
],
- 'conditions': [
- ['asan==1', {
- 'target_conditions': [
- ['_toolset=="target"', {
- 'ldflags': [
- # Add RPATH to result binary to make it linking instrumented libraries ($ORIGIN means relative RPATH)
- '-Wl,-R,\$$ORIGIN/instrumented_libraries/asan/lib/:\$$ORIGIN/instrumented_libraries/asan/usr/lib/x86_64-linux-gnu/',
- '-Wl,-z,origin',
- ],
- }],
- ],
- }],
- ['msan==1', {
- 'target_conditions': [
- ['_toolset=="target"', {
- 'ldflags': [
- '-Wl,-R,\$$ORIGIN/instrumented_libraries/msan/lib/:\$$ORIGIN/instrumented_libraries/msan/usr/lib/x86_64-linux-gnu/',
- '-Wl,-z,origin',
- ],
- }],
- ],
- }],
+ }],
+ ['use_custom_libcxx==1', {
+ 'dependencies': [
+ '<(DEPTH)/third_party/libc++/libc++.gyp:libcxx_proxy',
],
}],
['order_profiling!=0 and (chromeos==1 or OS=="linux" or OS=="android")', {
'target_conditions' : [
- ['_toolset=="target"', {
+ # crazy_linker has an upstream gyp file we can't edit, and we
+ # don't want to instrument it.
+ ['_toolset=="target" and _target_name!="crazy_linker"', {
'cflags': [
'-finstrument-functions',
# Allow mmx intrinsics to inline, so that the
@@ -3544,11 +4040,13 @@
['linux_dump_symbols==1', {
'cflags': [ '-g' ],
'conditions': [
- ['target_arch=="ia32" and OS!="android"', {
+ ['OS=="linux" and host_arch=="ia32" and linux_use_bundled_gold==0', {
'target_conditions': [
['_toolset=="target"', {
'ldflags': [
- # Workaround for linker OOM.
+ # Attempt to use less memory to prevent the linker from
+ # running out of address space. Considering installing a
+ # 64-bit kernel and switching to a 64-bit linker.
'-Wl,--no-keep-memory',
],
}],
@@ -3556,7 +4054,7 @@
}],
],
}],
- ['linux_use_tcmalloc==0 and android_use_tcmalloc==0', {
+ ['use_allocator!="tcmalloc"', {
'defines': ['NO_TCMALLOC'],
}],
['linux_use_gold_flags==1', {
@@ -3568,8 +4066,10 @@
# https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
# Only apply this to the target linker, since the host
# linker might not be gold, but isn't used much anyway.
- '-Wl,--threads',
- '-Wl,--thread-count=4',
+ # TODO(raymes): Disable threading because gold is frequently
+ # crashing on the bots: crbug.com/161942.
+ # '-Wl,--threads',
+ # '-Wl,--thread-count=4',
],
}],
],
@@ -3580,7 +4080,7 @@
'ldflags': [
# There seems to be a conflict of --icf and -pie
# in gold which can generate crashy binaries. As
- # a security measure, -pie takes precendence for
+ # a security measure, -pie takes precedence for
# now.
#'-Wl,--icf=safe',
'-Wl,--icf=none',
@@ -3588,18 +4088,58 @@
}],
],
}],
+ # Newer gcc's support -fuse-ld, use the flag to force gold
+ # selection.
+ # gcc -- http://gcc.gnu.org/onlinedocs/gcc-4.8.0/gcc/Optimize-Options.html
+ # TODO(mithro): Watch for clang support at following thread:
+ # http://clang-developers.42468.n3.nabble.com/Adding-fuse-ld-support-to-clang-td4032180.html
+ ['gcc_version>=48', {
+ 'target_conditions': [
+ ['_toolset=="target"', {
+ 'ldflags': [
+ '-fuse-ld=gold',
+ ],
+ }],
+ ],
+ }],
+ ['host_gcc_version>=48', {
+ 'target_conditions': [
+ ['_toolset=="host"', {
+ 'ldflags': [
+ '-fuse-ld=gold',
+ ],
+ }],
+ ],
+ }],
],
}],
- ['linux_use_gold_binary==1', {
+ ['linux_use_bundled_binutils==1', {
+ 'cflags': [
+ '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
+ ],
+ }],
+ ['linux_use_bundled_gold==1', {
+ # Put our binutils, which contains gold in the search path. We pass
+ # the path to gold to the compiler. gyp leaves unspecified what the
+ # cwd is when running the compiler, so the normal gyp path-munging
+ # fails us. This hack gets the right path.
'ldflags': [
- # Put our gold binary in the search path for the linker.
- # We pass the path to gold to the compiler. gyp leaves
- # unspecified what the cwd is when running the compiler,
- # so the normal gyp path-munging fails us. This hack
- # gets the right path.
- '-B<!(cd <(DEPTH) && pwd -P)/third_party/gold',
+ '-B<!(cd <(DEPTH) && pwd -P)/<(binutils_dir)',
],
}],
+ # Some binutils 2.23 releases may or may not have new dtags enabled,
+ # but they are all compatible with --disable-new-dtags,
+ # because the new dynamic tags are not created by default.
+ ['binutils_version>=223', {
+ # Newer binutils don't set DT_RPATH unless you disable "new" dtags
+ # and the new DT_RUNPATH doesn't work without --no-as-needed flag.
+ # FIXME(mithro): Figure out the --as-needed/--no-as-needed flags
+ # inside this file to allow usage of --no-as-needed and removal of
+ # this flag.
+ 'ldflags': [
+ '-Wl,--disable-new-dtags',
+ ],
+ }]
],
},
}],
@@ -3754,7 +4294,6 @@
['target_arch=="arm"', {
'cflags': [
'-target arm-linux-androideabi',
- '-mllvm -arm-enable-ehabi',
],
'ldflags': [
'-target arm-linux-androideabi',
@@ -3768,6 +4307,16 @@
'-target x86-linux-androideabi',
],
}],
+ # Place holder for x64 support, not tested.
+ # TODO: Enable clang support for Android x64. http://crbug.com/346626
+ ['target_arch=="x64"', {
+ 'cflags': [
+ '-target x86_64-linux-androideabi',
+ ],
+ 'ldflags': [
+ '-target x86_64-linux-androideabi',
+ ],
+ }],
],
}],
['asan==1', {
@@ -3809,13 +4358,9 @@
'-Wno-extra', # Enabled by -Wextra, but no specific flag
'-Wno-ignored-qualifiers',
'-Wno-type-limits',
+ '-Wno-unused-but-set-variable',
],
'cflags_cc': [
- # Disabling c++0x-compat should be handled in WebKit, but
- # this currently doesn't work because gcc_version is not set
- # correctly when building with the Android build system.
- # TODO(torne): Fix this in WebKit.
- '-Wno-error=c++0x-compat',
# Other things unrelated to -Wextra:
'-Wno-non-virtual-dtor',
'-Wno-sign-promo',
@@ -3878,11 +4423,20 @@
],
'target_conditions': [
['_type=="executable"', {
+ # Force android tools to export the "main" symbol so they can be
+ # loaded on ICS using the run_pie wrapper. See crbug.com/373219.
+ # TODO(primiano): remove -fvisibility and -rdynamic flags below
+ # when ICS support will be dropped.
+ 'cflags': [
+ '-fPIE',
+ '-fvisibility=default',
+ ],
'ldflags': [
'-Bdynamic',
- '-Wl,-dynamic-linker,/system/bin/linker',
'-Wl,--gc-sections',
'-Wl,-z,nocopyreloc',
+ '-pie',
+ '-rdynamic',
# crtbegin_dynamic.o should be the last item in ldflags.
'<(android_ndk_lib)/crtbegin_dynamic.o',
],
@@ -3891,18 +4445,11 @@
# Do not add any libraries after this!
'<(android_ndk_lib)/crtend_android.o',
],
- 'conditions': [
- ['asan==1', {
- 'cflags': [
- '-fPIE',
- ],
- 'ldflags': [
- '-pie',
- ],
- }],
- ],
}],
['_type=="shared_library" or _type=="loadable_module"', {
+ 'ldflags!': [
+ '-Wl,--exclude-libs=ALL',
+ ],
'ldflags': [
'-Wl,-shared,-Bsymbolic',
],
@@ -3920,14 +4467,6 @@
}],
],
}],
- # ndk-build copies .a's around the filesystem, breaking
- # relative paths in thin archives. Disable using thin
- # archives to avoid problems until one of these is fixed:
- # http://code.google.com/p/android/issues/detail?id=40302
- # http://code.google.com/p/android/issues/detail?id=40303
- ['_type=="static_library"', {
- 'standalone_static_library': 1,
- }],
],
}],
# Settings for building host targets using the system toolchain.
@@ -4002,9 +4541,6 @@
# Note that the prebuilt Clang binaries should not be used for iOS
# development except for ASan builds.
['clang==1', {
- 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
- 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
-
# gnu++11 instead of c++11 is needed because some code uses
# typeof() (a GNU extension).
# TODO(thakis): Eventually switch this to c++11 instead of
@@ -4040,23 +4576,36 @@
# Warns when a const char[] is converted to bool.
'-Wstring-conversion',
- # Clang considers the `register` keyword as deprecated, but e.g.
- # code generated by flex (used in angle) contains that keyword.
- # http://crbug.com/255186
+ # Clang considers the `register` keyword as deprecated, but
+ # e.g. code generated by flex (used in angle) contains that
+ # keyword. http://crbug.com/255186
'-Wno-deprecated-register',
+
+ # This warns on selectors from Cocoa headers (-length, -set).
+ # cfe-dev is currently discussing the merits of this warning.
+ # TODO(thakis): Reevaluate what to do with this, based one
+ # cfe-dev discussion.
+ '-Wno-selector-type-mismatch',
+ ],
+
+ 'conditions': [
+ ['clang_xcode==0', {
+ 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
+ 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
+ }],
],
}],
- ['clang==1 and clang_use_chrome_plugins==1', {
+ ['clang==1 and clang_xcode==0 and clang_use_chrome_plugins==1', {
'OTHER_CFLAGS': [
'<@(clang_chrome_plugins_flags)',
],
}],
- ['clang==1 and clang_load!=""', {
+ ['clang==1 and clang_xcode==0 and clang_load!=""', {
'OTHER_CFLAGS': [
'-Xclang', '-load', '-Xclang', '<(clang_load)',
],
}],
- ['clang==1 and clang_add_plugin!=""', {
+ ['clang==1 and clang_xcode==0 and clang_add_plugin!=""', {
'OTHER_CFLAGS': [
'-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
],
@@ -4067,6 +4616,16 @@
'-fcolor-diagnostics',
],
}],
+ ['OS=="ios" and target_subarch!="arm32" and \
+ "<(GENERATOR)"=="xcode"', {
+ 'OTHER_CFLAGS': [
+ # TODO(ios): when building Chrome for iOS on 64-bit platform
+ # with Xcode, the -Wshorted-64-to-32 warning is automatically
+ # enabled. This cause failures when compiling protobuf code,
+ # so disable the warning. http://crbug.com/359107
+ '-Wno-shorten-64-to-32',
+ ],
+ }],
],
},
'conditions': [
@@ -4079,12 +4638,19 @@
'xcode_settings': {
'OTHER_CFLAGS': [
'-fsanitize=address',
+ '-mllvm -asan-globals=0', # http://crbug.com/352073
'-w', # http://crbug.com/162783
+ '-gline-tables-only',
],
},
- 'defines': [
- 'ADDRESS_SANITIZER',
- 'MEMORY_TOOL_REPLACES_ALLOCATOR',
+ }],
+ ['asan_coverage!=0', {
+ 'target_conditions': [
+ ['_toolset=="target"', {
+ 'cflags': [
+ '-mllvm -asan-coverage=<(asan_coverage)',
+ ],
+ }],
],
}],
],
@@ -4099,6 +4665,13 @@
],
},
}],
+ ['mac_write_linker_maps==1', {
+ 'xcode_settings': {
+ 'OTHER_LDFLAGS': [
+ '-Wl,-map,>(_target_name).map',
+ ],
+ },
+ }],
],
}],
['_mac_bundle', {
@@ -4132,6 +4705,13 @@
}], # OS=="mac" or OS=="ios"
['OS=="mac"', {
'target_defaults': {
+ 'defines': [
+ # Prevent Mac OS X AssertMacros.h from defining macros that collide
+ # with common names, like 'check', 'require', and 'verify'.
+ # (Included by system header. Also exists on iOS but not included.)
+ # http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/AssertMacros.h
+ '__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0',
+ ],
'variables': {
# These should end with %, but there seems to be a bug with % in
# variables that are intended to be set to different values in
@@ -4299,27 +4879,36 @@
['OS=="ios"', {
'target_defaults': {
'xcode_settings' : {
- 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
-
- # This next block is mostly common with the 'mac' section above,
- # but keying off (or setting) 'clang' isn't valid for iOS as it
- # also means using Chromium's build of clang.
-
# TODO(stuartmorgan): switch to c++0x (see TODOs in the clang
# section above).
'CLANG_CXX_LANGUAGE_STANDARD': 'gnu++0x',
- # Warn if automatic synthesis is triggered with
- # the -Wobjc-missing-property-synthesis flag.
- 'CLANG_WARN_OBJC_MISSING_PROPERTY_SYNTHESIS': 'YES',
- 'WARNING_CFLAGS': [
- '-Wheader-hygiene',
- # Don't die on dtoa code that uses a char as an array index.
- # This is required solely for base/third_party/dmg_fp/dtoa.cc.
- '-Wno-char-subscripts',
- # See comment in the mac clang section above for this flag.
- '-Wno-unneeded-internal-declaration',
- # Match OS X clang C++11 warning settings.
- '-Wno-c++11-narrowing',
+
+ 'conditions': [
+ # Older Xcodes do not support -Wno-deprecated-register, so pass an
+ # additional flag to suppress the "unknown compiler option" error.
+ # Restrict this flag to builds that are either compiling with Xcode
+ # or compiling with Xcode's Clang. This will allow Ninja builds to
+ # continue failing on unknown compiler options.
+ # TODO(rohitrao): This flag is temporary and should be removed as
+ # soon as the iOS bots are updated to use Xcode 5.1.
+ ['clang_xcode==1', {
+ 'WARNING_CFLAGS': [
+ '-Wno-unknown-warning-option',
+ ],
+ }],
+
+ # Limit the valid architectures depending on "target_subarch".
+ # This need to include the "arm" architectures but also the "x86"
+ # ones (they are used when building for the simulator).
+ ['target_subarch=="arm32"', {
+ 'VALID_ARCHS': ['armv7', 'i386'],
+ }],
+ ['target_subarch=="arm64"', {
+ 'VALID_ARCHS': ['arm64', 'x86_64'],
+ }],
+ ['target_subarch=="both"', {
+ 'VALID_ARCHS': ['arm64', 'armv7', 'x86_64', 'i386'],
+ }],
],
},
'target_conditions': [
@@ -4327,8 +4916,11 @@
'xcode_settings': {
'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)',
+ 'VALID_ARCHS': [
+ 'x86_64',
+ ],
'ARCHS': [
- 'x86_64'
+ 'x86_64',
],
},
}],
@@ -4338,6 +4930,7 @@
# since we can't negate the iphone deployment target above, we
# instead set it here for target only.
'IPHONEOS_DEPLOYMENT_TARGET': '<(ios_deployment_target)',
+ 'ARCHS': ['$(ARCHS_STANDARD_INCLUDING_64_BIT)'],
},
}],
['_type=="executable"', {
@@ -4397,6 +4990,12 @@
'variables': {
'optimize%': 'size',
},
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ # Set /LTCG for the official builds.
+ 'LinkTimeCodeGeneration': '1',
+ },
+ },
'target_conditions': [
['optimize=="size"', {
'msvs_settings': {
@@ -4421,6 +5020,14 @@
},
],
['optimize=="max"', {
+ # Disable Warning 4702 ("Unreachable code") for the WPO/PGO
+ # builds. Probably anything that this would catch that
+ # wouldn't be caught in a normal build isn't going to
+ # actually be a bug, so the incremental value of C4702 for
+ # PGO builds is likely very small.
+ 'msvs_disabled_warnings': [
+ 4702
+ ],
'msvs_settings': {
'VCCLCompilerTool': {
# 2, optimizeMaxSpeed, Maximize Speed (/O2)
@@ -4473,6 +5080,12 @@
},
},
},
+ # https://code.google.com/p/chromium/issues/detail?id=372451#c20
+ # Warning 4702 ("Unreachable code") should be re-enabled once
+ # Express users are updated to VS2013 Update 2.
+ 'msvs_disabled_warnings': [
+ 4702
+ ],
'msvs_settings': {
'VCLinkerTool': {
# Explicitly required when using the ATL with express
@@ -4491,23 +5104,6 @@
'<(windows_driver_kit_path)/inc/atl71',
'<(windows_driver_kit_path)/inc/mfc42',
],
- 'target_conditions': [
- ['chromium_code', {
- # Workaround for intsafe in 2010 Express + WDK.
- # ATL code uses intsafe.h and both intsafe.h and stdint.h
- # define INT8_MIN et al.
- # We can't use this workaround in third_party code because
- # it has various levels of intolerance for including stdint.h.
- 'msvs_system_include_dirs': [
- '<(DEPTH)/build',
- ],
- 'msvs_settings': {
- 'VCCLCompilerTool': {
- 'ForcedIncludeFiles': [ 'intsafe_workaround.h', ],
- },
- },
- }],
- ],
}],
],
'msvs_system_include_dirs': [
@@ -4516,14 +5112,13 @@
'<(windows_sdk_path)/Include/winrt',
'$(VSInstallDir)/VC/atlmfc/include',
],
- 'msvs_cygwin_dirs': ['<(DEPTH)/third_party/cygwin'],
'msvs_cygwin_shell': 0,
- 'msvs_disabled_warnings': [4351, 4355, 4396, 4503, 4819,
+ 'msvs_disabled_warnings': [
+ 4351, 4355, 4396, 4503, 4819,
# TODO(maruel): These warnings are level 4. They will be slowly
# removed as code is fixed.
4100, 4121, 4125, 4127, 4130, 4131, 4189, 4201, 4238, 4244, 4245,
- 4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4702,
- 4706,
+ 4310, 4428, 4481, 4505, 4510, 4512, 4530, 4610, 4611, 4701, 4706,
],
'msvs_settings': {
'VCCLCompilerTool': {
@@ -4594,6 +5189,11 @@
],
},
'target_conditions': [
+ ['_type=="executable"', {
+ 'VCManifestTool': {
+ 'EmbedManifest': 'true',
+ },
+ }],
['_type=="executable" and ">(win_exe_compatibility_manifest)"!=""', {
'VCManifestTool': {
'AdditionalManifestFiles': [
@@ -4601,15 +5201,97 @@
],
},
}],
- ['_type=="executable" and >(win_use_external_manifest)==0', {
- 'VCManifestTool': {
- 'EmbedManifest': 'true',
- }
+ ],
+ 'conditions': [
+ ['clang==1', {
+ # Building with Clang on Windows is a work in progress and very
+ # experimental. See crbug.com/82385.
+ 'VCCLCompilerTool': {
+ 'WarnAsError': 'false',
+ 'RuntimeTypeInfo': 'false',
+ 'AdditionalOptions': [
+ '-fmsc-version=1800',
+ '/fallback',
+
+ # Many files use intrinsics without including this header.
+ # TODO(hans): Fix those files, or move this to sub-GYPs.
+ '/FIIntrin.h',
+
+ # TODO(hans): Make this list shorter eventually.
+ '-Qunused-arguments',
+ '-Wno-c++11-compat-deprecated-writable-strings',
+ '-Wno-char-subscripts',
+ '-Wno-deprecated-declarations',
+ '-Wno-deprecated-register',
+ '-Wno-empty-body',
+ '-Wno-enum-conversion',
+ '-Wno-extra-tokens',
+ '-Wno-ignored-attributes',
+ '-Wno-incompatible-pointer-types',
+ '-Wno-int-to-void-pointer-cast',
+ '-Wno-invalid-noreturn',
+ '-Wno-logical-op-parentheses',
+ '-Wno-microsoft',
+ '-Wno-missing-braces',
+ '-Wno-missing-declarations',
+ '-Wno-msvc-include',
+ '-Wno-null-dereference',
+ '-Wno-overloaded-virtual',
+ '-Wno-parentheses',
+ '-Wno-pointer-sign',
+ '-Wno-reorder',
+ '-Wno-return-type-c-linkage',
+ '-Wno-self-assign',
+ '-Wno-sometimes-uninitialized',
+ '-Wno-switch',
+ '-Wno-tautological-compare',
+ '-Wno-unknown-pragmas',
+ '-Wno-unsequenced',
+ '-Wno-unused-function',
+ '-Wno-unused-private-field',
+ '-Wno-unused-value',
+ '-Wno-unused-variable',
+ '-ferror-limit=1',
+ ],
+ },
}],
- ['_type=="executable" and >(win_use_external_manifest)==1', {
- 'VCManifestTool': {
- 'EmbedManifest': 'false',
- }
+ ['asan==1', {
+ # ASan on Windows is a work in progress and very experimental.
+ # See crbug.com/345874.
+ 'VCCLCompilerTool': {
+ 'AdditionalOptions': [
+ '-fsanitize=address',
+ ],
+ 'AdditionalIncludeDirectories': [
+ # MSVC needs to be able to find the sanitizer headers when
+ # invoked via /fallback. This is critical for using macros
+ # like ASAN_UNPOISON_MEMORY_REGION in files where we fall
+ # back.
+ '<(DEPTH)/<(make_clang_dir)/lib/clang/3.5.0/include_sanitizer',
+ ],
+ },
+ 'VCLinkerTool': {
+ 'AdditionalLibraryDirectories': [
+ # TODO(hans): If make_clang_dir is absolute, this breaks.
+ '<(DEPTH)/<(make_clang_dir)/lib/clang/3.5.0/lib/windows',
+ ],
+ },
+ 'target_conditions': [
+ ['_type=="executable"', {
+ 'VCLinkerTool': {
+ 'AdditionalDependencies': [
+ 'clang_rt.asan-i386.lib',
+ ],
+ },
+ }],
+ ['_type=="shared_library" or _type=="loadable_module"', {
+ 'VCLinkerTool': {
+ 'AdditionalDependencies': [
+ 'clang_rt.asan_dll_thunk-i386.lib',
+ ],
+ },
+ }],
+ ],
}],
],
},
@@ -4646,7 +5328,7 @@
'/nxcompat',
],
'conditions': [
- ['asan==0', {
+ ['syzyasan==0', {
'AdditionalOptions': ['/largeaddressaware'],
}],
],
@@ -4686,7 +5368,22 @@
],
},
}],
- ['clang==1', {
+ # We need a special case to handle the android webview build on mac because
+ # the host gcc there doesn't accept this flag, but the target gcc may
+ # require it.
+ ['gcc_version>=48 and android_webview_build==1 and host_os=="mac"', {
+ 'target_defaults': {
+ 'target_conditions': [
+ ['_toolset=="host"', {
+ 'cflags!': [
+ '-Wno-unused-local-typedefs',
+ ],
+ }],
+ ],
+ },
+ }],
+ ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) '
+ 'and OS!="win"', {
'make_global_settings': [
['CC', '<(make_clang_dir)/bin/clang'],
['CXX', '<(make_clang_dir)/bin/clang++'],
@@ -4694,6 +5391,12 @@
['CXX.host', '$(CXX)'],
],
}],
+ ['clang==1 and OS=="win"', {
+ 'make_global_settings': [
+ # On Windows, gyp's ninja generator only looks at CC.
+ ['CC', '<(make_clang_dir)/bin/clang-cl'],
+ ],
+ }],
['OS=="android" and clang==0', {
# Hardcode the compiler names in the Makefile so that
# it won't depend on the environment at make time.
@@ -4764,7 +5467,6 @@
['OS=="ios"', {
# Target both iPhone and iPad.
'TARGETED_DEVICE_FAMILY': '1,2',
- 'VALID_ARCHS': 'armv7 i386',
}, { # OS!="ios"
'conditions': [
['target_arch=="x64"', {
diff --git a/chromium/build/compiled_action.gni b/chromium/build/compiled_action.gni
new file mode 100644
index 00000000000..7f4975f7d86
--- /dev/null
+++ b/chromium/build/compiled_action.gni
@@ -0,0 +1,148 @@
+# 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.
+
+# This file introduces two related templates that act like action and
+# action_foreach but instead of running a Python script, it will compile a
+# given tool in the host toolchain and run that (either once or over the list
+# of inputs, depending on the variant).
+#
+# Parameters
+#
+# tool (required)
+# [label] Label of the tool to run. This should be an executable, and
+# this label should not include a toolchain (anything in parens). The
+# host compile of this tool will be used.
+#
+# outputs (required)
+# [list of files] Like the outputs of action (if using "compiled_action",
+# this would be just the list of outputs), or action_foreach (if using
+# "compiled_action_foreach", this would contain source expansions mapping
+# input to output files).
+#
+# args (required)
+# [list of strings] Same meaning as action/action_foreach.
+#
+# visibility
+# source_prereqs
+# deps
+# args (all optional)
+# Same meaning as action/action_foreach.
+#
+#
+# Example of usage:
+#
+# compiled_action("run_my_tool") {
+# tool = "//tools/something:mytool"
+# outputs = [
+# "$target_gen_dir/mysource.cc",
+# "$target_gen_dir/mysource.h",
+# ]
+#
+# # The tool takes this input.
+# source_prereqs = [ "my_input_file.idl" ]
+#
+# # In this case, the tool takes as arguments the input file and the output
+# # build dir (both relative to the "cd" that the script will be run in)
+# # and will produce the output files listed above.
+# args = [
+# rebase_path("my_input_file.idl", root_build_dir),
+# "--output-dir", rebase_path(target_gen_dir, root_build_dir),
+# ]
+# }
+#
+# You would typically declare your tool like this:
+# if (host_toolchain == current_toolchain) {
+# executable("mytool") {
+# ...
+# }
+# }
+# The if statement around the executable is optional. That says "I only care
+# about this target in the host toolchain". Usually this is what you want, and
+# saves unnecessarily compiling your tool for the target platform. But if you
+# need a target build of your tool as well, just leave off the if statement.
+
+template("compiled_action") {
+ assert(defined(invoker.tool), "tool must be defined for $target_name")
+ assert(defined(invoker.outputs), "outputs must be defined for $target_name")
+ assert(defined(invoker.args), "args must be defined for $target_name")
+
+ action(target_name) {
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
+
+ script = "//build/gn_run_binary.py"
+
+ if (defined(invoker.source_prereqs)) {
+ source_prereqs = invoker.source_prereqs
+ }
+ outputs = invoker.outputs
+
+ # Constuct the host toolchain version of the tool.
+ host_tool = invoker.tool + "($host_toolchain)"
+
+ # Get the path to the executable. Currently, this assumes that the tool
+ # does not specify output_name so that the target name is the name to use.
+ # If that's not the case, we'll need another argument to the script to
+ # specify this, since we can't know what the output name is (it might be in
+ # another file not processed yet).
+ host_executable = get_label_info(host_tool, "root_out_dir") + "/" +
+ get_label_info(host_tool, "name")
+
+ deps = [ host_tool ]
+ if (defined(invoker.deps)) {
+ deps += invoker.deps
+ }
+
+ # The script takes as arguments the binary to run, and then the arguments
+ # to pass it.
+ args = [
+ rebase_path(host_executable, root_build_dir)
+ ] + invoker.args
+ }
+}
+
+template("compiled_action_foreach") {
+ assert(defined(invoker.sources), "sources must be defined for $target_name")
+ assert(defined(invoker.tool), "tool must be defined for $target_name")
+ assert(defined(invoker.outputs), "outputs must be defined for $target_name")
+ assert(defined(invoker.args), "args must be defined for $target_name")
+
+ action_foreach(target_name) {
+ # Otherwise this is a standalone action, define visibility if requested.
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
+
+ script = "//build/gn_run_binary.py"
+ sources = invoker.sources
+
+ if (defined(invoker.source_prereqs)) {
+ source_prereqs = invoker.source_prereqs
+ }
+ outputs = invoker.outputs
+
+ # Constuct the host toolchain version of the tool.
+ host_tool = invoker.tool + "($host_toolchain)"
+
+ # Get the path to the executable. Currently, this assumes that the tool
+ # does not specify output_name so that the target name is the name to use.
+ # If that's not the case, we'll need another argument to the script to
+ # specify this, since we can't know what the output name is (it might be in
+ # another file not processed yet).
+ host_executable = get_label_info(host_tool, "root_out_dir") + "/" +
+ get_label_info(host_tool, "name")
+
+ deps = [ host_tool ]
+ if (defined(invoker.deps)) {
+ deps += invoker.deps
+ }
+
+ # The script takes as arguments the binary to run, and then the arguments
+ # to pass it.
+ args = [
+ rebase_path(host_executable, root_build_dir)
+ ] + invoker.args
+ }
+}
diff --git a/chromium/build/compiler_version.py b/chromium/build/compiler_version.py
index b349199992c..05faf54454d 100755
--- a/chromium/build/compiler_version.py
+++ b/chromium/build/compiler_version.py
@@ -14,42 +14,130 @@ import re
import subprocess
import sys
-def GetVersion(compiler):
+
+compiler_version_cache = {} # Map from (compiler, tool) -> version.
+
+
+def Usage(program_name):
+ print '%s MODE TOOL' % os.path.basename(program_name)
+ print 'MODE: host or target.'
+ print 'TOOL: assembler or compiler or linker.'
+ return 1
+
+
+def ParseArgs(args):
+ if len(args) != 2:
+ raise Exception('Invalid number of arguments')
+ mode = args[0]
+ tool = args[1]
+ if mode not in ('host', 'target'):
+ raise Exception('Invalid mode: %s' % mode)
+ if tool not in ('assembler', 'compiler', 'linker'):
+ raise Exception('Invalid tool: %s' % tool)
+ return mode, tool
+
+
+def GetEnvironFallback(var_list, default):
+ """Look up an environment variable from a possible list of variable names."""
+ for var in var_list:
+ if var in os.environ:
+ return os.environ[var]
+ return default
+
+
+def GetVersion(compiler, tool):
+ tool_output = tool_error = None
+ cache_key = (compiler, tool)
+ cached_version = compiler_version_cache.get(cache_key)
+ if cached_version:
+ return cached_version
try:
# Note that compiler could be something tricky like "distcc g++".
- compiler = compiler + " -dumpversion"
- pipe = subprocess.Popen(compiler, shell=True,
+ if tool == "compiler":
+ compiler = compiler + " -dumpversion"
+ # 4.6
+ version_re = re.compile(r"(\d+)\.(\d+)")
+ elif tool == "assembler":
+ compiler = compiler + " -Xassembler --version -x assembler -c /dev/null"
+ # Unmodified: GNU assembler (GNU Binutils) 2.24
+ # Ubuntu: GNU assembler (GNU Binutils for Ubuntu) 2.22
+ # Fedora: GNU assembler version 2.23.2
+ version_re = re.compile(r"^GNU [^ ]+ .* (\d+).(\d+).*?$", re.M)
+ elif tool == "linker":
+ compiler = compiler + " -Xlinker --version"
+ # Using BFD linker
+ # Unmodified: GNU ld (GNU Binutils) 2.24
+ # Ubuntu: GNU ld (GNU Binutils for Ubuntu) 2.22
+ # Fedora: GNU ld version 2.23.2
+ # Using Gold linker
+ # Unmodified: GNU gold (GNU Binutils 2.24) 1.11
+ # Ubuntu: GNU gold (GNU Binutils for Ubuntu 2.22) 1.11
+ # Fedora: GNU gold (version 2.23.2) 1.11
+ version_re = re.compile(r"^GNU [^ ]+ .* (\d+).(\d+).*?$", re.M)
+ else:
+ raise Exception("Unknown tool %s" % tool)
+
+ # Force the locale to C otherwise the version string could be localized
+ # making regex matching fail.
+ env = os.environ.copy()
+ env["LC_ALL"] = "C"
+ pipe = subprocess.Popen(compiler, shell=True, env=env,
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- gcc_output, gcc_error = pipe.communicate()
+ tool_output, tool_error = pipe.communicate()
if pipe.returncode:
raise subprocess.CalledProcessError(pipe.returncode, compiler)
- result = re.match(r"(\d+)\.(\d+)", gcc_output)
- return result.group(1) + result.group(2)
+ parsed_output = version_re.match(tool_output)
+ result = parsed_output.group(1) + parsed_output.group(2)
+ compiler_version_cache[cache_key] = result
+ return result
except Exception, e:
- if gcc_error:
- sys.stderr.write(gcc_error)
+ if tool_error:
+ sys.stderr.write(tool_error)
print >> sys.stderr, "compiler_version.py failed to execute:", compiler
print >> sys.stderr, e
return ""
-def main():
- # Check if CXX environment variable exists and
- # if it does use that compiler.
- cxx = os.getenv("CXX", None)
- if cxx:
- cxxversion = GetVersion(cxx)
- if cxxversion != "":
- print cxxversion
- return 0
- else:
- # Otherwise we check the g++ version.
- gccversion = GetVersion("g++")
- if gccversion != "":
- print gccversion
- return 0
- return 1
+def main(args):
+ try:
+ (mode, tool) = ParseArgs(args[1:])
+ except Exception, e:
+ sys.stderr.write(e.message + '\n\n')
+ return Usage(args[0])
+
+ ret_code, result = ExtractVersion(mode, tool)
+ if ret_code == 0:
+ print result
+ return ret_code
+
+
+def DoMain(args):
+ """Hook to be called from gyp without starting a separate python
+ interpreter."""
+ (mode, tool) = ParseArgs(args)
+ ret_code, result = ExtractVersion(mode, tool)
+ if ret_code == 0:
+ return result
+ raise Exception("Failed to extract compiler version for args: %s" % args)
+
+
+def ExtractVersion(mode, tool):
+ # Check if various CXX environment variables exist and use them if they
+ # exist. The preferences and fallback order is a close approximation of
+ # GenerateOutputForConfig() in GYP's ninja generator.
+ # The main difference being not supporting GYP's make_global_settings.
+ environments = ['CXX_target', 'CXX']
+ if mode == 'host':
+ environments = ['CXX_host'] + environments;
+ compiler = GetEnvironFallback(environments, 'c++')
+
+ if compiler:
+ compiler_version = GetVersion(compiler, tool)
+ if compiler_version != "":
+ return (0, compiler_version)
+ return (1, None)
+
if __name__ == "__main__":
- sys.exit(main())
+ sys.exit(main(sys.argv))
diff --git a/chromium/build/config/BUILD.gn b/chromium/build/config/BUILD.gn
index 37572d93771..71137f1ecc8 100644
--- a/chromium/build/config/BUILD.gn
+++ b/chromium/build/config/BUILD.gn
@@ -2,49 +2,242 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-config("my_msvs") {
+import("//build/config/allocator.gni")
+import("//build/config/crypto.gni")
+import("//build/config/features.gni")
+import("//build/config/ui.gni")
+
+declare_args() {
+ # When set, turns off the (normally-on) iterator debugging and related stuff
+ # that is normally turned on for Debug builds. These are generally useful for
+ # catching bugs but in some cases may cause conflicts or excessive slowness.
+ disable_iterator_debugging = false
+
+ # Set to true to not store any build metadata (this isn't working yet but
+ # this flag will help us to get there). See http://crbug.com/314403.
+ # TODO(sebmarchand): Update this comment once this flag guarantee that
+ # there's no build metadata in the build artifacts.
+ dont_embed_build_metadata = false
+}
+
+# TODO(brettw) Most of these should be removed. Instead of global feature
+# flags, we should have more modular flags that apply only to a target and its
+# dependents. For example, depending on the "x11" meta-target should define
+# USE_X11 for all dependents so that everything that could use X11 gets the
+# define, but anything that doesn't depend on X11 doesn't see it.
+#
+# For now we define these globally to match the current GYP build.
+config("feature_flags") {
+ # TODO(brettw) most of these need to be parameterized.
defines = [
"CHROMIUM_BUILD",
- "TOOLKIT_VIEWS=1",
- "USE_LIBJPEG_TURBO=1",
"ENABLE_ONE_CLICK_SIGNIN",
"ENABLE_REMOTING=1",
- "ENABLE_WEBRTC=1",
"ENABLE_CONFIGURATION_POLICY",
- "ENABLE_INPUT_SPEECH",
"ENABLE_NOTIFICATIONS",
"ENABLE_EGLIMAGE=1",
"ENABLE_TASK_MANAGER=1",
"ENABLE_EXTENSIONS=1",
"ENABLE_PLUGIN_INSTALLATION=1",
- "ENABLE_PLUGINS=1",
"ENABLE_SESSION_SERVICE=1",
"ENABLE_THEMES=1",
"ENABLE_AUTOFILL_DIALOG=1",
"ENABLE_BACKGROUND=1",
- "ENABLE_AUTOMATION=1",
"ENABLE_GOOGLE_NOW=1",
- "ENABLE_PRINTING=1",
"ENABLE_CAPTIVE_PORTAL_DETECTION=1",
"ENABLE_APP_LIST=1",
- "ENABLE_MESSAGE_CENTER=1",
"ENABLE_SETTINGS_APP=1",
"ENABLE_MANAGED_USERS=1",
+ "ENABLE_SERVICE_DISCOVERY=1",
+ "USE_MOJO=1",
+ "V8_DEPRECATION_WARNINGS", # Don't use deprecated V8 APIs anywhere.
+ # Temporary suppression until Blink code can be removed.
+ "BLINK_SCALE_FILTERS_AT_RECORD_TIME",
]
-}
-config("feature_flags") {
- #defines =
+ if (cld_version > 0) {
+ defines += [ "CLD_VERSION=$cld_version" ]
+ }
+ if (enable_mdns) {
+ defines += [ "ENABLE_MDNS=1" ]
+ }
+ if (enable_pepper_cdms) {
+ # TODO(brettw) should probably be "=1"
+ defines += [ "ENABLE_PEPPER_CDMS" ]
+ }
+ if (enable_plugins) {
+ defines += [ "ENABLE_PLUGINS=1" ]
+ }
+ if (enable_printing > 0) {
+ defines += [ "ENABLE_PRINTING=1" ]
+ if (enable_printing < 2) {
+ defines += [ "ENABLE_FULL_PRINTING=1" ]
+ }
+ }
+ if (enable_spellcheck) {
+ defines += [ "ENABLE_SPELLCHECK=1" ]
+ }
+ if (dont_embed_build_metadata) {
+ defines += [ "DONT_EMBED_BUILD_METADATA" ]
+ }
+ if (use_udev) {
+ # TODO(brettw) should probably be "=1".
+ defines += [ "USE_UDEV" ]
+ }
+ if (toolkit_views) {
+ defines += [ "TOOLKIT_VIEWS=1" ]
+ }
+ if (ui_compositor_image_transport) {
+ # TODO(brettw) should probably be "=1".
+ defines += [ "UI_COMPOSITOR_IMAGE_TRANSPORT" ]
+ }
+ if (use_ash) {
+ defines += [ "USE_ASH=1" ]
+ }
+ if (use_aura) {
+ defines += [ "USE_AURA=1" ]
+ }
+ if (use_cairo) {
+ defines += [ "USE_CAIRO=1" ]
+ }
+ if (use_clipboard_aurax11) {
+ defines += [ "USE_CLIPBOARD_AURAX11=1" ]
+ }
+ if (use_default_render_theme) {
+ defines += [ "USE_DEFAULT_RENDER_THEME=1" ]
+ }
+ if (use_glib) {
+ defines += [ "USE_GLIB=1" ]
+ }
+ if (use_openssl) {
+ defines += [ "USE_OPENSSL=1" ]
+ if (use_openssl_certs) {
+ defines += [ "USE_OPENSSL_CERTS=1" ]
+ }
+ } else if (use_nss_certs) {
+ # USE_NSS really means "use nss for certificate validation and storage"
+ # (like USE_OPENSSL_CERTS) and not "we're linking to NSS." It might be nice
+ # to rename this but we're hoping to transition away from NSS.
+ defines += [ "USE_NSS=1" ]
+ }
+ if (use_ozone) {
+ defines += [ "USE_OZONE=1" ]
+ }
+ if (use_x11) {
+ defines += [ "USE_X11=1" ]
+ if (use_xi2_mt > 0) {
+ defines += [ "USE_XI2_MT=$use_xi2_mt" ]
+ }
+ }
+ if (use_allocator != "tcmalloc") {
+ defines += [ "NO_TCMALLOC" ]
+ }
+ if (enable_webrtc) {
+ defines += [ "ENABLE_WEBRTC=1" ]
+ }
+ if (disable_ftp_support) {
+ defines += [ "DISABLE_FTP_SUPPORT=1" ]
+ }
}
+# Debug/release ----------------------------------------------------------------
+
config("debug") {
defines = [
"_DEBUG",
"DYNAMIC_ANNOTATIONS_ENABLED=1",
"WTF_USE_DYNAMIC_ANNOTATIONS=1",
]
+
+ if (is_win) {
+ if (disable_iterator_debugging) {
+ # Iterator debugging is enabled by the compiler on debug builds, and we
+ # have to tell it to turn it off.
+ defines += [ "_HAS_ITERATOR_DEBUGGING=0" ]
+ }
+ } else if (is_linux && !is_android && cpu_arch == "x64" &&
+ !disable_iterator_debugging) {
+ # Enable libstdc++ debugging facilities to help catch problems early, see
+ # http://crbug.com/65151 .
+ # TODO(phajdan.jr): Should we enable this for all of POSIX?
+ defines += [ "_GLIBCXX_DEBUG=1" ]
+ }
}
config("release") {
+}
+
+# Default libraries ------------------------------------------------------------
+# This config defines the default libraries applied to all targets.
+config("default_libs") {
+ if (is_win) {
+ # TODO(brettw) this list of defaults should probably be smaller, and
+ # instead the targets that use the less common ones (e.g. wininet or
+ # winspool) should include those explicitly.
+ libs = [
+ "advapi32.lib",
+ "comdlg32.lib",
+ "dbghelp.lib",
+ "delayimp.lib",
+ "dnsapi.lib",
+ "gdi32.lib",
+ "kernel32.lib",
+ "msimg32.lib",
+ "odbc32.lib",
+ "odbccp32.lib",
+ "ole32.lib",
+ "oleaut32.lib",
+ "psapi.lib",
+ "shell32.lib",
+ "shlwapi.lib",
+ "user32.lib",
+ "usp10.lib",
+ "uuid.lib",
+ "version.lib",
+ "wininet.lib",
+ "winmm.lib",
+ "winspool.lib",
+ "ws2_32.lib",
+ # Please don't add more stuff here. We should actually be making this
+ # list smaller, since all common things should be covered. If you need
+ # some extra libraries, please just add a libs = [ "foo.lib" ] to your
+ # target that needs it.
+ ]
+ } else if (is_android) {
+ # Android uses -nostdlib so we need to add even libc here.
+ libs = [
+ # TODO(brettw) write a version of this, hopefully we can express this
+ # without forking out to GCC just to get the library name. The android
+ # toolchain directory should probably be extracted into a .gni file that
+ # this file and the android toolchain .gn file can share.
+ # # Manually link the libgcc.a that the cross compiler uses.
+ # '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
+ "c",
+ "dl",
+ "m"
+ ]
+ } else if (is_mac) {
+ libs = [
+ "AppKit.framework",
+ "ApplicationServices.framework",
+ "Carbon.framework",
+ "CoreFoundation.framework",
+ "Foundation.framework",
+ "IOKit.framework",
+ "Security.framework",
+ ]
+ } else if (is_ios) {
+ libs = [
+ "CoreFoundation.framework",
+ "CoreGraphics.framework",
+ "CoreText.framework",
+ "Foundation.framework",
+ "UIKit.framework",
+ ]
+ } else if (is_linux) {
+ libs = [
+ "dl",
+ ]
+ }
}
diff --git a/chromium/build/config/BUILDCONFIG.gn b/chromium/build/config/BUILDCONFIG.gn
index 1110970a82a..3df338da72c 100644
--- a/chromium/build/config/BUILDCONFIG.gn
+++ b/chromium/build/config/BUILDCONFIG.gn
@@ -33,16 +33,6 @@ declare_args() {
# to configure warnings.
is_clang = false
- # ASH is enabled.
- # TODO(brettw) this should be moved out of the main build config file.
- use_ash = false
- # Aura is enabled.
- # TODO(brettw) this should be moved out of the main build config file.
- use_aura = false
- # Ozone is enabled.
- # TODO(brettw) this should be moved out of the main build config file.
- use_ozone = false
-
# Forces a 64-bit build on Windows. Does nothing on other platforms. Normally
# we build 32-bit on Windows regardless of the current host OS bit depth.
# Setting this flag will override this logic and generate 64-bit toolchains.
@@ -52,10 +42,6 @@ declare_args() {
# the default toolchain to 64-bit.
force_win64 = false
- # Set to true on the command line when invoked by GYP. Build files can key
- # off of this to make any GYP-output-specific changes to the build.
- is_gyp = false
-
# Selects the desired build flavor. Official builds get additional
# processing to prepare for release. Normally you will want to develop and
# test with this flag off.
@@ -65,6 +51,18 @@ declare_args() {
# true means official Google Chrome branding (requires extra Google-internal
# resources).
is_chrome_branded = false
+
+ # Compile for Address Sanitizer to find memory bugs.
+ is_asan = false
+
+ # Compile for Leak Sanitizer to find leaks.
+ is_lsan = false
+
+ # Compile for Memory Sanitizer to find uninitialized reads.
+ is_msan = false
+
+ # Compile for Thread Sanitizer to find threading bugs.
+ is_tsan = false
}
# =============================================================================
@@ -78,7 +76,8 @@ declare_args() {
# - is_mac is set only for desktop Mac. It is not set on iOS.
# - is_posix is true for mac and any Unix-like system (basically everything
# except Windows).
-# - is_linux is true for any Linux variant including Android and ChromeOS.
+# - is_linux is true for desktop Linux and ChromeOS, but not Android (which is
+# generally too different despite being based on the Linux kernel).
#
# Do not add more is_* variants here for random lesser-used Unix systems like
# aix or one of the BSDs. If you need to check these, just check the os value
@@ -102,12 +101,14 @@ if (os == "win") {
is_nacl = false
is_posix = true
is_win = false
- is_clang = true # Always use clang on Mac.
+ if (!is_clang) {
+ is_clang = true # Always use clang on Mac.
+ }
} else if (os == "android") {
- is_android = false
+ is_android = true
is_chromeos = false
is_ios = false
- is_linux = true
+ is_linux = false
is_mac = false
is_nacl = false
is_posix = true
@@ -141,6 +142,10 @@ if (os == "win") {
is_nacl = false
is_posix = true
is_win = false
+ if (!is_gyp_xcode_generator) {
+ # Always use clang on iOS when using ninja
+ is_clang = true
+ }
} else if (os == "linux") {
is_android = false
is_chromeos = false
@@ -152,6 +157,8 @@ if (os == "win") {
is_win = false
}
+is_desktop_linux = is_linux && !is_chromeos
+
# =============================================================================
# CPU ARCHITECTURE
# =============================================================================
@@ -175,97 +182,108 @@ if (is_win) {
# to each assignment or appending to the sources variable and matches are
# automatcally removed.
#
-# We define lists of filters for each platform for all builds so they can
-# be used by individual targets if necessary (a target can always change
-# sources_assignment_filter on itself if it needs something more specific).
-#
# Note that the patterns are NOT regular expressions. Only "*" and "\b" (path
# boundary = end of string or slash) are supported, and the entire string
# muct match the pattern (so you need "*.cc" to match all .cc files, for
# example).
-windows_sources_filters = [
- "*_win.cc",
- "*_win.h",
- "*_win_unittest.cc",
- "*\bwin/*",
-]
-mac_sources_filters = [
- "*_mac.h",
- "*_mac.cc",
- "*_mac.mm",
- "*_mac_unittest.h",
- "*_mac_unittest.cc",
- "*_mac_unittest.mm",
- "*\bmac/*",
- "*_cocoa.h",
- "*_cocoa.cc",
- "*_cocoa.mm",
- "*_cocoa_unittest.h",
- "*_cocoa_unittest.cc",
- "*_cocoa_unittest.mm",
- "*\bcocoa/*",
-]
-ios_sources_filters = [
- "*_ios.h",
- "*_ios.cc",
- "*_ios.mm",
- "*_ios_unittest.h",
- "*_ios_unittest.cc",
- "*_ios_unittest.mm",
- "*\bios/*",
-]
-objective_c_sources_filters = [
- "*.mm",
-]
-linux_sources_filters = [
- "*_linux.h",
- "*_linux.cc",
- "*_linux_unittest.h",
- "*_linux_unittest.cc",
- "*\blinux/*",
- "*_x11.cc",
- "*_x11.h",
-]
-android_sources_filters = [
- "*_android.h",
- "*_android.cc",
- "*_android_unittest.h",
- "*_android_unittest.cc",
- "*\bandroid/*",
-]
-posix_sources_filters = [
- "*_posix.h",
- "*_posix.cc",
- "*_posix_unittest.h",
- "*_posix_unittest.cc",
- "*\bposix/*",
-]
-
-# Construct the full list of sources we're using for this platform.
+# DO NOT ADD MORE PATTERNS TO THIS LIST, see set_sources_assignment_filter call
+# below.
sources_assignment_filter = []
-if (is_win) {
- sources_assignment_filter += posix_sources_filters
-} else {
- sources_assignment_filter += windows_sources_filters
+if (!is_posix) {
+ sources_assignment_filter += [
+ "*_posix.h",
+ "*_posix.cc",
+ "*_posix_unittest.h",
+ "*_posix_unittest.cc",
+ "*\bposix/*",
+ ]
+}
+if (!is_win) {
+ sources_assignment_filter += [
+ "*_win.cc",
+ "*_win.h",
+ "*_win_unittest.cc",
+ "*\bwin/*",
+ "*.rc",
+ ]
}
if (!is_mac) {
- sources_assignment_filter += mac_sources_filters
+ sources_assignment_filter += [
+ "*_mac.h",
+ "*_mac.cc",
+ "*_mac.mm",
+ "*_mac_unittest.h",
+ "*_mac_unittest.cc",
+ "*_mac_unittest.mm",
+ "*\bmac/*",
+ "*_cocoa.h",
+ "*_cocoa.cc",
+ "*_cocoa.mm",
+ "*_cocoa_unittest.h",
+ "*_cocoa_unittest.cc",
+ "*_cocoa_unittest.mm",
+ "*\bcocoa/*",
+ ]
}
if (!is_ios) {
- sources_assignment_filter += ios_sources_filters
+ sources_assignment_filter += [
+ "*_ios.h",
+ "*_ios.cc",
+ "*_ios.mm",
+ "*_ios_unittest.h",
+ "*_ios_unittest.cc",
+ "*_ios_unittest.mm",
+ "*\bios/*",
+ ]
}
if (!is_mac && !is_ios) {
- sources_assignment_filter += objective_c_sources_filters
+ sources_assignment_filter += [
+ "*.mm",
+ ]
}
if (!is_linux) {
- sources_assignment_filter += linux_sources_filters
+ sources_assignment_filter += [
+ "*_linux.h",
+ "*_linux.cc",
+ "*_linux_unittest.h",
+ "*_linux_unittest.cc",
+ "*\blinux/*",
+ ]
}
if (!is_android) {
- sources_assignment_filter += android_sources_filters
+ sources_assignment_filter += [
+ "*_android.h",
+ "*_android.cc",
+ "*_android_unittest.h",
+ "*_android_unittest.cc",
+ "*\bandroid/*",
+ ]
+}
+if (!is_chromeos) {
+ sources_assignment_filter += [
+ "*_chromeos.h",
+ "*_chromeos.cc",
+ "*_chromeos_unittest.h",
+ "*_chromeos_unittest.cc",
+ "*\bchromeos/*",
+ ]
}
+# DO NOT ADD MORE PATTERNS TO THIS LIST, see set_sources_assignment_filter call
+# below.
-# This is the actual set.
+# Actually save this list.
+#
+# These patterns are executed for every file in the source tree of every run.
+# Therefore, adding more patterns slows down the build for everybody. We should
+# only add automatic patterns for configurations affecting hundreds of files
+# across many projects in the tree.
+#
+# Therefore, we only add rules to this list corresponding to platforms on the
+# Chromium waterfall. This is not for non-officially-supported platforms
+# (FreeBSD, etc.) toolkits, (X11, GTK, etc.), or features. For these cases,
+# write a conditional in the target to remove the file(s) from the list when
+# your platform/toolkit/feature doesn't apply.
set_sources_assignment_filter(sources_assignment_filter)
# =============================================================================
@@ -275,10 +293,14 @@ set_sources_assignment_filter(sources_assignment_filter)
if (is_component_build) {
component_mode = "shared_library"
} else {
- component_mode = "static_library"
+ component_mode = "source_set"
}
-toolkit_uses_gtk = is_linux
+# These Sanitizers all imply using the Clang compiler. On Windows they either
+# don't work or work differently.
+if (!is_clang && (is_asan || is_lsan || is_tsan || is_msan)) {
+ is_clang = true
+}
# =============================================================================
# TARGET DEFAULTS
@@ -291,8 +313,8 @@ toolkit_uses_gtk = is_linux
# Holds all configs used for making native executables and libraries, to avoid
# duplication in each target below.
-native_compiler_configs = [
- "//build/config:my_msvs", # TODO(brettw) eraseme
+_native_compiler_configs = [
+ "//build/config:feature_flags",
"//build/config/compiler:compiler",
"//build/config/compiler:chromium_code",
@@ -301,22 +323,46 @@ native_compiler_configs = [
"//build/config/compiler:runtime_library",
]
if (is_win) {
- native_compiler_configs += [
+ _native_compiler_configs += [
+ "//build/config/win:lean_and_mean",
+ "//build/config/win:nominmax",
"//build/config/win:sdk",
+ "//build/config/win:unicode",
+ ]
+}
+if (is_posix) {
+ _native_compiler_configs += [
+ "//build/config/gcc:no_exceptions",
+ "//build/config/gcc:symbol_visibility_hidden",
+ ]
+}
+
+if (is_linux) {
+ _native_compiler_configs += [ "//build/config/linux:sdk", ]
+} else if (is_mac) {
+ _native_compiler_configs += [ "//build/config/mac:sdk", ]
+} else if (is_ios) {
+ _native_compiler_configs += [ "//build/config/ios:sdk", ]
+} else if (is_android) {
+ _native_compiler_configs += [ "//build/config/android:sdk", ]
+}
+
+if (is_clang) {
+ _native_compiler_configs += [
+ "//build/config/clang:find_bad_constructs",
+ "//build/config/clang:extra_warnings",
]
-} else if (is_clang) {
- native_compiler_configs += "//build/config/clang:find_bad_constructs"
}
# Optimizations and debug checking.
if (is_debug) {
- native_compiler_configs += "//build/config:debug"
- default_optimization_config = "//build/config/compiler:no_optimize"
+ _native_compiler_configs += [ "//build/config:debug" ]
+ _default_optimization_config = "//build/config/compiler:no_optimize"
} else {
- native_compiler_configs += "//build/config:release"
- default_optimization_config = "//build/config/compiler:optimize"
+ _native_compiler_configs += [ "//build/config:release" ]
+ _default_optimization_config = "//build/config/compiler:optimize"
}
-native_compiler_configs += default_optimization_config
+_native_compiler_configs += [ _default_optimization_config ]
# Symbol setup.
if (is_clang && (is_linux || is_android)) {
@@ -324,29 +370,29 @@ if (is_clang && (is_linux || is_android)) {
# For now, don't create debug information with clang.
# See http://crbug.com/70000
# TODO(brettw) This just copies GYP. Why not do this on Mac as well?
- default_symbols_config = "//build/config/compiler:no_symbols"
+ _default_symbols_config = "//build/config/compiler:no_symbols"
} else if (symbol_level == 2) {
- default_symbols_config = "//build/config/compiler:symbols"
+ _default_symbols_config = "//build/config/compiler:symbols"
} else if (symbol_level == 1) {
- default_symbols_config = "//build/config/compiler:minimal_symbols"
+ _default_symbols_config = "//build/config/compiler:minimal_symbols"
} else if (symbol_level == 0) {
- default_symbols_config = "//build/config/compiler:no_symbols"
+ _default_symbols_config = "//build/config/compiler:no_symbols"
} else {
assert(false, "Bad value for symbol_level.")
}
-native_compiler_configs += default_symbols_config
+_native_compiler_configs += [ _default_symbols_config ]
# Windows linker setup for EXEs and DLLs.
if (is_win) {
if (is_debug) {
- default_incremental_linking_config =
+ _default_incremental_linking_config =
"//build/config/win:incremental_linking"
} else {
- default_incremental_linking_config =
+ _default_incremental_linking_config =
"//build/config/win:no_incremental_linking"
}
- windows_linker_configs = [
- default_incremental_linking_config,
+ _windows_linker_configs = [
+ _default_incremental_linking_config,
"//build/config/win:sdk_link",
"//build/config/win:common_linker_setup",
# Default to console-mode apps. Most of our targets are tests and such
@@ -356,31 +402,37 @@ if (is_win) {
}
set_defaults("executable") {
- configs = native_compiler_configs
+ configs = _native_compiler_configs + [
+ "//build/config:default_libs",
+ ]
if (is_win) {
- configs += windows_linker_configs
+ configs += _windows_linker_configs
} else if (is_mac) {
- configs += "//build/config/mac:mac_dynamic_flags"
- } else if (is_linux) {
- configs += "//build/config/linux:executable_ldconfig"
+ configs += [
+ "//build/config/mac:mac_dynamic_flags",
+ "//build/config/mac:mac_executable_flags" ]
+ } else if (is_linux || is_android) {
+ configs += [ "//build/config/gcc:executable_ldconfig" ]
}
}
set_defaults("static_library") {
- configs = native_compiler_configs
+ configs = _native_compiler_configs
}
set_defaults("shared_library") {
- configs = native_compiler_configs
+ configs = _native_compiler_configs + [
+ "//build/config:default_libs",
+ ]
if (is_win) {
- configs += windows_linker_configs
+ configs += _windows_linker_configs
} else if (is_mac) {
- configs += "//build/config/mac:mac_dynamic_flags"
+ configs += [ "//build/config/mac:mac_dynamic_flags" ]
}
}
set_defaults("source_set") {
- configs = native_compiler_configs
+ configs = _native_compiler_configs
}
# ==============================================================================
@@ -393,6 +445,8 @@ set_defaults("source_set") {
# default toolchain.
if (is_win) {
+ # TODO(brettw) name the toolchains the same as cpu_arch as with Linux below
+ # to eliminate these conditionals.
if (build_cpu_arch == "x64") {
host_toolchain = "//build/toolchain/win:64"
} else if (build_cpu_arch == "x86") {
@@ -404,23 +458,16 @@ if (is_win) {
} else if (cpu_arch == "x86") {
set_default_toolchain("//build/toolchain/win:32")
}
+} else if (is_android) {
+ host_toolchain = "//build/toolchain/linux:$build_cpu_arch"
+ set_default_toolchain("//build/toolchain/android:$cpu_arch")
} else if (is_linux) {
- if (build_cpu_arch == "arm") {
- host_toolchain = "//build/toolchain/linux:arm"
- } else if (build_cpu_arch == "x86") {
- host_toolchain = "//build/toolchain/linux:32"
- } else if (build_cpu_arch == "x64") {
- host_toolchain = "//build/toolchain/linux:64"
- }
-
- if (build_cpu_arch == "arm") {
- set_default_toolchain("//build/toolchain/linux:arm")
- } else if (build_cpu_arch == "x86") {
- set_default_toolchain("//build/toolchain/linux:32")
- } else if (build_cpu_arch == "x64") {
- set_default_toolchain("//build/toolchain/linux:64")
- }
+ host_toolchain = "//build/toolchain/linux:$build_cpu_arch"
+ set_default_toolchain("//build/toolchain/linux:$cpu_arch")
} else if (is_mac) {
host_toolchain = "//build/toolchain/mac:clang"
set_default_toolchain(host_toolchain)
+} else if (is_ios) {
+ host_toolchain = "//build/toolchain/mac:host_clang"
+ set_default_toolchain("//build/toolchain/mac:clang")
}
diff --git a/chromium/build/config/allocator.gni b/chromium/build/config/allocator.gni
new file mode 100644
index 00000000000..3c4fe90bcad
--- /dev/null
+++ b/chromium/build/config/allocator.gni
@@ -0,0 +1,14 @@
+# 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.
+
+if (is_android || cpu_arch == "mipsel" || is_mac) {
+ _default_allocator = "none"
+} else {
+ _default_allocator = "tcmalloc"
+}
+
+declare_args() {
+ # Memory allocator to use. Set to "none" to use default allocator.
+ use_allocator = _default_allocator
+}
diff --git a/chromium/build/config/android/BUILD.gn b/chromium/build/config/android/BUILD.gn
new file mode 100644
index 00000000000..185db596f46
--- /dev/null
+++ b/chromium/build/config/android/BUILD.gn
@@ -0,0 +1,20 @@
+# 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("//build/config/android/config.gni")
+import("//build/config/sysroot.gni")
+
+config("sdk") {
+ if (sysroot != "") {
+ cflags = [ "--sysroot=" + sysroot ]
+ ldflags = [ "--sysroot=" + sysroot ]
+
+ # Need to get some linker flags out of the sysroot.
+ sysroot_ld_path = rebase_path("//build/config/linux/sysroot_ld_path.py")
+ ldflags += [ exec_script(sysroot_ld_path,
+ [ rebase_path("//build/linux/sysroot_ld_path.sh"), sysroot ],
+ "value")
+ ]
+ }
+}
diff --git a/chromium/build/config/android/config.gni b/chromium/build/config/android/config.gni
new file mode 100644
index 00000000000..819fe4d7efa
--- /dev/null
+++ b/chromium/build/config/android/config.gni
@@ -0,0 +1,128 @@
+# 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.
+
+# This file contains common system config stuff for the Android build.
+
+if (is_android) {
+ declare_args() {
+ # Absolute directory containing the Android source code.
+ android_src = ""
+
+ android_sdk_root = "//third_party/android_tools/sdk"
+ android_sdk_version = "20"
+
+ # This is set when building the Android WebView inside the Android build
+ # system, using the 'android' gyp backend. The WebView code is still built
+ # when this is unset, but builds using the normal chromium build system.
+ is_android_webview_build = false
+ }
+
+ if (is_android_webview_build) {
+ assert(android_src != "",
+ "You must specify android_src for an Android WebView build.")
+ }
+
+ # Host stuff -----------------------------------------------------------------
+
+ # Defines the name the Android build gives to the current host CPU
+ # architecture, which is different than the names GN uses.
+ if (build_cpu_arch == "x64") {
+ android_host_arch = "x86_64"
+ } else if (build_cpu_arch == "x86") {
+ android_host_arch = "x86"
+ } else {
+ assert(false, "Need Android toolchain support for your build CPU arch.")
+ }
+
+ # Defines the name the Android build gives to the current host CPU
+ # architecture, which is different than the names GN uses.
+ if (build_os == "linux") {
+ android_host_os = "linux"
+ } else {
+ assert(false, "Need Android toolchain support for your build OS.")
+ }
+
+ # Directories and files ------------------------------------------------------
+ #
+ # We define may of the dirs strings here for each output architecture (rather
+ # than just the current one) since these are needed by the Android toolchain
+ # file to define toolchains for all possible targets in one pass.
+
+ 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_sdk = "${android_sdk_root}/platforms/android-${android_sdk_version}"
+
+ android_sdk_tools = "${android_sdk_root}/tools"
+ android_sdk_build_tools = "${android_sdk_root}/build-tools/20.0.0"
+
+ # Path to the SDK's android.jar
+ android_sdk_jar = "$android_sdk/android.jar"
+
+ # Subdirectories inside android_ndk_root that contain the sysroot for the
+ # associated platform.
+ _android_api_level = 14
+ x86_android_sysroot_subdir = "platforms/android-${_android_api_level}/arch-x86"
+ arm_android_sysroot_subdir = "platforms/android-${_android_api_level}/arch-arm"
+ mips_android_sysroot_subdir = "platforms/android-${_android_api_level}/arch-mips"
+
+ # Toolchain root directory for each build. The actual binaries are inside
+ # a "bin" directory inside of these.
+ _android_toolchain_version = "4.8"
+ x86_android_toolchain_root = "$android_ndk_root/toolchains/x86-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
+ arm_android_toolchain_root = "$android_ndk_root/toolchains/arm-linux-androideabi-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
+ mips_android_toolchain_root = "$android_ndk_root/toolchains/mipsel-linux-android-${_android_toolchain_version}/prebuilt/${android_host_os}-${android_host_arch}"
+
+ # Location of libgcc. This is only needed for the current GN toolchain, so we
+ # only need to define the current one, rather than one for every platform
+ # like the toolchain roots.
+ if (cpu_arch == "x86") {
+ android_libgcc_file =
+ "$x86_android_toolchain_root/lib/gcc/i686-linux-android/${_android_toolchain_version}/libgcc.a"
+ } else if (cpu_arch == "arm") {
+ android_libgcc_file =
+ "$arm_android_toolchain_root/lib/gcc/arm-linux-androideabi/${_android_toolchain_version}/libgcc.a"
+ } else if (cpu_arch == "mipsel") {
+ android_libgcc_file =
+ "$mips_android_toolchain_root/lib/gcc/mipsel-linux-android/${_android_toolchain_version}/libgcc.a"
+ } else {
+ assert(false, "Need android libgcc support for your target arch.")
+ }
+
+ # stlport stuff --------------------------------------------------------------
+
+ use_system_stlport = is_android_webview_build
+
+ if (use_system_stlport) {
+ android_stlport_library = "stlport"
+ } else if (component_mode == "shared_library") {
+ android_stlport_library = "stlport_shared"
+ } else {
+ android_stlport_library = "stlport_static"
+ }
+
+ # ABI ------------------------------------------------------------------------
+
+ if (cpu_arch == "x86") {
+ android_app_abi = "x86"
+ } else if (cpu_arch == "arm") {
+ import("//build/config/arm.gni")
+ if (arm_version < 7) {
+ android_app_abi = "armeabi"
+ } else {
+ android_app_abi = "armeabi-v7a"
+ }
+ } else if (cpu_arch == "mipsel") {
+ android_app_abi = "mips"
+ } else {
+ assert(false, "Unknown Android ABI: " + cpu_arch)
+ }
+} else {
+ if (!defined(is_android_webview_build)) {
+ is_android_webview_build = false
+ }
+ use_system_stlport = false
+}
diff --git a/chromium/build/config/android/internal_rules.gni b/chromium/build/config/android/internal_rules.gni
new file mode 100644
index 00000000000..b3114ef1690
--- /dev/null
+++ b/chromium/build/config/android/internal_rules.gni
@@ -0,0 +1,25 @@
+
+# Creates a zip archive of the inputs.
+# If base_dir is provided, the archive paths will be relative to it.
+template("zip") {
+ assert(defined(invoker.inputs))
+ assert(defined(invoker.output))
+
+ rebase_inputs = rebase_path(invoker.inputs)
+ rebase_output = rebase_path(invoker.output)
+ action(target_name) {
+ script = "//build/android/gn/zip.py"
+ source_prereqs = invoker.inputs
+ outputs = [invoker.output]
+ args = [
+ "--inputs=$rebase_inputs",
+ "--output=$rebase_output",
+ ]
+ if (defined(invoker.base_dir)) {
+ args += [
+ "--base-dir", rebase_path(invoker.base_dir)
+ ]
+ }
+ }
+}
+
diff --git a/chromium/build/config/android/rules.gni b/chromium/build/config/android/rules.gni
new file mode 100644
index 00000000000..d63c7bf94a5
--- /dev/null
+++ b/chromium/build/config/android/rules.gni
@@ -0,0 +1,240 @@
+# 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("config.gni")
+import("internal_rules.gni")
+
+# Declare a jni target
+#
+# This target generates the native jni bindings for a set of .java files.
+#
+# See base/android/jni_generator/jni_generator.py for more info about the
+# format of generating JNI bindings.
+#
+# Variables
+# sources: list of .java files to generate jni for
+# jni_package: subdirectory path for generated bindings
+#
+# Example
+# generate_jni("foo_jni") {
+# sources = [
+# "android/java/src/org/chromium/foo/Foo.java",
+# "android/java/src/org/chromium/foo/FooUtil.java",
+# ]
+# jni_package = "foo"
+# }
+template("generate_jni") {
+ assert(defined(invoker.sources))
+ assert(defined(invoker.jni_package))
+ jni_package = invoker.jni_package
+ base_output_dir = "${root_gen_dir}/${target_name}/${jni_package}"
+ jni_output_dir = "${base_output_dir}/jni"
+
+ jni_generator_include = "//base/android/jni_generator/jni_generator_helper.h"
+
+ foreach_target_name = "${target_name}__jni_gen"
+ action_foreach(foreach_target_name) {
+ script = "//base/android/jni_generator/jni_generator.py"
+ sources = invoker.sources
+ source_prereqs = [ jni_generator_include ]
+ outputs = [
+ "${jni_output_dir}/{{source_name_part}}_jni.h"
+ ]
+
+ args = [
+ "--input_file={{source}}",
+ "--optimize_generation=1",
+ "--ptr_type=long",
+ "--output_dir", rebase_path(jni_output_dir, root_build_dir),
+ "--includes", rebase_path(jni_generator_include, "//"),
+ ]
+ if (defined(invoker.jni_generator_jarjar_file)) {
+ args += [
+ "--jarjar", rebase_path(jni_generator_jarjar_file, root_build_dir),
+ ]
+ }
+ }
+
+ config("jni_includes_${target_name}") {
+ include_dirs = [ base_output_dir ]
+ }
+
+ group(target_name) {
+ deps = [ ":$foreach_target_name" ]
+ direct_dependent_configs = [ ":jni_includes_${target_name}" ]
+
+ if (defined(invoker.deps)) {
+ deps += invoker.deps
+ }
+ if (defined(invoker.forward_dependent_configs_from)) {
+ forward_dependent_configs_from = invoker.forward_dependent_configs_from
+ }
+ }
+}
+
+
+# Declare a jni target for a prebuilt jar
+#
+# This target generates the native jni bindings for a set of classes in a .jar.
+#
+# See base/android/jni_generator/jni_generator.py for more info about the
+# format of generating JNI bindings.
+#
+# Variables
+# classes: list of .class files in the jar to generate jni for. These should
+# include the full path to the .class file.
+# jni_package: subdirectory path for generated bindings
+# jar_file: the path to the .jar. If not provided, will default to the sdk's
+# android.jar
+#
+# Example
+# generate_jar_jni("foo_jni") {
+# classes = [
+# "android/view/Foo.class",
+# ]
+# jni_package = "foo"
+# }
+template("generate_jar_jni") {
+ assert(defined(invoker.classes))
+ assert(defined(invoker.jni_package))
+
+ if (defined(invoker.jar_file)) {
+ jar_file = invoker.jar_file
+ } else {
+ jar_file = android_sdk_jar
+ }
+
+ jni_package = invoker.jni_package
+ base_output_dir = "${root_gen_dir}/${target_name}/${jni_package}"
+ jni_output_dir = "${base_output_dir}/jni"
+
+ jni_generator_include =
+ rebase_path("//base/android/jni_generator/jni_generator_helper.h",
+ root_build_dir)
+
+ # TODO(cjhopman): make jni_generator.py support generating jni for multiple
+ # .class files from a .jar.
+ jni_actions = []
+ foreach(class, invoker.classes) {
+ classname_list = process_file_template(
+ [class], "{{source_name_part}}")
+ classname = classname_list[0]
+ jni_target_name = "${target_name}__jni_${classname}"
+ jni_actions += [ ":$jni_target_name" ]
+ action(jni_target_name) {
+ script = "//base/android/jni_generator/jni_generator.py"
+ sources = [
+ jni_generator_include,
+ jar_file,
+ ]
+ outputs = [
+ "${jni_output_dir}/${classname}_jni.h"
+ ]
+
+ args = [
+ "--jar_file", rebase_path(jar_file, root_build_dir),
+ "--input_file", class,
+ "--optimize_generation=1",
+ "--ptr_type=long",
+ "--output_dir", rebase_path(jni_output_dir, root_build_dir),
+ "--includes", rebase_path(jni_generator_include, "//"),
+ ]
+ }
+ }
+
+ config("jni_includes_${target_name}") {
+ include_dirs = [ base_output_dir ]
+ }
+
+ group(target_name) {
+ deps = jni_actions
+ if (defined(invoker.deps)) {
+ deps += invoker.deps
+ }
+ if (defined(invoker.forward_dependent_configs_from)) {
+ forward_dependent_configs_from = invoker.forward_dependent_configs_from
+ }
+ direct_dependent_configs = [ ":jni_includes_${target_name}" ]
+ }
+}
+
+# Declare a target for c-preprocessor-generated java files
+#
+# This target generates java files using the host C pre-processor. Each file in
+# sources will be compiled using the C pre-processor. If include_path is
+# specified, it will be passed (with --I) to the pre-processor.
+#
+# This target will create a single .srcjar. Adding this target to a library
+# target's srcjar_deps will make the generated java files be included in that
+# library's final outputs.
+#
+# Variables
+# sources: list of files to be processed by the C pre-processor. For each
+# file in sources, there will be one .java file in the final .srcjar. For a
+# file named FooBar.template, a java file will be created with name
+# FooBar.java.
+# source_prereqs: additional compile-time dependencies. Any files
+# `#include`-ed in the templates should be listed here.
+# package_name: this will be the subdirectory for each .java file in the .srcjar.
+#
+# Example
+# java_cpp_template("foo_generated_enum") {
+# sources = [
+# "android/java/templates/Foo.template",
+# ]
+# source_prereqs = [
+# "android/java/templates/native_foo_header.h",
+# ]
+#
+# package_name = "org/chromium/base/library_loader"
+# include_path = "android/java/templates"
+# }
+template("java_cpp_template") {
+ assert(defined(invoker.sources))
+ package_name = invoker.package_name + ""
+
+ if (defined(invoker.include_path)) {
+ include_path = invoker.include_path + ""
+ } else {
+ include_path = "//"
+ }
+
+ action_foreach("${target_name}__apply_gcc") {
+ script = "//build/android/gyp/gcc_preprocess.py"
+ if (defined(invoker.source_prereqs)) {
+ source_prereqs = invoker.source_prereqs + []
+ }
+
+ sources = invoker.sources
+
+ gen_dir = "${target_gen_dir}/${package_name}"
+ gcc_template_output_pattern = "${gen_dir}/{{source_name_part}}.java"
+
+ outputs = [
+ gcc_template_output_pattern
+ ]
+
+ args = [
+ "--include-path", rebase_path(include_path, root_build_dir),
+ "--output", rebase_path(gen_dir, root_build_dir) + "/{{source_name_part}}.java",
+ "--template={{source}}",
+ ]
+ }
+
+ apply_gcc_outputs = get_target_outputs(":${target_name}__apply_gcc")
+ base_gen_dir = get_label_info(":${target_name}__apply_gcc", "target_gen_dir")
+
+ srcjar_path = "${target_gen_dir}/${target_name}.srcjar"
+ zip("${target_name}__zip_srcjar") {
+ inputs = apply_gcc_outputs
+ output = srcjar_path
+ base_dir = base_gen_dir
+ }
+
+ group(target_name) {
+ deps = [
+ ":${target_name}__zip_srcjar"
+ ]
+ }
+}
diff --git a/chromium/build/config/arm.gni b/chromium/build/config/arm.gni
new file mode 100644
index 00000000000..d3ed3c605ec
--- /dev/null
+++ b/chromium/build/config/arm.gni
@@ -0,0 +1,55 @@
+# 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.
+
+if (cpu_arch == "arm") {
+ declare_args() {
+ # Version of the ARM processor when compiling on ARM. Ignored on non-ARM
+ # platforms.
+ arm_version = 7
+
+ # The ARM floating point mode. This is either the string "hard", "soft", or
+ # "softfp". An empty string means to use the default one for the
+ # arm_version.
+ arm_float_abi = ""
+ }
+
+ assert(arm_float_abi == "" ||
+ arm_float_abi == "hard" ||
+ arm_float_abi == "soft" ||
+ arm_float_abi == "softfp")
+
+ if (is_android) {
+ arm_use_neon = false
+ arm_optionally_use_neon = false
+ } else {
+ arm_use_neon = true
+ arm_optionally_use_neon = true
+ }
+
+ if (arm_version == 6) {
+ arm_arch = "armv6"
+ arm_tune = ""
+ if (arm_float_abi == "") {
+ arm_float_abi = "softfp"
+ }
+ arm_fpu = "vfp"
+ # Thumb is a reduced instruction set available on some ARM processors that
+ # has increased code density.
+ arm_use_thumb = false
+
+ } else if (arm_version == 7) {
+ arm_arch = "armv7-a"
+ arm_tune = "generic-armv7-a"
+ if (arm_float_abi == "") {
+ arm_float_abi = "softfp"
+ }
+ arm_use_thumb = true
+
+ if (arm_use_neon) {
+ arm_fpu = "neon"
+ } else {
+ arm_fpu = "vfpv3-d16"
+ }
+ }
+}
diff --git a/chromium/build/config/clang/BUILD.gn b/chromium/build/config/clang/BUILD.gn
index d083e86c11b..00fb9e066c9 100644
--- a/chromium/build/config/clang/BUILD.gn
+++ b/chromium/build/config/clang/BUILD.gn
@@ -2,17 +2,39 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("clang.gni")
+
config("find_bad_constructs") {
- cflags = [
- "-Xclang", "-load",
- "-Xclang",
+ if (clang_use_chrome_plugins) {
+ cflags = [
+ "-Xclang", "-load",
+ "-Xclang",
+ ]
+
+ if (is_mac || is_ios) {
+ cflags += [ rebase_path(
+ "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib",
+ root_build_dir) ]
+ } else if (is_linux) {
+ cflags += [ rebase_path(
+ "//third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.so",
+ root_build_dir) ]
+ }
- # TODO(brettw) express this in terms of a relative dir from the output.
- # for now, assume the output dir is two levels deep under the source
- # (like "out/Debug").
- "../../third_party/llvm-build/Release+Asserts/lib/libFindBadConstructs.dylib",
+ cflags += [
+ "-Xclang", "-add-plugin",
+ "-Xclang", "find-bad-constructs",
+ ]
+ }
+}
+
+# Enables some extra Clang-specific warnings. Some third-party code won't
+# compile with these so may want to remove this config.
+config("extra_warnings") {
+ cflags = [
+ "-Wheader-hygiene",
- "-Xclang", "-add-plugin",
- "-Xclang", "find-bad-constructs",
+ # Warns when a const char[] is converted to bool.
+ "-Wstring-conversion",
]
}
diff --git a/chromium/build/config/clang/clang.gni b/chromium/build/config/clang/clang.gni
new file mode 100644
index 00000000000..3b2d76fbe6a
--- /dev/null
+++ b/chromium/build/config/clang/clang.gni
@@ -0,0 +1,9 @@
+# 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.
+
+declare_args() {
+ # Indicates if the build should use the Chrome-specific plugins for enforcing
+ # coding guidelines, etc. Only used when compiling with Clang.
+ clang_use_chrome_plugins = is_clang
+}
diff --git a/chromium/build/config/compiler/BUILD.gn b/chromium/build/config/compiler/BUILD.gn
index 6c5b973fd5c..70f1fd2374c 100644
--- a/chromium/build/config/compiler/BUILD.gn
+++ b/chromium/build/config/compiler/BUILD.gn
@@ -2,146 +2,300 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import("//build/config/linux/sysroot.gni")
+import("//build/config/android/config.gni")
+if (cpu_arch == "arm") {
+ import("//build/config/arm.gni")
+}
+if (is_posix) {
+ import("//build/config/gcc/gcc_version.gni")
+}
+declare_args() {
+ # Normally, Android builds are lightly optimized, even for debug builds, to
+ # keep binary size down. Setting this flag to true disables such optimization
+ android_full_debug = false
+}
+
+# compiler ---------------------------------------------------------------------
+#
# Base compiler configuration.
+#
+# See also "runtime_library" below for related stuff and a discusison about
+# where stuff should go. Put warning related stuff in the "warnings" config.
+
config("compiler") {
- include_dirs = [ "//", root_gen_dir ]
+ cflags = []
+ cflags_c = []
+ cflags_cc = []
+ ldflags = []
+ defines = []
+ include_dirs = []
+
+ include_dirs += [ "//", root_gen_dir ]
+
+ # In general, Windows is totally different, but all the other builds share
+ # some common GCC configuration. This section sets up Windows and the common
+ # GCC flags, and then we handle the other non-Windows platforms specifically
+ # below.
if (is_win) {
- cflags = [
+ # Windows compiler flags setup.
+ # -----------------------------
+ cflags += [
"/Gy", # Enable function-level linking.
"/GS", # Enable buffer security checking.
- "/EHsc", # Assume C functions can't throw exceptions and don't catch
- # structured exceptions (only C++ ones).
+ "/FS", # Preserve previous PDB behavior.
]
+ if (is_component_build) {
+ cflags += [
+ "/EHsc", # Assume C functions can't throw exceptions and don't catch
+ # structured exceptions (only C++ ones).
+ ]
+ }
} else {
# Common GCC compiler flags setup.
# --------------------------------
- cflags = [
+ cflags += [
"-fno-strict-aliasing", # See http://crbug.com/32204
- "-fvisibility=hidden",
]
- cflags_c = [
- ]
- cflags_cc = [
- "-fno-exceptions",
+ cflags_cc += [
"-fno-threadsafe-statics",
+ # Not exporting C++ inline functions can generally be applied anywhere
+ # so we do so here. Normal function visibility is controlled by
+ # //build/config/gcc:symbol_visibility_hidden.
"-fvisibility-inlines-hidden",
]
- ldflags = [
- ]
# Stack protection.
- # TODO(brettw) why do we have different values for all of these cases?
if (is_mac) {
- cflags += "-fstack-protector-all"
- } else if (is_chromeos) {
- cflags += "-fstack-protector-strong"
+ cflags += [ "-fstack-protector-all" ]
} else if (is_linux) {
cflags += [ "-fstack-protector", "--param=ssp-buffer-size=4" ]
}
- if (is_mac) {
- # Mac-specific compiler flags setup.
- # ----------------------------------
+ # Linker warnings.
+ if (!(is_chromeos && cpu_arch == "arm") && !is_mac) {
+ # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
+ ldflags += [ "-Wl,--fatal-warnings" ]
+ }
+ }
- # These flags are shared between the C compiler and linker.
- common_mac_flags = [
- "-isysroot", sysroot,
- "-mmacosx-version-min=10.6",
- ]
+ # Mac-specific compiler flags setup.
+ # ----------------------------------
+ if (is_mac || is_ios) {
+ # These flags are shared between the C compiler and linker.
+ common_mac_flags = []
+
+ # CPU architecture.
+ if (cpu_arch == "x64") {
+ common_mac_flags += [ "-arch", "x86_64" ]
+ } else if (cpu_arch == "x86") {
+ common_mac_flags += [ "-arch", "i386" ]
+ }
- # CPU architecture.
- if (cpu_arch == "x64") {
- common_mac_flags += "-arch x86_64"
- } else if (cpu_arch == "x32") {
- common_mac_flags += "-arch i386"
+ cflags += common_mac_flags
+
+ # Without this, the constructors and destructors of a C++ object inside
+ # an Objective C struct won't be called, which is very bad.
+ cflags_objcc = [ "-fobjc-call-cxx-cdtors", ]
+
+ cflags_c += [ "-std=c99" ]
+ cflags_cc += [ "-std=gnu++11" ]
+
+ ldflags += common_mac_flags
+ } else if (is_posix) {
+ # Non-Mac Posix compiler flags setup.
+ # -----------------------------------
+
+ # CPU architecture. We may or may not be doing a cross compile now, so for
+ # simplicity we always explicitly set the architecture.
+ if (cpu_arch == "x64") {
+ cflags += [ "-m64" ]
+ ldflags += [ "-m64" ]
+ } else if (cpu_arch == "x86") {
+ cflags += [ "-m32" ]
+ ldflags += [ "-m32" ]
+ } else if (cpu_arch == "arm") {
+ # Don't set the compiler flags for the WebView build. These will come
+ # from the Android build system.
+ if (!is_android_webview_build) {
+ cflags += [
+ "-march=$arm_arch",
+ "-mfpu=$arm_fpu",
+ "-mfloat-abi=$arm_float_abi",
+ ]
+ if (arm_tune != "") {
+ cflags += [ "-mtune=$arm_tune" ]
+ }
+ if (arm_use_thumb) {
+ cflags += [ "-mthumb" ]
+ if (is_android && !is_clang) { # Clang doesn't support this option.
+ cflags += [ "-mthumb-interwork" ]
+ }
+ }
}
+ }
- cflags += common_mac_flags + [
- # Without this, the constructors and destructors of a C++ object inside
- # an Objective C struct won't be called, which is very bad.
- "-fobjc-call-cxx-cdtors",
+ defines += [ "_FILE_OFFSET_BITS=64" ]
+
+ # Omit unwind support in official builds to save space. We can use breakpad
+ # for these builds.
+ if (is_chrome_branded && is_official_build) {
+ cflags += [
+ "-fno-unwind-tables",
+ "-fno-asynchronous-unwind-tables",
]
+ } else {
+ cflags += [ "-funwind-tables" ]
+ }
+ }
- cflags_c += [ "-std=c99" ]
- cflags_cc += [ "-std=gnu++11" ]
+ # Linux/Android common flags setup.
+ # ---------------------------------
+ if (is_linux || is_android) {
+ cflags += [
+ "-fPIC",
+ "-pipe", # Use pipes for communicating between sub-processes. Faster.
+ ]
- ldflags += common_mac_flags + [
- "-L.",
+ ldflags += [
+ "-fPIC",
+ "-Wl,-z,noexecstack",
+ "-Wl,-z,now",
+ "-Wl,-z,relro",
+ ]
+ }
- # TODO(brettW) I don't understand these options.
- "-Wl,-rpath,@loader_path/.",
- "-Wl,-rpath,@loader_path/../../..",
+ # Linux-specific compiler flags setup.
+ # ------------------------------------
+ if (is_linux) {
+ cflags += [ "-pthread" ]
+
+ if (cpu_arch == "x64") {
+ # Use gold for linking on 64-bit Linux only (on 32-bit it runs out of
+ # address space, and it doesn't support cross-compiling).
+ gold_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin",
+ root_build_dir)
+ ldflags += [
+ "-B$gold_path",
+
+ # There seems to be a conflict of --icf and -pie in gold which can
+ # generate crashy binaries. As a security measure, -pie takes
+ # precedence for now.
+ # TODO(brettw) common.gypi has this only for target toolset.
+ #"-Wl,--icf=safe",
+ "-Wl,--icf=none",
+
+ # Experimentation found that using four linking threads
+ # saved ~20% of link time.
+ # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
+ # Only apply this to the target linker, since the host
+ # linker might not be gold, but isn't used much anyway.
+ # TODO(raymes): Disable threading because gold is frequently
+ # crashing on the bots: crbug.com/161942.
+ #"-Wl,--threads",
+ #"-Wl,--thread-count=4",
]
- } else {
- # Non-Mac Posix compiler flags setup.
- # -----------------------------------
-
- # CPU architecture. We may or may not be doing a cross compile now, so for
- # simplicity we always explicitly set the architecture.
- if (cpu_arch == "x64") {
- cflags += "-m64"
- ldflags += "-m64"
- } else if (cpu_arch == "x32") {
- cflags += "-m32"
- ldflags += "-m32"
- }
}
- # Linux-specific compiler flags setup.
- # ------------------------------------
- if (is_linux) {
+ ldflags += [
+ "-pthread",
+ ]
+ }
+
+ # Clang-specific compiler flags setup.
+ # ------------------------------------
+ if (is_clang) {
+ cflags += [
+ "-fcolor-diagnostics",
+ ]
+ cflags_cc += [
+ "-std=gnu++11",
+ ]
+ }
+
+ # Android-specific flags setup.
+ # -----------------------------
+ if (is_android) {
+ cflags += [
+ "-ffunction-sections",
+ "-funwind-tables",
+ "-fno-short-enums",
+ ]
+ if (!is_clang) {
+ # Clang doesn't support these flags.
cflags += [
- "-fPIC",
- "-pthread",
- "-pipe", # Use pipes for communicating between sub-processes. Faster.
+ "-finline-limit=64",
+ # The following 6 options are disabled to save on
+ # binary size in gcc 4.8.
+ # TODO(fdegans) Reevaluate when we upgrade GCC.
+ "-fno-partial-inlining",
+ "-fno-early-inlining",
+ "-fno-tree-copy-prop",
+ "-fno-tree-loop-optimize",
+ "-fno-move-loop-invariants",
+ "-fno-caller-saves",
]
+ }
+ if (is_android_webview_build) {
+ # Android predefines this as 1; undefine it here so Chromium can redefine
+ # it later to be 2 for chromium code and unset for third party code. This
+ # works because cflags are added before defines.
+ # TODO(brettw) the above comment seems incorrect. We specify defines
+ # before cflags on our compiler command lines.
+ cflags += [ "-U_FORTIFY_SOURCE" ]
+ }
- # Use gold for linking on 64-bit Linux only (on 32-bit it runs out of
- # address space, and it doesn't support cross-compiling).
- if (cpu_arch == "x64") {
- gold_path = rebase_path("//third_party/gold", ".", root_build_dir)
+ if (is_asan) {
+ # Android build relies on -Wl,--gc-sections removing unreachable code.
+ # ASan instrumentation for globals inhibits this and results in a library
+ # with unresolvable relocations.
+ # TODO(eugenis): find a way to reenable this.
+ cflags += [ "-mllvm -asan-globals=0" ]
+ }
+
+ defines += [ "ANDROID" ]
+ if (!is_android_webview_build) {
+ # The NDK has these things, but doesn't define the constants
+ # to say that it does. Define them here instead.
+ defines += [ "HAVE_SYS_UIO_H" ]
+ }
+
+ # Use gold for Android for most CPU architectures.
+ if (cpu_arch == "x86" || cpu_arch == "x64" || cpu_arch == "arm") {
+ if (is_clang) {
+ # Clang does not support -fuse-ld to invoke the built-in gold linker,
+ # so use the -B option which requires us to specify the path.
ldflags += [
- "-B$gold_path",
-
- # There seems to be a conflict of --icf and -pie in gold which can
- # generate crashy binaries. As a security measure, -pie takes
- # precendence for now.
- # TODO(brettw) common.gypi has this only for target toolset.
- #"-Wl,--icf=safe",
- "-Wl,--icf=none",
-
- # Experimentation found that using four linking threads
- # saved ~20% of link time.
- # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_thread/thread/281527606915bb36
- # Only apply this to the target linker, since the host
- # linker might not be gold, but isn't used much anyway.
- "-Wl,--threads",
- "-Wl,--thread-count=4",
+ "-B" + rebase_path("//build/android/arm-linux-androideabi-gold",
+ root_build_dir)
]
+ } else {
+ ldflags += [ "-fuse-ld=gold" ]
}
+ }
- if (sysroot != "") {
- cflags += "--sysroot=" + sysroot
- ldflags += "--sysroot=" + sysroot
- }
-
+ ldflags += [
+ "-Wl,--no-undefined",
+ # Don't export symbols from statically linked libraries.
+ "-Wl,--exclude-libs=ALL",
+ ]
+ if (cpu_arch == "arm") {
ldflags += [
- "-fPIC",
- "-pthread",
- "-Wl,-z,noexecstack",
- "-Wl,-z,now",
- "-Wl,-z,relro",
+ # Enable identical code folding to reduce size.
+ "-Wl,--icf=safe",
]
}
- # Clang-specific compiler flags setup.
- # ------------------------------------
if (is_clang) {
- cflags += [
- "-fcolor-diagnostics",
- ]
+ if (cpu_arch == "arm") {
+ cflags += [
+ "-target arm-linux-androideabi",
+ ]
+ ldflags += [ "-target arm-linux-androideabi" ]
+ } else if (cpu_arch == "x86") {
+ cflags += [ "-target x86-linux-androideabi" ]
+ ldflags += [ "-target x86-linux-androideabi" ]
+ }
}
}
}
@@ -150,21 +304,29 @@ config("compiler") {
#
# Sets the runtime library and associated options.
#
-# We don't bother making multiple versions that are toggle-able since there
-# is more than one axis of control (which makes it complicated) and there's
-# no practical reason for anybody to change this since the CRT must agree.
+# How do you determine what should go in here vs. "compiler" above? Consider if
+# a target might choose to use a different runtime library (ignore for a moment
+# if this is possible or reasonable on your system). If such a target would want
+# to change or remove your option, put it in the runtime_library config. If a
+# target wants the option regardless, put it in the compiler config.
config("runtime_library") {
+ cflags = []
+ defines = []
+ ldflags = []
+ lib_dirs = []
+ libs = []
+
if (is_component_build) {
# Component mode: dynamic CRT.
- defines = [ "COMPONENT_BUILD" ]
+ defines += [ "COMPONENT_BUILD" ]
if (is_win) {
# Since the library is shared, it requires exceptions or will give errors
# about things not matching, so keep exceptions on.
if (is_debug) {
- cflags = [ "/MDd" ]
+ cflags += [ "/MDd" ]
} else {
- cflags = [ "/MD" ]
+ cflags += [ "/MD" ]
}
}
} else {
@@ -172,11 +334,11 @@ config("runtime_library") {
if (is_win) {
# We don't use exceptions, and when we link statically we can just get
# rid of them entirely.
- defines = [ "_HAS_EXCEPTIONS=0" ]
+ defines += [ "_HAS_EXCEPTIONS=0" ]
if (is_debug) {
- cflags = [ "/MTd" ]
+ cflags += [ "/MTd" ]
} else {
- cflags = [ "/MT" ]
+ cflags += [ "/MT" ]
}
}
}
@@ -189,10 +351,71 @@ config("runtime_library") {
"_CRT_RAND_S",
"_CRT_SECURE_NO_DEPRECATE",
"_SCL_SECURE_NO_DEPRECATE",
- "_UNICODE",
- "UNICODE",
]
}
+
+ # Stlport setup. Android uses a different (smaller) version of the STL.
+ if (is_android) {
+ if (is_clang) {
+ # Work around incompatibilities between bionic and clang headers.
+ defines += [
+ "__compiler_offsetof=__builtin_offsetof",
+ "nan=__builtin_nan",
+ ]
+ }
+
+ defines += [
+ "USE_STLPORT=1",
+ "_STLP_USE_PTR_SPECIALIZATIONS=1",
+ "__GNU_SOURCE=1", # Necessary for clone().
+ ]
+
+ ldflags += [
+ "-Wl,--warn-shared-textrel",
+ "-nostdlib",
+ ]
+
+ # NOTE: The stlport header include paths below are specified in cflags
+ # rather than include_dirs because they need to come after include_dirs.
+ # Think of them like system headers, but don't use '-isystem' because the
+ # arm-linux-androideabi-4.4.3 toolchain (circa Gingerbread) will exhibit
+ # strange errors. The include ordering here is important; change with
+ # caution.
+ if (use_system_stlport) {
+ cflags += [
+ # For libstdc++/include, which is used by stlport.
+ "-I" + rebase_path("$android_src/bionic", root_build_dir),
+ "-I" + rebase_path("$android_src/external/stlport/stlport",
+ root_build_dir),
+ ]
+ libs += [
+ "stlport",
+ ]
+ } else {
+ android_stlport_root = "$android_ndk_root/sources/cxx-stl/stlport"
+
+ cflags += [
+ "-I" + rebase_path("$android_stlport_root/stlport", root_build_dir)
+ ]
+ lib_dirs += [ "$android_stlport_root/libs/$android_app_abi" ]
+
+ if (component_mode == "shared_library") {
+ libs += [ "stlport_shared" ]
+ } else {
+ libs += [ "stlport_static" ]
+ }
+ }
+
+ libs += [
+ # Manually link the libgcc.a that the cross compiler uses. This is
+ # absolute because the linker will look inside the sysroot if it's not.
+ rebase_path(android_libgcc_file),
+ "c",
+ "dl",
+ "m",
+ ]
+
+ }
}
# chromium_code ---------------------------------------------------------------
@@ -228,21 +451,59 @@ config("chromium_code") {
# TODO(brettw) this should also be enabled on Linux but some files
# currently fail.
if (is_mac) {
- cflags += "-Wextra"
+ cflags += [ "-Wextra" ]
}
}
}
config("no_chromium_code") {
+ cflags = []
+ cflags_cc = []
+ defines = []
+
if (is_win) {
- cflags = [
+ cflags += [
"/W3", # Warning level 3.
"/wd4800", # Disable warning when forcing value to bool.
]
- defines = [
+ defines += [
"_CRT_NONSTDC_NO_WARNINGS",
"_CRT_NONSTDC_NO_DEPRECATE",
]
}
+
+ if (is_linux) {
+ # Don't warn about ignoring the return value from e.g. close(). This is
+ # off by default in some gccs but on by default in others. BSD systems do
+ # not support this option, since they are usually using gcc 4.2.1, which
+ # does not have this flag yet.
+ cflags += [ "-Wno-unused-result" ]
+ }
+
+ if (is_linux || is_android) {
+ cflags += [
+ # Don't warn about printf format problems. This is off by default in gcc
+ # but on in Ubuntu's gcc(!).
+ "-Wno-format",
+ ]
+ cflags_cc += [
+ # Don't warn about hash_map in third-party code.
+ "-Wno-deprecated",
+ ]
+ }
+
+ if (is_android_webview_build) {
+ # There is a class of warning which:
+ # 1) Android always enables and also treats as errors
+ # 2) Chromium ignores in third party code
+ # So we re-enable those warnings when building Android.
+ cflags += [
+ "-Wno-address",
+ "-Wno-format-security",
+ "-Wno-return-type",
+ "-Wno-sequence-point",
+ ]
+ cflags_cc += [ "-Wno-non-virtual-dtor" ]
+ }
}
# rtti ------------------------------------------------------------------------
@@ -263,6 +524,9 @@ config("no_rtti") {
}
# Warnings ---------------------------------------------------------------------
+#
+# This is where we disable various warnings that we've decided aren't
+# worthwhile, and enable special warnings.
config("default_warnings") {
if (is_win) {
@@ -274,9 +538,6 @@ config("default_warnings") {
"/wd4125", # Decimal digit terminates octal escape sequence.
"/wd4127", # Conditional expression is constant.
"/wd4130", # Logical operation on address of string constant.
- # TODO(brettw) is this necessary? If so, it should probably be on whoever
- # is silly enough to be doing this rather than globally.
- #"/wd4131", # Function uses old-style declarator.
"/wd4189", # A variable was declared and initialized but never used.
"/wd4201", # Nonstandard extension used: nameless struct/union.
"/wd4238", # Nonstandard extension used: class rvalue used as lvalue.
@@ -310,7 +571,6 @@ config("default_warnings") {
# Disables.
"-Wno-missing-field-initializers", # "struct foo f = {0};"
"-Wno-unused-parameter", # Unused function parameters.
- "-Wno-write-strings",
]
if (is_mac) {
@@ -319,12 +579,8 @@ config("default_warnings") {
]
}
- # TODO(brettw) Ones below here should be clang-only when we have a flag
- # for it.
if (is_clang) {
cflags += [
- "-Wheader-hygiene",
-
# This warns on using ints as initializers for floats in
# initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
# which happens in several places in chrome code. Not sure if
@@ -347,32 +603,137 @@ config("default_warnings") {
# Clang spots more unused functions.
"-Wno-unused-function",
+ ]
+ }
+
+ # Suppress warnings about ABI changes on ARM (Clang doesn't give this
+ # warning).
+ if (cpu_arch == "arm" && !is_clang) {
+ cflags += [ "-Wno-psabi" ]
+ }
- # Warns when a const char[] is converted to bool.
- "-Wstring-conversion",
+ if (is_android) {
+ # Disable any additional warnings enabled by the Android build system but
+ # which chromium does not build cleanly with (when treating warning as
+ # errors).
+ cflags += [
+ "-Wno-extra",
+ "-Wno-ignored-qualifiers",
+ "-Wno-type-limits",
+ ]
+ cflags_cc = [
+ # Disabling c++0x-compat should be handled in WebKit, but
+ # this currently doesn't work because gcc_version is not set
+ # correctly when building with the Android build system.
+ # TODO(torne): Fix this in WebKit.
+ "-Wno-error=c++0x-compat",
+ # Other things unrelated to -Wextra:
+ "-Wno-non-virtual-dtor",
+ "-Wno-sign-promo",
]
}
+
+ if (gcc_version >= 48) {
+ # Don't warn about the "typedef 'foo' locally defined but not used"
+ # for gcc 4.8.
+ # TODO: remove this flag once all builds work. See crbug.com/227506
+ cflags += [
+ "-Wno-unused-local-typedefs",
+ ]
+ }
+ }
+}
+
+# This will generate warnings when using Clang if code generates exit-time
+# destructors, which will slow down closing the program.
+# TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
+config("wexit_time_destructors") {
+ if (is_clang) {
+ cflags = [ "-Wexit-time-destructors" ]
}
}
# Optimization -----------------------------------------------------------------
+#
+# Note that BUILDCONFIG.gn sets up a variable "default_optimization_config"
+# which it will assign to the config it implicitly applies to every target. If
+# you want to override the optimization level for your target, remove this
+# config (which will expand differently for debug or release builds), and then
+# add back the one you want to override it with:
+#
+# configs -= default_optimization_config
+# configs += [ "//build/config/compiler/optimize_max" ]
+
+# Shared settings for both "optimize" and "optimize_max" configs.
+if (is_win) {
+ common_optimize_on_cflags = [
+ "/O2",
+ "/Ob2", # both explicit and auto inlining.
+ "/Oy-", # disable omitting frame pointers, must be after /o2.
+ "/Os", # favor size over speed.
+ ]
+ common_optimize_on_ldflags = []
+} else {
+ common_optimize_on_cflags = [
+ # Don't emit the GCC version ident directives, they just end up in the
+ # .comment section taking up binary size.
+ "-fno-ident",
+ # Put data and code in their own sections, so that unused symbols
+ # can be removed at link time with --gc-sections.
+ "-fdata-sections",
+ "-ffunction-sections",
+ ]
+ common_optimize_on_ldflags = []
+
+ if (is_android) {
+ common_optimize_on_cflags += [
+ "-fomit-frame-pointer",
+ ]
+ common_optimize_on_ldflags += [
+ # Warn in case of text relocations.
+ "-Wl,--warn-shared-textrel",
+ ]
+ }
+ if (is_mac) {
+ if (symbol_level == 2) {
+ # Mac dead code stripping requires symbols.
+ common_optimize_on_ldflags += [
+ "-Wl,-dead_strip",
+ ]
+ }
+ } else {
+ # Non-Mac Posix linker flags.
+ common_optimize_on_ldflags += [
+ # Specifically tell the linker to perform optimizations.
+ # See http://lwn.net/Articles/192624/ .
+ "-Wl,-O1",
+ "-Wl,--as-needed",
+ "-Wl,--gc-sections",
+ ]
+ }
+}
+
+# Default "optimization on" config. On Windows, this favors size over speed.
config("optimize") {
+ cflags = common_optimize_on_cflags
+ ldflags = common_optimize_on_ldflags
if (is_win) {
- cflags = [
- "/O2",
- "/Ob2", # Both explicit and auto inlining.
- "/Oy-", # Disable omitting frame pointers, must be after /O2.
+ cflags += [
+ "/Os", # favor size over speed.
+ ]
+ } else if (is_android || is_ios) {
+ cflags += [
+ "-Os", # Favor size over speed.
]
} else {
- if (is_ios) {
- cflags = [ "-Os" ]
- } else {
- cflags = [ "-O2" ]
- }
+ cflags += [
+ "-O2",
+ ]
}
}
+# Turn off optimizations.
config("no_optimize") {
if (is_win) {
cflags = [
@@ -380,19 +741,46 @@ config("no_optimize") {
"/Ob0", # Disable all inlining (on by default).
"/RTC1", # Runtime checks for stack frame and uninitialized variables.
]
+ } else if (is_android && !android_full_debug) {
+ # On Android we kind of optimize some things that don't affect debugging
+ # much even when optimization is disabled to get the binary size down.
+ cflags = [
+ "-Os",
+ "-fomit-frame-pointer",
+ "-fdata-sections",
+ "-ffunction-sections",
+ ]
+ ldflags = common_optimize_on_ldflags
} else {
cflags = [ "-O0" ]
}
}
+# On Windows, turns up the optimization level. This implies whole program
+# optimization and link-time code generation which is very expensive and should
+# be used sparingly. For non-Windows, this is the same as "optimize".
+config("optimize_max") {
+ cflags = common_optimize_on_cflags
+ ldflags = common_optimize_on_ldflags
+ if (is_win) {
+ cflags += [
+ "/Ot", # Favor speed over size.
+ "/GL", # Whole program optimization.
+ # Disable Warning 4702 ("Unreachable code") for the WPO/PGO builds.
+ # Probably anything that this would catch that wouldn't be caught in a
+ # normal build isn't going to actually be a bug, so the incremental value
+ # of C4702 for PGO builds is likely very small.
+ "/wd4702",
+ ]
+ } else {
+ cflags += [
+ "-O2",
+ ]
+ }
+}
+
# Symbols ----------------------------------------------------------------------
-# TODO(brettw) Since this sets ldflags on Windows which is inherited across
-# static library boundaries, if you want to remove the default symbol config
-# and set a different one on a target, you also have to do it for all static
-# libraries that go into that target, which is messed up. Either we need a
-# more flexible system for defining linker flags, or we need to separate this
-# out into a "symbols_linker" config that is only applied to DLLs and EXEs.
config("symbols") {
if (is_win) {
cflags = [ "/Zi" ] # Produce PDB file, no edit and continue.
diff --git a/chromium/build/config/crypto.gni b/chromium/build/config/crypto.gni
new file mode 100644
index 00000000000..1837754a0af
--- /dev/null
+++ b/chromium/build/config/crypto.gni
@@ -0,0 +1,22 @@
+# 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.
+
+# This file declares build flags for the SSL library configuration.
+#
+# TODO(brettw) this should probably be moved to src/crypto or somewhere, and
+# the global build dependency on it should be removed.
+
+declare_args() {
+ # Use OpenSSL instead of NSS. This is used for Android and NaCl untrusted
+ # code, and is experimental in other cases (see http://crbug.com/62803).
+ use_openssl = is_android || is_nacl
+}
+
+# True when we're using OpenSSL for certificate verification and storage. We
+# only do this when we're using OpenSSL on desktop Linux systems. For other
+# systems (Mac/Win/Android) we use the system certificate features.
+use_openssl_certs = use_openssl && (is_linux || is_android)
+
+# Same meaning as use_openssl_certs but for NSS.
+use_nss_certs = !use_openssl && is_linux
diff --git a/chromium/build/config/features.gni b/chromium/build/config/features.gni
new file mode 100644
index 00000000000..79fc222d5c0
--- /dev/null
+++ b/chromium/build/config/features.gni
@@ -0,0 +1,74 @@
+# 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.
+
+# This file contains UI-related build flags. It should theoretically be in the
+# src/ui directory and only things that depend on the ui module should get the
+# definitions.
+#
+# However, today we have many "bad" dependencies on some of these flags from,
+# e.g. base, so they need to be global.
+#
+# See also build/config/ui.gni
+
+declare_args() {
+ # Multicast DNS.
+ enable_mdns = is_win || is_linux
+
+ enable_plugins = !is_android || !is_ios
+}
+
+# Additional dependent variables -----------------------------------------------
+
+# Set the version of CLD.
+# 0: Don't specify the version. This option is for the Finch testing.
+# 1: Use only CLD1.
+# 2: Use only CLD2.
+if (is_android || is_ios) {
+ cld_version = 1
+} else {
+ cld_version = 2
+}
+
+# libudev usage. This currently only affects the content layer.
+use_udev = is_linux
+
+# Enable the spell checker.
+enable_spellcheck = !is_android
+
+enable_pepper_cdms = enable_plugins && (is_linux || is_mac || is_win)
+
+# Enable printing support and UI. This variable is used to configure which
+# parts of printing will be built. 0 disables printing completely, 1 enables it
+# fully, and 2 enables only the codepath to generate a Metafile (e.g. usually
+# a PDF or EMF) and disables print preview, cloud print, UI, etc.
+if (is_android) {
+ enable_printing = 2
+} else {
+ enable_printing = 1
+}
+
+# The seccomp-bpf sandbox is only supported on three architectures
+# currently.
+# Do not disable seccomp_bpf anywhere without talking to
+# security@chromium.org!
+use_seccomp_bpf = (is_linux || is_android) &&
+ (cpu_arch == "x86" || cpu_arch == "x64" || cpu_arch == "arm")
+
+enable_webrtc = !is_ios
+
+# Enable notifications everywhere except Android.
+# Android is http://crbug.com/115320
+enable_notifications = !is_android
+
+# TODO(brettw) this should be moved to net and only dependents get this define.
+disable_ftp_support = is_ios
+
+# Speech input is compiled in by default. Set to 0 to disable.
+# TODO(tommyw): Speech Input doesn't exist anymore. Clarify the scope
+# of this flag (and probably rename it).
+enable_speech_input = true
+
+use_dbus = is_linux
+
+enable_extensions = (!is_android && !is_ios)
diff --git a/chromium/build/config/gcc/BUILD.gn b/chromium/build/config/gcc/BUILD.gn
new file mode 100644
index 00000000000..d5b9ddb4579
--- /dev/null
+++ b/chromium/build/config/gcc/BUILD.gn
@@ -0,0 +1,41 @@
+# 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.
+
+# This config causes functions not to be automatically exported from shared
+# libraries. By default, all symbols are exported but this means there are
+# lots of exports that slow everything down. In general we explicitly mark
+# which functiosn we want to export from components.
+#
+# Some third_party code assumes all functions are exported so this is separated
+# into its own config so such libraries can remove this config to make symbols
+# public again.
+#
+# See http://gcc.gnu.org/wiki/Visibility
+config("symbol_visibility_hidden") {
+ # Note that -fvisibility-inlines-hidden is set globally in the compiler
+ # config since that can almost always be applied.
+ cflags = [ "-fvisibility=hidden" ]
+}
+
+# Settings for executables and shared libraries.
+config("executable_ldconfig") {
+ ldflags = [
+ # Want to pass "\$". Need to escape both '\' and '$'. GN will re-escape as
+ # required for ninja.
+ "-Wl,-rpath=\\\$ORIGIN/lib/",
+
+ "-Wl,-rpath-link=lib/",
+ ]
+
+ if (is_android) {
+ ldflags += [
+ "-Bdynamic",
+ "-Wl,-z,nocopyreloc",
+ ]
+ }
+}
+
+config("no_exceptions") {
+ cflags_cc = [ "-fno-exceptions" ]
+}
diff --git a/chromium/build/config/gcc/gcc_version.gni b/chromium/build/config/gcc/gcc_version.gni
new file mode 100644
index 00000000000..86f5093cf57
--- /dev/null
+++ b/chromium/build/config/gcc/gcc_version.gni
@@ -0,0 +1,9 @@
+# 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.
+
+if (is_android) {
+ gcc_version = 48
+} else {
+ gcc_version = exec_script("../../compiler_version.py", [ "host", "compiler" ], "value")
+}
diff --git a/chromium/build/config/ios/BUILD.gn b/chromium/build/config/ios/BUILD.gn
new file mode 100644
index 00000000000..0886be458ab
--- /dev/null
+++ b/chromium/build/config/ios/BUILD.gn
@@ -0,0 +1,19 @@
+# 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("//build/config/sysroot.gni")
+import("//build/config/ios/ios_sdk.gni")
+
+config("sdk") {
+ common_flags = [ "-isysroot", sysroot ]
+
+ cflags = common_flags
+ ldflags = common_flags
+
+ if (use_ios_simulator) {
+ cflags += [ "-mios-simulator-version-min=$ios_deployment_target" ]
+ } else {
+ cflags += [ "-miphoneos-version-min=$ios_deployment_target" ]
+ }
+}
diff --git a/chromium/build/config/ios/ios_sdk.gni b/chromium/build/config/ios/ios_sdk.gni
new file mode 100644
index 00000000000..6b81a0308c0
--- /dev/null
+++ b/chromium/build/config/ios/ios_sdk.gni
@@ -0,0 +1,30 @@
+# 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.
+
+declare_args() {
+ # SDK path to use. When empty this will use the default SDK based on the
+ # value of use_ios_simulator.
+ ios_sdk_path = ""
+
+ # Set to true when targeting a simulator build on iOS. False means that the
+ # target is for running on the device. The default value is to use the
+ # Simulator except when targeting GYP's Xcode builds (for compat with the
+ # existing GYP build).
+ use_ios_simulator = true
+
+ # Version of iOS that we're targeting.
+ ios_deployment_target = "6.0"
+}
+
+if (ios_sdk_path == "") {
+ # Compute default target.
+ if (use_ios_simulator) {
+ _ios_sdk_to_query = "iphonesimulator"
+ } else {
+ _ios_sdk_to_query = "iphoneos"
+ }
+ _ios_sdk_result =
+ exec_script("ios_sdk.py", [ _ios_sdk_to_query ], "list lines")
+ ios_sdk_path = _ios_sdk_result[0]
+}
diff --git a/chromium/build/config/ios/ios_sdk.py b/chromium/build/config/ios/ios_sdk.py
new file mode 100644
index 00000000000..dfec4dbada9
--- /dev/null
+++ b/chromium/build/config/ios/ios_sdk.py
@@ -0,0 +1,19 @@
+# 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 subprocess
+import sys
+
+# This script returns the path to the SDK of the given type. Pass the type of
+# SDK you want, which is typically "iphone" or "iphonesimulator".
+#
+# In the GYP build, this is done inside GYP itself based on the SDKROOT
+# variable.
+
+if len(sys.argv) != 2:
+ print "Takes one arg (SDK to find)"
+ sys.exit(1)
+
+print subprocess.check_output(['xcodebuild', '-version', '-sdk',
+ sys.argv[1], 'Path']).strip()
diff --git a/chromium/build/config/linux/BUILD.gn b/chromium/build/config/linux/BUILD.gn
index a7b841c7adc..bfe242c3f7b 100644
--- a/chromium/build/config/linux/BUILD.gn
+++ b/chromium/build/config/linux/BUILD.gn
@@ -2,17 +2,25 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-import("pkg_config.gni")
+import("//build/config/linux/pkg_config.gni")
+import("//build/config/sysroot.gni")
+import("//build/config/ui.gni")
-# Sets up the dynamic library search path to include our "lib" directory.
-config("executable_ldconfig") {
- ldflags = [
- # Want to pass "\$". Need to escape both '\' and '$'. GN will re-escape as
- # required for ninja.
- "-Wl,-rpath=\\\$ORIGIN/lib/",
+config("sdk") {
+ if (sysroot != "") {
+ cflags = [ "--sysroot=" + sysroot ]
+ ldflags = [ "--sysroot=" + sysroot ]
- "-Wl,-rpath-link=lib/",
- ]
+ # Need to get some linker flags out of the sysroot.
+ ldflags += [ exec_script("sysroot_ld_path.py",
+ [ rebase_path("//build/linux/sysroot_ld_path.sh", root_build_dir),
+ sysroot ],
+ "value") ]
+ }
+}
+
+pkg_config("dridrm") {
+ packages = [ "libdrm" ]
}
config("fontconfig") {
@@ -31,7 +39,6 @@ pkg_config("gtk") {
# Gtk requires gmodule, but it does not list it as a dependency in some
# misconfigured systems.
packages = [ "gmodule-2.0", "gtk+-2.0", "gthread-2.0" ]
- defines = [ "TOOLKIT_GTK" ]
}
pkg_config("pangocairo") {
@@ -42,10 +49,25 @@ pkg_config("udev") {
packages = [ "libudev" ]
}
+# Note: if your target also depends on //dbus, you don't need to add this
+# config (it will get added automatically if you depend on //dbus).
+pkg_config("dbus") {
+ packages = [ "dbus-1" ]
+}
+
+if (use_evdev_gestures) {
+ pkg_config("libevdev-cros") {
+ packages = [ "libevdev-cros" ]
+ }
+
+ pkg_config("libgestures") {
+ packages = [ "libgestures" ]
+ }
+}
+
config("x11") {
# Don't bother running pkg-config for these X related libraries since it just
# returns the same libs, and forking pkg-config is slow.
- defines = [ "USE_X11" ]
libs = [
"X11",
"Xcomposite",
@@ -59,3 +81,120 @@ config("x11") {
"Xtst",
]
}
+
+config("xcomposite") {
+ libs = [ "Xcomposite" ]
+}
+
+config("xext") {
+ libs = [ "Xext" ]
+}
+
+config("xrandr") {
+ libs = [ "xrandr" ]
+}
+
+config("libcap") {
+ libs = [ "cap" ]
+}
+
+config("libresolv") {
+ libs = [ "resolv" ]
+}
+
+pkg_config("gconf") {
+ packages = [ "gconf-2.0" ]
+ defines = [ "USE_GCONF" ]
+}
+
+# name: Name to use for the value of the --name arg.
+# output_h/output_cc: Names for the generated header/cc file with no dir.
+# header: header file to process. Example: "<foo/bar.h>"
+# functions: List of strings for functions to process.
+# config: Label of the config generated by pkgconfig.
+template("generate_library_loader") {
+ output_h = "$root_gen_dir/library_loaders/" + invoker.output_h
+ output_cc = "$root_gen_dir/library_loaders/" + invoker.output_cc
+
+ action_visibility = ":$target_name"
+ action("${target_name}_loader") {
+ visibility = action_visibility
+
+ script = "//tools/generate_library_loader/generate_library_loader.py"
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
+
+ outputs = [ output_h, output_cc ]
+
+ args = [
+ "--name", invoker.name,
+ "--output-h", rebase_path(output_h),
+ "--output-cc", rebase_path(output_cc),
+ "--header", invoker.header,
+ # Note GYP build exposes a per-target variable to control this, which, if
+ # manually set to true, will disable dlopen(). Its not clear this is
+ # needed, so here we just leave off. If this can be done globally, we
+ # can expose one switch for this value, otherwise we need to add a template
+ # param for this.
+ "--link-directly=0",
+ ] + invoker.functions
+ }
+
+ source_set(target_name) {
+ direct_dependent_configs = [ invoker.config ]
+ sources = [ output_h, output_cc ]
+ deps = [ ":${target_name}_loader" ]
+ }
+}
+
+pkg_config("gio_config") {
+ packages = [ "gio-2.0" ]
+ defines = [ "USE_GIO" ]
+ ignore_libs = true # Loader generated below.
+}
+
+# This generates a target named "gio".
+generate_library_loader("gio") {
+ name = "LibGioLoader"
+ output_h = "libgio.h"
+ output_cc = "libgio_loader.cc"
+ header = "<gio/gio.h>"
+ config = ":gio_config"
+
+ functions = [
+ "g_settings_new",
+ "g_settings_get_child",
+ "g_settings_get_string",
+ "g_settings_get_boolean",
+ "g_settings_get_int",
+ "g_settings_get_strv",
+ "g_settings_list_schemas",
+ ]
+}
+
+# pkgconfig doesn't return anything interesting for this other than -lpci
+# on suppotred systems, so we hardcode.
+config("libpci_config") {
+ # This is not needed as long as we're setting link_directly=0 for the library
+ # loaders.
+ #libs = [ "pci" ]
+}
+
+# This generates a target named "libpci".
+generate_library_loader("libpci") {
+ name = "LibPciLoader"
+ output_h = "libpci.h"
+ output_cc = "libpci_loader.cc"
+ header = "<pci/pci.h>"
+ config = ":libpci_config"
+
+ functions = [
+ "pci_alloc",
+ "pci_init",
+ "pci_cleanup",
+ "pci_scan_bus",
+ "pci_fill_info",
+ "pci_lookup_name",
+ ]
+}
diff --git a/chromium/build/config/linux/pkg-config.py b/chromium/build/config/linux/pkg-config.py
index 40988d9792e..b107e74f277 100644
--- a/chromium/build/config/linux/pkg-config.py
+++ b/chromium/build/config/linux/pkg-config.py
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import json
+import os
import subprocess
import sys
import re
@@ -11,22 +12,98 @@ from optparse import OptionParser
# This script runs pkg-config, optionally filtering out some results, and
# returns the result.
#
-# The result will be [ <includes>, <cflags>, <libs>, <lib_dirs> ] where each
-# member is itself a list of strings.
+# The result will be [ <includes>, <cflags>, <libs>, <lib_dirs>, <ldflags> ]
+# where each member is itself a list of strings.
#
# You can filter out matches using "-v <regexp>" where all results from
# pkgconfig matching the given regular expression will be ignored. You can
# specify more than one regular expression my specifying "-v" more than once.
+#
+# You can specify a sysroot using "-s <sysroot>" where sysroot is the absolute
+# system path to the sysroot used for compiling. This script will attempt to
+# generate correct paths for the sysroot.
+#
+# When using a sysroot, you must also specify the architecture via
+# "-a <arch>" where arch is either "x86" or "x64".
# If this is run on non-Linux platforms, just return nothing and indicate
# success. This allows us to "kind of emulate" a Linux build from other
# platforms.
if sys.platform.find("linux") == -1:
- print "[[],[],[]]"
+ print "[[],[],[],[],[]]"
sys.exit(0)
+
+def SetConfigPath(options):
+ """Set the PKG_CONFIG_PATH environment variable.
+ This takes into account any sysroot and architecture specification from the
+ options on the given command line."""
+
+ sysroot = options.sysroot
+ if not sysroot:
+ sysroot = ""
+
+ # Compute the library path name based on the architecture.
+ arch = options.arch
+ if sysroot and not arch:
+ print "You must specify an architecture via -a if using a sysroot."
+ sys.exit(1)
+ if arch == 'x64':
+ libpath = 'lib64'
+ else:
+ libpath = 'lib'
+
+ # Add the sysroot path to the environment's PKG_CONFIG_PATH
+ config_path = sysroot + '/usr/' + libpath + '/pkgconfig'
+ config_path += ':' + sysroot + '/usr/share/pkgconfig'
+ if 'PKG_CONFIG_PATH' in os.environ:
+ os.environ['PKG_CONFIG_PATH'] += ':' + config_path
+ else:
+ os.environ['PKG_CONFIG_PATH'] = config_path
+
+
+def GetPkgConfigPrefixToStrip(args):
+ """Returns the prefix from pkg-config where packages are installed.
+ This returned prefix is the one that should be stripped from the beginning of
+ directory names to take into account sysroots."""
+ # Some sysroots, like the Chromium OS ones, may generate paths that are not
+ # relative to the sysroot. For example,
+ # /path/to/chroot/build/x86-generic/usr/lib/pkgconfig/pkg.pc may have all
+ # paths relative to /path/to/chroot (i.e. prefix=/build/x86-generic/usr)
+ # instead of relative to /path/to/chroot/build/x86-generic (i.e prefix=/usr).
+ # To support this correctly, it's necessary to extract the prefix to strip
+ # from pkg-config's |prefix| variable.
+ prefix = subprocess.check_output(["pkg-config", "--variable=prefix"] + args,
+ env=os.environ)
+ if prefix[-4] == '/usr':
+ return prefix[4:]
+ return prefix
+
+
+def MatchesAnyRegexp(flag, list_of_regexps):
+ """Returns true if the first argument matches any regular expression in the
+ given list."""
+ for regexp in list_of_regexps:
+ if regexp.search(flag) != None:
+ return True
+ return False
+
+
+def RewritePath(path, strip_prefix, sysroot):
+ """Rewrites a path by stripping the prefix and prepending the sysroot."""
+ if os.path.isabs(path) and not path.startswith(sysroot):
+ if path.startswith(strip_prefix):
+ path = path[len(strip_prefix):]
+ path = path.lstrip('/')
+ return os.path.join(sysroot, path)
+ else:
+ return path
+
+
parser = OptionParser()
parser.add_option('-v', action='append', dest='strip_out', type='string')
+parser.add_option('-s', action='store', dest='sysroot', type='string')
+parser.add_option('-a', action='store', dest='arch', type='string')
(options, args) = parser.parse_args()
# Make a list of regular expressions to strip out.
@@ -35,9 +112,16 @@ if options.strip_out != None:
for regexp in options.strip_out:
strip_out.append(re.compile(regexp))
+SetConfigPath(options)
+if options.sysroot:
+ prefix = GetPkgConfigPrefixToStrip(args)
+else:
+ prefix = ''
+
try:
- flag_string = subprocess.check_output(["pkg-config", "--cflags", "--libs"] +
- args)
+ flag_string = subprocess.check_output(
+ [ "pkg-config", "--cflags", "--libs-only-l", "--libs-only-L" ] +
+ args, env=os.environ)
# For now just split on spaces to get the args out. This will break if
# pkgconfig returns quoted things with spaces in them, but that doesn't seem
# to happen in practice.
@@ -46,31 +130,38 @@ except:
print "Could not run pkg-config."
sys.exit(1)
+
+sysroot = options.sysroot
+if not sysroot:
+ sysroot = ''
+
includes = []
cflags = []
libs = []
lib_dirs = []
-
-def MatchesAnyRegexp(flag, list_of_regexps):
- for regexp in list_of_regexps:
- if regexp.search(flag) != None:
- return True
- return False
+ldflags = []
for flag in all_flags[:]:
if len(flag) == 0 or MatchesAnyRegexp(flag, strip_out):
continue;
if flag[:2] == '-l':
- libs.append(flag[2:])
- if flag[:2] == '-L':
- lib_dirs.append(flag[2:])
+ libs.append(RewritePath(flag[2:], prefix, sysroot))
+ elif flag[:2] == '-L':
+ lib_dirs.append(RewritePath(flag[2:], prefix, sysroot))
elif flag[:2] == '-I':
- includes.append(flag[2:])
+ includes.append(RewritePath(flag[2:], prefix, sysroot))
+ elif flag[:3] == '-Wl':
+ ldflags.append(flag)
+ elif flag == '-pthread':
+ # Many libs specify "-pthread" which we don't need since we always include
+ # this anyway. Removing it here prevents a bunch of duplicate inclusions on
+ # the command line.
+ pass
else:
cflags.append(flag)
# Output a GN array, the first one is the cflags, the second are the libs. The
# JSON formatter prints GN compatible lists when everything is a list of
# strings.
-print json.dumps([includes, cflags, libs, lib_dirs])
+print json.dumps([includes, cflags, libs, lib_dirs, ldflags])
diff --git a/chromium/build/config/linux/pkg_config.gni b/chromium/build/config/linux/pkg_config.gni
index 50e21f1d009..46f7d7590e6 100644
--- a/chromium/build/config/linux/pkg_config.gni
+++ b/chromium/build/config/linux/pkg_config.gni
@@ -2,6 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/sysroot.gni")
+
# Defines a config specifying the result of running pkg-config for the given
# packages. Put the package names you want to query in the "packages" variable
# inside the template invocation.
@@ -15,16 +17,44 @@
# packages = [ "mything1", "mything2" ]
# defines = [ "ENABLE_AWESOME" ]
# }
+#
+# You can also use "extra args" to filter out results (see pkg-config.py):
+# extra_args = [ "-v, "foo" ]
+# To ignore libs and ldflags (only cflags/defines will be set, which is useful
+# when doing manual dynamic linking), set:
+# ignore_libs = true
template("pkg_config") {
- assert(defined(packages),
+ assert(defined(invoker.packages),
"Variable |packages| must be defined to be a list in pkg_config.")
config(target_name) {
+ if (sysroot != "") {
+ # Pass the sysroot if we're using one (it requires the CPU arch also).
+ args = ["-s", sysroot, "-a", cpu_arch] + invoker.packages
+ } else {
+ args = invoker.packages
+ }
+
+ if (defined(invoker.extra_args)) {
+ args += invoker.extra_args
+ }
+
pkgresult = exec_script("//build/config/linux/pkg-config.py",
- packages, "value")
+ args, "value")
include_dirs = pkgresult[0]
cflags = pkgresult[1]
- libs = pkgresult[2]
- lib_dirs = pkgresult[3]
+
+ if (!defined(invoker.ignore_libs) || !invoker.ignore_libs) {
+ libs = pkgresult[2]
+ lib_dirs = pkgresult[3]
+ ldflags = pkgresult[4]
+ }
+
+ if (defined(invoker.defines)) {
+ defines = invoker.defines
+ }
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
}
}
diff --git a/chromium/build/config/linux/sysroot.gni b/chromium/build/config/linux/sysroot.gni
deleted file mode 100644
index 78a8790d869..00000000000
--- a/chromium/build/config/linux/sysroot.gni
+++ /dev/null
@@ -1,27 +0,0 @@
-# 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.
-
-# This header file defines the "sysroot" variable which is the absolute path
-# of the sysroot. If no sysroot applies, the variable will be an empty string.
-
-# For official builds, use the sysroot checked into the internal source repo so
-# that the builds work on older versions of Linux.
-if (is_linux && is_chrome_branded && is_official_build && !is_chromeos) {
- if (cpu_arch == "x64") {
- sysroot = rebase_path(
- "//chrome/installer/linux/debian_wheezy_amd64-sysroot", ".", "")
- } else if (cpu_arch == "x86") {
- sysroot = rebase_path(
- "//chrome/installer/linux/debian_wheezy_i386-sysroot", ".", "")
- } else {
- assert(false,
- "Official builds on non-x86/64 processors not supported.")
- }
-} else if (is_mac) {
- # Set which SDK to use.
- # TODO(brettw) this needs to be configurable somehow.
- sysroot = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.7.sdk"
-} else {
- sysroot = ""
-}
diff --git a/chromium/build/config/linux/sysroot_ld_path.py b/chromium/build/config/linux/sysroot_ld_path.py
new file mode 100644
index 00000000000..4bce7ee3e2b
--- /dev/null
+++ b/chromium/build/config/linux/sysroot_ld_path.py
@@ -0,0 +1,20 @@
+# 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.
+
+# This file takes two arguments, the relative location of the shell script that
+# does the checking, and the name of the sysroot.
+
+# TODO(brettw) the build/linux/sysroot_ld_path.sh script should be rewritten in
+# Python in this file.
+
+import subprocess
+import sys
+
+if len(sys.argv) != 3:
+ print "Need two arguments"
+ sys.exit(1)
+
+result = subprocess.check_output([sys.argv[1], sys.argv[2]]).strip()
+
+print '"' + result + '"'
diff --git a/chromium/build/config/mac/BUILD.gn b/chromium/build/config/mac/BUILD.gn
index 78c106aebf9..2ebf45872d1 100644
--- a/chromium/build/config/mac/BUILD.gn
+++ b/chromium/build/config/mac/BUILD.gn
@@ -2,9 +2,34 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/sysroot.gni")
+
+config("sdk") {
+ common_flags = [
+ "-isysroot", sysroot,
+ "-mmacosx-version-min=10.6"
+ ]
+
+ cflags = common_flags
+ ldflags = common_flags
+}
+
# On Mac, this is used for everything except static libraries.
config("mac_dynamic_flags") {
ldflags = [
"-Wl,-search_paths_first",
+ "-L.",
+ # Path for loading shared libraries for unbundled binaries.
+ "-Wl,-rpath,@loader_path/.",
+ # Path for loading shared libraries for bundled binaries. Get back from
+ # Binary.app/Contents/MacOS.
+ "-Wl,-rpath,@loader_path/../../..",
+ ]
+}
+
+# On Mac, this is used only for executables.
+config("mac_executable_flags") {
+ ldflags = [
+ "-Wl,-pie", # Position independent.
]
}
diff --git a/chromium/build/config/mac/mac_sdk.gni b/chromium/build/config/mac/mac_sdk.gni
new file mode 100644
index 00000000000..aa0333219fc
--- /dev/null
+++ b/chromium/build/config/mac/mac_sdk.gni
@@ -0,0 +1,34 @@
+# 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.
+
+declare_args() {
+ # Minimum supported version of the Mac SDK.
+ mac_sdk_min = "10.6"
+
+ # Path to a specific version of the Mac SDKJ, not including a backslash at
+ # the end. If empty, the path to the lowest version greater than or equal to
+ # mac_sdk_min is used.
+ mac_sdk_path = ""
+}
+
+find_sdk_args = [ "--print_sdk_path" ]
+if (is_chrome_branded && is_official_build) {
+ find_sdk_args += [ "--verify", mac_sdk_min, "--sdk_path=" + mac_sdk_path ]
+} else {
+ find_sdk_args += [ mac_sdk_min ]
+}
+# The tool will print the SDK path on the first line, and the version on the
+# second line.
+find_sdk_lines =
+ exec_script("//build/mac/find_sdk.py", find_sdk_args, "list lines")
+mac_sdk_version = find_sdk_lines[1]
+if (mac_sdk_path == "") {
+ # TODO(brettw) http://crbug.com/335325 when everybody moves to XCode 5 we
+ # can remove the --print_sdk_path argument to find_sdk and instead just use
+ # the following two lines to get the path. Although it looks longer here, it
+ # saves forking a process in find_sdk.py so will be faster.
+ #mac_sdk_root = "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX"
+ #mac_sdk_path = mac_sdk_root + mac_sdk_version + ".sdk"
+ mac_sdk_path = find_sdk_lines[0]
+}
diff --git a/chromium/build/config/sysroot.gni b/chromium/build/config/sysroot.gni
new file mode 100644
index 00000000000..2b04c568895
--- /dev/null
+++ b/chromium/build/config/sysroot.gni
@@ -0,0 +1,50 @@
+# 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.
+
+# This header file defines the "sysroot" variable which is the absolute path
+# of the sysroot. If no sysroot applies, the variable will be an empty string.
+
+if (is_android) {
+ import("//build/config/android/config.gni")
+ if (!is_android_webview_build) {
+ if (cpu_arch == "x86") {
+ sysroot = rebase_path("$android_ndk_root/$x86_android_sysroot_subdir")
+ } else if (cpu_arch == "arm") {
+ sysroot = rebase_path("$android_ndk_root/$arm_android_sysroot_subdir")
+ } else if (cpu_arch == "mipsel") {
+ sysroot = rebase_path("$android_ndk_root/$mips_android_sysroot_subdir")
+ } else {
+ sysroot = ""
+ }
+ } else {
+ sysroot = ""
+ }
+} else if (is_linux && is_chrome_branded && is_official_build && !is_chromeos) {
+ # For official builds, use the sysroot checked into the internal source repo
+ # so that the builds work on older versions of Linux.
+ if (cpu_arch == "x64") {
+ sysroot =
+ rebase_path("//chrome/installer/linux/debian_wheezy_amd64-sysroot")
+ } else if (cpu_arch == "x86") {
+ sysroot = rebase_path("//chrome/installer/linux/debian_wheezy_i386-sysroot")
+ } else {
+ # Any other builds don't use a sysroot.
+ sysroot = ""
+ }
+} else if (is_linux && !is_chromeos) {
+ if (cpu_arch == "mipsel") {
+ sysroot = rebase_path("//mipsel-sysroot/sysroot")
+ } else {
+ sysroot = ""
+ }
+} else if (is_mac) {
+ import("//build/config/mac/mac_sdk.gni")
+
+ sysroot = mac_sdk_path
+} else if (is_ios) {
+ import("//build/config/ios/ios_sdk.gni")
+ sysroot = ios_sdk_path
+} else {
+ sysroot = ""
+}
diff --git a/chromium/build/config/ui.gni b/chromium/build/config/ui.gni
new file mode 100644
index 00000000000..3e37d2d5fcf
--- /dev/null
+++ b/chromium/build/config/ui.gni
@@ -0,0 +1,63 @@
+# 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.
+
+# This file contains UI-related build flags. It should theoretically be in the
+# src/ui directory and only things that depend on the ui module should get the
+# definitions.
+#
+# However, today we have many "bad" dependencies on some of these flags from,
+# e.g. base, so they need to be global.
+#
+# See also build/config/features.gni
+
+declare_args() {
+ # Indicates if Ash is enabled. Ash is the Aura Shell which provides a
+ # desktop-like environment for Aura. Requires use_aura = true
+ use_ash = is_win || is_chromeos
+
+ # Indicates if Ozone is enabled. Ozone is a low-level library layer for Linux
+ # that does not require X11.
+ use_ozone = false
+
+ # Support ChromeOS touchpad gestures with ozone.
+ use_evdev_gestures = false
+
+ # Indicates if Aura is enabled. Aura is a low-level windowing library, sort
+ # of a replacement for GDI or GTK.
+ use_aura = is_linux || use_ozone || is_win || is_chromeos || use_ash
+
+ # XInput2 multitouch support. Zero means disabled, nonzero indicates the
+ # minimum XI2 version. For example, use_xi2_mt=2 means XI2.2 or above.
+ use_xi2_mt = 2
+
+ # True means the UI is built using the "views" framework.
+ toolkit_views = is_win || is_chromeos || use_aura
+}
+
+# Additional dependent variables -----------------------------------------------
+#
+# These variables depend on other variables and can't be set externally.
+
+if (is_linux) {
+ use_cairo = true
+ use_pango = true
+} else {
+ use_cairo = false
+ use_pango = false
+}
+
+# Use GPU accelerated cross process image transport by default on linux builds
+# with the Aura window manager.
+ui_compositor_image_transport = use_aura && is_linux
+
+use_default_render_theme = use_aura || is_linux
+
+# Indicates if the UI toolkit depends on X11.
+use_x11 = is_linux && !use_ozone
+
+use_ozone_evdev = use_ozone
+
+use_glib = is_linux
+
+use_clipboard_aurax11 = is_linux && use_aura && use_x11
diff --git a/chromium/build/config/win/BUILD.gn b/chromium/build/config/win/BUILD.gn
index 8bedbf581cc..3fed26abe8c 100644
--- a/chromium/build/config/win/BUILD.gn
+++ b/chromium/build/config/win/BUILD.gn
@@ -2,14 +2,7 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-declare_args() {
- # Full path to the Windows SDK, not including a backslash at the end.
- windows_sdk_path = "C:\Program Files (x86)\Windows Kits\8.0"
-
- # Full path to the Visual Studio installation, not including a backslash
- # at the end.
- visual_studio_path = "C:\Program Files (x86)\Microsoft Visual Studio 10.0"
-}
+import("//build/config/win/visual_studio_version.gni")
# Compiler setup for the Windows SDK. Applied to all targets.
config("sdk") {
@@ -18,15 +11,12 @@ config("sdk") {
defines = [
"_ATL_NO_OPENGL",
- "_SECURE_ATL",
"_WIN32_WINNT=0x0602",
"_WINDOWS",
"CERT_CHAIN_PARA_HAS_EXTRA_FIELDS",
- "NOMINMAX",
"NTDDI_VERSION=0x06020000",
"PSAPI_VERSION=1",
"WIN32",
- "WIN32_LEAN_AND_MEAN",
"WINVER=0x0602",
]
@@ -40,6 +30,21 @@ config("sdk") {
"$visual_studio_path\VC\include",
"$visual_studio_path\VC\atlmfc\include",
]
+
+ if (is_visual_studio_express) {
+ include_dirs += [
+ "$wdk_path/inc/atl71",
+ "$wdk_path/inc/mfc42",
+ ]
+
+ # https://code.google.com/p/chromium/issues/detail?id=372451#c20
+ # Warning 4702 ("Unreachable code") should be re-enabled once Express users
+ # are updated to VS2013 Update 2.
+ cflags = [ "/wd4702" ]
+ } else {
+ # Only supported on non-Express versions.
+ defines += [ "_SECURE_ATL" ]
+ }
}
# Linker flags for Windows SDK setup, this is applied only to EXEs and DLLs.
@@ -51,6 +56,9 @@ config("sdk_link") {
"$visual_studio_path\VC\lib\amd64",
"$visual_studio_path\VC\atlmfc\lib\amd64",
]
+ if (is_visual_studio_express) {
+ lib_dirs += [ "$wdk_path/lib/ATL/amd64" ]
+ }
} else {
ldflags = [
"/MACHINE:X86",
@@ -61,15 +69,31 @@ config("sdk_link") {
"$visual_studio_path\VC\lib",
"$visual_studio_path\VC\atlmfc\lib",
]
- #if (!is_asan) { TODO(brettw) Address Sanitizer
- # ldflags += "/largeaddressaware"
- #}
+ if (is_visual_studio_express) {
+ lib_dirs += [ "$wdk_path/lib/ATL/i386" ]
+ }
+ if (!is_asan) {
+ ldflags += [ "/largeaddressaware" ]
+ }
+ }
+
+ if (is_visual_studio_express) {
+ # Explicitly required when using the ATL with express.
+ libs = [ "atlthunk.lib" ]
+
+ # ATL 8.0 included in WDK 7.1 makes the linker to generate almost eight
+ # hundred LNK4254 and LNK4078 warnings:
+ # - warning LNK4254: section 'ATL' (50000040) merged into '.rdata'
+ # (40000040) with different attributes
+ # - warning LNK4078: multiple 'ATL' sections found with different
+ # attributes
+ ldflags += [ "/ignore:4254", "/ignore:4078" ]
}
}
# This default linker setup is provided separately from the SDK setup so
-# targets who want different libraries linked can remove this and specify their
-# own.
+# targets who want different library configurations can remove this and specify
+# their own.
config("common_linker_setup") {
ldflags = [
"/FIXED:NO",
@@ -85,38 +109,11 @@ config("common_linker_setup") {
# Chrome.dll don't stick from one launch to the next. For this reason, we
# turn ASLR off in debug builds.
if (is_debug) {
- ldflags += "/DYNAMICBASE:NO"
+ ldflags += [ "/DYNAMICBASE:NO" ]
} else {
- ldflags += "/DYNAMICBASE"
+ ldflags += [ "/DYNAMICBASE" ]
}
- # Common libraries.
- libs = [
- "advapi32.lib",
- "comdlg32.lib",
- "dbghelp.lib",
- "delayimp.lib",
- "dnsapi.lib",
- "gdi32.lib",
- "kernel32.lib",
- "msimg32.lib",
- "odbc32.lib",
- "odbccp32.lib",
- "ole32.lib",
- "oleaut32.lib",
- "psapi.lib",
- "shell32.lib",
- "shlwapi.lib",
- "user32.lib",
- "usp10.lib",
- "uuid.lib",
- "version.lib",
- "wininet.lib",
- "winmm.lib",
- "winspool.lib",
- "ws2_32.lib",
- ]
-
# Delay loaded DLLs.
ldflags += [
"/DELAYLOAD:dbghelp.dll",
@@ -143,3 +140,36 @@ config("incremental_linking") {
config("no_incremental_linking") {
ldflags = [ "/INCREMENTAL:NO" ]
}
+
+# Character set ----------------------------------------------------------------
+
+# Not including this config means "ansi" (8-bit system codepage).
+config("unicode") {
+ defines = [
+ "_UNICODE",
+ "UNICODE",
+ ]
+}
+
+# Lean and mean ----------------------------------------------------------------
+
+# Some third party code might not compile with WIN32_LEAN_AND_MEAN so we have
+# to have a separate config for it. Remove this config from your target to
+# get the "bloaty and accomodating" version of windows.h.
+config("lean_and_mean") {
+ defines = [
+ "WIN32_LEAN_AND_MEAN",
+ ]
+}
+
+# Nominmax --------------------------------------------------------------------
+
+# Some third party code defines NOMINMAX before including windows.h, which
+# then causes warnings when it's been previously defined on the command line.
+# For such targets, this config can be removed.
+
+config("nominmax") {
+ defines = [
+ "NOMINMAX",
+ ]
+}
diff --git a/chromium/build/config/win/get_msvc_config.py b/chromium/build/config/win/get_msvc_config.py
deleted file mode 100644
index 01380cd8954..00000000000
--- a/chromium/build/config/win/get_msvc_config.py
+++ /dev/null
@@ -1,77 +0,0 @@
-# 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.
-
-# This file returns the MSVC config used by the Windows build.
-# It's a bit hardcoded right now. I suspect we want to build this functionality
-# into GN itself in the future.
-
-import sys
-
-# This script expects one parameter: the path to the root output directory.
-
-# TODO(brettw): do escaping.
-def FormatStringForGN(x):
- return '"' + x + '"'
-
-def PrintListOfStrings(x):
- print '['
- for i in x:
- print FormatStringForGN(i) + ', '
- print ']'
-
-# GN wants system-absolutepaths to begin in slashes.
-sdk_root = '/C:\\Program Files (x86)\\Windows Kits\\8.0\\'
-vs_root = '/C:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\'
-
-def GetIncludes():
- return [
- sdk_root + 'Include\\shared',
- sdk_root + 'Include\\um',
- sdk_root + 'Include\\winrt',
- vs_root + 'VC\\atlmfc\\include'
- ]
-
-def _FormatAsEnvironmentBlock(envvar_dict):
- """Format as an 'environment block' directly suitable for CreateProcess.
- Briefly this is a list of key=value\0, terminated by an additional \0. See
- CreateProcess documentation for more details."""
- block = ''
- nul = '\0'
- for key, value in envvar_dict.iteritems():
- block += key + '=' + value + nul
- block += nul
- return block
-
-def WriteEnvFile(file_path, values):
- f = open(file_path, "w")
- f.write(_FormatAsEnvironmentBlock(values))
-
-includes = GetIncludes()
-
-# Write the environment files.
-WriteEnvFile(sys.argv[1] + '\\environment.x86',
- { 'TMP': 'C:\\Users\\brettw\\AppData\\Local\\Temp',
- 'SYSTEMROOT': 'C:\\Windows',
- 'TEMP': 'C:\\Users\\brettw\\AppData\\Local\\Temp',
- 'LIB': 'c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\LIB;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\ATLMFC\\LIB;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\lib;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\LIB;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\ATLMFC\\LIB;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\lib;',
- 'LIBPATH': 'C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework\\v3.5;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\LIB;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\ATLMFC\\LIB;C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework\\v3.5;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\LIB;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\ATLMFC\\LIB;',
- 'PATH': 'C:\\apps\\depot_tools\\python_bin;c:\\Program Files (x86)\\Microsoft F#\\v4.0\\;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VSTSDB\\Deploy;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE\\;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\Tools;C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework\\v3.5;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\VCPackages;C:\\Program Files (x86)\\HTML Help Workshop;C:\\Program Files (x86)\\HTML Help Workshop;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\bin\\NETFX 4.0 Tools;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\bin;C:\\apps\\depot_tools\\python_bin;C:\\apps\\depot_tools\\;C:\\apps\\depot_tools\\;C:\\apps\\depot_tools\\;c:\\Program Files (x86)\\Microsoft F#\\v4.0\\;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VSTSDB\\Deploy;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE\\;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\Tools;C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework\\v3.5;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\VCPackages;C:\\Program Files (x86)\\HTML Help Workshop;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\bin\\NETFX 4.0 Tools;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\windows\\corpam;C:\\python_26_amd64\\files;C:\\Windows\\ccmsetup;c:\\Program Files (x86)\\Microsoft SQL Server\\100\\Tools\\Binn\\;c:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Binn\\;c:\\Program Files\\Microsoft SQL Server\\100\\DTS\\Binn\\;c:\\cygwin\\bin;C:\\apps\\;C:\\apps\\depot_tools;C:\\Program Files (x86)\\Windows Kits\\8.0\\Windows Performance Toolkit\\;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Google\\Cert Installer;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Google\\google_appengine\\',
- 'PATHEXT': '=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC',
- 'INCLUDE': 'c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\ATLMFC\\INCLUDE;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\include;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\ATLMFC\\INCLUDE;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\include;'})
-
-WriteEnvFile(sys.argv[1] + '\\environment.x64',
- { 'TMP': 'C:\\Users\\brettw\\AppData\\Local\\Temp',
- 'SYSTEMROOT': 'C:\\Windows',
- 'TEMP': 'C:\\Users\\brettw\\AppData\\Local\\Temp',
- 'LIB': 'c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\LIB\\amd64;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\ATLMFC\\LIB\\amd64;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\lib\\x64;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\LIB;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\ATLMFC\\LIB;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\lib;',
- 'LIBPATH': 'C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework64\\v3.5;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\LIB\\amd64;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\ATLMFC\\LIB\\amd64;C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework\\v3.5;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\LIB;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\ATLMFC\\LIB;',
- 'PATH': 'C:\\apps\\depot_tools\\python_bin;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN\\amd64;C:\\Windows\\Microsoft.NET\\Framework64\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework64\\v3.5;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\VCPackages;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\Tools;C:\\Program Files (x86)\\HTML Help Workshop;C:\\Program Files (x86)\\HTML Help Workshop;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\bin\\NETFX 4.0 Tools\\x64;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\bin\\x64;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\bin;C:\\apps\\depot_tools\\python_bin;C:\\apps\\depot_tools\\;C:\\apps\\depot_tools\\;C:\\apps\\depot_tools\\;c:\\Program Files (x86)\\Microsoft F#\\v4.0\\;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VSTSDB\\Deploy;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\IDE\\;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\BIN;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\Common7\\Tools;C:\\Windows\\Microsoft.NET\\Framework\\v4.0.30319;C:\\Windows\\Microsoft.NET\\Framework\\v3.5;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\VCPackages;C:\\Program Files (x86)\\HTML Help Workshop;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\bin\\NETFX 4.0 Tools;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\windows\\corpam;C:\\python_26_amd64\\files;C:\\Windows\\ccmsetup;c:\\Program Files (x86)\\Microsoft SQL Server\\100\\Tools\\Binn\\;c:\\Program Files\\Microsoft SQL Server\\100\\Tools\\Binn\\;c:\\Program Files\\Microsoft SQL Server\\100\\DTS\\Binn\\;c:\\cygwin\\bin;C:\\apps\\;C:\\apps\\depot_tools;C:\\Program Files (x86)\\Windows Kits\\8.0\\Windows Performance Toolkit\\;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Google\\Cert Installer;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\;C:\\Program Files (x86)\\Google\\google_appengine\\',
- 'PATHEXT': '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH;.MSC',
- 'INCLUDE': 'c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\ATLMFC\\INCLUDE;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\include;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\INCLUDE;c:\\Program Files (x86)\\Microsoft Visual Studio 10.0\\VC\\ATLMFC\\INCLUDE;C:\\Program Files (x86)\\Microsoft SDKs\\Windows\\v7.0A\\include;'})
-
-# Return the includes and such.
-print '['
-PrintListOfStrings(includes)
-print ']'
-
diff --git a/chromium/build/config/win/get_msvc_config_real.py b/chromium/build/config/win/get_msvc_config_real.py
deleted file mode 100644
index a209d7ff8a1..00000000000
--- a/chromium/build/config/win/get_msvc_config_real.py
+++ /dev/null
@@ -1,575 +0,0 @@
-# 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.
-
-# This file copies the logic from GYP to find the MSVC configuration. It's not
-# currently used because it is too slow. We will probably build this
-# functionality into the C++ code in the future.
-
-"""Handle version information related to Visual Stuio."""
-
-import errno
-import os
-import re
-import subprocess
-import sys
-
-class VisualStudioVersion(object):
- """Information regarding a version of Visual Studio."""
-
- def __init__(self, short_name, description,
- solution_version, project_version, flat_sln, uses_vcxproj,
- path, sdk_based, default_toolset=None):
- self.short_name = short_name
- self.description = description
- self.solution_version = solution_version
- self.project_version = project_version
- self.flat_sln = flat_sln
- self.uses_vcxproj = uses_vcxproj
- self.path = path
- self.sdk_based = sdk_based
- self.default_toolset = default_toolset
-
- def ShortName(self):
- return self.short_name
-
- def Description(self):
- """Get the full description of the version."""
- return self.description
-
- def SolutionVersion(self):
- """Get the version number of the sln files."""
- return self.solution_version
-
- def ProjectVersion(self):
- """Get the version number of the vcproj or vcxproj files."""
- return self.project_version
-
- def FlatSolution(self):
- return self.flat_sln
-
- def UsesVcxproj(self):
- """Returns true if this version uses a vcxproj file."""
- return self.uses_vcxproj
-
- def ProjectExtension(self):
- """Returns the file extension for the project."""
- return self.uses_vcxproj and '.vcxproj' or '.vcproj'
-
- def Path(self):
- """Returns the path to Visual Studio installation."""
- return self.path
-
- def ToolPath(self, tool):
- """Returns the path to a given compiler tool. """
- return os.path.normpath(os.path.join(self.path, "VC/bin", tool))
-
- def DefaultToolset(self):
- """Returns the msbuild toolset version that will be used in the absence
- of a user override."""
- return self.default_toolset
-
- def SetupScript(self, target_arch):
- """Returns a command (with arguments) to be used to set up the
- environment."""
- # Check if we are running in the SDK command line environment and use
- # the setup script from the SDK if so. |target_arch| should be either
- # 'x86' or 'x64'.
- assert target_arch in ('x86', 'x64')
- sdk_dir = os.environ.get('WindowsSDKDir')
- if self.sdk_based and sdk_dir:
- return [os.path.normpath(os.path.join(sdk_dir, 'Bin/SetEnv.Cmd')),
- '/' + target_arch]
- else:
- # We don't use VC/vcvarsall.bat for x86 because vcvarsall calls
- # vcvars32, which it can only find if VS??COMNTOOLS is set, which it
- # isn't always.
- if target_arch == 'x86':
- return [os.path.normpath(
- os.path.join(self.path, 'Common7/Tools/vsvars32.bat'))]
- else:
- assert target_arch == 'x64'
- arg = 'x86_amd64'
- if (os.environ.get('PROCESSOR_ARCHITECTURE') == 'AMD64' or
- os.environ.get('PROCESSOR_ARCHITEW6432') == 'AMD64'):
- # Use the 64-on-64 compiler if we can.
- arg = 'amd64'
- return [os.path.normpath(
- os.path.join(self.path, 'VC/vcvarsall.bat')), arg]
-
-
-def _RegistryQueryBase(sysdir, key, value):
- """Use reg.exe to read a particular key.
-
- While ideally we might use the win32 module, we would like gyp to be
- python neutral, so for instance cygwin python lacks this module.
-
- Arguments:
- sysdir: The system subdirectory to attempt to launch reg.exe from.
- key: The registry key to read from.
- value: The particular value to read.
- Return:
- stdout from reg.exe, or None for failure.
- """
- # Skip if not on Windows or Python Win32 setup issue
- if sys.platform not in ('win32', 'cygwin'):
- return None
- # Setup params to pass to and attempt to launch reg.exe
- cmd = [os.path.join(os.environ.get('WINDIR', ''), sysdir, 'reg.exe'),
- 'query', key]
- if value:
- cmd.extend(['/v', value])
- p = subprocess.Popen(cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
- # Obtain the stdout from reg.exe, reading to the end so p.returncode is valid
- # Note that the error text may be in [1] in some cases
- text = p.communicate()[0]
- # Check return code from reg.exe; officially 0==success and 1==error
- if p.returncode:
- return None
- return text
-
-
-def _RegistryQuery(key, value=None):
- """Use reg.exe to read a particular key through _RegistryQueryBase.
-
- First tries to launch from %WinDir%\Sysnative to avoid WoW64 redirection. If
- that fails, it falls back to System32. Sysnative is available on Vista and
- up and available on Windows Server 2003 and XP through KB patch 942589. Note
- that Sysnative will always fail if using 64-bit python due to it being a
- virtual directory and System32 will work correctly in the first place.
-
- KB 942589 - http://support.microsoft.com/kb/942589/en-us.
-
- Arguments:
- key: The registry key.
- value: The particular registry value to read (optional).
- Return:
- stdout from reg.exe, or None for failure.
- """
- text = None
- try:
- text = _RegistryQueryBase('Sysnative', key, value)
- except OSError, e:
- if e.errno == errno.ENOENT:
- text = _RegistryQueryBase('System32', key, value)
- else:
- raise
- return text
-
-
-def _RegistryGetValue(key, value):
- """Use reg.exe 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.
- """
- text = _RegistryQuery(key, value)
- if not text:
- return None
- # Extract value.
- match = re.search(r'REG_\w+\s+([^\r]+)\r\n', text)
- if not match:
- return None
- return match.group(1)
-
-
-def _RegistryKeyExists(key):
- """Use reg.exe to see if a key exists.
-
- Args:
- key: The registry key to check.
- Return:
- True if the key exists
- """
- if not _RegistryQuery(key):
- return False
- return True
-
-
-def _CreateVersion(name, path, sdk_based=False):
- """Sets up MSVS project generation.
-
- Setup is based off the GYP_MSVS_VERSION environment variable or whatever is
- autodetected if GYP_MSVS_VERSION is not explicitly specified. If a version is
- passed in that doesn't match a value in versions python will throw a error.
- """
- if path:
- path = os.path.normpath(path)
- versions = {
- '2013': VisualStudioVersion('2013',
- 'Visual Studio 2013',
- solution_version='13.00',
- project_version='4.0',
- flat_sln=False,
- uses_vcxproj=True,
- path=path,
- sdk_based=sdk_based,
- default_toolset='v110'),
- '2013e': VisualStudioVersion('2013e',
- 'Visual Studio 2013',
- solution_version='13.00',
- project_version='4.0',
- flat_sln=True,
- uses_vcxproj=True,
- path=path,
- sdk_based=sdk_based,
- default_toolset='v110'),
- '2012': VisualStudioVersion('2012',
- 'Visual Studio 2012',
- solution_version='12.00',
- project_version='4.0',
- flat_sln=False,
- uses_vcxproj=True,
- path=path,
- sdk_based=sdk_based,
- default_toolset='v110'),
- '2012e': VisualStudioVersion('2012e',
- 'Visual Studio 2012',
- solution_version='12.00',
- project_version='4.0',
- flat_sln=True,
- uses_vcxproj=True,
- path=path,
- sdk_based=sdk_based,
- default_toolset='v110'),
- '2010': VisualStudioVersion('2010',
- 'Visual Studio 2010',
- solution_version='11.00',
- project_version='4.0',
- flat_sln=False,
- uses_vcxproj=True,
- path=path,
- sdk_based=sdk_based),
- '2010e': VisualStudioVersion('2010e',
- 'Visual Studio 2010',
- solution_version='11.00',
- project_version='4.0',
- flat_sln=True,
- uses_vcxproj=True,
- path=path,
- sdk_based=sdk_based),
- '2008': VisualStudioVersion('2008',
- 'Visual Studio 2008',
- solution_version='10.00',
- project_version='9.00',
- flat_sln=False,
- uses_vcxproj=False,
- path=path,
- sdk_based=sdk_based),
- '2008e': VisualStudioVersion('2008e',
- 'Visual Studio 2008',
- solution_version='10.00',
- project_version='9.00',
- flat_sln=True,
- uses_vcxproj=False,
- path=path,
- sdk_based=sdk_based),
- '2005': VisualStudioVersion('2005',
- 'Visual Studio 2005',
- solution_version='9.00',
- project_version='8.00',
- flat_sln=False,
- uses_vcxproj=False,
- path=path,
- sdk_based=sdk_based),
- '2005e': VisualStudioVersion('2005e',
- 'Visual Studio 2005',
- solution_version='9.00',
- project_version='8.00',
- flat_sln=True,
- uses_vcxproj=False,
- path=path,
- sdk_based=sdk_based),
- }
- return versions[str(name)]
-
-
-def _ConvertToCygpath(path):
- """Convert to cygwin path if we are using cygwin."""
- if sys.platform == 'cygwin':
- p = subprocess.Popen(['cygpath', path], stdout=subprocess.PIPE)
- path = p.communicate()[0].strip()
- return path
-
-
-def _DetectVisualStudioVersions(versions_to_check, force_express):
- """Collect the list of installed visual studio versions.
-
- Returns:
- A list of visual studio versions installed in descending order of
- usage preference.
- Base this on the registry and a quick check if devenv.exe exists.
- Only versions 8-10 are considered.
- Possibilities are:
- 2005(e) - Visual Studio 2005 (8)
- 2008(e) - Visual Studio 2008 (9)
- 2010(e) - Visual Studio 2010 (10)
- 2012(e) - Visual Studio 2012 (11)
- 2013(e) - Visual Studio 2013 (11)
- Where (e) is e for express editions of MSVS and blank otherwise.
- """
- version_to_year = {
- '8.0': '2005',
- '9.0': '2008',
- '10.0': '2010',
- '11.0': '2012',
- '12.0': '2013',
- }
- versions = []
- for version in versions_to_check:
- # Old method of searching for which VS version is installed
- # We don't use the 2010-encouraged-way because we also want to get the
- # path to the binaries, which it doesn't offer.
- keys = [r'HKLM\Software\Microsoft\VisualStudio\%s' % version,
- r'HKLM\Software\Wow6432Node\Microsoft\VisualStudio\%s' % version,
- r'HKLM\Software\Microsoft\VCExpress\%s' % version,
- r'HKLM\Software\Wow6432Node\Microsoft\VCExpress\%s' % version]
- for index in range(len(keys)):
- path = _RegistryGetValue(keys[index], 'InstallDir')
- if not path:
- continue
- path = _ConvertToCygpath(path)
- # Check for full.
- full_path = os.path.join(path, 'devenv.exe')
- express_path = os.path.join(path, 'vcexpress.exe')
- if not force_express and os.path.exists(full_path):
- # Add this one.
- versions.append(_CreateVersion(version_to_year[version],
- os.path.join(path, '..', '..')))
- # Check for express.
- elif os.path.exists(express_path):
- # Add this one.
- versions.append(_CreateVersion(version_to_year[version] + 'e',
- os.path.join(path, '..', '..')))
-
- # The old method above does not work when only SDK is installed.
- keys = [r'HKLM\Software\Microsoft\VisualStudio\SxS\VC7',
- r'HKLM\Software\Wow6432Node\Microsoft\VisualStudio\SxS\VC7']
- for index in range(len(keys)):
- path = _RegistryGetValue(keys[index], version)
- if not path:
- continue
- path = _ConvertToCygpath(path)
- versions.append(_CreateVersion(version_to_year[version] + 'e',
- os.path.join(path, '..'), sdk_based=True))
-
- return versions
-
-
-def SelectVisualStudioVersion(version='auto'):
- """Select which version of Visual Studio projects to generate.
-
- Arguments:
- version: Hook to allow caller to force a particular version (vs auto).
- Returns:
- An object representing a visual studio project format version.
- """
- # In auto mode, check environment variable for override.
- if version == 'auto':
- version = os.environ.get('GYP_MSVS_VERSION', 'auto')
- version_map = {
- 'auto': ('10.0', '9.0', '8.0', '11.0'),
- '2005': ('8.0',),
- '2005e': ('8.0',),
- '2008': ('9.0',),
- '2008e': ('9.0',),
- '2010': ('10.0',),
- '2010e': ('10.0',),
- '2012': ('11.0',),
- '2012e': ('11.0',),
- '2013': ('12.0',),
- '2013e': ('12.0',),
- }
- override_path = os.environ.get('GYP_MSVS_OVERRIDE_PATH')
- if override_path:
- msvs_version = os.environ.get('GYP_MSVS_VERSION')
- if not msvs_version or 'e' not in msvs_version:
- raise ValueError('GYP_MSVS_OVERRIDE_PATH requires GYP_MSVS_VERSION to be '
- 'set to an "e" version (e.g. 2010e)')
- return _CreateVersion(msvs_version, override_path, sdk_based=True)
- version = str(version)
- versions = _DetectVisualStudioVersions(version_map[version], 'e' in version)
- if not versions:
- if version == 'auto':
- # Default to 2005 if we couldn't find anything
- return _CreateVersion('2005', None)
- else:
- return _CreateVersion(version, None)
- return versions[0]
-
-def GenerateEnvironmentFiles(toplevel_build_dir, generator_flags, open_out):
- """It's not sufficient to have the absolute path to the compiler, linker,
- etc. on Windows, as those tools rely on .dlls being in the PATH. We also
- need to support both x86 and x64 compilers within the same build (to support
- msvs_target_platform hackery). Different architectures require a different
- compiler binary, and different supporting environment variables (INCLUDE,
- LIB, LIBPATH). So, we extract the environment here, wrap all invocations
- of compiler tools (cl, link, lib, rc, midl, etc.) via win_tool.py which
- sets up the environment, and then we do not prefix the compiler with
- an absolute path, instead preferring something like "cl.exe" in the rule
- which will then run whichever the environment setup has put in the path.
- When the following procedure to generate environment files does not
- meet your requirement (e.g. for custom toolchains), you can pass
- "-G ninja_use_custom_environment_files" to the gyp to suppress file
- generation and use custom environment files prepared by yourself."""
- archs = ('x86', 'x64')
- if generator_flags.get('ninja_use_custom_environment_files', 0):
- cl_paths = {}
- for arch in archs:
- cl_paths[arch] = 'cl.exe'
- return cl_paths
- vs = GetVSVersion(generator_flags)
- cl_paths = {}
- for arch in archs:
- # Extract environment variables for subprocesses.
- args = vs.SetupScript(arch)
- args.extend(('&&', 'set'))
- popen = subprocess.Popen(
- args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- variables, _ = popen.communicate()
- env = _ExtractImportantEnvironment(variables)
- env_block = _FormatAsEnvironmentBlock(env)
- f = open_out(os.path.join(toplevel_build_dir, 'environment.' + arch), 'wb')
- f.write(env_block)
- f.close()
-
- # Find cl.exe location for this architecture.
- args = vs.SetupScript(arch)
- args.extend(('&&',
- 'for', '%i', 'in', '(cl.exe)', 'do', '@echo', 'LOC:%~$PATH:i'))
- popen = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE)
- output, _ = popen.communicate()
- cl_paths[arch] = _ExtractCLPath(output)
- return cl_paths
-
-def OpenOutput(path, mode='w'):
- """Open |path| for writing, creating directories if necessary."""
- try:
- os.makedirs(os.path.dirname(path))
- except OSError:
- pass
- return open(path, mode)
-
-vs_version = None
-def GetVSVersion(generator_flags):
- global vs_version
- if not vs_version:
- vs_version = SelectVisualStudioVersion(
- generator_flags.get('msvs_version', 'auto'))
- return vs_version
-
-def _ExtractImportantEnvironment(output_of_set):
- """Extracts environment variables required for the toolchain to run from
- a textual dump output by the cmd.exe 'set' command."""
- envvars_to_save = (
- 'goma_.*', # TODO(scottmg): This is ugly, but needed for goma.
- 'include',
- 'lib',
- 'libpath',
- 'path',
- 'pathext',
- 'systemroot',
- 'temp',
- 'tmp',
- )
- env = {}
- for line in output_of_set.splitlines():
- for envvar in envvars_to_save:
- if re.match(envvar + '=', line.lower()):
- var, setting = line.split('=', 1)
- if envvar == 'path':
- # Our own rules (for running gyp-win-tool) and other actions in
- # Chromium rely on python being in the path. Add the path to this
- # python here so that if it's not in the path when ninja is run
- # later, python will still be found.
- setting = os.path.dirname(sys.executable) + os.pathsep + setting
- env[var.upper()] = setting
- break
- for required in ('SYSTEMROOT', 'TEMP', 'TMP'):
- if required not in env:
- raise Exception('Environment variable "%s" '
- 'required to be set to valid path' % required)
- return env
-
-def _FormatAsEnvironmentBlock(envvar_dict):
- """Format as an 'environment block' directly suitable for CreateProcess.
- Briefly this is a list of key=value\0, terminated by an additional \0. See
- CreateProcess documentation for more details."""
- block = ''
- nul = '\0'
- for key, value in envvar_dict.iteritems():
- block += key + '=' + value + nul
- block += nul
- return block
-
-
-def GenerateEnvironmentFiles(toplevel_build_dir, generator_flags):
- """It's not sufficient to have the absolute path to the compiler, linker,
- etc. on Windows, as those tools rely on .dlls being in the PATH. We also
- need to support both x86 and x64 compilers within the same build (to support
- msvs_target_platform hackery). Different architectures require a different
- compiler binary, and different supporting environment variables (INCLUDE,
- LIB, LIBPATH). So, we extract the environment here, wrap all invocations
- of compiler tools (cl, link, lib, rc, midl, etc.) via win_tool.py which
- sets up the environment, and then we do not prefix the compiler with
- an absolute path, instead preferring something like "cl.exe" in the rule
- which will then run whichever the environment setup has put in the path.
- When the following procedure to generate environment files does not
- meet your requirement (e.g. for custom toolchains), you can pass
- "-G ninja_use_custom_environment_files" to the gyp to suppress file
- generation and use custom environment files prepared by yourself."""
- archs = ('x86', 'x64')
- if generator_flags.get('ninja_use_custom_environment_files', 0):
- cl_paths = {}
- for arch in archs:
- cl_paths[arch] = 'cl.exe'
- return cl_paths
- vs = GetVSVersion(generator_flags)
- cl_paths = {}
- for arch in archs:
- # Extract environment variables for subprocesses.
- args = vs.SetupScript(arch)
- args.extend(('&&', 'set'))
- popen = subprocess.Popen(
- args, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
- variables, _ = popen.communicate()
- env = _ExtractImportantEnvironment(variables)
- env_block = _FormatAsEnvironmentBlock(env)
- f = OpenOutput(os.path.join(toplevel_build_dir, 'environment.' + arch), 'wb')
- f.write(env_block)
- f.close()
-
- # Find cl.exe location for this architecture.
- args = vs.SetupScript(arch)
- args.extend(('&&',
- 'for', '%i', 'in', '(cl.exe)', 'do', '@echo', 'LOC:%~$PATH:i'))
- popen = subprocess.Popen(args, shell=True, stdout=subprocess.PIPE)
- output, _ = popen.communicate()
- cl_paths[arch] = _ExtractCLPath(output)
- return cl_paths
-
-def _ExtractCLPath(output_of_where):
- """Gets the path to cl.exe based on the output of calling the environment
- setup batch file, followed by the equivalent of `where`."""
- # Take the first line, as that's the first found in the PATH.
- for line in output_of_where.strip().splitlines():
- if line.startswith('LOC:'):
- return line[len('LOC:'):].strip()
-
-#print SelectVisualStudioVersion().DefaultToolset()
-#GenerateEnvironmentFiles("D:\\src\\src1\\src\\out\\gn\\eraseme", {})
-#print '"', GetVSVersion({}).Path(), '"'
-print '"', GetVSVersion({}).sdk_based, '"'
-
-#-------------------------------------------------------------------------------
-
-version_info = {
- '2010': {
- 'includes': [
- 'VC\\atlmfc\\include',
- ],
- },
-}
diff --git a/chromium/build/config/win/visual_studio_version.gni b/chromium/build/config/win/visual_studio_version.gni
new file mode 100644
index 00000000000..c73f98af511
--- /dev/null
+++ b/chromium/build/config/win/visual_studio_version.gni
@@ -0,0 +1,40 @@
+# 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.
+
+declare_args() {
+ # Path to Visual Studio. If empty, the default is used which is to use the
+ # automatic toolchain in depot_tools. If set, you must also set the
+ # visual_studio_version and wdk_path.
+ visual_studio_path = ""
+
+ # Version of Visual Studio pointed to by the visual_studio_path.
+ # Use "2013" for Visual Studio 2013, or "2013e" for the Express version.
+ visual_studio_version = ""
+
+ # Directory of the Windows driver kit. If visual_studio_path is empty, this
+ # will be auto-filled.
+ wdk_path = ""
+
+ # Full path to the Windows SDK, not including a backslash at the end.
+ # This value is the default location, override if you have a different
+ # installation location.
+ windows_sdk_path = "C:\Program Files (x86)\Windows Kits\8.0"
+}
+
+if (visual_studio_path == "") {
+ toolchain_data =
+ exec_script("../../vs_toolchain.py", [ "get_toolchain_dir" ], "scope")
+ visual_studio_path = toolchain_data.vs_path
+ windows_sdk_path = toolchain_data.sdk_path
+ visual_studio_version = toolchain_data.vs_version
+ wdk_path = toolchain_data.wdk_dir
+} else {
+ assert(visual_studio_version != "",
+ "You must set the visual_studio_version if you set the path")
+ assert(wdk_path != "",
+ "You must set the wdk_path if you set the visual studio path")
+}
+
+# Set when using the "Express" version of a Visual Studio version we support.
+is_visual_studio_express = (visual_studio_version == "2013e")
diff --git a/chromium/build/copy_test_data_ios.gypi b/chromium/build/copy_test_data_ios.gypi
index 56a222f9f84..576a0f26ecb 100644
--- a/chromium/build/copy_test_data_ios.gypi
+++ b/chromium/build/copy_test_data_ios.gypi
@@ -34,7 +34,12 @@
{
'inputs': [
- '<!@pymod_do_main(copy_test_data_ios --inputs <(test_data_files))',
+ # The |-o <(test_data_prefix)| is ignored; it is there to work around a
+ # caching bug in gyp (https://code.google.com/p/gyp/issues/detail?id=112).
+ # It caches command output when the string is the same, so if two copy
+ # steps have the same relative paths, there can be bogus cache hits that
+ # cause compile failures unless something varies.
+ '<!@pymod_do_main(copy_test_data_ios -o <(test_data_prefix) --inputs <(test_data_files))',
],
'outputs': [
'<!@pymod_do_main(copy_test_data_ios -o <(PRODUCT_DIR)/<(_target_name).app/<(test_data_prefix) --outputs <(test_data_files))',
diff --git a/chromium/build/detect_host_arch.py b/chromium/build/detect_host_arch.py
new file mode 100755
index 00000000000..638dd688409
--- /dev/null
+++ b/chromium/build/detect_host_arch.py
@@ -0,0 +1,40 @@
+#!/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.
+
+"""Outputs host CPU architecture in format recognized by gyp."""
+
+import platform
+import re
+import sys
+
+
+def main():
+ print DoMain([])
+ return 0
+
+def DoMain(_):
+ """Hook to be called from gyp without starting a separate python
+ interpreter."""
+ host_arch = platform.machine()
+
+ # Convert machine type to format recognized by gyp.
+ if re.match(r'i.86', host_arch) or host_arch == 'i86pc':
+ host_arch = 'ia32'
+ elif host_arch in ['x86_64', 'amd64']:
+ host_arch = 'x64'
+ elif host_arch.startswith('arm'):
+ host_arch = 'arm'
+
+ # platform.machine is based on running kernel. It's possible to use 64-bit
+ # kernel with 32-bit userland, e.g. to give linker slightly more memory.
+ # Distinguish between different userland bitness by querying
+ # the python binary.
+ if host_arch == 'x64' and platform.architecture()[0] == '32bit':
+ host_arch = 'ia32'
+
+ return host_arch
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/chromium/build/dir_exists.py b/chromium/build/dir_exists.py
index 0a89bc87bbf..70d367ec269 100755
--- a/chromium/build/dir_exists.py
+++ b/chromium/build/dir_exists.py
@@ -8,8 +8,16 @@ import os.path
import sys
def main():
- sys.stdout.write(str(os.path.isdir(sys.argv[1])))
+ sys.stdout.write(_is_dir(sys.argv[1]))
return 0
+def _is_dir(dir_name):
+ return str(os.path.isdir(dir_name))
+
+def DoMain(args):
+ """Hook to be called from gyp without starting a separate python
+ interpreter."""
+ return _is_dir(args[0])
+
if __name__ == '__main__':
sys.exit(main())
diff --git a/chromium/build/download_nacl_toolchains.py b/chromium/build/download_nacl_toolchains.py
index 3a4cb1b8bfa..3d6c64fc33f 100755
--- a/chromium/build/download_nacl_toolchains.py
+++ b/chromium/build/download_nacl_toolchains.py
@@ -6,6 +6,7 @@
"""Shim to run nacl toolchain download script only if there is a nacl dir."""
import os
+import shutil
import sys
@@ -17,16 +18,16 @@ def Main(args):
src_dir = os.path.dirname(script_dir)
nacl_dir = os.path.join(src_dir, 'native_client')
nacl_build_dir = os.path.join(nacl_dir, 'build')
- download_script = os.path.join(nacl_build_dir, 'download_toolchains.py')
- if not os.path.exists(download_script):
- print "Can't find '%s'" % download_script
+ package_version_dir = os.path.join(nacl_build_dir, 'package_version')
+ package_version = os.path.join(package_version_dir, 'package_version.py')
+ if not os.path.exists(package_version):
+ print "Can't find '%s'" % package_version
print 'Presumably you are intentionally building without NativeClient.'
print 'Skipping NativeClient toolchain download.'
sys.exit(0)
- sys.path.insert(0, nacl_build_dir)
- import download_toolchains
+ sys.path.insert(0, package_version_dir)
+ import package_version
- # TODO (robertm): Finish getting PNaCl ready for prime time.
# BUG:
# We remove this --optional-pnacl argument, and instead replace it with
# --no-pnacl for most cases. However, if the bot name is an sdk
@@ -41,21 +42,27 @@ def Main(args):
if use_pnacl:
print '\n*** DOWNLOADING PNACL TOOLCHAIN ***\n'
else:
- args.append('--no-pnacl')
+ args.extend(['--exclude', 'pnacl_newlib'])
# Only download the ARM gcc toolchain if we are building for ARM
# TODO(olonho): we need to invent more reliable way to get build
# configuration info, to know if we're building for ARM.
- if 'target_arch=arm' in os.environ.get('GYP_DEFINES', ''):
- args.append('--arm-untrusted')
+ if 'target_arch=arm' not in os.environ.get('GYP_DEFINES', ''):
+ args.extend(['--exclude', 'nacl_arm_newlib'])
- # Append the name of the file to use as a version and hash source.
- # NOTE: While not recommended, it is possible to redirect this file to
- # a chrome location to avoid branching NaCl if just a toolchain needs
- # to be bumped.
- args.append(os.path.join(nacl_dir, 'TOOL_REVISIONS'))
+ args.append('sync')
+ package_version.main(args)
+
+ # Because we are no longer extracting the toolchain, it is best to delete
+ # the old extracted ones so that no stale toolchains are left behind. This
+ # also would catch any stale code that happens to work because it is using
+ # an old extracted toolchain that was left behind.
+ toolchain_dir = os.path.join(nacl_dir, 'toolchain')
+ for toolchain_item in os.listdir(toolchain_dir):
+ toolchain_path = os.path.join(toolchain_dir, toolchain_item)
+ if os.path.isdir(toolchain_path) and not toolchain_item.startswith('.'):
+ shutil.rmtree(toolchain_path)
- download_toolchains.main(args)
return 0
diff --git a/chromium/build/filename_rules.gypi b/chromium/build/filename_rules.gypi
index 9bb76c50da3..e22569949c3 100644
--- a/chromium/build/filename_rules.gypi
+++ b/chromium/build/filename_rules.gypi
@@ -35,7 +35,7 @@
['exclude', '(^|/)linux/'],
],
}],
- ['OS!="android" or _toolset=="host"', {
+ ['OS!="android" or _toolset=="host" or >(nacl_untrusted_build)==1', {
'sources/': [
['exclude', '_android(_unittest)?\\.cc$'],
['exclude', '(^|/)android/'],
@@ -71,15 +71,8 @@
['exclude', '(^|/)x/'],
],
}],
- ['<(toolkit_uses_gtk)!=1 or >(nacl_untrusted_build)==1', {
- 'sources/': [
- ['exclude', '_gtk(_browsertest|_unittest)?\\.(h|cc)$'],
- ['exclude', '(^|/)gtk/'],
- ['exclude', '(^|/)gtk_[^/]*\\.(h|cc)$'],
- ],
- }],
['<(toolkit_views)==0 or >(nacl_untrusted_build)==1', {
- 'sources/': [ ['exclude', '_views\\.(h|cc)$'] ]
+ 'sources/': [ ['exclude', '_views(_browsertest|_unittest)?\\.(h|cc)$'] ]
}],
['<(use_aura)==0 or >(nacl_untrusted_build)==1', {
'sources/': [ ['exclude', '_aura(_browsertest|_unittest)?\\.(h|cc)$'],
diff --git a/chromium/build/find_isolated_tests.py b/chromium/build/find_isolated_tests.py
new file mode 100755
index 00000000000..c5b3ab77a90
--- /dev/null
+++ b/chromium/build/find_isolated_tests.py
@@ -0,0 +1,78 @@
+#!/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.
+
+"""Scans build output directory for .isolated files, calculates their SHA1
+hashes, stores final list in JSON document and then removes *.isolated files
+found (to ensure no stale *.isolated stay around on the next build).
+
+Used to figure out what tests were build in isolated mode to trigger these
+tests to run on swarming.
+
+For more info see:
+https://sites.google.com/a/chromium.org/dev/developers/testing/isolated-testing
+"""
+
+import glob
+import hashlib
+import json
+import optparse
+import os
+import re
+import sys
+
+
+def hash_file(filepath):
+ """Calculates the hash of a file without reading it all in memory at once."""
+ digest = hashlib.sha1()
+ with open(filepath, 'rb') as f:
+ while True:
+ chunk = f.read(1024*1024)
+ if not chunk:
+ break
+ digest.update(chunk)
+ return digest.hexdigest()
+
+
+def main():
+ parser = optparse.OptionParser(
+ usage='%prog --build-dir <path> --output-json <path>',
+ description=sys.modules[__name__].__doc__)
+ parser.add_option(
+ '--build-dir',
+ help='Path to a directory to search for *.isolated files.')
+ parser.add_option(
+ '--output-json',
+ help='File to dump JSON results into.')
+
+ options, _ = parser.parse_args()
+ if not options.build_dir:
+ parser.error('--build-dir option is required')
+ if not options.output_json:
+ parser.error('--output-json option is required')
+
+ result = {}
+
+ # Get the file hash values and output the pair.
+ pattern = os.path.join(options.build_dir, '*.isolated')
+ for filepath in sorted(glob.glob(pattern)):
+ test_name = os.path.splitext(os.path.basename(filepath))[0]
+ if re.match(r'^.+?\.\d$', test_name):
+ # It's a split .isolated file, e.g. foo.0.isolated. Ignore these.
+ continue
+
+ # TODO(csharp): Remove deletion once the isolate tracked dependencies are
+ # inputs for the isolated files.
+ sha1_hash = hash_file(filepath)
+ os.remove(filepath)
+ result[test_name] = sha1_hash
+
+ with open(options.output_json, 'wb') as f:
+ json.dump(result, f)
+
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/chromium/build/gdb-add-index b/chromium/build/gdb-add-index
index 0d66d8dac83..687e9f5d501 100755
--- a/chromium/build/gdb-add-index
+++ b/chromium/build/gdb-add-index
@@ -36,11 +36,20 @@ function on_exit {
function index_one_file {
local file=$1
local basename=$(basename "$file")
+ local should_index="${SHOULD_INDEX}"
local readelf_out=$(readelf -S "$file")
if [[ $readelf_out =~ "gdb_index" ]]; then
- echo "Skipped $basename -- already contains index."
- else
+ if [ "${REMOVE_INDEX}" = 1 ]; then
+ objcopy --remove-section .gdb_index "$file"
+ echo "Removed index from $basename."
+ else
+ echo "Skipped $basename -- already contains index."
+ should_index=0
+ fi
+ fi
+
+ if [ "${should_index}" = 1 ]; then
local start=$(date +"%s%N")
echo "Adding index to $basename..."
@@ -83,8 +92,29 @@ function index_next {
########
### Main body of the script.
+REMOVE_INDEX=0
+SHOULD_INDEX=1
+while getopts ":f:r" opt; do
+ case $opt in
+ f)
+ REMOVE_INDEX=1
+ shift
+ ;;
+ r)
+ REMOVE_INDEX=1
+ SHOULD_INDEX=0
+ shift
+ ;;
+ *)
+ echo "Invalid option: -$OPTARG" >&2
+ ;;
+ esac
+done
+
if [[ ! $# == 1 ]]; then
- echo "Usage: $0 path-to-binary"
+ echo "Usage: $0 [-f] [-r] path-to-binary"
+ echo " -f forces replacement of an existing index."
+ echo " -r removes the index section."
exit 1
fi
diff --git a/chromium/build/get_landmines.py b/chromium/build/get_landmines.py
index 113b37ce380..8cfd795625b 100755
--- a/chromium/build/get_landmines.py
+++ b/chromium/build/get_landmines.py
@@ -14,7 +14,7 @@ import sys
import landmine_utils
-builder = landmine_utils.platform
+builder = landmine_utils.builder
distributor = landmine_utils.distributor
gyp_defines = landmine_utils.gyp_defines
gyp_msvs_version = landmine_utils.gyp_msvs_version
@@ -30,7 +30,7 @@ def print_landmines(target):
builder() == 'ninja'):
print 'Need to clobber winja goma due to backend cwd cache fix.'
if platform() == 'android':
- print 'Clobber: Resources removed in r195014 require clobber.'
+ print 'Clobber: build_size.jar needs to be deleted (issue 258633003)'
if platform() == 'win' and builder() == 'ninja':
print 'Compile on cc_unittests fails due to symbols removed in r185063.'
if platform() == 'linux' and builder() == 'ninja':
@@ -45,7 +45,15 @@ def print_landmines(target):
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 "Switched win from VS2010 to VS2013."
+ print "Update to VS2013 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'
def main():
diff --git a/chromium/build/get_syzygy_binaries.py b/chromium/build/get_syzygy_binaries.py
new file mode 100755
index 00000000000..05e8072d3df
--- /dev/null
+++ b/chromium/build/get_syzygy_binaries.py
@@ -0,0 +1,410 @@
+#!/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.
+
+"""A utility script for downloading versioned Syzygy binaries."""
+
+import cStringIO
+import hashlib
+import errno
+import json
+import logging
+import optparse
+import os
+import re
+import shutil
+import stat
+import sys
+import subprocess
+import urllib2
+import zipfile
+
+
+_LOGGER = logging.getLogger(os.path.basename(__file__))
+
+# The URL where official builds are archived.
+_SYZYGY_ARCHIVE_URL = ('http://syzygy-archive.commondatastorage.googleapis.com/'
+ 'builds/official/%(revision)s')
+
+# A JSON file containing the state of the download directory. If this file and
+# directory state do not agree, then the binaries will be downloaded and
+# installed again.
+_STATE = '.state'
+
+# This matches an integer (an SVN revision number) or a SHA1 value (a GIT hash).
+# The archive exclusively uses lowercase GIT hashes.
+_REVISION_RE = re.compile('^(?:\d+|[a-f0-9]{40})$')
+
+# This matches an MD5 hash.
+_MD5_RE = re.compile('^[a-f0-9]{32}$')
+
+# List of reources to be downloaded and installed. These are tuples with the
+# following format:
+# (basename, logging name, relative installation path, extraction filter)
+_RESOURCES = [
+ ('benchmark.zip', 'benchmark', '', None),
+ ('binaries.zip', 'binaries', 'exe', None),
+ ('symbols.zip', 'symbols', 'exe',
+ lambda x: x.filename.endswith('.dll.pdb')),
+ ('include.zip', 'include', 'include', None),
+ ('lib.zip', 'library', 'lib', None)]
+
+
+def _Shell(*cmd, **kw):
+ """Runs |cmd|, returns the results from Popen(cmd).communicate()."""
+ _LOGGER.debug('Executing %s.', cmd)
+ prog = subprocess.Popen(cmd, shell=True, **kw)
+
+ stdout, stderr = prog.communicate()
+ if prog.returncode != 0:
+ raise RuntimeError('Command "%s" returned %d.' % (cmd, prog.returncode))
+ return (stdout, stderr)
+
+
+def _LoadState(output_dir):
+ """Loads the contents of the state file for a given |output_dir|, returning
+ None if it doesn't exist.
+ """
+ path = os.path.join(output_dir, _STATE)
+ if not os.path.exists(path):
+ _LOGGER.debug('No state file found.')
+ return None
+ with open(path, 'rb') as f:
+ _LOGGER.debug('Reading state file: %s', path)
+ try:
+ return json.load(f)
+ except ValueError:
+ _LOGGER.debug('Invalid state file.')
+ return None
+
+
+def _SaveState(output_dir, state, dry_run=False):
+ """Saves the |state| dictionary to the given |output_dir| as a JSON file."""
+ path = os.path.join(output_dir, _STATE)
+ _LOGGER.debug('Writing state file: %s', path)
+ if dry_run:
+ return
+ with open(path, 'wb') as f:
+ f.write(json.dumps(state, sort_keys=True, indent=2))
+
+
+def _Md5(path):
+ """Returns the MD5 hash of the file at |path|, which must exist."""
+ return hashlib.md5(open(path, 'rb').read()).hexdigest()
+
+
+def _StateIsValid(state):
+ """Returns true if the given state structure is valid."""
+ if not isinstance(state, dict):
+ _LOGGER.debug('State must be a dict.')
+ return False
+ r = state.get('revision', None)
+ if not isinstance(r, basestring) or not _REVISION_RE.match(r):
+ _LOGGER.debug('State contains an invalid revision.')
+ return False
+ c = state.get('contents', None)
+ if not isinstance(c, dict):
+ _LOGGER.debug('State must contain a contents dict.')
+ return False
+ for (relpath, md5) in c.iteritems():
+ if not isinstance(relpath, basestring) or len(relpath) == 0:
+ _LOGGER.debug('State contents dict contains an invalid path.')
+ return False
+ if not isinstance(md5, basestring) or not _MD5_RE.match(md5):
+ _LOGGER.debug('State contents dict contains an invalid MD5 digest.')
+ return False
+ return True
+
+
+def _BuildActualState(stored, revision, output_dir):
+ """Builds the actual state using the provided |stored| state as a template.
+ Only examines files listed in the stored state, causing the script to ignore
+ files that have been added to the directories locally. |stored| must be a
+ valid state dictionary.
+ """
+ contents = {}
+ state = { 'revision': revision, 'contents': contents }
+ for relpath, md5 in stored['contents'].iteritems():
+ abspath = os.path.abspath(os.path.join(output_dir, relpath))
+ if os.path.isfile(abspath):
+ m = _Md5(abspath)
+ contents[relpath] = m
+
+ return state
+
+
+def _StatesAreConsistent(stored, actual):
+ """Validates whether two state dictionaries are consistent. Both must be valid
+ state dictionaries. Additional entries in |actual| are ignored.
+ """
+ if stored['revision'] != actual['revision']:
+ _LOGGER.debug('Mismatched revision number.')
+ return False
+ cont_stored = stored['contents']
+ cont_actual = actual['contents']
+ for relpath, md5 in cont_stored.iteritems():
+ if relpath not in cont_actual:
+ _LOGGER.debug('Missing content: %s', relpath)
+ return False
+ if md5 != cont_actual[relpath]:
+ _LOGGER.debug('Modified content: %s', relpath)
+ return False
+ return True
+
+
+def _GetCurrentState(revision, output_dir):
+ """Loads the current state and checks to see if it is consistent. Returns
+ a tuple (state, bool). The returned state will always be valid, even if an
+ invalid state is present on disk.
+ """
+ stored = _LoadState(output_dir)
+ if not _StateIsValid(stored):
+ _LOGGER.debug('State is invalid.')
+ # Return a valid but empty state.
+ return ({'revision': '0', 'contents': {}}, False)
+ actual = _BuildActualState(stored, revision, output_dir)
+ # If the script has been modified consider the state invalid.
+ path = os.path.join(output_dir, _STATE)
+ if os.path.getmtime(__file__) > os.path.getmtime(path):
+ return (stored, False)
+ # Otherwise, explicitly validate the state.
+ if not _StatesAreConsistent(stored, actual):
+ return (stored, False)
+ return (stored, True)
+
+
+def _DirIsEmpty(path):
+ """Returns true if the given directory is empty, false otherwise."""
+ for root, dirs, files in os.walk(path):
+ return not dirs and not files
+
+
+def _RmTreeHandleReadOnly(func, path, exc):
+ """An error handling function for use with shutil.rmtree. This will
+ detect failures to remove read-only files, and will change their properties
+ prior to removing them. This is necessary on Windows as os.remove will return
+ an access error for read-only files, and git repos contain read-only
+ pack/index files.
+ """
+ excvalue = exc[1]
+ if func in (os.rmdir, os.remove) and excvalue.errno == errno.EACCES:
+ _LOGGER.debug('Removing read-only path: %s', path)
+ os.chmod(path, stat.S_IRWXU | stat.S_IRWXG | stat.S_IRWXO)
+ func(path)
+ else:
+ raise
+
+
+def _RmTree(path):
+ """A wrapper of shutil.rmtree that handles read-only files."""
+ shutil.rmtree(path, ignore_errors=False, onerror=_RmTreeHandleReadOnly)
+
+
+def _CleanState(output_dir, state, dry_run=False):
+ """Cleans up files/directories in |output_dir| that are referenced by
+ the given |state|. Raises an error if there are local changes. Returns a
+ dictionary of files that were deleted.
+ """
+ _LOGGER.debug('Deleting files from previous installation.')
+ deleted = {}
+
+ # Generate a list of files to delete, relative to |output_dir|.
+ contents = state['contents']
+ files = sorted(contents.keys())
+
+ # Try to delete the files. Keep track of directories to delete as well.
+ dirs = {}
+ for relpath in files:
+ fullpath = os.path.join(output_dir, relpath)
+ fulldir = os.path.dirname(fullpath)
+ dirs[fulldir] = True
+ if os.path.exists(fullpath):
+ # If somehow the file has become a directory complain about it.
+ if os.path.isdir(fullpath):
+ raise Exception('Directory exists where file expected: %s' % fullpath)
+
+ # Double check that the file doesn't have local changes. If it does
+ # then refuse to delete it.
+ if relpath in contents:
+ stored_md5 = contents[relpath]
+ actual_md5 = _Md5(fullpath)
+ if actual_md5 != stored_md5:
+ raise Exception('File has local changes: %s' % fullpath)
+
+ # The file is unchanged so it can safely be deleted.
+ _LOGGER.debug('Deleting file "%s".', fullpath)
+ deleted[relpath] = True
+ if not dry_run:
+ os.unlink(fullpath)
+
+ # Sort directories from longest name to shortest. This lets us remove empty
+ # directories from the most nested paths first.
+ dirs = sorted(dirs.keys(), key=lambda x: len(x), reverse=True)
+ for p in dirs:
+ if os.path.exists(p) and _DirIsEmpty(p):
+ _LOGGER.debug('Deleting empty directory "%s".', p)
+ if not dry_run:
+ _RmTree(p)
+
+ return deleted
+
+
+def _Download(url):
+ """Downloads the given URL and returns the contents as a string."""
+ response = urllib2.urlopen(url)
+ if response.code != 200:
+ raise RuntimeError('Failed to download "%s".' % url)
+ return response.read()
+
+
+def _InstallBinaries(options, deleted={}):
+ """Installs Syzygy binaries. This assumes that the output directory has
+ already been cleaned, as it will refuse to overwrite existing files."""
+ contents = {}
+ state = { 'revision': options.revision, 'contents': contents }
+ archive_url = _SYZYGY_ARCHIVE_URL % { 'revision': options.revision }
+ for (base, name, subdir, filt) in _RESOURCES:
+ # Create the output directory if it doesn't exist.
+ fulldir = os.path.join(options.output_dir, subdir)
+ if os.path.isfile(fulldir):
+ raise Exception('File exists where a directory needs to be created: %s' %
+ fulldir)
+ if not os.path.exists(fulldir):
+ _LOGGER.debug('Creating directory: %s', fulldir)
+ if not options.dry_run:
+ os.makedirs(fulldir)
+
+ # Download the archive.
+ url = archive_url + '/' + base
+ _LOGGER.debug('Retrieving %s archive at "%s".', name, url)
+ data = _Download(url)
+
+ _LOGGER.debug('Unzipping %s archive.', name)
+ archive = zipfile.ZipFile(cStringIO.StringIO(data))
+ for entry in archive.infolist():
+ if not filt or filt(entry):
+ fullpath = os.path.normpath(os.path.join(fulldir, entry.filename))
+ relpath = os.path.relpath(fullpath, options.output_dir)
+ if os.path.exists(fullpath):
+ # If in a dry-run take into account the fact that the file *would*
+ # have been deleted.
+ if options.dry_run and relpath in deleted:
+ pass
+ else:
+ raise Exception('Path already exists: %s' % fullpath)
+
+ # Extract the file and update the state dictionary.
+ _LOGGER.debug('Extracting "%s".', fullpath)
+ if not options.dry_run:
+ archive.extract(entry.filename, fulldir)
+ md5 = _Md5(fullpath)
+ contents[relpath] = md5
+ if sys.platform == 'cygwin':
+ os.chmod(fullpath, os.stat(fullpath).st_mode | stat.S_IXUSR)
+
+ return state
+
+
+def _ParseCommandLine():
+ """Parses the command-line and returns an options structure."""
+ option_parser = optparse.OptionParser()
+ option_parser.add_option('--dry-run', action='store_true', default=False,
+ help='If true then will simply list actions that would be performed.')
+ option_parser.add_option('--force', action='store_true', default=False,
+ help='Force an installation even if the binaries are up to date.')
+ option_parser.add_option('--output-dir', type='string',
+ help='The path where the binaries will be replaced. Existing binaries '
+ 'will only be overwritten if not up to date.')
+ option_parser.add_option('--overwrite', action='store_true', default=False,
+ help='If specified then the installation will happily delete and rewrite '
+ 'the entire output directory, blasting any local changes.')
+ option_parser.add_option('--revision', type='string',
+ help='The SVN revision or GIT hash associated with the required version.')
+ option_parser.add_option('--revision-file', type='string',
+ help='A text file containing an SVN revision or GIT hash.')
+ option_parser.add_option('--verbose', dest='log_level', action='store_const',
+ default=logging.INFO, const=logging.DEBUG,
+ help='Enables verbose logging.')
+ option_parser.add_option('--quiet', dest='log_level', action='store_const',
+ default=logging.INFO, const=logging.ERROR,
+ help='Disables all output except for errors.')
+ options, args = option_parser.parse_args()
+ if args:
+ option_parser.error('Unexpected arguments: %s' % args)
+ if not options.output_dir:
+ option_parser.error('Must specify --output-dir.')
+ if not options.revision and not options.revision_file:
+ option_parser.error('Must specify one of --revision or --revision-file.')
+ if options.revision and options.revision_file:
+ option_parser.error('Must not specify both --revision and --revision-file.')
+
+ # Configure logging.
+ logging.basicConfig(level=options.log_level)
+
+ # If a revision file has been specified then read it.
+ if options.revision_file:
+ options.revision = open(options.revision_file, 'rb').read().strip()
+ _LOGGER.debug('Parsed revision "%s" from file "%s".',
+ options.revision, options.revision_file)
+
+ # Ensure that the specified SVN revision or GIT hash is valid.
+ if not _REVISION_RE.match(options.revision):
+ option_parser.error('Must specify a valid SVN or GIT revision.')
+
+ # This just makes output prettier to read.
+ options.output_dir = os.path.normpath(options.output_dir)
+
+ return options
+
+
+def main():
+ # We only care about Windows platforms, as the Syzygy binaries aren't used
+ # elsewhere.
+ if sys.platform not in ('win32', 'cygwin'):
+ return
+
+ options = _ParseCommandLine()
+
+ if options.dry_run:
+ _LOGGER.debug('Performing a dry-run.')
+
+ # Load the current installation state, and validate it against the
+ # requested installation.
+ state, is_consistent = _GetCurrentState(options.revision, options.output_dir)
+
+ # Decide whether or not an install is necessary.
+ if options.force:
+ _LOGGER.debug('Forcing reinstall of binaries.')
+ elif is_consistent:
+ # Avoid doing any work if the contents of the directory are consistent.
+ _LOGGER.debug('State unchanged, no reinstall necessary.')
+ return
+
+ # Under normal logging this is the only only message that will be reported.
+ _LOGGER.info('Installing revision %s Syzygy binaries.',
+ options.revision[0:12])
+
+ # Clean up the old state to begin with.
+ deleted = []
+ if options.overwrite:
+ if os.path.exists(options.output_dir):
+ # If overwrite was specified then take a heavy-handed approach.
+ _LOGGER.debug('Deleting entire installation directory.')
+ if not options.dry_run:
+ _RmTree(options.output_dir)
+ else:
+ # Otherwise only delete things that the previous installation put in place,
+ # and take care to preserve any local changes.
+ deleted = _CleanState(options.output_dir, state, options.dry_run)
+
+ # Install the new binaries. In a dry-run this will actually download the
+ # archives, but it won't write anything to disk.
+ state = _InstallBinaries(options, deleted)
+
+ # Build and save the state for the directory.
+ _SaveState(options.output_dir, state, options.dry_run)
+
+
+if __name__ == '__main__':
+ main()
diff --git a/chromium/build/git-hooks/pre-commit b/chromium/build/git-hooks/pre-commit
index 3391a777e76..41b596344c4 100755
--- a/chromium/build/git-hooks/pre-commit
+++ b/chromium/build/git-hooks/pre-commit
@@ -1,6 +1,28 @@
#!/bin/sh
-submods=$(git diff-index --cached --ignore-submodules=dirty HEAD | grep -e '^:160000' -e '^:...... 160000' | xargs)
+submodule_diff() {
+ if test -n "$2"; then
+ git diff-tree -r --ignore-submodules=dirty "$1" "$2" | grep -e '^:160000' -e '^:...... 160000' | xargs
+ else
+ git diff-index --cached --ignore-submodules=dirty "$1" | grep -e '^:160000' -e '^:...... 160000' | xargs
+ fi
+}
+
+if git rev-parse --verify --quiet --no-revs MERGE_HEAD; then
+ merge_base=$(git merge-base HEAD MERGE_HEAD)
+ if test -z "$(submodule_diff $merge_base HEAD)"; then
+ # Most up-to-date submodules are in MERGE_HEAD.
+ head_ref=MERGE_HEAD
+ else
+ # Most up-to-date submodules are in HEAD.
+ head_ref=HEAD
+ fi
+else
+ # No merge in progress. Submodules must match HEAD.
+ head_ref=HEAD
+fi
+
+submods=$(submodule_diff $head_ref)
if test "$submods"; then
echo "You are trying to commit changes to the following submodules:" 1>&2
echo 1>&2
@@ -23,7 +45,11 @@ EOF
exit 1
fi
-if test "$(git diff-index --cached HEAD .gitmodules)"; then
+gitmodules_diff() {
+ git diff-index --cached "$1" .gitmodules
+}
+
+if [ "$(git ls-files .gitmodules)" ] && [ "$(gitmodules_diff $head_ref)" ]; then
cat <<EOF 1>&2
You are trying to commit a change to .gitmodules. That is not allowed.
To make changes to submodule names/paths, edit DEPS.
diff --git a/chromium/build/gn_helpers.py b/chromium/build/gn_helpers.py
new file mode 100644
index 00000000000..3b0647d9a5b
--- /dev/null
+++ b/chromium/build/gn_helpers.py
@@ -0,0 +1,39 @@
+# 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.
+
+"""Helper functions useful when writing scripts that are run from GN's
+exec_script function."""
+
+class GNException(Exception):
+ pass
+
+
+def ToGNString(value, allow_dicts = True):
+ """Prints the given value to stdout.
+
+ allow_dicts indicates if this function will allow converting dictionaries
+ to GN scopes. This is only possible at the top level, you can't nest a
+ GN scope in a list, so this should be set to False for recursive calls."""
+ if isinstance(value, str):
+ if value.find('\n') >= 0:
+ raise GNException("Trying to print a string with a newline in it.")
+ return '"' + value.replace('"', '\\"') + '"'
+
+ if isinstance(value, list):
+ return '[ %s ]' % ', '.join(ToGNString(v) for v in value)
+
+ if isinstance(value, dict):
+ if not allow_dicts:
+ raise GNException("Attempting to recursively print a dictionary.")
+ result = ""
+ for key in value:
+ if not isinstance(key, str):
+ raise GNException("Dictionary key is not a string.")
+ result += "%s = %s\n" % (key, ToGNString(value[key], False))
+ return result
+
+ if isinstance(value, int):
+ return str(value)
+
+ raise GNException("Unsupported type when printing to GN.")
diff --git a/chromium/build/gn_run_binary.py b/chromium/build/gn_run_binary.py
new file mode 100644
index 00000000000..7d83f6136fd
--- /dev/null
+++ b/chromium/build/gn_run_binary.py
@@ -0,0 +1,22 @@
+# 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.
+
+"""Helper script for GN to run an arbitrary binary. See compiled_action.gni.
+
+Run with:
+ python gn_run_binary.py <binary_name> [args ...]
+"""
+
+import sys
+import subprocess
+
+# This script is designed to run binaries produced by the current build. We
+# always prefix it with "./" to avoid picking up system versions that might
+# also be on the path.
+path = './' + sys.argv[1]
+
+# The rest of the arguements are passed directly to the executable.
+args = [path] + sys.argv[2:]
+
+sys.exit(subprocess.call(args))
diff --git a/chromium/build/grit_action.gypi b/chromium/build/grit_action.gypi
index e8b98b43ddf..ab7a70bef25 100644
--- a/chromium/build/grit_action.gypi
+++ b/chromium/build/grit_action.gypi
@@ -10,7 +10,7 @@
# It would be really nice to do this with a rule instead of actions, but it
# would need to determine inputs and outputs via grit_info on a per-file
-# basis. GYP rules don’t currently support that. They could be extended to
+# basis. GYP rules don't currently support that. They could be extended to
# do this, but then every generator would need to be updated to handle this.
{
@@ -20,6 +20,7 @@
# This makes it possible to add more defines in specific targets,
# instead of build/common.gypi .
'grit_additional_defines%': [],
+ 'grit_rc_header_format%': [],
},
'inputs': [
'<!@pymod_do_main(grit_info <@(grit_defines) <@(grit_additional_defines) '
@@ -35,7 +36,7 @@
'-f', '<(grit_resource_ids)',
'-o', '<(grit_out_dir)',
'<@(grit_defines)',
- '<@(grit_additional_defines)' ],
- 'msvs_cygwin_shell': 0,
+ '<@(grit_additional_defines)',
+ '<@(grit_rc_header_format)'],
'message': 'Generating resources from <(grit_grd_file)',
}
diff --git a/chromium/build/gyp_chromium b/chromium/build/gyp_chromium
index e8aee14af64..48c73892852 100755
--- a/chromium/build/gyp_chromium
+++ b/chromium/build/gyp_chromium
@@ -10,11 +10,12 @@
import glob
import gyp_helper
import os
-import pipes
+import re
import shlex
import subprocess
import string
import sys
+import vs_toolchain
script_dir = os.path.dirname(os.path.realpath(__file__))
chrome_src = os.path.abspath(os.path.join(script_dir, os.pardir))
@@ -26,6 +27,7 @@ import gyp
SRC_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
# Add paths so that pymod_do_main(...) can import files.
+sys.path.insert(1, os.path.join(chrome_src, 'tools'))
sys.path.insert(1, os.path.join(chrome_src, 'tools', 'generate_shim_headers'))
sys.path.insert(1, os.path.join(chrome_src, 'tools', 'grit'))
sys.path.insert(1, os.path.join(chrome_src, 'chrome', 'tools', 'build'))
@@ -63,25 +65,48 @@ def GetSupplementalFiles():
return glob.glob(os.path.join(chrome_src, '*', 'supplement.gypi'))
-def FormatKeyForGN(key):
- """Returns the given GYP key reformatted for GN.
-
- GYP dictionary keys can be almost anything, but in GN they are identifiers
- and must follow the same rules. This reformats such keys to be valid GN
- identifiers."""
- return ''.join([c if c in string.ascii_letters else '_' for c in key])
-
-
-def EscapeStringForGN(s):
- """Converts a string to a GN string literal."""
- # Escape $ characters which have special meaning to GN.
- return '"' + s.replace('$', '\\$').replace('"', '\\"') + '"'
-
+def ProcessGypDefinesItems(items):
+ """Converts a list of strings to a list of key-value pairs."""
+ result = []
+ for item in items:
+ tokens = item.split('=', 1)
+ # Some GYP variables have hyphens, which we don't support.
+ if len(tokens) == 2:
+ result += [(tokens[0], tokens[1])]
+ else:
+ # No value supplied, treat it as a boolean and set it. Note that we
+ # use the string '1' here so we have a consistent definition whether
+ # you do 'foo=1' or 'foo'.
+ result += [(tokens[0], '1')]
+ return result
-def GetGypVarsForGN(supplemental_files):
- """Returns a dictionary of all GYP vars that we will be passing to GN."""
- vars_dict = {}
+def GetGypVars(supplemental_files):
+ """Returns a dictionary of all GYP vars."""
+ # Find the .gyp directory in the user's home directory.
+ home_dot_gyp = os.environ.get('GYP_CONFIG_DIR', None)
+ if home_dot_gyp:
+ home_dot_gyp = os.path.expanduser(home_dot_gyp)
+ if not home_dot_gyp:
+ home_vars = ['HOME']
+ if sys.platform in ('cygwin', 'win32'):
+ home_vars.append('USERPROFILE')
+ for home_var in home_vars:
+ home = os.getenv(home_var)
+ if home != None:
+ home_dot_gyp = os.path.join(home, '.gyp')
+ if not os.path.exists(home_dot_gyp):
+ home_dot_gyp = None
+ else:
+ break
+
+ if home_dot_gyp:
+ include_gypi = os.path.join(home_dot_gyp, "include.gypi")
+ if os.path.exists(include_gypi):
+ supplemental_files += [include_gypi]
+
+ # GYP defines from the supplemental.gypi files.
+ supp_items = []
for supplement in supplemental_files:
with open(supplement, 'r') as f:
try:
@@ -91,49 +116,44 @@ def GetGypVarsForGN(supplemental_files):
raise
variables = file_data.get('variables', [])
for v in variables:
- vars_dict[FormatKeyForGN(v)] = EscapeStringForGN(str(variables[v]))
-
- env_string = os.environ.get('GYP_DEFINES', '')
- items = shlex.split(env_string)
- for item in items:
- tokens = item.split('=', 1)
- # Some GYP variables have hyphens, which we don't support.
- key = FormatKeyForGN(tokens[0])
- if len(tokens) == 2:
- vars_dict[key] = tokens[1]
- else:
- # No value supplied, treat it as a boolean and set it.
- vars_dict[key] = 'true'
-
+ supp_items += [(v, str(variables[v]))]
+
+ # GYP defines from the environment.
+ env_items = ProcessGypDefinesItems(
+ shlex.split(os.environ.get('GYP_DEFINES', '')))
+
+ # GYP defines from the command line. We can't use optparse since we want
+ # to ignore all arguments other than "-D".
+ cmdline_input_items = []
+ for i in range(len(sys.argv))[1:]:
+ if sys.argv[i].startswith('-D'):
+ if sys.argv[i] == '-D' and i + 1 < len(sys.argv):
+ cmdline_input_items += [sys.argv[i + 1]]
+ elif len(sys.argv[i]) > 2:
+ cmdline_input_items += [sys.argv[i][2:]]
+ cmdline_items = ProcessGypDefinesItems(cmdline_input_items)
+
+ vars_dict = dict(supp_items + env_items + cmdline_items)
return vars_dict
-def GetArgsStringForGN(supplemental_files):
- """Returns the args to pass to GN.
- Based on a subset of the GYP variables that have been rewritten a bit."""
-
- vars_dict = GetGypVarsForGN(supplemental_files)
- gn_args = ''
+def GetOutputDirectory():
+ """Returns the output directory that GYP will use."""
+ # GYP generator flags from the command line. We can't use optparse since we
+ # want to ignore all arguments other than "-G".
+ needle = '-Goutput_dir='
+ cmdline_input_items = []
+ for item in sys.argv[1:]:
+ if item.startswith(needle):
+ return item[len(needle):]
- # These tuples of (key, value, gn_arg_string) use the gn_arg_string for
- # gn when the key is set to the given value in the GYP arguments.
- remap_cases = [
- ('branding', 'Chrome', 'is_chrome_branded=true'),
- ('buildtype', 'Official', 'is_official_build=true'),
- ('component', 'shared_library', 'is_component_build=true'),
- ]
- for i in remap_cases:
- if i[0] in vars_dict and vars_dict[i[0]] == i[1]:
- gn_args += ' ' + i[2]
+ env_items = shlex.split(os.environ.get('GYP_GENERATOR_FLAGS', ''))
+ needle = 'output_dir='
+ for item in env_items:
+ if item.startswith(needle):
+ return item[len(needle):]
- # These string arguments get passed directly.
- for v in ['windows_sdk_path']:
- if v in vars_dict:
- gn_args += ' ' + v + '=' + EscapeStringForGN(vars_dict[v])
-
- # Set the GYP flag so BUILD files know they're being invoked in GYP mode.
- gn_args += ' is_gyp=true'
- return gn_args.strip()
+ return "out"
def additional_include_files(supplemental_files, args=[]):
@@ -166,41 +186,14 @@ def additional_include_files(supplemental_files, args=[]):
return result
-def RunGN(supplemental_includes):
- """Runs GN, returning True if it succeeded, printing an error and returning
- false if not."""
-
- # The binaries in platform-specific subdirectories in src/tools/gn/bin.
- gnpath = SRC_DIR + '/tools/gn/bin/'
- if sys.platform in ('cygwin', 'win32'):
- gnpath += 'win/gn.exe'
- elif sys.platform.startswith('linux'):
- # On Linux we have 32-bit and 64-bit versions.
- if subprocess.check_output(["getconf", "LONG_BIT"]).find("64") >= 0:
- gnpath += 'linux/gn'
- else:
- gnpath += 'linux/gn32'
- elif sys.platform == 'darwin':
- gnpath += 'mac/gn'
- else:
- print 'Unknown platform for GN: ', sys.platform
- return False
-
- print 'Generating gyp files from GN...'
-
- # Need to pass both the source root (the bots don't run this command from
- # within the source tree) as well as set the is_gyp value so the BUILD files
- # to know they're being run under GYP.
- args = [gnpath, 'gyp', '-q',
- '--root=' + chrome_src,
- '--args=' + GetArgsStringForGN(supplemental_includes)]
- return subprocess.call(args) == 0
-
-
if __name__ == '__main__':
args = sys.argv[1:]
if int(os.environ.get('GYP_CHROMIUM_NO_ACTION', 0)):
+ # Check for landmines (reasons to clobber the build) in any case.
+ print 'Running build/landmines.py...'
+ subprocess.check_call(
+ [sys.executable, os.path.join(script_dir, 'landmines.py')])
print 'Skipping gyp_chromium due to GYP_CHROMIUM_NO_ACTION env var.'
sys.exit(0)
@@ -213,7 +206,10 @@ if __name__ == '__main__':
# TODO(bradnelson): take this out once this issue is fixed:
# http://code.google.com/p/gyp/issues/detail?id=177
if sys.platform == 'cygwin':
- python_dir = os.path.join(chrome_src, 'third_party', 'python_26')
+ import find_depot_tools
+ depot_tools_path = find_depot_tools.add_depot_tools_to_path()
+ python_dir = sorted(glob.glob(os.path.join(depot_tools_path,
+ 'python2*_bin')))[-1]
env = os.environ.copy()
env['PATH'] = python_dir + os.pathsep + env.get('PATH', '')
p = subprocess.Popen(
@@ -243,14 +239,6 @@ if __name__ == '__main__':
else:
args.append(os.path.join(script_dir, 'all.gyp'))
- supplemental_includes = GetSupplementalFiles()
-
- if not RunGN(supplemental_includes):
- sys.exit(1)
-
- args.extend(
- ['-I' + i for i in additional_include_files(supplemental_includes, args)])
-
# There shouldn't be a circular dependency relationship between .gyp files,
# but in Chromium's .gyp files, on non-Mac platforms, circular relationships
# currently exist. The check for circular dependencies is currently
@@ -263,50 +251,26 @@ if __name__ == '__main__':
if sys.platform not in ('darwin',):
args.append('--no-circular-check')
- # Default to ninja on linux, but only if no generator has explicitly been set.
+ # We explicitly don't support the make gyp generator (crbug.com/348686). Be
+ # nice and fail here, rather than choking in gyp.
+ if re.search(r'(^|,|\s)make($|,|\s)', os.environ.get('GYP_GENERATORS', '')):
+ print 'Error: make gyp generator not supported (check GYP_GENERATORS).'
+ sys.exit(1)
+
+ # 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') and not os.environ.get('GYP_GENERATORS'):
+ 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'
- # If using ninja on windows, and not opting out of the the automatic
- # toolchain, then set up variables for the automatic toolchain. Opt-out is
- # on by default, for now.
- if (sys.platform in ('win32', 'cygwin') and
- os.environ.get('GYP_GENERATORS') == 'ninja' and
- os.environ.get('GYP_MSVS_USE_SYSTEM_TOOLCHAIN', '1') != '1'):
- # For now, call the acquisition script here so that there's only one
- # opt-in step required. This will be moved to a separate DEPS step once
- # it's on by default.
- subprocess.check_call([
- sys.executable,
- os.path.normpath(os.path.join(script_dir, '..', 'tools', 'win',
- 'toolchain',
- 'get_toolchain_if_necessary.py'))])
- toolchain = os.path.normpath(os.path.join(
- script_dir, '..', 'third_party', 'win_toolchain', 'files'))
- os.environ['GYP_MSVS_OVERRIDE_PATH'] = toolchain
- os.environ['GYP_MSVS_VERSION'] = '2013'
- # 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 other values there.
- gyp_defines_dict = gyp.NameValueListToDict(gyp.ShlexEnv('GYP_DEFINES'))
- win8sdk = os.path.join(toolchain, 'win8sdk')
- gyp_defines_dict['windows_sdk_path'] = win8sdk
- os.environ['WINDOWSSDKDIR'] = win8sdk
- os.environ['GYP_DEFINES'] = ' '.join('%s=%s' % (k, pipes.quote(str(v)))
- for k, v in gyp_defines_dict.iteritems())
- # Include the VS runtime in the PATH in case it's not machine-installed.
- runtime_path = ';'.join(
- os.path.normpath(os.path.join(
- script_dir, '..', 'third_party', 'win_toolchain', 'files', s))
- for s in ('sys64', 'sys32'))
- os.environ['PATH'] = runtime_path + os.environ['PATH']
- print('Using automatic toolchain in %s.' % toolchain)
+ vs2013_runtime_dll_dirs = vs_toolchain.SetEnvironmentAndGetRuntimeDllDirs()
# If CHROMIUM_GYP_SYNTAX_CHECK is set to 1, it will invoke gyp with --check
# to enfore syntax checking.
@@ -314,8 +278,52 @@ if __name__ == '__main__':
if syntax_check and int(syntax_check):
args.append('--check')
+ supplemental_includes = GetSupplementalFiles()
+ gyp_vars_dict = GetGypVars(supplemental_includes)
+
+ # TODO(dmikurube): Remove these checks and messages after a while.
+ if ('linux_use_tcmalloc' in gyp_vars_dict or
+ 'android_use_tcmalloc' in gyp_vars_dict):
+ print '*****************************************************************'
+ print '"linux_use_tcmalloc" and "android_use_tcmalloc" are deprecated!'
+ print '-----------------------------------------------------------------'
+ print 'You specify "linux_use_tcmalloc" or "android_use_tcmalloc" in'
+ print 'your GYP_DEFINES. Please switch them into "use_allocator" now.'
+ print 'See http://crbug.com/345554 for the details.'
+ print '*****************************************************************'
+
+ # Automatically turn on crosscompile support for platforms that need it.
+ # (The Chrome OS build sets CC_host / CC_target which implicitly enables
+ # this mode.)
+ if all(('ninja' in os.environ.get('GYP_GENERATORS', ''),
+ gyp_vars_dict.get('OS') in ['android', 'ios'],
+ 'GYP_CROSSCOMPILE' not in os.environ)):
+ os.environ['GYP_CROSSCOMPILE'] = '1'
+ if gyp_vars_dict.get('OS') == 'android':
+ args.append('--check')
+
+ args.extend(
+ ['-I' + i for i in additional_include_files(supplemental_includes, args)])
+
+ args.extend(['-D', 'gyp_output_dir=' + GetOutputDirectory()])
+
print 'Updating projects from gyp files...'
sys.stdout.flush()
# Off we go...
- sys.exit(gyp.main(args))
+ gyp_rc = gyp.main(args)
+
+ # Check for landmines (reasons to clobber the build). This must be run here,
+ # rather than a separate runhooks step so that any environment modifications
+ # from above are picked up.
+ print 'Running build/landmines.py...'
+ subprocess.check_call(
+ [sys.executable, os.path.join(script_dir, 'landmines.py')])
+
+ if vs2013_runtime_dll_dirs:
+ x64_runtime, x86_runtime = vs2013_runtime_dll_dirs
+ vs_toolchain.CopyVsRuntimeDlls(
+ os.path.join(chrome_src, GetOutputDirectory()),
+ (x86_runtime, x64_runtime))
+
+ sys.exit(gyp_rc)
diff --git a/chromium/build/gyp_helper.py b/chromium/build/gyp_helper.py
index 81242783c41..eadc7a5fb5c 100644
--- a/chromium/build/gyp_helper.py
+++ b/chromium/build/gyp_helper.py
@@ -34,6 +34,7 @@ def apply_gyp_environment_from_file(file_path):
'GYP_CROSSCOMPILE',
'GYP_GENERATOR_OUTPUT',
'GYP_GENERATORS',
+ 'GYP_MSVS_VERSION',
)
for var in supported_vars:
file_val = file_data.get(var)
diff --git a/chromium/build/gypi_to_gn.py b/chromium/build/gypi_to_gn.py
new file mode 100644
index 00000000000..a107f94fcaf
--- /dev/null
+++ b/chromium/build/gypi_to_gn.py
@@ -0,0 +1,167 @@
+# 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.
+
+"""Converts a given gypi file to a python scope and writes the result to stdout.
+
+It is assumed that the file contains a toplevel dictionary, and this script
+will return that dictionary as a GN "scope" (see example below). This script
+does not know anything about GYP and it will not expand variables or execute
+conditions.
+
+It will strip conditions blocks.
+
+A variables block at the top level will be flattened so that the variables
+appear in the root dictionary. This way they can be returned to the GN code.
+
+Say your_file.gypi looked like this:
+ {
+ 'sources': [ 'a.cc', 'b.cc' ],
+ 'defines': [ 'ENABLE_DOOM_MELON' ],
+ }
+
+You would call it like this:
+ gypi_values = exec_script("//build/gypi_to_gn.py",
+ [ rebase_path("your_file.gypi") ],
+ "scope",
+ [ "your_file.gypi" ])
+
+Notes:
+ - The rebase_path call converts the gypi file from being relative to the
+ current build file to being system absolute for calling the script, which
+ will have a different current directory than this file.
+
+ - The "scope" parameter tells GN to interpret the result as a series of GN
+ variable assignments.
+
+ - The last file argument to exec_script tells GN that the given file is a
+ dependency of the build so Ninja can automatically re-run GN if the file
+ changes.
+
+Read the values into a target like this:
+ component("mycomponent") {
+ sources = gypi_values.sources
+ defines = gypi_values.defines
+ }
+
+Sometimes your .gypi file will include paths relative to a different
+directory than the current .gn file. In this case, you can rebase them to
+be relative to the current directory.
+ sources = rebase_path(gypi_values.sources, ".",
+ "//path/gypi/input/values/are/relative/to")
+
+This script will tolerate a 'variables' in the toplevel dictionary or not. If
+the toplevel dictionary just contains one item called 'variables', it will be
+collapsed away and the result will be the contents of that dictinoary. Some
+.gypi files are written with or without this, depending on how they expect to
+be embedded into a .gyp file.
+
+This script also has the ability to replace certain substrings in the input.
+Generally this is used to emulate GYP variable expansion. If you passed the
+argument "--replace=<(foo)=bar" then all instances of "<(foo)" in strings in
+the input will be replaced with "bar":
+
+ gypi_values = exec_script("//build/gypi_to_gn.py",
+ [ rebase_path("your_file.gypi"),
+ "--replace=<(foo)=bar"],
+ "scope",
+ [ "your_file.gypi" ])
+
+"""
+
+import gn_helpers
+from optparse import OptionParser
+import sys
+
+def LoadPythonDictionary(path):
+ file_string = open(path).read()
+ try:
+ file_data = eval(file_string, {'__builtins__': None}, None)
+ except SyntaxError, e:
+ e.filename = path
+ raise
+ except Exception, e:
+ raise Exception("Unexpected error while reading %s: %s" % (path, str(e)))
+
+ assert isinstance(file_data, dict), "%s does not eval to a dictionary" % path
+
+ # Flatten any variables to the top level.
+ if 'variables' in file_data:
+ file_data.update(file_data['variables'])
+ del file_data['variables']
+
+ # Strip any conditions.
+ if 'conditions' in file_data:
+ del file_data['conditions']
+ if 'target_conditions' in file_data:
+ del file_data['target_conditions']
+
+ # Strip targets in the toplevel, since some files define these and we can't
+ # slurp them in.
+ if 'targets' in file_data:
+ del file_data['targets']
+
+ return file_data
+
+
+def ReplaceSubstrings(values, search_for, replace_with):
+ """Recursively replaces substrings in a value.
+
+ Replaces all substrings of the "search_for" with "repace_with" for all
+ strings occurring in "values". This is done by recursively iterating into
+ lists as well as the keys and values of dictionaries."""
+ if isinstance(values, str):
+ return values.replace(search_for, replace_with)
+
+ if isinstance(values, list):
+ return [ReplaceSubstrings(v, search_for, replace_with) for v in values]
+
+ if isinstance(values, dict):
+ # For dictionaries, do the search for both the key and values.
+ result = {}
+ for key, value in values.items():
+ new_key = ReplaceSubstrings(key, search_for, replace_with)
+ new_value = ReplaceSubstrings(value, search_for, replace_with)
+ result[new_key] = new_value
+ return result
+
+ # Assume everything else is unchanged.
+ return values
+
+def main():
+ parser = OptionParser()
+ parser.add_option("-r", "--replace", action="append",
+ help="Replaces substrings. If passed a=b, replaces all substrs a with b.")
+ (options, args) = parser.parse_args()
+
+ if len(args) != 1:
+ raise Exception("Need one argument which is the .gypi file to read.")
+
+ data = LoadPythonDictionary(args[0])
+ if options.replace:
+ # Do replacements for all specified patterns.
+ for replace in options.replace:
+ split = replace.split('=')
+ # Allow "foo=" to replace with nothing.
+ if len(split) == 1:
+ split.append('')
+ assert len(split) == 2, "Replacement must be of the form 'key=value'."
+ data = ReplaceSubstrings(data, split[0], split[1])
+
+ # Sometimes .gypi files use the GYP syntax with percents at the end of the
+ # variable name (to indicate not to overwrite a previously-defined value):
+ # 'foo%': 'bar',
+ # Convert these to regular variables.
+ for key in data:
+ if len(key) > 1 and key[len(key) - 1] == '%':
+ data[key[:-1]] = data[key]
+ del data[key]
+
+ print gn_helpers.ToGNString(data)
+
+if __name__ == '__main__':
+ try:
+ main()
+ except Exception, e:
+ print str(e)
+ sys.exit(1)
diff --git a/chromium/build/install-build-deps-android.sh b/chromium/build/install-build-deps-android.sh
index 73e534a2869..9d8301933e7 100755
--- a/chromium/build/install-build-deps-android.sh
+++ b/chromium/build/install-build-deps-android.sh
@@ -17,11 +17,9 @@ if ! uname -m | egrep -q "i686|x86_64"; then
exit
fi
-if [ "x$(id -u)" != x0 ]; then
- echo "Running as non-root user."
- echo "You might have to enter your password one or more times for 'sudo'."
- echo
-fi
+# Install first the default Linux build deps.
+"$(dirname "${BASH_SOURCE[0]}")/install-build-deps.sh" \
+ --no-syms --no-arm --no-chromeos-fonts --no-nacl --no-prompt
# The temporary directory used to store output of update-java-alternatives
TEMPDIR=$(mktemp -d)
@@ -49,55 +47,35 @@ sudo apt-get -y install checkstyle lighttpd python-pexpect xvfb x11-utils
# Few binaries in the Android SDK require 32-bit libraries on the host.
sudo apt-get -y install lib32z1 g++-multilib
-if [ $(/usr/bin/lsb_release -r -s | cut -d"." -f1) -ge 12 ]; then
- # Ubuntu >= 12.x
- sudo apt-get -y install ant
-
- # Java can not be installed via ppa on Ubuntu 12.04+ so we'll
- # simply check to see if it has been setup properly -- if not
- # let the user know.
-
- if ! java -version 2>&1 | grep -q "Java(TM)"; then
- echo "****************************************************************"
- echo "You need to install the Oracle Java SDK from http://goo.gl/uPRSq"
- echo "and configure it as the default command-line Java environment."
- echo "****************************************************************"
- exit
+sudo apt-get -y install ant
+
+# Install openjdk and openjre 7 stuff
+sudo apt-get -y install openjdk-7-jre openjdk-7-jdk
+
+# Switch version of Java to openjdk 7.
+# Some Java plugins (e.g. for firefox, mozilla) are not required to build, and
+# thus are treated only as warnings. Any errors in updating java alternatives
+# which are not '*-javaplugin.so' will cause errors and stop the script from
+# completing successfully.
+if ! sudo update-java-alternatives -s java-1.7.0-openjdk-amd64 \
+ >& "${TEMPDIR}"/update-java-alternatives.out
+then
+ # Check that there are the expected javaplugin.so errors for the update
+ if grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out >& \
+ /dev/null
+ then
+ # Print as warnings all the javaplugin.so errors
+ echo 'WARNING: java-6-sun has no alternatives for the following plugins:'
+ grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out
fi
-
-else
- # Ubuntu 10.x
-
- sudo apt-get -y install ant1.8
-
- # Install sun-java6 stuff
- sudo apt-get -y install sun-java6-bin sun-java6-jre sun-java6-jdk
-
- # Switch version of Java to java-6-sun
- # Sun's java is missing certain Java plugins (e.g. for firefox, mozilla).
- # These are not required to build, and thus are treated only as warnings.
- # Any errors in updating java alternatives which are not '*-javaplugin.so'
- # will cause errors and stop the script from completing successfully.
- if ! sudo update-java-alternatives -s java-6-sun \
- >& "${TEMPDIR}"/update-java-alternatives.out
+ # Check if there are any errors that are not javaplugin.so
+ if grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out \
+ >& /dev/null
then
- # Check that there are the expected javaplugin.so errors for the update
- if grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out >& \
- /dev/null
- then
- # Print as warnings all the javaplugin.so errors
- echo 'WARNING: java-6-sun has no alternatives for the following plugins:'
- grep 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out
- fi
- # Check if there are any errors that are not javaplugin.so
- if grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out \
- >& /dev/null
- then
- # If there are non-javaplugin.so errors, treat as errors and exit
- echo 'ERRORS: Failed to update alternatives for java-6-sun:'
- grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out
- exit 1
- fi
+ # If there are non-javaplugin.so errors, treat as errors and exit
+ echo 'ERRORS: Failed to update alternatives for java-6-sun:'
+ grep -v 'javaplugin.so' "${TEMPDIR}"/update-java-alternatives.out
+ exit 1
fi
fi
diff --git a/chromium/build/install-build-deps.sh b/chromium/build/install-build-deps.sh
index 48e2c76dcce..5cb25229835 100755
--- a/chromium/build/install-build-deps.sh
+++ b/chromium/build/install-build-deps.sh
@@ -16,6 +16,8 @@ usage() {
echo "--[no-]arm: enable or disable installation of arm cross toolchain"
echo "--[no-]chromeos-fonts: enable or disable installation of Chrome OS"\
"fonts"
+ echo "--[no-]nacl: enable or disable installation of prerequisites for"\
+ "building standalone NaCl and all its toolchains"
echo "--no-prompt: silently select standard options/defaults"
echo "--quick-check: quickly try to determine if dependencies are installed"
echo " (this avoids interactive prompts and sudo commands,"
@@ -31,6 +33,13 @@ package_exists() {
apt-cache pkgnames | grep -x "$1" > /dev/null 2>&1
}
+# These default to on because (some) bots need them and it keeps things
+# simple for the bot setup if all bots just run the script in its default
+# mode. Developers who don't want stuff they don't need installed on their
+# own workstations can pass --no-arm --no-nacl when running the script.
+do_inst_arm=1
+do_inst_nacl=1
+
while test "$1" != ""
do
case "$1" in
@@ -42,6 +51,8 @@ do
--no-arm) do_inst_arm=0;;
--chromeos-fonts) do_inst_chromeos_fonts=1;;
--no-chromeos-fonts) do_inst_chromeos_fonts=0;;
+ --nacl) do_inst_nacl=1;;
+ --no-nacl) do_inst_nacl=0;;
--no-prompt) do_default=1
do_quietly="-qq --assume-yes"
;;
@@ -52,17 +63,17 @@ do
shift
done
-ubuntu_versions="12\.04|12\.10|13\.04"
-ubuntu_codenames="precise|quantal|raring"
-ubuntu_issue="Ubuntu ($ubuntu_versions|$ubuntu_codenames)"
-# GCEL is an Ubuntu-derived VM image used on Google Compute Engine; /etc/issue
-# doesn't contain a version number so just trust that the user knows what
-# they're doing.
-gcel_issue="^GCEL"
+# Check for lsb_release command in $PATH
+if ! which lsb_release > /dev/null; then
+ echo "ERROR: lsb_release not found in \$PATH" >&2
+ exit 1;
+fi
+lsb_release=$(lsb_release --codename --short)
+ubuntu_codenames="(precise|quantal|raring|saucy|trusty)"
if [ 0 -eq "${do_unsupported-0}" ] && [ 0 -eq "${do_quick_check-0}" ] ; then
- if ! egrep -q "($ubuntu_issue|$gcel_issue)" /etc/issue; then
- echo "ERROR: Only Ubuntu 12.04 (precise) through 13.04 (raring) are"\
+ if [[ ! $lsb_release =~ $ubuntu_codenames ]]; then
+ echo "ERROR: Only Ubuntu 12.04 (precise) through 14.04 (trusty) are"\
"currently supported" >&2
exit 1
fi
@@ -83,19 +94,20 @@ fi
chromeos_dev_list="libbluetooth-dev"
# Packages needed for development
-dev_list="apache2.2-bin bison curl elfutils fakeroot flex g++ git-core gperf
- language-pack-da language-pack-fr language-pack-he
- language-pack-zh-hant libapache2-mod-php5 libasound2-dev libbrlapi-dev
- libbz2-dev libcairo2-dev libcap-dev libcups2-dev libcurl4-gnutls-dev
- libdrm-dev libelf-dev libgconf2-dev libgl1-mesa-dev libglib2.0-dev
- libglu1-mesa-dev libgnome-keyring-dev libgtk2.0-dev libkrb5-dev
- libnspr4-dev libnss3-dev libpam0g-dev libpci-dev libpulse-dev
- libsctp-dev libspeechd-dev libsqlite3-dev libssl-dev libudev-dev
- libwww-perl libxslt1-dev libxss-dev libxt-dev libxtst-dev
- mesa-common-dev openbox patch perl php5-cgi pkg-config python
- python-cherrypy3 python-dev python-psutil rpm ruby subversion
- ttf-dejavu-core ttf-indic-fonts ttf-kochi-gothic ttf-kochi-mincho
- ttf-thai-tlwg wdiff xfonts-mathml $chromeos_dev_list"
+dev_list="apache2.2-bin bison curl dpkg-dev elfutils devscripts fakeroot flex
+ fonts-thai-tlwg g++ git-core gperf language-pack-da language-pack-fr
+ language-pack-he language-pack-zh-hant libapache2-mod-php5
+ libasound2-dev libbrlapi-dev libbz2-dev libcairo2-dev libcap-dev
+ libcups2-dev libcurl4-gnutls-dev libdrm-dev libelf-dev libexif-dev
+ libgconf2-dev libgl1-mesa-dev libglib2.0-dev libglu1-mesa-dev
+ libgnome-keyring-dev libgtk2.0-dev libkrb5-dev libnspr4-dev
+ libnss3-dev libpam0g-dev libpci-dev libpulse-dev libsctp-dev
+ libspeechd-dev libsqlite3-dev libssl-dev libudev-dev libwww-perl
+ libxslt1-dev libxss-dev libxt-dev libxtst-dev mesa-common-dev openbox
+ patch perl php5-cgi pkg-config python python-cherrypy3 python-dev
+ python-psutil rpm ruby subversion ttf-dejavu-core ttf-indic-fonts
+ ttf-kochi-gothic ttf-kochi-mincho wdiff xfonts-mathml zip
+ $chromeos_dev_list"
# 64-bit systems need a minimum set of 32-bit compat packages for the pre-built
# NaCl binaries. These are always needed, regardless of whether or not we want
@@ -109,7 +121,7 @@ chromeos_lib_list="libpulse0 libbz2-1.0"
# Full list of required run-time libraries
lib_list="libatk1.0-0 libc6 libasound2 libcairo2 libcap2 libcups2 libexpat1
- libfontconfig1 libfreetype6 libglib2.0-0 libgnome-keyring0
+ libexif12 libfontconfig1 libfreetype6 libglib2.0-0 libgnome-keyring0
libgtk2.0-0 libpam0g libpango1.0-0 libpci3 libpcre3 libpixman-1-0
libpng12-0 libspeechd2 libstdc++6 libsqlite3-0 libx11-6
libxau6 libxcb1 libxcomposite1 libxcursor1 libxdamage1 libxdmcp6
@@ -126,23 +138,31 @@ dbg_list="libatk1.0-dbg libc6-dbg libcairo2-dbg libfontconfig1-dbg
libstdc++6-4.6-dbg"
# arm cross toolchain packages needed to build chrome on armhf
-arm_list="libc6-armhf-cross libc6-dev-armhf-cross libgcc1-armhf-cross
- libgomp1-armhf-cross linux-libc-dev-armhf-cross
- libgcc1-dbg-armhf-cross libgomp1-dbg-armhf-cross
- binutils-arm-linux-gnueabihf cpp-arm-linux-gnueabihf
- gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
- libmudflap0-dbg-armhf-cross"
-
-# Old armel cross toolchain packages
-armel_list="libc6-armel-cross libc6-dev-armel-cross libgcc1-armel-cross
- libgomp1-armel-cross linux-libc-dev-armel-cross
- libgcc1-dbg-armel-cross libgomp1-dbg-armel-cross
- binutils-arm-linux-gnueabi cpp-arm-linux-gnueabi
- gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
- libmudflap0-dbg-armel-cross"
-
-# TODO(sbc): remove armel once the armhf transition is complete
-arm_list="$arm_list $armel_list"
+arm_list="libc6-dev-armhf-cross
+ linux-libc-dev-armhf-cross
+ g++-arm-linux-gnueabihf"
+
+# Packages to build NaCl, its toolchains, and its ports.
+nacl_list="autoconf bison cmake g++-mingw-w64-i686 gawk lib32z1-dev
+ libasound2:i386 libcap2:i386 libelf-dev:i386 libexif12:i386
+ libfontconfig1:i386 libgconf-2-4:i386 libglib2.0-0:i386 libgpm2:i386
+ libgtk2.0-0:i386 libncurses5:i386 libnss3:i386 libpango1.0-0:i386
+ libssl0.9.8:i386 libtinfo-dev libtinfo-dev:i386 libtool
+ libxcomposite1:i386 libxcursor1:i386 libxdamage1:i386 libxi6:i386
+ libxrandr2:i386 libxss1:i386 libxtst6:i386 texinfo xvfb"
+
+# Find the proper version of libgbm-dev. We can't just install libgbm-dev as
+# it depends on mesa, and only one version of mesa can exists on the system.
+# Hence we must match the same version or this entire script will fail.
+mesa_variant=""
+for variant in "-lts-quantal" "-lts-raring" "-lts-saucy"; do
+ if $(dpkg-query -Wf'${Status}' libgl1-mesa-glx${variant} | \
+ grep -q " ok installed"); then
+ mesa_variant="${variant}"
+ fi
+done
+dev_list="${dev_list} libgbm-dev${mesa_variant}"
+nacl_list="${nacl_list} libgl1-mesa-glx${mesa_variant}:i386"
# Some package names have changed over time
if package_exists ttf-mscorefonts-installer; then
@@ -164,8 +184,10 @@ else
fi
if package_exists libudev1; then
dev_list="${dev_list} libudev1"
+ nacl_list="${nacl_list} libudev1:i386"
else
dev_list="${dev_list} libudev0"
+ nacl_list="${nacl_list} libudev0:i386"
fi
if package_exists libbrlapi0.6; then
dev_list="${dev_list} libbrlapi0.6"
@@ -242,25 +264,33 @@ fi
# that are part of v8 need to be compiled with -m32 which means
# that basic multilib support is needed.
if file /sbin/init | grep -q 'ELF 64-bit'; then
- arm_list="$arm_list g++-multilib"
+ if [ "$lsb_release" = "trusty" ]; then
+ # gcc-multilib conflicts with the arm cross compiler in trusty but
+ # g++-4.8-multilib gives us the 32-bit support that we need.
+ arm_list="$arm_list g++-4.8-multilib"
+ else
+ arm_list="$arm_list g++-multilib"
+ fi
fi
if test "$do_inst_arm" = "1" ; then
- . /etc/lsb-release
- if ! [ "${DISTRIB_CODENAME}" = "precise" -o \
- 1 -eq "${do_unsupported-0}" ]; then
- echo "ERROR: Installing the ARM cross toolchain is only available on" \
- "Ubuntu precise." >&2
- exit 1
- fi
echo "Including ARM cross toolchain."
else
echo "Skipping ARM cross toolchain."
arm_list=
fi
-packages="$(echo "${dev_list} ${lib_list} ${dbg_list} ${arm_list}" | \
- tr " " "\n" | sort -u | tr "\n" " ")"
+if test "$do_inst_nacl" = "1"; then
+ echo "Including NaCl, NaCl toolchain, NaCl ports dependencies."
+else
+ echo "Skipping NaCl, NaCl toolchain, NaCl ports dependencies."
+ nacl_list=
+fi
+
+packages="$(
+ echo "${dev_list} ${lib_list} ${dbg_list} ${arm_list} ${nacl_list}" |
+ tr " " "\n" | sort -u | tr "\n" " "
+)"
if [ 1 -eq "${do_quick_check-0}" ] ; then
failed_check="$(dpkg-query -W -f '${PackageSpec}:${Status}\n' \
@@ -362,6 +392,18 @@ else
echo "Skipping installation of Chrome OS fonts."
fi
+if test "$do_inst_nacl" = "1"; then
+ echo "Installing symbolic links for NaCl."
+ if [ ! -r /usr/lib/i386-linux-gnu/libcrypto.so ]; then
+ sudo ln -fs libcrypto.so.0.9.8 /usr/lib/i386-linux-gnu/libcrypto.so
+ fi
+ if [ ! -r /usr/lib/i386-linux-gnu/libssl.so ]; then
+ sudo ln -fs libssl.so.0.9.8 /usr/lib/i386-linux-gnu/libssl.so
+ fi
+else
+ echo "Skipping symbolic links for NaCl."
+fi
+
# Install 32bit backwards compatibility support for 64bit systems
if file /sbin/init | grep -q 'ELF 64-bit'; then
if test "$do_inst_lib32" != "1"
diff --git a/chromium/build/internal/release_impl_official.gypi b/chromium/build/internal/release_impl_official.gypi
index d084ae32cfd..d0729a97e5d 100644
--- a/chromium/build/internal/release_impl_official.gypi
+++ b/chromium/build/internal/release_impl_official.gypi
@@ -31,7 +31,6 @@
# headroom as of Dec 16, 2011.
'/expectedoutputsize:41943040',
],
- 'LinkTimeCodeGeneration': '1',
# The /PROFILE flag causes the linker to add a "FIXUP" debug stream to
# the generated PDB. According to MSDN documentation, this flag is only
# available (or perhaps supported) in the Enterprise (team development)
diff --git a/chromium/build/inverse_depth.py b/chromium/build/inverse_depth.py
new file mode 100755
index 00000000000..ce7a6abb68a
--- /dev/null
+++ b/chromium/build/inverse_depth.py
@@ -0,0 +1,24 @@
+#!/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 os
+import sys
+
+
+def DoMain(argv):
+ depth = argv[0]
+ return os.path.relpath(os.getcwd(), os.path.abspath(depth))
+
+
+def main(argv):
+ if len(argv) < 2:
+ print "USAGE: inverse_depth.py depth"
+ return 1
+ print DoMain(argv[1:])
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main(sys.argv))
diff --git a/chromium/build/ios/PRESUBMIT.py b/chromium/build/ios/PRESUBMIT.py
index 7f3dacd1d74..a0d32f8b9e1 100644
--- a/chromium/build/ios/PRESUBMIT.py
+++ b/chromium/build/ios/PRESUBMIT.py
@@ -16,10 +16,13 @@ def _CheckWhitelistSorted(input_api, output_api):
for path in input_api.LocalPaths():
if WHITELIST_FILE == path:
lines = open(os.path.join('../..', WHITELIST_FILE)).readlines()
- sorted = all(lines[i] <= lines[i + 1] for i in xrange(len(lines) - 1))
- if not sorted:
+ i = 0
+ while i < len(lines) - 1 and lines[i] <= lines[i + 1]:
+ i += 1
+ if i < len(lines) - 1:
return [output_api.PresubmitError(
- 'The file ' + WHITELIST_FILE + ' must be sorted.')]
+ 'The file ' + WHITELIST_FILE + ' must be sorted. ' +
+ 'First offending line: #' + str(i + 2))]
return []
def _CommonChecks(input_api, output_api):
diff --git a/chromium/build/ios/grit_whitelist.txt b/chromium/build/ios/grit_whitelist.txt
index d2f832fe0c5..8c5252c7146 100644
--- a/chromium/build/ios/grit_whitelist.txt
+++ b/chromium/build/ios/grit_whitelist.txt
@@ -23,10 +23,6 @@ IDR_INPUT_ALERT
IDR_NET_ERROR_HTML
IDR_NET_EXPORT_HTML
IDR_NET_EXPORT_JS
-IDR_NET_INTERNALS_HELP_HTML
-IDR_NET_INTERNALS_HELP_JS
-IDR_NET_INTERNALS_INDEX_HTML
-IDR_NET_INTERNALS_INDEX_JS
IDR_OMAHA_HTML
IDR_OMAHA_JS
IDR_OMNIBOX_EXTENSION_APP
@@ -55,17 +51,13 @@ IDR_SYNC_INTERNALS_DATA_JS
IDR_SYNC_INTERNALS_EVENTS_JS
IDR_SYNC_INTERNALS_INDEX_HTML
IDR_SYNC_INTERNALS_INDEX_JS
-IDR_SYNC_INTERNALS_NODE_BROWSER_JS
-IDR_SYNC_INTERNALS_NOTIFICATIONS_JS
IDR_SYNC_INTERNALS_SEARCH_JS
IDR_SYNC_INTERNALS_SYNC_LOG_JS
IDR_SYNC_INTERNALS_SYNC_NODE_BROWSER_JS
IDR_SYNC_INTERNALS_SYNC_SEARCH_JS
-IDR_SYNC_INTERNALS_TRAFFIC_JS
+IDR_SYNC_INTERNALS_TYPES_JS
IDR_THROBBER
IDR_TRANSLATE_JS
-IDR_UPDATE_BADGE4
-IDR_UPDATE_MENU4
IDR_WEBUI_I18N_PROCESS_JS
IDR_WEBUI_I18N_TEMPLATE2_JS
IDR_WEBUI_I18N_TEMPLATE_JS
@@ -94,9 +86,8 @@ IDS_ACCNAME_LOCATION
IDS_ACCNAME_VOICE_SEARCH
IDS_ALLOW_INSECURE_CONTENT_BUTTON
IDS_ALTERNATE_NAV_URL_VIEW_LABEL
-IDS_APP_LAUNCHER_OPEN_IN_APP_QUESTION_MESSAGE_MOBILE
-IDS_APP_LAUNCHER_OPEN_IN_LABEL_MOBILE
-IDS_APP_LAUNCHER_OPEN_ONCE_BUTTON_MOBILE
+IDS_APP_CANCEL
+IDS_APP_OK
IDS_APP_UNTITLED_SHORTCUT_FILE_NAME
IDS_AUTOCOMPLETE_SEARCH_DESCRIPTION
IDS_AUTOFILL_ADDRESS_LINE_SEPARATOR
@@ -125,9 +116,6 @@ IDS_AUTOFILL_FIELD_LABEL_PREFECTURE
IDS_AUTOFILL_FIELD_LABEL_PROVINCE
IDS_AUTOFILL_FIELD_LABEL_STATE
IDS_AUTOFILL_FIELD_LABEL_ZIP_CODE
-IDS_AUTOFILL_FLOW_INFOBAR_ACCEPT
-IDS_AUTOFILL_FLOW_INFOBAR_DENY
-IDS_AUTOFILL_FLOW_INFOBAR_TEXT
IDS_AUTOFILL_OPTIONS_POPUP
IDS_AUTOFILL_WARNING_FORM_DISABLED
IDS_AUTOFILL_WARNING_INSECURE_CONNECTION
@@ -139,8 +127,22 @@ IDS_BLOCK_INSECURE_CONTENT_BUTTON
IDS_BOOKMARK_ADD_EDITOR_TITLE
IDS_BOOKMARK_ALL_TABS_DIALOG_TITLE
IDS_BOOKMARK_BAR_FOLDER_NAME
+IDS_BOOKMARK_BAR_MANAGED_FOLDER_DEFAULT_NAME
+IDS_BOOKMARK_BAR_MANAGED_FOLDER_DOMAIN_NAME
IDS_BOOKMARK_BAR_MOBILE_FOLDER_NAME
IDS_BOOKMARK_BAR_OTHER_FOLDER_NAME
+IDS_BOOKMARK_BAR_REDO
+IDS_BOOKMARK_BAR_REDO_ADD
+IDS_BOOKMARK_BAR_REDO_DELETE
+IDS_BOOKMARK_BAR_REDO_EDIT
+IDS_BOOKMARK_BAR_REDO_MOVE
+IDS_BOOKMARK_BAR_REDO_REORDER
+IDS_BOOKMARK_BAR_UNDO
+IDS_BOOKMARK_BAR_UNDO_ADD
+IDS_BOOKMARK_BAR_UNDO_DELETE
+IDS_BOOKMARK_BAR_UNDO_EDIT
+IDS_BOOKMARK_BAR_UNDO_MOVE
+IDS_BOOKMARK_BAR_UNDO_REORDER
IDS_BOOKMARK_BUBBLE_CHOOSER_ANOTHER_FOLDER
IDS_BOOKMARK_BUBBLE_REMOVE_BOOKMARK
IDS_BOOKMARK_EDITOR_CONFIRM_DELETE
@@ -150,7 +152,6 @@ IDS_BOOKMARK_FOLDER_CHOOSER_TITLE
IDS_BOOKMARK_FOLDER_EDITOR_TITLE
IDS_BOOKMARK_FOLDER_EDITOR_WINDOW_TITLE
IDS_BOOKMARK_FOLDER_EDITOR_WINDOW_TITLE_NEW
-IDS_BOOKMARK_MANAGER_BOOKMARK_ALL_TABS
IDS_BOOKMARK_MANAGER_FOLDER_SECTION
IDS_BOOKMARK_MANAGER_FOLDER_TITLE
IDS_BOOKMARK_MANAGER_NAME_INPUT_PLACE_HOLDER
@@ -180,10 +181,6 @@ IDS_CERT_ERROR_INVALID_CERT_DESCRIPTION
IDS_CERT_ERROR_INVALID_CERT_DETAILS
IDS_CERT_ERROR_INVALID_CERT_EXTRA_INFO_2
IDS_CERT_ERROR_INVALID_CERT_TITLE
-IDS_CERT_ERROR_NOT_IN_DNS_DESCRIPTION
-IDS_CERT_ERROR_NOT_IN_DNS_DETAILS
-IDS_CERT_ERROR_NOT_IN_DNS_EXTRA_INFO
-IDS_CERT_ERROR_NOT_IN_DNS_TITLE
IDS_CERT_ERROR_NOT_YET_VALID_DESCRIPTION
IDS_CERT_ERROR_NOT_YET_VALID_DETAILS
IDS_CERT_ERROR_NOT_YET_VALID_DETAILS_EXTRA_INFO_2
@@ -211,7 +208,6 @@ IDS_CERT_ERROR_WEAK_SIGNATURE_ALGORITHM_EXTRA_INFO_2
IDS_CERT_ERROR_WEAK_SIGNATURE_ALGORITHM_TITLE
IDS_CHROME_TO_DEVICE_PRINT_TO_PHONE
IDS_CHROME_TO_DEVICE_SNAPSHOTS
-IDS_COPY_URL_MAC
IDS_COULDNT_OPEN_PROFILE_ERROR
IDS_CRASHES_BUG_LINK_LABEL
IDS_CRASHES_CRASH_COUNT_BANNER_FORMAT
@@ -238,6 +234,7 @@ IDS_DEFAULT_AVATAR_NAME_22
IDS_DEFAULT_AVATAR_NAME_23
IDS_DEFAULT_AVATAR_NAME_24
IDS_DEFAULT_AVATAR_NAME_25
+IDS_DEFAULT_AVATAR_NAME_26
IDS_DEFAULT_AVATAR_NAME_8
IDS_DEFAULT_AVATAR_NAME_9
IDS_DEFAULT_ENCODING
@@ -246,23 +243,26 @@ IDS_DEFAULT_TAB_TITLE
IDS_DELETE
IDS_DISABLE_TOUCH_ADJUSTMENT_DESCRIPTION
IDS_DISABLE_TOUCH_ADJUSTMENT_NAME
-IDS_DOM_DISTILLER_TITLE
+IDS_DOM_DISTILLER_VIEWER_FAILED_TO_FIND_ARTICLE_CONTENT
+IDS_DOM_DISTILLER_VIEWER_FAILED_TO_FIND_ARTICLE_TITLE
+IDS_DOM_DISTILLER_VIEWER_LOADING_STRING
+IDS_DOM_DISTILLER_VIEWER_NO_DATA_CONTENT
+IDS_DOM_DISTILLER_VIEWER_NO_DATA_TITLE
+IDS_DOM_DISTILLER_VIEWER_VIEW_ORIGINAL
IDS_DOM_DISTILLER_WEBUI_ENTRY_ADD
IDS_DOM_DISTILLER_WEBUI_ENTRY_ADD_FAILED
IDS_DOM_DISTILLER_WEBUI_ENTRY_URL
IDS_DOM_DISTILLER_WEBUI_FETCHING_ENTRIES
IDS_DOM_DISTILLER_WEBUI_REFRESH
IDS_DOM_DISTILLER_WEBUI_TITLE
+IDS_DOM_DISTILLER_WEBUI_VIEW_URL
+IDS_DOM_DISTILLER_WEBUI_VIEW_URL_FAILED
IDS_DONE
IDS_EDIT_FIND_MAC
IDS_EMPTY_KEYWORD_VALUE
-IDS_ENABLE_BACKLOADER_DESCRIPTION
-IDS_ENABLE_BACKLOADER_NAME
-IDS_ENABLE_BEZEL_TOUCH_DESCRIPTION
-IDS_ENABLE_BEZEL_TOUCH_NAME
-IDS_ENABLE_TAB_CAPTURE_DESCRIPTION
-IDS_ENABLE_TAB_CAPTURE_NAME
IDS_ERRORPAGES_BUTTON_LESS
+IDS_ERRORPAGES_BUTTON_LOAD_STALE
+IDS_ERRORPAGES_BUTTON_LOAD_STALE_HELP
IDS_ERRORPAGES_BUTTON_MORE
IDS_ERRORPAGES_BUTTON_RELOAD
IDS_ERRORPAGES_DETAILS_ADDRESS_UNREACHABLE
@@ -300,12 +300,10 @@ IDS_ERRORPAGES_DETAILS_RESPONSE_HEADERS_MULTIPLE_LOCATION
IDS_ERRORPAGES_DETAILS_SERVICE_UNAVAILABLE
IDS_ERRORPAGES_DETAILS_SSL_PROTOCOL_ERROR
IDS_ERRORPAGES_DETAILS_SSL_UNSAFE_NEGOTIATION
-IDS_ERRORPAGES_DETAILS_TEMPLATE
IDS_ERRORPAGES_DETAILS_TEMPORARILY_THROTTLED
IDS_ERRORPAGES_DETAILS_TIMED_OUT
IDS_ERRORPAGES_DETAILS_TOO_MANY_REDIRECTS
IDS_ERRORPAGES_DETAILS_UNKNOWN
-IDS_ERRORPAGES_DETAILS_UNSUPPORTED_SCHEME_ERROR
IDS_ERRORPAGES_ERROR_CODE
IDS_ERRORPAGES_HEADING_ACCESS_DENIED
IDS_ERRORPAGES_HEADING_BAD_SSL_CLIENT_AUTH_CERT
@@ -316,11 +314,9 @@ IDS_ERRORPAGES_HEADING_CACHE_READ_FAILURE
IDS_ERRORPAGES_HEADING_DOWNLOAD_FILE_TYPE_ERROR
IDS_ERRORPAGES_HEADING_DUPLICATE_HEADERS
IDS_ERRORPAGES_HEADING_EMPTY_RESPONSE
-IDS_ERRORPAGES_HEADING_ESET_ANTI_VIRUS_SSL_INTERCEPTION
IDS_ERRORPAGES_HEADING_FILE_ACCESS_DENIED
IDS_ERRORPAGES_HEADING_HTTP_SERVER_ERROR
IDS_ERRORPAGES_HEADING_INTERNET_DISCONNECTED
-IDS_ERRORPAGES_HEADING_KASPERSKY_ANTI_VIRUS_SSL_INTERCEPTION
IDS_ERRORPAGES_HEADING_NETWORK_ACCESS_DENIED
IDS_ERRORPAGES_HEADING_NETWORK_IO_SUSPENDED
IDS_ERRORPAGES_HEADING_NOT_AVAILABLE
@@ -329,18 +325,13 @@ IDS_ERRORPAGES_HEADING_PINNING_FAILURE
IDS_ERRORPAGES_HEADING_PROXY_CONNECTION_FAILED
IDS_ERRORPAGES_HEADING_SSL_PROTOCOL_ERROR
IDS_ERRORPAGES_HEADING_TOO_MANY_REDIRECTS
-IDS_ERRORPAGES_HEADING_UNSUPPORTED_SCHEME_ERROR
IDS_ERRORPAGES_HEADING_WEAK_SERVER_EPHEMERAL_DH_KEY
-IDS_ERRORPAGES_HTTP_DETAILS_TEMPLATE
IDS_ERRORPAGES_HTTP_POST_WARNING
IDS_ERRORPAGES_SUGGESTION_CHECK_CONNECTION_BODY
IDS_ERRORPAGES_SUGGESTION_CHECK_CONNECTION_HEADER
IDS_ERRORPAGES_SUGGESTION_CONTACT_ADMINISTRATOR
-IDS_ERRORPAGES_SUGGESTION_DISABLE_PLATFORM
IDS_ERRORPAGES_SUGGESTION_DNS_CONFIG
IDS_ERRORPAGES_SUGGESTION_FIREWALL_CONFIG
-IDS_ERRORPAGES_SUGGESTION_HEADING
-IDS_ERRORPAGES_SUGGESTION_HOMEPAGE
IDS_ERRORPAGES_SUGGESTION_LEARNMORE_BODY
IDS_ERRORPAGES_SUGGESTION_NETWORK_PREDICTION
IDS_ERRORPAGES_SUGGESTION_PROXY_CONFIG
@@ -362,7 +353,6 @@ IDS_ERRORPAGES_SUMMARY_DNS_PROBE_RUNNING
IDS_ERRORPAGES_SUMMARY_DOWNLOAD_FILE_TYPE_ERROR
IDS_ERRORPAGES_SUMMARY_DUPLICATE_HEADERS
IDS_ERRORPAGES_SUMMARY_EMPTY_RESPONSE
-IDS_ERRORPAGES_SUMMARY_ESET_ANTI_VIRUS_SSL_INTERCEPTION
IDS_ERRORPAGES_SUMMARY_FILE_ACCESS_DENIED
IDS_ERRORPAGES_SUMMARY_FORBIDDEN
IDS_ERRORPAGES_SUMMARY_GATEWAY_TIMEOUT
@@ -371,7 +361,6 @@ IDS_ERRORPAGES_SUMMARY_INTERNAL_SERVER_ERROR
IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED
IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_INSTRUCTIONS_TEMPLATE
IDS_ERRORPAGES_SUMMARY_INTERNET_DISCONNECTED_PLATFORM
-IDS_ERRORPAGES_SUMMARY_KASPERSKY_ANTI_VIRUS_SSL_INTERCEPTION
IDS_ERRORPAGES_SUMMARY_NAME_NOT_RESOLVED
IDS_ERRORPAGES_SUMMARY_NETWORK_ACCESS_DENIED
IDS_ERRORPAGES_SUMMARY_NETWORK_CHANGED
@@ -385,7 +374,6 @@ IDS_ERRORPAGES_SUMMARY_SSL_PROTOCOL_ERROR
IDS_ERRORPAGES_SUMMARY_TEMPORARILY_THROTTLED
IDS_ERRORPAGES_SUMMARY_TIMED_OUT
IDS_ERRORPAGES_SUMMARY_TOO_MANY_REDIRECTS
-IDS_ERRORPAGES_SUMMARY_UNSUPPORTED_SCHEME_ERROR
IDS_ERRORPAGES_SUMMARY_WEAK_SERVER_EPHEMERAL_DH_KEY
IDS_ERRORPAGES_SUMMARY_WEBSITE_CANNOT_HANDLE
IDS_ERRORPAGES_TITLE_ACCESS_DENIED
@@ -393,50 +381,22 @@ IDS_ERRORPAGES_TITLE_BLOCKED
IDS_ERRORPAGES_TITLE_LOAD_FAILED
IDS_ERRORPAGES_TITLE_NOT_AVAILABLE
IDS_ERRORPAGES_TITLE_NOT_FOUND
-IDS_EXTENSIONS_LOCKED_MANAGED_MODE
IDS_EXTENSION_KEYWORD_COMMAND
-IDS_FEEDBACK_DESCRIPTION_LABEL
IDS_FEEDBACK_REPORT_PAGE_TITLE
IDS_FEEDBACK_REPORT_URL_LABEL
IDS_FEEDBACK_SEND_REPORT
-IDS_FEEDBACK_SYSTEM_INFORMATION_URL_TEXT
IDS_FEEDBACK_USER_EMAIL_LABEL
IDS_FILE_BROWSER_OPEN_LABEL
IDS_FIND_IN_PAGE_CLOSE_TOOLTIP
IDS_FIND_IN_PAGE_COUNT
IDS_FIND_IN_PAGE_NEXT_TOOLTIP
IDS_FIND_IN_PAGE_PREVIOUS_TOOLTIP
-IDS_FLAGS_ACCELERATED_FILTERS
-IDS_FLAGS_ACCELERATED_FILTERS_DESCRIPTION
IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_DESCRIPTION
IDS_FLAGS_ACCELERATED_FIXED_ROOT_BACKGROUND_NAME
-IDS_FLAGS_ACTION_BOX_DESCRIPTION
-IDS_FLAGS_ACTION_BOX_NAME
IDS_FLAGS_ALLOW_NACL_SOCKET_API_DESCRIPTION
IDS_FLAGS_ALLOW_NACL_SOCKET_API_NAME
IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_DESCRIPTION
IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_CLICK_NAME
-IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_DESCRIPTION
-IDS_FLAGS_ALLOW_TOUCHPAD_THREE_FINGER_SWIPE_NAME
-IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_DESCRIPTION
-IDS_FLAGS_APPS_NEW_INSTALL_BUBBLE_NAME
-IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_DESCRIPTION
-IDS_FLAGS_ASH_AUTO_WINDOW_PLACEMENT_NAME
-IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION
-IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION2
-IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION3
-IDS_FLAGS_ASH_BOOT_ANIMATION_FUNCTION_DESCRIPTION
-IDS_FLAGS_ASH_DISABLE_IMMERSIVE_MODE_DESCRIPTION
-IDS_FLAGS_ASH_DISABLE_IMMERSIVE_MODE_NAME
-IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_DESCRIPTION
-IDS_FLAGS_ASH_DISABLE_PER_APP_LAUNCHER_NAME
-IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_DESCRIPTION
-IDS_FLAGS_ASH_IMMERSIVE_FULLSCREEN_NAME
-IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_DESCRIPTION
-IDS_FLAGS_CAPTIVE_PORTAL_DETECTOR_NAME
-IDS_FLAGS_CHROME_CAPTIVE_PORTAL_DETECTOR
-IDS_FLAGS_CLOUD_PRINT_CONNECTOR_DESCRIPTION
-IDS_FLAGS_CLOUD_PRINT_CONNECTOR_NAME
IDS_FLAGS_COMPOSITED_LAYER_BORDERS
IDS_FLAGS_COMPOSITED_LAYER_BORDERS_DESCRIPTION
IDS_FLAGS_COMPOSITING_FOR_FIXED_POSITION_DESCRIPTION
@@ -462,112 +422,46 @@ IDS_FLAGS_DEFAULT_TILE_WIDTH_NAME
IDS_FLAGS_DEFAULT_TILE_WIDTH_SHORT
IDS_FLAGS_DEFAULT_TILE_WIDTH_TALL
IDS_FLAGS_DEFAULT_TILE_WIDTH_VENTI
-IDS_FLAGS_DESKTOP_GUEST_MODE_DESCRIPTION
-IDS_FLAGS_DESKTOP_GUEST_MODE_NAME
IDS_FLAGS_DISABLE
IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_DESCRIPTION
IDS_FLAGS_DISABLE_ACCELERATED_2D_CANVAS_NAME
IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_DESCRIPTION
IDS_FLAGS_DISABLE_ACCELERATED_VIDEO_DECODE_NAME
IDS_FLAGS_DISABLE_BOOT_ANIMATION
-IDS_FLAGS_DISABLE_BOOT_ANIMATION2
-IDS_FLAGS_DISABLE_BOOT_ANIMATION2_DESCRIPTION
IDS_FLAGS_DISABLE_BOOT_ANIMATION_DESCRIPTION
-IDS_FLAGS_DISABLE_DEFERRED_2D_CANVAS_DESCRIPTION
-IDS_FLAGS_DISABLE_DEFERRED_2D_CANVAS_NAME
-IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_DESCRIPTION
-IDS_FLAGS_DISABLE_ENCRYPTED_MEDIA_NAME
IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_DESCRIPTION
IDS_FLAGS_DISABLE_GESTURE_REQUIREMENT_FOR_MEDIA_PLAYBACK_NAME
-IDS_FLAGS_DISABLE_GPU_VSYNC_DESCRIPTION
-IDS_FLAGS_DISABLE_GPU_VSYNC_NAME
IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_DESCRIPTION
IDS_FLAGS_DISABLE_HYPERLINK_AUDITING_NAME
-IDS_FLAGS_DISABLE_LAUNCHER_PER_DISPLAY_DESCRIPTION
-IDS_FLAGS_DISABLE_LAUNCHER_PER_DISPLAY_NAME
-IDS_FLAGS_DISABLE_MEDIA_SOURCE_DESCRIPTION
-IDS_FLAGS_DISABLE_MEDIA_SOURCE_NAME
-IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_DESCRIPTION
-IDS_FLAGS_DISABLE_NATIVE_AUTOFILL_UI_NAME
-IDS_FLAGS_DISABLE_OVERSCROLL_HISTORY_NAVIGATION_DESCRIPTION
-IDS_FLAGS_DISABLE_OVERSCROLL_HISTORY_NAVIGATION_NAME
IDS_FLAGS_DISABLE_PNACL_DESCRIPTION
IDS_FLAGS_DISABLE_PNACL_NAME
-IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_DESCRIPTION
-IDS_FLAGS_DISABLE_RESTORE_SESSION_STATE_NAME
IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_DESCRIPTION
IDS_FLAGS_DISABLE_SOFTWARE_RASTERIZER_NAME
-IDS_FLAGS_DISABLE_TAB_SCRUBBING_DESCRIPTION
-IDS_FLAGS_DISABLE_TAB_SCRUBBING_NAME
-IDS_FLAGS_DISABLE_THREADED_ANIMATION_DESCRIPTION
-IDS_FLAGS_DISABLE_THREADED_ANIMATION_NAME
IDS_FLAGS_DISABLE_WEBGL_DESCRIPTION
IDS_FLAGS_DISABLE_WEBGL_NAME
IDS_FLAGS_DISABLE_WEBRTC_DESCRIPTION
IDS_FLAGS_DISABLE_WEBRTC_NAME
IDS_FLAGS_ENABLE
-IDS_FLAGS_ENABLE_ADVANCED_GESTURES_DESCRIPTION
-IDS_FLAGS_ENABLE_ADVANCED_GESTURES_NAME
-IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_DESCRIPTION
-IDS_FLAGS_ENABLE_APPS_DEVTOOL_APP_NAME
-IDS_FLAGS_ENABLE_APP_LIST_SHOW_APPS_ONLY_DESCRIPTION
-IDS_FLAGS_ENABLE_APP_LIST_SHOW_APPS_ONLY_NAME
-IDS_FLAGS_ENABLE_ASH_OAK_DESCRIPTION
-IDS_FLAGS_ENABLE_ASH_OAK_NAME
IDS_FLAGS_ENABLE_ASYNC_DNS_DESCRIPTION
IDS_FLAGS_ENABLE_ASYNC_DNS_NAME
-IDS_FLAGS_ENABLE_AUTOLOGIN_DESCRIPTION
-IDS_FLAGS_ENABLE_AUTOLOGIN_NAME
IDS_FLAGS_ENABLE_CARRIER_SWITCHING
IDS_FLAGS_ENABLE_CARRIER_SWITCHING_DESCRIPTION
-IDS_FLAGS_ENABLE_CONTACTS_DESCRIPTION
-IDS_FLAGS_ENABLE_CONTACTS_NAME
IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_DESCRIPTION
IDS_FLAGS_ENABLE_DEFERRED_IMAGE_DECODING_NAME
IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_DESCRIPTION
IDS_FLAGS_ENABLE_DEVTOOLS_EXPERIMENTS_NAME
IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_DESCRIPTION
IDS_FLAGS_ENABLE_DOWNLOAD_RESUMPTION_NAME
-IDS_FLAGS_ENABLE_DRAGGABLE_MENU_BUTTON_DESCRIPTION
-IDS_FLAGS_ENABLE_DRAGGABLE_MENU_BUTTON_NAME
-IDS_FLAGS_ENABLE_EXPERIMENTAL_BLUETOOTH_DESCRIPTION
-IDS_FLAGS_ENABLE_EXPERIMENTAL_BLUETOOTH_NAME
IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_DESCRIPTION
IDS_FLAGS_ENABLE_EXPERIMENTAL_CANVAS_FEATURES_NAME
-IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_DESCRIPTION
-IDS_FLAGS_ENABLE_EXPERIMENTAL_FORM_FILLING_NAME
IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_DESCRIPTION
IDS_FLAGS_ENABLE_GESTURE_TAP_HIGHLIGHTING_NAME
-IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_DESCRIPTION
-IDS_FLAGS_ENABLE_GOOGLE_NOW_INTEGRATION_NAME
-IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_DESCRIPTION
-IDS_FLAGS_ENABLE_HTTP2_DRAFT_04_NAME
-IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API
-IDS_FLAGS_ENABLE_INSTANT_EXTENDED_API_DESCRIPTION
-IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_DESCRIPTION
-IDS_FLAGS_ENABLE_INTERACTIVE_AUTOCOMPLETE_NAME
IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_DESCRIPTION
IDS_FLAGS_ENABLE_JAVASCRIPT_HARMONY_NAME
-IDS_FLAGS_ENABLE_KIOSK_APPS_DESCRIPTION
-IDS_FLAGS_ENABLE_KIOSK_APPS_NAME
-IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_DESCRIPTION
-IDS_FLAGS_ENABLE_LOCALLY_MANAGED_USERS_NAME
-IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API
-IDS_FLAGS_ENABLE_LOCAL_ONLY_INSTANT_EXTENDED_API_DESCRIPTION
-IDS_FLAGS_ENABLE_MEMORY_MONITOR_DESCRIPTION
-IDS_FLAGS_ENABLE_MEMORY_MONITOR_NAME
IDS_FLAGS_ENABLE_NACL_DEBUG_DESCRIPTION
IDS_FLAGS_ENABLE_NACL_DEBUG_NAME
IDS_FLAGS_ENABLE_NACL_DESCRIPTION
-IDS_FLAGS_ENABLE_NACL_EXCEPTION_HANDLING_DESCRIPTION
-IDS_FLAGS_ENABLE_NACL_EXCEPTION_HANDLING_NAME
IDS_FLAGS_ENABLE_NACL_NAME
-IDS_FLAGS_ENABLE_NATIVE_AUTOFILL_UI_DESCRIPTION
-IDS_FLAGS_ENABLE_NATIVE_AUTOFILL_UI_NAME
-IDS_FLAGS_ENABLE_NEW_DIALOG_STYLE_DESCRIPTION
-IDS_FLAGS_ENABLE_NEW_DIALOG_STYLE_NAME
-IDS_FLAGS_ENABLE_OPUS_PLAYBACK_DESCRIPTION
-IDS_FLAGS_ENABLE_OPUS_PLAYBACK_NAME
IDS_FLAGS_ENABLE_PANELS_DESCRIPTION
IDS_FLAGS_ENABLE_PANELS_NAME
IDS_FLAGS_ENABLE_PASSWORD_GENERATION_DESCRIPTION
@@ -576,74 +470,32 @@ IDS_FLAGS_ENABLE_PINCH_SCALE_DESCRIPTION
IDS_FLAGS_ENABLE_PINCH_SCALE_NAME
IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_DESCRIPTION
IDS_FLAGS_ENABLE_REQUEST_TABLET_SITE_NAME
-IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_DESCRIPTION
-IDS_FLAGS_ENABLE_RICH_NOTIFICATIONS_NAME
IDS_FLAGS_ENABLE_SCREEN_CAPTURE_DESCRIPTION
IDS_FLAGS_ENABLE_SCREEN_CAPTURE_NAME
IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_DESCRIPTION
IDS_FLAGS_ENABLE_SIMPLE_CACHE_BACKEND_NAME
IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_DESCRIPTION
IDS_FLAGS_ENABLE_SMOOTH_SCROLLING_NAME
-IDS_FLAGS_ENABLE_SPDY31_DESCRIPTION
-IDS_FLAGS_ENABLE_SPDY31_NAME
-IDS_FLAGS_ENABLE_SPDY3_DESCRIPTION
-IDS_FLAGS_ENABLE_SPDY3_NAME
-IDS_FLAGS_ENABLE_SPDY4A1_DESCRIPTION
-IDS_FLAGS_ENABLE_SPDY4A1_NAME
-IDS_FLAGS_ENABLE_SPDY4A2_DESCRIPTION
-IDS_FLAGS_ENABLE_SPDY4A2_NAME
-IDS_FLAGS_ENABLE_SPDY_PROXY_AUTH_DESCRIPTION
-IDS_FLAGS_ENABLE_SPDY_PROXY_AUTH_NAME
+IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_DESCRIPTION
+IDS_FLAGS_ENABLE_SUGGESTIONS_SERVICE_NAME
IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_DESCRIPTION
IDS_FLAGS_ENABLE_SYNCED_NOTIFICATIONS_NAME
-IDS_FLAGS_ENABLE_SYNC_FAVICONS_DESCRIPTION
-IDS_FLAGS_ENABLE_SYNC_FAVICONS_NAME
-IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_DESCRIPTION
-IDS_FLAGS_ENABLE_TAB_BROWSER_DRAGGING_NAME
IDS_FLAGS_ENABLE_TCP_FAST_OPEN_DESCRIPTION
IDS_FLAGS_ENABLE_TCP_FAST_OPEN_NAME
IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_DESCRIPTION
IDS_FLAGS_ENABLE_TOUCH_DRAG_DROP_NAME
IDS_FLAGS_ENABLE_TOUCH_EDITING_DESCRIPTION
IDS_FLAGS_ENABLE_TOUCH_EDITING_NAME
-IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_DESCRIPTION
-IDS_FLAGS_ENABLE_TOUCH_SIDE_BEZELS_NAME
-IDS_FLAGS_ENABLE_VP9_PLAYBACK_DESCRIPTION
-IDS_FLAGS_ENABLE_VP9_PLAYBACK_NAME
-IDS_FLAGS_ENABLE_WEBGL_DESCRIPTION
-IDS_FLAGS_ENABLE_WEBGL_NAME
-IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_DESCRIPTION
-IDS_FLAGS_ENABLE_WEBP_IN_ACCEPT_HEADER_NAME
-IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_DESCRIPTION
-IDS_FLAGS_ENABLE_WORKSPACE_SCRUBBING_NAME
IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_DESCRIPTION
IDS_FLAGS_EXPERIMENTAL_EXTENSION_APIS_NAME
-IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_DESCRIPTION
-IDS_FLAGS_EXPERIMENTAL_LOCATION_FEATURES_NAME
-IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_DESCRIPTION
-IDS_FLAGS_EXPERIMENTAL_WEBKIT_FEATURES_NAME
IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_DESCRIPTION
IDS_FLAGS_EXPERIMENTAL_WEB_PLATFORM_FEATURES_NAME
IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_DESCRIPTION
IDS_FLAGS_EXTENSIONS_ON_CHROME_URLS_NAME
-IDS_FLAGS_FILE_MANAGER_PACKAGED_DESCRIPTION
-IDS_FLAGS_FILE_MANAGER_PACKAGED_NAME
-IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_DESCRIPTION
-IDS_FLAGS_FIXED_POSITION_CREATES_STACKING_CONTEXT_NAME
IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION
IDS_FLAGS_FORCE_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME
-IDS_FLAGS_FORCE_COMPOSITING_MODE_DESCRIPTION
-IDS_FLAGS_FORCE_COMPOSITING_MODE_NAME
-IDS_FLAGS_FORCE_FULLSCREEN_APP_DESCRIPTION
-IDS_FLAGS_FORCE_FULLSCREEN_APP_NAME
IDS_FLAGS_FORCE_HIGH_DPI_DESCRIPTION
IDS_FLAGS_FORCE_HIGH_DPI_NAME
-IDS_FLAGS_FORCE_UNIVERSAL_ACCELERATED_OVERFLOW_SCROLL_MODE_DESCRIPTION
-IDS_FLAGS_FORCE_UNIVERSAL_ACCELERATED_OVERFLOW_SCROLL_MODE_NAME
-IDS_FLAGS_FULL_HISTORY_SYNC_DESCRIPTION
-IDS_FLAGS_FULL_HISTORY_SYNC_NAME
-IDS_FLAGS_HIDE_LAUNCHER_ALIGNMENT_MENU_DESCRIPTION
-IDS_FLAGS_HIDE_LAUNCHER_ALIGNMENT_MENU_NAME
IDS_FLAGS_IGNORE_GPU_BLACKLIST_DESCRIPTION
IDS_FLAGS_IGNORE_GPU_BLACKLIST_NAME
IDS_FLAGS_IMPL_SIDE_PAINTING_DESCRIPTION
@@ -652,51 +504,17 @@ IDS_FLAGS_LONG_TITLE
IDS_FLAGS_NACL_DEBUG_MASK_DESCRIPTION
IDS_FLAGS_NACL_DEBUG_MASK_NAME
IDS_FLAGS_NOT_AVAILABLE
-IDS_FLAGS_NO_DISCARD_TABS_DESCRIPTION
-IDS_FLAGS_NO_DISCARD_TABS_NAME
IDS_FLAGS_NO_EXPERIMENTS_AVAILABLE
IDS_FLAGS_NO_UNSUPPORTED_EXPERIMENTS
IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_DESCRIPTION
IDS_FLAGS_NTP_OTHER_SESSIONS_MENU_NAME
-IDS_FLAGS_NTP_SUGGESTIONS_PAGE_DESCRIPTION
-IDS_FLAGS_NTP_SUGGESTIONS_PAGE_NAME
-IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_AUTOMATIC
-IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_DESCRIPTION
-IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_DISABLED
-IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_ENABLED
-IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_NEW_SCORING_NAME
-IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_AUTOMATIC
-IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DESCRIPTION
-IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_DISABLED
-IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_ENABLED
-IDS_FLAGS_OMNIBOX_HISTORY_QUICK_PROVIDER_REORDER_FOR_INLINING_NAME
-IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_ALLOWED
-IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_AUTOMATIC
-IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_DESCRIPTION
-IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_NAME
-IDS_FLAGS_OMNIBOX_INLINE_HISTORY_QUICK_PROVIDER_PROHIBITED
IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_DESCRIPTION
IDS_FLAGS_PERFORMANCE_MONITOR_GATHERING_NAME
-IDS_FLAGS_PER_TILE_PAINTING_DESCRIPTION
-IDS_FLAGS_PER_TILE_PAINTING_NAME
-IDS_FLAGS_PRESENT_WITH_GDI_ALL_SHOW
-IDS_FLAGS_PRESENT_WITH_GDI_DESCRIPTION
-IDS_FLAGS_PRESENT_WITH_GDI_FIRST_SHOW
-IDS_FLAGS_PRESENT_WITH_GDI_NAME
-IDS_FLAGS_PRINT_RASTER_DESCRIPTION
-IDS_FLAGS_PRINT_RASTER_NAME
IDS_FLAGS_RELAUNCH_BUTTON
IDS_FLAGS_RELAUNCH_NOTICE
IDS_FLAGS_RESET_ALL_BUTTON
IDS_FLAGS_SAVE_PAGE_AS_MHTML_DESCRIPTION
IDS_FLAGS_SAVE_PAGE_AS_MHTML_NAME
-IDS_FLAGS_SCRIPT_BADGES_DESCRIPTION
-IDS_FLAGS_SCRIPT_BADGES_NAME
-IDS_FLAGS_SCRIPT_BUBBLE_DESCRIPTION
-IDS_FLAGS_SCRIPT_BUBBLE_NAME
-IDS_FLAGS_SHILL_CAPTIVE_PORTAL_DETECTOR
-IDS_FLAGS_SHOW_APP_LIST_SHORTCUT_DESCRIPTION
-IDS_FLAGS_SHOW_APP_LIST_SHORTCUT_NAME
IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_DESCRIPTION
IDS_FLAGS_SHOW_AUTOFILL_TYPE_PREDICTIONS_NAME
IDS_FLAGS_SHOW_FPS_COUNTER
@@ -709,28 +527,10 @@ IDS_FLAGS_SPELLCHECK_AUTOCORRECT
IDS_FLAGS_SPELLCHECK_AUTOCORRECT_DESCRIPTION
IDS_FLAGS_STACKED_TAB_STRIP_DESCRIPTION
IDS_FLAGS_STACKED_TAB_STRIP_NAME
-IDS_FLAGS_STATIC_IP_CONFIG_DESCRIPTION
-IDS_FLAGS_STATIC_IP_CONFIG_NAME
-IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_DESCRIPTION
-IDS_FLAGS_SYNC_KEYSTORE_ENCRYPTION_NAME
-IDS_FLAGS_SYNC_TAB_FAVICONS_DESCRIPTION
-IDS_FLAGS_SYNC_TAB_FAVICONS_NAME
IDS_FLAGS_TABLE_TITLE
-IDS_FLAGS_TABPOSE_DESCRIPTION
-IDS_FLAGS_TABPOSE_NAME
-IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_DESCRIPTION
-IDS_FLAGS_TAB_GROUPS_CONTEXT_MENU_NAME
IDS_FLAGS_THREADED_COMPOSITING_MODE_DESCRIPTION
IDS_FLAGS_THREADED_COMPOSITING_MODE_NAME
-IDS_FLAGS_TOUCH_OPTIMIZED_UI_DESCRIPTION
-IDS_FLAGS_TOUCH_OPTIMIZED_UI_NAME
-IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_DESCRIPTION
-IDS_FLAGS_TRACK_ACTIVE_VISIT_TIME_NAME
IDS_FLAGS_UNSUPPORTED_TABLE_TITLE
-IDS_FLAGS_USE_CLIENT_LOGIN_SIGNIN_FLOW_DESCRIPTION
-IDS_FLAGS_USE_CLIENT_LOGIN_SIGNIN_FLOW_NAME
-IDS_FLAGS_VIEWS_TEXTFIELD_DESCRIPTION
-IDS_FLAGS_VIEWS_TEXTFIELD_NAME
IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_DESCRIPTION
IDS_FLAGS_WALLET_SERVICE_USE_SANDBOX_NAME
IDS_FLAGS_WARNING_HEADER
@@ -741,6 +541,7 @@ IDS_GENERIC_EXPERIMENT_CHOICE_DEFAULT
IDS_GENERIC_EXPERIMENT_CHOICE_DISABLED
IDS_GENERIC_EXPERIMENT_CHOICE_ENABLED
IDS_GOOGLE_URL_TRACKER_INFOBAR_DONT_SWITCH
+IDS_GOOGLE_URL_TRACKER_INFOBAR_LEARN_MORE
IDS_GOOGLE_URL_TRACKER_INFOBAR_MESSAGE
IDS_GOOGLE_URL_TRACKER_INFOBAR_SWITCH
IDS_GROUP_BY_DOMAIN_LABEL
@@ -763,8 +564,6 @@ IDS_HISTORY_LOCK_BUTTON
IDS_HISTORY_MORE_FROM_SITE
IDS_HISTORY_NEWER
IDS_HISTORY_NEWEST
-IDS_HISTORY_NO_ITEMS
-IDS_HISTORY_NO_RESPONSE_FROM_SERVER
IDS_HISTORY_NO_RESULTS
IDS_HISTORY_NO_SEARCH_RESULTS
IDS_HISTORY_NO_SYNCED_RESULTS
@@ -782,8 +581,6 @@ IDS_HISTORY_REMOVE_PAGE
IDS_HISTORY_REMOVE_SELECTED_ITEMS
IDS_HISTORY_SEARCHRESULTSFOR
IDS_HISTORY_SEARCH_BUTTON
-IDS_HISTORY_START_EDITING_HISTORY
-IDS_HISTORY_STOP_EDITING_HISTORY
IDS_HISTORY_TITLE
IDS_HISTORY_UNKNOWN_DEVICE
IDS_HISTORY_UNLOCK_BUTTON
@@ -800,7 +597,8 @@ IDS_LOGIN_DIALOG_TITLE
IDS_LOGIN_DIALOG_USERNAME_FIELD
IDS_MANAGED_USER_AVATAR_LABEL
IDS_MOBILE_WELCOME_URL
-IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS
+IDS_NACL_DEBUG_MASK_CHOICE_DEBUG_ALL
+IDS_NACL_DEBUG_MASK_CHOICE_EXCLUDE_UTILS_PNACL
IDS_NACL_DEBUG_MASK_CHOICE_INCLUDE_DEBUG
IDS_NETWORK_PREDICTION_ENABLED_DESCRIPTION
IDS_NET_EXPORT_NO_EMAIL_ACCOUNTS_ALERT_MESSAGE
@@ -826,9 +624,7 @@ IDS_OPTIONS_ADVANCED_SECTION_TITLE_PRIVACY
IDS_OPTIONS_DISABLE_WEB_SERVICES
IDS_OPTIONS_ENABLE_LOGGING
IDS_OPTIONS_IMPROVE_BROWSING_EXPERIENCE
-IDS_OPTIONS_INTERNET_TAB_LABEL
IDS_OPTIONS_PROXIES_CONFIGURE_BUTTON
-IDS_OPTIONS_SETTINGS_OPTIONS
IDS_OTHER_DEVICES_X_MORE
IDS_PAGEINFO_ADDRESS
IDS_PAGEINFO_CERT_INFO_BUTTON
@@ -847,7 +643,6 @@ IDS_PAGE_INFO_SECURITY_TAB_FIRST_VISITED_TODAY
IDS_PAGE_INFO_SECURITY_TAB_INSECURE_IDENTITY
IDS_PAGE_INFO_SECURITY_TAB_NON_UNIQUE_NAME
IDS_PAGE_INFO_SECURITY_TAB_NOT_ENCRYPTED_CONNECTION_TEXT
-IDS_PAGE_INFO_SECURITY_TAB_NO_COMPRESSION
IDS_PAGE_INFO_SECURITY_TAB_NO_REVOCATION_MECHANISM
IDS_PAGE_INFO_SECURITY_TAB_RENEGOTIATION_MESSAGE
IDS_PAGE_INFO_SECURITY_TAB_SECURE_IDENTITY
@@ -869,6 +664,64 @@ IDS_PDF_INFOBAR_ALWAYS_USE_READER_BUTTON
IDS_PLATFORM_LABEL
IDS_PLUGIN_CONFIRM_INSTALL_DIALOG_ACCEPT_BUTTON
IDS_PLUGIN_CONFIRM_INSTALL_DIALOG_TITLE
+IDS_POLICY_DEFAULT_SEARCH_DISABLED
+IDS_POLICY_DEPRECATED
+IDS_POLICY_DM_STATUS_HTTP_STATUS_ERROR
+IDS_POLICY_DM_STATUS_REQUEST_FAILED
+IDS_POLICY_DM_STATUS_REQUEST_INVALID
+IDS_POLICY_DM_STATUS_RESPONSE_DECODING_ERROR
+IDS_POLICY_DM_STATUS_SERVICE_ACTIVATION_PENDING
+IDS_POLICY_DM_STATUS_SERVICE_DEPROVISIONED
+IDS_POLICY_DM_STATUS_SERVICE_DEVICE_ID_CONFLICT
+IDS_POLICY_DM_STATUS_SERVICE_DEVICE_NOT_FOUND
+IDS_POLICY_DM_STATUS_SERVICE_DOMAIN_MISMATCH
+IDS_POLICY_DM_STATUS_SERVICE_INVALID_SERIAL_NUMBER
+IDS_POLICY_DM_STATUS_SERVICE_MANAGEMENT_NOT_SUPPORTED
+IDS_POLICY_DM_STATUS_SERVICE_MANAGEMENT_TOKEN_INVALID
+IDS_POLICY_DM_STATUS_SERVICE_MISSING_LICENSES
+IDS_POLICY_DM_STATUS_SERVICE_POLICY_NOT_FOUND
+IDS_POLICY_DM_STATUS_SUCCESS
+IDS_POLICY_DM_STATUS_TEMPORARY_UNAVAILABLE
+IDS_POLICY_DM_STATUS_UNKNOWN_ERROR
+IDS_POLICY_INVALID_BOOKMARK
+IDS_POLICY_INVALID_PROXY_MODE_ERROR
+IDS_POLICY_INVALID_SEARCH_URL_ERROR
+IDS_POLICY_LEVEL_ERROR
+IDS_POLICY_LIST_ENTRY_ERROR
+IDS_POLICY_NOT_SPECIFIED_ERROR
+IDS_POLICY_OUT_OF_RANGE_ERROR
+IDS_POLICY_OVERRIDDEN
+IDS_POLICY_PROXY_BOTH_SPECIFIED_ERROR
+IDS_POLICY_PROXY_MODE_AUTO_DETECT_ERROR
+IDS_POLICY_PROXY_MODE_DISABLED_ERROR
+IDS_POLICY_PROXY_MODE_FIXED_SERVERS_ERROR
+IDS_POLICY_PROXY_MODE_PAC_URL_ERROR
+IDS_POLICY_PROXY_MODE_SYSTEM_ERROR
+IDS_POLICY_PROXY_NEITHER_SPECIFIED_ERROR
+IDS_POLICY_SCHEMA_VALIDATION_ERROR
+IDS_POLICY_STORE_STATUS_BAD_STATE
+IDS_POLICY_STORE_STATUS_LOAD_ERROR
+IDS_POLICY_STORE_STATUS_OK
+IDS_POLICY_STORE_STATUS_PARSE_ERROR
+IDS_POLICY_STORE_STATUS_SERIALIZE_ERROR
+IDS_POLICY_STORE_STATUS_STORE_ERROR
+IDS_POLICY_STORE_STATUS_UNKNOWN_ERROR
+IDS_POLICY_STORE_STATUS_VALIDATION_ERROR
+IDS_POLICY_SUBKEY_ERROR
+IDS_POLICY_TYPE_ERROR
+IDS_POLICY_VALIDATION_BAD_INITIAL_SIGNATURE
+IDS_POLICY_VALIDATION_BAD_KEY_VERIFICATION_SIGNATURE
+IDS_POLICY_VALIDATION_BAD_SIGNATURE
+IDS_POLICY_VALIDATION_BAD_TIMESTAMP
+IDS_POLICY_VALIDATION_BAD_USERNAME
+IDS_POLICY_VALIDATION_ERROR_CODE_PRESENT
+IDS_POLICY_VALIDATION_OK
+IDS_POLICY_VALIDATION_PAYLOAD_PARSE_ERROR
+IDS_POLICY_VALIDATION_POLICY_PARSE_ERROR
+IDS_POLICY_VALIDATION_UNKNOWN_ERROR
+IDS_POLICY_VALIDATION_WRONG_POLICY_TYPE
+IDS_POLICY_VALIDATION_WRONG_SETTINGS_ENTITY_ID
+IDS_POLICY_VALIDATION_WRONG_TOKEN
IDS_PREFERENCES_CORRUPT_ERROR
IDS_PREFERENCES_UNREADABLE_ERROR
IDS_PRINT
@@ -935,28 +788,13 @@ IDS_SHOW_HISTORY
IDS_SIGNED_IN_WITH_SYNC_DISABLED
IDS_SIGNED_IN_WITH_SYNC_SUPPRESSED
IDS_SIGNIN_ERROR_BUBBLE_VIEW_TITLE
-IDS_SKIP
-IDS_SPEECH_INPUT_ABORTED
-IDS_SPEECH_INPUT_MIC_ERROR
-IDS_SPEECH_INPUT_NET_ERROR
-IDS_SPEECH_INPUT_NO_MIC
-IDS_SPEECH_INPUT_NO_RESULTS
-IDS_SPEECH_INPUT_NO_SPEECH
-IDS_SSL_BLOCKING_PAGE_EXIT
-IDS_SSL_BLOCKING_PAGE_PROCEED
-IDS_SSL_BLOCKING_PAGE_SHOULD_NOT_PROCEED
IDS_SSL_BLOCKING_PAGE_TITLE
-IDS_SSL_ERROR_PAGE_CANNOT_PROCEED
-IDS_SSL_ERROR_PAGE_TITLE
-IDS_SYNC_ACCOUNT_DETAILS_NOT_ENTERED
IDS_SYNC_ACCOUNT_SYNCING_TO_USER
IDS_SYNC_ACCOUNT_SYNCING_TO_USER_WITH_MANAGE_LINK
IDS_SYNC_AUTHENTICATING_LABEL
IDS_SYNC_BASIC_ENCRYPTION_DATA
-IDS_SYNC_CANNOT_ACCESS_ACCOUNT
IDS_SYNC_CLEAR_USER_DATA
IDS_SYNC_CONFIGURE_ENCRYPTION
-IDS_SYNC_CREATE_ACCOUNT
IDS_SYNC_DATATYPE_AUTOFILL
IDS_SYNC_DATATYPE_BOOKMARKS
IDS_SYNC_DATATYPE_PASSWORDS
@@ -967,23 +805,17 @@ IDS_SYNC_EMPTY_PASSPHRASE_ERROR
IDS_SYNC_ENABLE_SYNC_ON_ACCOUNT
IDS_SYNC_ENCRYPTION_SECTION_TITLE
IDS_SYNC_ENTER_GOOGLE_PASSPHRASE_BODY
-IDS_SYNC_ENTER_OTHER_PASSPHRASE_BODY
IDS_SYNC_ENTER_PASSPHRASE_BODY
IDS_SYNC_ENTER_PASSPHRASE_BODY_WITH_DATE
IDS_SYNC_ENTER_PASSPHRASE_TITLE
IDS_SYNC_ERROR_BUBBLE_VIEW_TITLE
IDS_SYNC_ERROR_SIGNING_IN
IDS_SYNC_FULL_ENCRYPTION_DATA
-IDS_SYNC_GAIA_CAPTCHA_CASE_INSENSITIVE_TIP
-IDS_SYNC_GET_ACCESS_CODE_URL
-IDS_SYNC_INVALID_ACCESS_CODE_LABEL
IDS_SYNC_INVALID_USER_CREDENTIALS
-IDS_SYNC_LOGIN_COULD_NOT_CONNECT
IDS_SYNC_LOGIN_INFO_OUT_OF_DATE
IDS_SYNC_LOGIN_SETTING_UP
IDS_SYNC_MENU_PRE_SYNCED_LABEL
IDS_SYNC_MENU_SYNCED_LABEL
-IDS_SYNC_MENU_SYNC_ERROR_LABEL
IDS_SYNC_NTP_PASSWORD_ENABLE
IDS_SYNC_NTP_PASSWORD_PROMO
IDS_SYNC_NTP_PASSWORD_PROMO,
@@ -997,7 +829,6 @@ IDS_SYNC_PASSPHRASE_LABEL
IDS_SYNC_PASSPHRASE_MISMATCH_ERROR
IDS_SYNC_PASSPHRASE_MSG_EXPLICIT_POSTFIX
IDS_SYNC_PASSPHRASE_MSG_EXPLICIT_PREFIX
-IDS_SYNC_PASSPHRASE_SECTION_TITLE
IDS_SYNC_PASSWORD_SYNC_ATTENTION
IDS_SYNC_PROMO_NTP_BUBBLE_MESSAGE
IDS_SYNC_PROMO_TAB_TITLE
@@ -1005,7 +836,6 @@ IDS_SYNC_RELOGIN_LINK_LABEL
IDS_SYNC_SERVER_IS_UNREACHABLE
IDS_SYNC_SERVICE_UNAVAILABLE
IDS_SYNC_SETUP_ERROR
-IDS_SYNC_SIGNIN
IDS_SYNC_SIGN_IN_ERROR_BUBBLE_VIEW_ACCEPT
IDS_SYNC_SIGN_IN_ERROR_BUBBLE_VIEW_MESSAGE
IDS_SYNC_SIGN_IN_ERROR_WRENCH_MENU_ITEM
@@ -1018,105 +848,160 @@ IDS_SYNC_UNAVAILABLE_ERROR_BUBBLE_VIEW_ACCEPT
IDS_SYNC_UNAVAILABLE_ERROR_BUBBLE_VIEW_MESSAGE
IDS_SYNC_UNRECOVERABLE_ERROR_HELP_URL
IDS_SYNC_UPGRADE_CLIENT
-IDS_SYNC_ZERO_DATA_TYPES_ERROR
IDS_SYSTEM_FLAGS_OWNER_ONLY
+IDS_TIME_DAYS_1ST_DEFAULT
+IDS_TIME_DAYS_1ST_FEW
+IDS_TIME_DAYS_1ST_MANY
+IDS_TIME_DAYS_1ST_SINGULAR
+IDS_TIME_DAYS_1ST_TWO
+IDS_TIME_DAYS_1ST_ZERO
IDS_TIME_DAYS_DEFAULT
IDS_TIME_DAYS_FEW
IDS_TIME_DAYS_MANY
+IDS_TIME_DAYS_SINGULAR
IDS_TIME_DAYS_TWO
IDS_TIME_DAYS_ZERO
-IDS_TIME_DAY_SINGULAR
-IDS_TIME_DURATION_LONG_MINS_DEFAULT
-IDS_TIME_DURATION_LONG_MINS_FEW
-IDS_TIME_DURATION_LONG_MINS_MANY
-IDS_TIME_DURATION_LONG_MINS_TWO
-IDS_TIME_DURATION_LONG_MINS_ZERO
-IDS_TIME_DURATION_LONG_MIN_SINGULAR
-IDS_TIME_DURATION_LONG_SECS_DEFAULT
-IDS_TIME_DURATION_LONG_SECS_FEW
-IDS_TIME_DURATION_LONG_SECS_MANY
-IDS_TIME_DURATION_LONG_SECS_TWO
-IDS_TIME_DURATION_LONG_SECS_ZERO
-IDS_TIME_DURATION_LONG_SEC_SINGULAR
IDS_TIME_ELAPSED_DAYS_DEFAULT
IDS_TIME_ELAPSED_DAYS_FEW
IDS_TIME_ELAPSED_DAYS_MANY
+IDS_TIME_ELAPSED_DAYS_SINGULAR
IDS_TIME_ELAPSED_DAYS_TWO
IDS_TIME_ELAPSED_DAYS_ZERO
-IDS_TIME_ELAPSED_DAY_SINGULAR
IDS_TIME_ELAPSED_HOURS_DEFAULT
IDS_TIME_ELAPSED_HOURS_FEW
IDS_TIME_ELAPSED_HOURS_MANY
+IDS_TIME_ELAPSED_HOURS_SINGULAR
IDS_TIME_ELAPSED_HOURS_TWO
IDS_TIME_ELAPSED_HOURS_ZERO
-IDS_TIME_ELAPSED_HOUR_SINGULAR
IDS_TIME_ELAPSED_MINS_DEFAULT
IDS_TIME_ELAPSED_MINS_FEW
IDS_TIME_ELAPSED_MINS_MANY
+IDS_TIME_ELAPSED_MINS_SINGULAR
IDS_TIME_ELAPSED_MINS_TWO
IDS_TIME_ELAPSED_MINS_ZERO
-IDS_TIME_ELAPSED_MIN_SINGULAR
IDS_TIME_ELAPSED_SECS_DEFAULT
IDS_TIME_ELAPSED_SECS_FEW
IDS_TIME_ELAPSED_SECS_MANY
+IDS_TIME_ELAPSED_SECS_SINGULAR
IDS_TIME_ELAPSED_SECS_TWO
IDS_TIME_ELAPSED_SECS_ZERO
-IDS_TIME_ELAPSED_SEC_SINGULAR
+IDS_TIME_HOURS_1ST_DEFAULT
+IDS_TIME_HOURS_1ST_FEW
+IDS_TIME_HOURS_1ST_MANY
+IDS_TIME_HOURS_1ST_SINGULAR
+IDS_TIME_HOURS_1ST_TWO
+IDS_TIME_HOURS_1ST_ZERO
+IDS_TIME_HOURS_2ND_DEFAULT
+IDS_TIME_HOURS_2ND_FEW
+IDS_TIME_HOURS_2ND_MANY
+IDS_TIME_HOURS_2ND_SINGULAR
+IDS_TIME_HOURS_2ND_TWO
+IDS_TIME_HOURS_2ND_ZERO
IDS_TIME_HOURS_DEFAULT
IDS_TIME_HOURS_FEW
IDS_TIME_HOURS_MANY
+IDS_TIME_HOURS_SINGULAR
IDS_TIME_HOURS_TWO
IDS_TIME_HOURS_ZERO
-IDS_TIME_HOUR_SINGULAR
+IDS_TIME_LONG_MINS_1ST_DEFAULT
+IDS_TIME_LONG_MINS_1ST_FEW
+IDS_TIME_LONG_MINS_1ST_MANY
+IDS_TIME_LONG_MINS_1ST_SINGULAR
+IDS_TIME_LONG_MINS_1ST_TWO
+IDS_TIME_LONG_MINS_1ST_ZERO
+IDS_TIME_LONG_MINS_2ND_DEFAULT
+IDS_TIME_LONG_MINS_2ND_FEW
+IDS_TIME_LONG_MINS_2ND_MANY
+IDS_TIME_LONG_MINS_2ND_SINGULAR
+IDS_TIME_LONG_MINS_2ND_TWO
+IDS_TIME_LONG_MINS_2ND_ZERO
+IDS_TIME_LONG_MINS_DEFAULT
+IDS_TIME_LONG_MINS_FEW
+IDS_TIME_LONG_MINS_MANY
+IDS_TIME_LONG_MINS_SINGULAR
+IDS_TIME_LONG_MINS_TWO
+IDS_TIME_LONG_MINS_ZERO
+IDS_TIME_LONG_SECS_2ND_DEFAULT
+IDS_TIME_LONG_SECS_2ND_FEW
+IDS_TIME_LONG_SECS_2ND_MANY
+IDS_TIME_LONG_SECS_2ND_SINGULAR
+IDS_TIME_LONG_SECS_2ND_TWO
+IDS_TIME_LONG_SECS_2ND_ZERO
+IDS_TIME_LONG_SECS_DEFAULT
+IDS_TIME_LONG_SECS_FEW
+IDS_TIME_LONG_SECS_MANY
+IDS_TIME_LONG_SECS_SINGULAR
+IDS_TIME_LONG_SECS_TWO
+IDS_TIME_LONG_SECS_ZERO
IDS_TIME_MINS_DEFAULT
IDS_TIME_MINS_FEW
IDS_TIME_MINS_MANY
+IDS_TIME_MINS_SINGULAR
IDS_TIME_MINS_TWO
IDS_TIME_MINS_ZERO
-IDS_TIME_MIN_SINGULAR
IDS_TIME_REMAINING_DAYS_DEFAULT
IDS_TIME_REMAINING_DAYS_FEW
IDS_TIME_REMAINING_DAYS_MANY
+IDS_TIME_REMAINING_DAYS_SINGULAR
IDS_TIME_REMAINING_DAYS_TWO
IDS_TIME_REMAINING_DAYS_ZERO
-IDS_TIME_REMAINING_DAY_SINGULAR
IDS_TIME_REMAINING_HOURS_DEFAULT
IDS_TIME_REMAINING_HOURS_FEW
IDS_TIME_REMAINING_HOURS_MANY
+IDS_TIME_REMAINING_HOURS_SINGULAR
IDS_TIME_REMAINING_HOURS_TWO
IDS_TIME_REMAINING_HOURS_ZERO
-IDS_TIME_REMAINING_HOUR_SINGULAR
IDS_TIME_REMAINING_LONG_MINS_DEFAULT
IDS_TIME_REMAINING_LONG_MINS_FEW
IDS_TIME_REMAINING_LONG_MINS_MANY
+IDS_TIME_REMAINING_LONG_MINS_SINGULAR
IDS_TIME_REMAINING_LONG_MINS_TWO
IDS_TIME_REMAINING_LONG_MINS_ZERO
-IDS_TIME_REMAINING_LONG_MIN_SINGULAR
+IDS_TIME_REMAINING_LONG_SECS_DEFAULT
+IDS_TIME_REMAINING_LONG_SECS_FEW
+IDS_TIME_REMAINING_LONG_SECS_MANY
+IDS_TIME_REMAINING_LONG_SECS_SINGULAR
+IDS_TIME_REMAINING_LONG_SECS_TWO
+IDS_TIME_REMAINING_LONG_SECS_ZERO
IDS_TIME_REMAINING_MINS_DEFAULT
IDS_TIME_REMAINING_MINS_FEW
IDS_TIME_REMAINING_MINS_MANY
+IDS_TIME_REMAINING_MINS_SINGULAR
IDS_TIME_REMAINING_MINS_TWO
IDS_TIME_REMAINING_MINS_ZERO
-IDS_TIME_REMAINING_MIN_SINGULAR
IDS_TIME_REMAINING_SECS_DEFAULT
IDS_TIME_REMAINING_SECS_FEW
IDS_TIME_REMAINING_SECS_MANY
+IDS_TIME_REMAINING_SECS_SINGULAR
IDS_TIME_REMAINING_SECS_TWO
IDS_TIME_REMAINING_SECS_ZERO
-IDS_TIME_REMAINING_SEC_SINGULAR
IDS_TIME_SECS_DEFAULT
IDS_TIME_SECS_FEW
IDS_TIME_SECS_MANY
+IDS_TIME_SECS_SINGULAR
IDS_TIME_SECS_TWO
IDS_TIME_SECS_ZERO
-IDS_TIME_SEC_SINGULAR
IDS_TOOLTIP_STAR
IDS_TOUCH_EVENTS_DESCRIPTION
IDS_TOUCH_EVENTS_NAME
IDS_TRANSLATE_INFOBAR_ACCEPT
+IDS_TRANSLATE_INFOBAR_AFTER_MESSAGE
+IDS_TRANSLATE_INFOBAR_AFTER_MESSAGE_AUTODETERMINED_SOURCE_LANGUAGE
IDS_TRANSLATE_INFOBAR_BEFORE_MESSAGE
IDS_TRANSLATE_INFOBAR_DENY
-IDS_UNKNOWN_SEARCH_ENGINE_NAME
+IDS_TRANSLATE_INFOBAR_ERROR_CANT_CONNECT
+IDS_TRANSLATE_INFOBAR_ERROR_CANT_TRANSLATE
+IDS_TRANSLATE_INFOBAR_ERROR_SAME_LANGUAGE
+IDS_TRANSLATE_INFOBAR_OPTIONS_ABOUT
+IDS_TRANSLATE_INFOBAR_OPTIONS_ALWAYS
+IDS_TRANSLATE_INFOBAR_OPTIONS_NEVER_TRANSLATE_LANG
+IDS_TRANSLATE_INFOBAR_OPTIONS_NEVER_TRANSLATE_SITE
+IDS_TRANSLATE_INFOBAR_OPTIONS_REPORT_ERROR
+IDS_TRANSLATE_INFOBAR_RETRY
+IDS_TRANSLATE_INFOBAR_REVERT
+IDS_TRANSLATE_INFOBAR_TRANSLATING_TO
+IDS_TRANSLATE_INFOBAR_UNKNOWN_PAGE_LANGUAGE
+IDS_TRANSLATE_INFOBAR_UNSUPPORTED_PAGE_LANGUAGE
IDS_UPGRADE_AVAILABLE
IDS_UPGRADE_AVAILABLE_BUTTON
IDS_WEB_FONT_FAMILY
diff --git a/chromium/build/isolate.gypi b/chromium/build/isolate.gypi
index 2c667de5712..0b9dd3447e1 100644
--- a/chromium/build/isolate.gypi
+++ b/chromium/build/isolate.gypi
@@ -38,12 +38,16 @@
# for more information.
{
+ 'includes': [
+ '../build/util/version.gypi',
+ ],
'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',
@@ -64,14 +68,37 @@
],
'action': [
'python',
- '<(DEPTH)/tools/swarming_client/isolate.py',
+ '<(DEPTH)/tools/isolate_driver.py',
'<(test_isolation_mode)',
+ '--isolated', '<@(_outputs)',
+ '--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.
+ # like '0' or '1', aren't stripped out by GYP. Run 'isolate.py help' for
+ # more details.
+ #
+ # This list needs to be kept in sync with the cmd line options
+ # in src/build/android/pylib/gtest/setup.py.
+
+ # Path variables are used to replace file paths when loading a .isolate
+ # file
+ '--path-variable', 'DEPTH', '<(DEPTH)',
'--path-variable', 'PRODUCT_DIR', '<(PRODUCT_DIR) ',
+
+ # Extra variables are replaced on the 'command' entry and on paths in
+ # the .isolate file but are not considered relative paths.
+ '--extra-variable', 'version_full=<(version_full)',
+
'--config-variable', 'OS=<(OS)',
- '--result', '<@(_outputs)',
- '--isolate', '<(RULE_INPUT_PATH)',
+ '--config-variable', 'chromeos=<(chromeos)',
+ '--config-variable', 'component=<(component)',
+ # 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', 'icu_use_data_file_flag=<(icu_use_data_file_flag)',
+ '--config-variable', 'libpeer_target_type=<(libpeer_target_type)',
+ '--config-variable', 'use_openssl=<(use_openssl)',
],
'conditions': [
# Note: When gyp merges lists, it appends them to the old value.
@@ -82,24 +109,13 @@
'--extra-variable', 'mac_product_name', '<(mac_product_name)',
],
}],
- ["test_isolation_outdir==''", {
- # GYP will eliminate duplicate arguments so '<(PRODUCT_DIR)' cannot
- # be provided twice. To work around this behavior, append '/'.
- #
- # Also have a space after <(PRODUCT_DIR) or visual studio will
- # escape the argument wrappping " with the \ and merge it into
- # the following arguments.
- 'action': [ '--outdir', '<(PRODUCT_DIR)/ ' ],
- }, {
- 'action': [ '--outdir', '<(test_isolation_outdir)' ],
+ ["test_isolation_outdir!=''", {
+ 'action': [ '--isolate-server', '<(test_isolation_outdir)' ],
}],
['test_isolation_fail_on_missing == 0', {
- 'action': ['--ignore_broken_items'],
- },
- ],
+ 'action': ['--ignore_broken_items'],
+ }],
],
-
- 'msvs_cygwin_shell': 0,
},
],
}
diff --git a/chromium/build/jar_file_jni_generator.gypi b/chromium/build/jar_file_jni_generator.gypi
index 2e1b08497b2..dc43c49070d 100644
--- a/chromium/build/jar_file_jni_generator.gypi
+++ b/chromium/build/jar_file_jni_generator.gypi
@@ -22,6 +22,10 @@
{
'variables': {
'jni_generator': '<(DEPTH)/base/android/jni_generator/jni_generator.py',
+ # A comma separated string of include files.
+ 'jni_generator_includes%': (
+ 'base/android/jni_generator/jni_generator_helper.h'
+ ),
},
'actions': [
{
@@ -46,6 +50,8 @@
'<(input_java_class)',
'--output_dir',
'<(SHARED_INTERMEDIATE_DIR)/<(jni_gen_package)/jni',
+ '--includes',
+ '<(jni_generator_includes)',
'--optimize_generation',
'<(optimize_jni_generation)',
],
diff --git a/chromium/build/java.gypi b/chromium/build/java.gypi
index b3daebbee60..205f746a52c 100644
--- a/chromium/build/java.gypi
+++ b/chromium/build/java.gypi
@@ -39,8 +39,6 @@
# R_package - The java package in which the R class (which maps resources to
# integer IDs) should be generated, e.g. org.chromium.content.
# R_package_relpath - Same as R_package, but replace each '.' with '/'.
-# java_strings_grd - The name of the grd file from which to generate localized
-# strings.xml files, if any.
# res_extra_dirs - A list of extra directories containing Android resources.
# These directories may be generated at build time.
# res_extra_files - A list of the files in res_extra_dirs.
@@ -66,7 +64,6 @@
'generated_src_dirs': ['>@(generated_R_dirs)'],
'generated_R_dirs': [],
'has_java_resources%': 0,
- 'java_strings_grd%': '',
'res_extra_dirs': [],
'res_extra_files': [],
'res_v14_verify_only%': 0,
@@ -113,65 +110,35 @@
['has_java_resources == 1', {
'variables': {
'res_dir': '<(java_in_dir)/res',
- 'res_crunched_dir': '<(intermediate_dir)/res_crunched',
- 'res_v14_compatibility_stamp': '<(intermediate_dir)/res_v14_compatibility.stamp',
- 'res_v14_compatibility_dir': '<(intermediate_dir)/res_v14_compatibility',
'res_input_dirs': ['<(res_dir)', '<@(res_extra_dirs)'],
'resource_input_paths': ['<!@(find <(res_dir) -type f)'],
+
'R_dir': '<(intermediate_dir)/java_R',
'R_text_file': '<(R_dir)/R.txt',
- 'R_stamp': '<(intermediate_dir)/resources.stamp',
+
'generated_src_dirs': ['<(R_dir)'],
- 'additional_input_paths': ['<(R_stamp)',
- '<(res_v14_compatibility_stamp)',],
- 'additional_res_dirs': [],
- 'dependencies_res_input_dirs': [],
- 'dependencies_res_files': [],
+ 'additional_input_paths': ['<(resource_zip_path)', ],
+
+ 'dependencies_res_zip_paths': [],
+ 'resource_zip_path': '<(PRODUCT_DIR)/res.java/<(_target_name).zip',
},
'all_dependent_settings': {
'variables': {
- # Dependent jars include this target's R.java file via
- # generated_R_dirs and include its resources via
- # dependencies_res_files.
+ # Dependent libraries include this target's R.java file via
+ # generated_R_dirs.
'generated_R_dirs': ['<(R_dir)'],
- 'additional_input_paths': ['<(R_stamp)',
- '<(res_v14_compatibility_stamp)',],
- 'dependencies_res_files': ['<@(resource_input_paths)'],
- 'dependencies_res_input_dirs': ['<@(res_input_dirs)'],
+ # Dependent libraries and apks include this target's resources via
+ # dependencies_res_zip_paths.
+ 'additional_input_paths': ['<(resource_zip_path)'],
+ 'dependencies_res_zip_paths': ['<(resource_zip_path)'],
- # Dependent APKs include this target's resources via
- # additional_res_dirs, additional_res_packages, and
- # additional_R_text_files.
- 'additional_res_dirs': ['<(res_crunched_dir)',
- '<(res_v14_compatibility_dir)',
- '<@(res_input_dirs)'],
+ # additional_res_packages and additional_R_text_files are used to
+ # create this packages R.java files when building the APK.
'additional_res_packages': ['<(R_package)'],
'additional_R_text_files': ['<(R_text_file)'],
},
},
- 'conditions': [
- ['java_strings_grd != ""', {
- 'variables': {
- 'res_grit_dir': '<(intermediate_dir)/res_grit',
- 'res_input_dirs': ['<(res_grit_dir)'],
- 'grit_grd_file': '<(java_in_dir)/strings/<(java_strings_grd)',
- 'resource_input_paths': ['<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(res_grit_dir)" <(grit_grd_file))'],
- },
- 'actions': [
- {
- 'action_name': 'generate_localized_strings_xml',
- 'variables': {
- 'grit_additional_defines': ['-E', 'ANDROID_JAVA_TAGGED_ONLY=false'],
- 'grit_out_dir': '<(res_grit_dir)',
- # resource_ids is unneeded since we don't generate .h headers.
- 'grit_resource_ids': '',
- },
- 'includes': ['../build/grit_action.gypi'],
- },
- ],
- }],
- ],
'actions': [
# Generate R.java and crunch image resources.
{
@@ -179,72 +146,44 @@
'message': 'processing resources for <(_target_name)',
'variables': {
'android_manifest': '<(DEPTH)/build/android/AndroidManifest.xml',
- # Include the dependencies' res dirs so that references to
- # resources in dependencies can be resolved.
- 'all_res_dirs': ['<@(res_input_dirs)',
- '>@(dependencies_res_input_dirs)',],
- # Write the inputs list to a file, so that the action command
- # line won't exceed the OS limits when calculating the checksum
- # of the list.
- 'inputs_list_file': '>|(inputs_list.<(_target_name).gypcmd >@(_inputs))'
+ # Write the inputs list to a file, so that its mtime is updated when
+ # the list of inputs changes.
+ 'inputs_list_file': '>|(java_resources.<(_target_name).gypcmd >@(resource_input_paths))',
+ 'process_resources_options': [],
+ 'conditions': [
+ ['res_v14_verify_only == 1', {
+ 'process_resources_options': ['--v14-verify-only']
+ }],
+ ],
},
'inputs': [
'<(DEPTH)/build/android/gyp/util/build_utils.py',
'<(DEPTH)/build/android/gyp/process_resources.py',
+ '<(DEPTH)/build/android/gyp/generate_v14_compatible_resources.py',
'>@(resource_input_paths)',
- '>@(dependencies_res_files)',
+ '>@(dependencies_res_zip_paths)',
+ '>(inputs_list_file)',
],
'outputs': [
- '<(R_stamp)',
+ '<(resource_zip_path)',
],
'action': [
'python', '<(DEPTH)/build/android/gyp/process_resources.py',
'--android-sdk', '<(android_sdk)',
'--android-sdk-tools', '<(android_sdk_tools)',
- '--R-dir', '<(R_dir)',
- '--res-dirs', '>(all_res_dirs)',
- '--crunch-input-dir', '>(res_dir)',
- '--crunch-output-dir', '<(res_crunched_dir)',
- '--android-manifest', '<(android_manifest)',
'--non-constant-id',
+
+ '--android-manifest', '<(android_manifest)',
'--custom-package', '<(R_package)',
- '--stamp', '<(R_stamp)',
- # Add hash of inputs to the command line, so if inputs change
- # (e.g. if a resource if removed), the command will be re-run.
- # TODO(newt): remove this once crbug.com/177552 is fixed in ninja.
- '--ignore=>!(md5sum >(inputs_list_file))',
- ],
- },
- # Generate API 14 resources.
- {
- 'action_name': 'generate_api_14_resources_<(_target_name)',
- 'message': 'Generating Android API 14 resources <(_target_name)',
- 'variables' : {
- 'res_v14_additional_options': [],
- },
- 'conditions': [
- ['res_v14_verify_only == 1', {
- 'variables': {
- 'res_v14_additional_options': ['--verify-only']
- },
- }],
- ],
- 'inputs': [
- '<(DEPTH)/build/android/gyp/util/build_utils.py',
- '<(DEPTH)/build/android/gyp/generate_v14_compatible_resources.py',
- '>@(resource_input_paths)',
- ],
- 'outputs': [
- '<(res_v14_compatibility_stamp)',
+ '--dependencies-res-zips', '>(dependencies_res_zip_paths)',
+ '--resource-dirs', '<(res_input_dirs)',
+
+ '--R-dir', '<(R_dir)',
+ '--resource-zip-out', '<(resource_zip_path)',
+
+ '<@(process_resources_options)',
],
- 'action': [
- 'python', '<(DEPTH)/build/android/gyp/generate_v14_compatible_resources.py',
- '--res-dir=<(res_dir)',
- '--res-v14-compatibility-dir=<(res_v14_compatibility_dir)',
- '--stamp', '<(res_v14_compatibility_stamp)',
- '<@(res_v14_additional_options)',
- ]
},
],
}],
@@ -254,7 +193,7 @@
'action_name': 'proguard_<(_target_name)',
'message': 'Proguard preprocessing <(_target_name) jar',
'inputs': [
- '<(android_sdk_root)/tools/proguard/bin/proguard.sh',
+ '<(android_sdk_root)/tools/proguard/lib/proguard.jar',
'<(DEPTH)/build/android/gyp/util/build_utils.py',
'<(DEPTH)/build/android/gyp/proguard.py',
'<(javac_jar_path)',
@@ -265,14 +204,11 @@
],
'action': [
'python', '<(DEPTH)/build/android/gyp/proguard.py',
- '--proguard-path=<(android_sdk_root)/tools/proguard/bin/proguard.sh',
+ '--proguard-path=<(android_sdk_root)/tools/proguard/lib/proguard.jar',
'--input-path=<(javac_jar_path)',
'--output-path=<(jar_path)',
'--proguard-config=<(proguard_config)',
'--classpath=<(android_sdk_jar) >(input_jars_paths)',
-
- # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
- '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
]
},
],
@@ -283,16 +219,12 @@
'action_name': 'javac_<(_target_name)',
'message': 'Compiling <(_target_name) java sources',
'variables': {
- 'all_src_dirs': [
- '>(java_in_dir)/src',
- '>@(additional_src_dirs)',
- '>@(generated_src_dirs)',
- ],
+ 'java_sources': ['>!@(find >(java_in_dir)/src >(additional_src_dirs) -name "*.java")'],
},
'inputs': [
'<(DEPTH)/build/android/gyp/util/build_utils.py',
'<(DEPTH)/build/android/gyp/javac.py',
- '>!@(find >(java_in_dir)/src >(additional_src_dirs) -name "*.java")',
+ '>@(java_sources)',
'>@(input_jars_paths)',
'>@(additional_input_paths)',
],
@@ -303,13 +235,11 @@
'python', '<(DEPTH)/build/android/gyp/javac.py',
'--output-dir=<(classes_dir)',
'--classpath=>(input_jars_paths)',
- '--src-dirs=>(all_src_dirs)',
+ '--src-gendirs=>(generated_src_dirs)',
'--javac-includes=<(javac_includes)',
'--chromium-code=<(chromium_code)',
'--stamp=<(compile_stamp)',
-
- # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
- '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
+ '>@(java_sources)',
]
},
{
@@ -347,9 +277,6 @@
'--classes-dir=<(classes_dir)',
'--jar-path=<(javac_jar_path)',
'--excluded-classes=<(jar_excluded_classes)',
-
- # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
- '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
]
},
{
@@ -385,9 +312,6 @@
'python', '<(DEPTH)/build/android/gyp/jar_toc.py',
'--jar-path=<(jar_final_path)',
'--toc-path=<(jar_final_path).TOC',
-
- # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
- '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
]
},
{
diff --git a/chromium/build/java_aidl.gypi b/chromium/build/java_aidl.gypi
index 2d4ae2ef6e8..3c6f8e435cb 100644
--- a/chromium/build/java_aidl.gypi
+++ b/chromium/build/java_aidl.gypi
@@ -46,7 +46,7 @@
},
},
'conditions': [
- ['"<(aidl_import_include)"!=""', {
+ ['aidl_import_include != ""', {
'variables': {
'additional_aidl_arguments': [ '-I<(aidl_import_include)' ],
'additional_aidl_input_paths': [ '<!@(find <(aidl_import_include) -name "*.java")', ]
diff --git a/chromium/build/java_apk.gypi b/chromium/build/java_apk.gypi
index 5ca61e3794e..bef0811c9a8 100644
--- a/chromium/build/java_apk.gypi
+++ b/chromium/build/java_apk.gypi
@@ -44,18 +44,16 @@
# resource_dir - The directory for resources.
# R_package - A custom Java package to generate the resource file R.java in.
# By default, the package given in AndroidManifest.xml will be used.
-# java_strings_grd - The name of the grd file from which to generate localized
-# strings.xml files, if any.
-# library_manifest_paths'- Paths to additional AndroidManifest.xml files from
-# libraries.
-# use_content_linker - Enable the content dynamic linker that allows sharing the
+# use_chromium_linker - Enable the content dynamic linker that allows sharing the
# RELRO section of the native libraries between the different processes.
-# enable_content_linker_tests - Enable the content dynamic linker test support
+# enable_chromium_linker_tests - Enable the content dynamic linker test support
# code. This allows a test APK to inject a Linker.TestRunner instance at
-# runtime. Should only be used by the content_linker_test_apk target!!
+# runtime. Should only be used by the chromium_linker_test_apk target!!
# never_lint - Set to 1 to not run lint on this target.
{
'variables': {
+ 'tested_apk_obfuscated_jar_path%': '/',
+ 'tested_apk_dex_path%': '/',
'additional_input_paths': [],
'input_jars_paths': [],
'library_dexed_jars_paths': [],
@@ -63,28 +61,24 @@
'generated_src_dirs': [],
'app_manifest_version_name%': '<(android_app_version_name)',
'app_manifest_version_code%': '<(android_app_version_code)',
+ # aapt generates this proguard.txt.
+ 'generated_proguard_file': '<(intermediate_dir)/proguard.txt',
'proguard_enabled%': 'false',
- 'proguard_flags_paths%': ['<(DEPTH)/build/android/empty_proguard.flags'],
+ 'proguard_flags_paths': ['<(generated_proguard_file)'],
'jar_name': 'chromium_apk_<(_target_name).jar',
'resource_dir%':'<(DEPTH)/build/android/ant/empty/res',
'R_package%':'',
'additional_R_text_files': [],
- 'additional_res_dirs': [],
+ 'dependencies_res_zip_paths': [],
'additional_res_packages': [],
'is_test_apk%': 0,
- 'java_strings_grd%': '',
- 'library_manifest_paths' : [],
'resource_input_paths': [],
'intermediate_dir': '<(PRODUCT_DIR)/<(_target_name)',
'asset_location%': '<(intermediate_dir)/assets',
'codegen_stamp': '<(intermediate_dir)/codegen.stamp',
- 'compile_input_paths': [],
'package_input_paths': [],
'ordered_libraries_file': '<(intermediate_dir)/native_libraries.json',
- # TODO(cjhopman): build/ shouldn't refer to content/. The libraryloader and
- # nativelibraries template should be moved out of content/ (to base/?).
- # http://crbug.com/225101
- 'native_libraries_template': '<(DEPTH)/content/public/android/java/templates/NativeLibraries.template',
+ 'native_libraries_template': '<(DEPTH)/base/android/java/templates/NativeLibraries.template',
'native_libraries_java_dir': '<(intermediate_dir)/native_libraries_java/',
'native_libraries_java_file': '<(native_libraries_java_dir)/NativeLibraries.java',
'native_libraries_java_stamp': '<(intermediate_dir)/native_libraries_java.stamp',
@@ -106,28 +100,31 @@
'jar_excluded_classes': [],
'jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)',
'obfuscated_jar_path': '<(intermediate_dir)/obfuscated.jar',
+ 'test_jar_path': '<(PRODUCT_DIR)/test.lib.java/<(apk_name).jar',
'dex_path': '<(intermediate_dir)/classes.dex',
'emma_device_jar': '<(android_sdk_root)/tools/lib/emma_device.jar',
'android_manifest_path%': '<(java_in_dir)/AndroidManifest.xml',
'push_stamp': '<(intermediate_dir)/push.stamp',
'link_stamp': '<(intermediate_dir)/link.stamp',
'package_resources_stamp': '<(intermediate_dir)/package_resources.stamp',
- 'codegen_input_paths': [],
+ 'resource_zip_path': '<(intermediate_dir)/<(_target_name).resources.zip',
+ 'resource_packaged_apk_name': '<(apk_name)-resources.ap_',
+ 'resource_packaged_apk_path': '<(intermediate_dir)/<(resource_packaged_apk_name)',
'unsigned_apk_path': '<(intermediate_dir)/<(apk_name)-unsigned.apk',
'final_apk_path%': '<(PRODUCT_DIR)/apks/<(apk_name).apk',
'incomplete_apk_path': '<(intermediate_dir)/<(apk_name)-incomplete.apk',
- 'source_dir': '<(java_in_dir)/src',
'apk_install_record': '<(intermediate_dir)/apk_install.record.stamp',
- 'device_intermediate_dir': '/data/local/tmp/chromium/<(_target_name)/<(CONFIGURATION_NAME)',
+ 'device_intermediate_dir': '/data/data/org.chromium.gyp_managed_install/<(_target_name)/<(CONFIGURATION_NAME)',
'symlink_script_host_path': '<(intermediate_dir)/create_symlinks.sh',
'symlink_script_device_path': '<(device_intermediate_dir)/create_symlinks.sh',
'create_standalone_apk%': 1,
+ 'res_v14_verify_only%': 0,
'variables': {
'variables': {
'native_lib_target%': '',
'native_lib_version_name%': '',
- 'use_content_linker%': 0,
- 'enable_content_linker_tests%': 0,
+ 'use_chromium_linker%' : 0,
+ 'enable_chromium_linker_tests%': 0,
'is_test_apk%': 0,
},
'conditions': [
@@ -142,27 +139,37 @@
'apk_package_native_libs_dir': '<(intermediate_dir)/libs',
}],
['is_test_apk == 0 and emma_coverage != 0', {
- 'emma_instrument': 1,
+ 'emma_instrument%': 1,
},{
- 'emma_instrument': 0,
+ 'emma_instrument%': 0,
}],
],
},
'native_lib_target%': '',
'native_lib_version_name%': '',
- 'use_content_linker%': 0,
- 'enable_content_linker_tests%': 0,
- 'emma_instrument': '<(emma_instrument)',
+ 'use_chromium_linker%' : 0,
+ 'enable_chromium_linker_tests%': 0,
+ 'emma_instrument%': '<(emma_instrument)',
'apk_package_native_libs_dir': '<(apk_package_native_libs_dir)',
'unsigned_standalone_apk_path': '<(unsigned_standalone_apk_path)',
'extra_native_libs': [],
+ 'apk_dex_input_paths': [ '>@(library_dexed_jars_paths)' ],
},
# Pass the jar path to the apk's "fake" jar target. This would be better as
# direct_dependent_settings, but a variable set by a direct_dependent_settings
# cannot be lifted in a dependent to all_dependent_settings.
'all_dependent_settings': {
+ 'conditions': [
+ ['proguard_enabled == "true"', {
+ 'variables': {
+ 'proguard_enabled': 'true',
+ }
+ }],
+ ],
'variables': {
- 'apk_output_jar_path': '<(PRODUCT_DIR)/lib.java/<(jar_name)',
+ 'apk_output_jar_path': '<(jar_path)',
+ 'tested_apk_obfuscated_jar_path': '<(obfuscated_jar_path)',
+ 'tested_apk_dex_path': '<(dex_path)',
},
},
'conditions': [
@@ -175,7 +182,6 @@
'variables': {
# We generate R.java in package R_package (in addition to the package
# listed in the AndroidManifest.xml, which is unavoidable).
- 'additional_res_dirs': ['<(DEPTH)/build/android/ant/empty/res'],
'additional_res_packages': ['<(R_package)'],
'additional_R_text_files': ['<(PRODUCT_DIR)/<(package_name)/R.txt'],
},
@@ -185,14 +191,13 @@
'<(DEPTH)/build/android/setup.gyp:copy_system_libraries',
],
}],
- ['use_content_linker == 1', {
+ ['use_chromium_linker == 1', {
'dependencies': [
- '<(DEPTH)/content/content.gyp:content_android_linker',
+ '<(DEPTH)/base/base.gyp:chromium_android_linker',
],
}],
['native_lib_target != ""', {
'variables': {
- 'compile_input_paths': [ '<(native_libraries_java_stamp)' ],
'generated_src_dirs': [ '<(native_libraries_java_dir)' ],
'native_libs_paths': [
'<(SHARED_LIB_DIR)/<(native_lib_target).>(android_product_extension)'
@@ -209,7 +214,6 @@
'destination': '<(apk_package_native_libs_dir)/<(android_app_abi)',
'files': [
'<(android_gdbserver)',
- '<@(extra_native_libs)',
],
},
],
@@ -217,10 +221,10 @@
{
'variables': {
'conditions': [
- ['use_content_linker == 1', {
+ ['use_chromium_linker == 1', {
'variables': {
'linker_input_libraries': [
- '<(SHARED_LIB_DIR)/libcontent_android_linker.>(android_product_extension)',
+ '<(SHARED_LIB_DIR)/libchromium_android_linker.>(android_product_extension)',
],
}
}, {
@@ -261,10 +265,10 @@
'action_name': 'native_libraries_<(_target_name)',
'variables': {
'conditions': [
- ['use_content_linker == 1', {
+ ['use_chromium_linker == 1', {
'variables': {
'linker_gcc_preprocess_defines': [
- '--defines', 'ENABLE_CONTENT_LINKER',
+ '--defines', 'ENABLE_CHROMIUM_LINKER',
],
}
}, {
@@ -272,10 +276,10 @@
'linker_gcc_preprocess_defines': [],
},
}],
- ['enable_content_linker_tests == 1', {
+ ['enable_chromium_linker_tests == 1', {
'variables': {
'linker_tests_gcc_preprocess_defines': [
- '--defines', 'ENABLE_CONTENT_LINKER_TESTS',
+ '--defines', 'ENABLE_CHROMIUM_LINKER_TESTS',
],
}
}, {
@@ -289,7 +293,7 @@
'<@(linker_tests_gcc_preprocess_defines)',
],
},
- 'message': 'Creating NativeLibraries.java for <(_target_name).',
+ 'message': 'Creating NativeLibraries.java for <(_target_name)',
'inputs': [
'<(DEPTH)/build/android/gyp/util/build_utils.py',
'<(DEPTH)/build/android/gyp/gcc_preprocess.py',
@@ -340,7 +344,7 @@
},
{
'action_name': 'create device library symlinks',
- 'message': 'Creating links on device for <(_target_name).',
+ 'message': 'Creating links on device for <(_target_name)',
'inputs': [
'<(DEPTH)/build/android/gyp/util/build_utils.py',
'<(DEPTH)/build/android/gyp/create_device_library_links.py',
@@ -404,29 +408,6 @@
},
],
}],
- ['java_strings_grd != ""', {
- 'variables': {
- 'res_grit_dir': '<(SHARED_INTERMEDIATE_DIR)/<(package_name)_apk/res_grit',
- 'additional_res_dirs': ['<(res_grit_dir)'],
- # grit_grd_file is used by grit_action.gypi, included below.
- 'grit_grd_file': '<(java_in_dir)/strings/<(java_strings_grd)',
- 'resource_input_paths': [
- '<!@pymod_do_main(grit_info <@(grit_defines) --outputs "<(res_grit_dir)" <(grit_grd_file))'
- ],
- },
- 'actions': [
- {
- 'action_name': 'generate_localized_strings_xml',
- 'variables': {
- 'grit_additional_defines': ['-E', 'ANDROID_JAVA_TAGGED_ONLY=false'],
- 'grit_out_dir': '<(res_grit_dir)',
- # resource_ids is unneeded since we don't generate .h headers.
- 'grit_resource_ids': '',
- },
- 'includes': ['../build/grit_action.gypi'],
- },
- ],
- }],
['gyp_managed_install == 1', {
'actions': [
{
@@ -470,75 +451,92 @@
],
'actions': [
{
- 'action_name': 'ant_codegen_<(_target_name)',
- 'message': 'Generating R.java for <(_target_name)',
- 'conditions': [
- ['is_test_apk == 1', {
- 'variables': {
- 'additional_res_dirs=': [],
+ 'action_name': 'process_resources',
+ 'message': 'processing resources for <(_target_name)',
+ 'variables': {
+ # Write the inputs list to a file, so that its mtime is updated when
+ # the list of inputs changes.
+ 'inputs_list_file': '>|(apk_codegen.<(_target_name).gypcmd >@(additional_input_paths) >@(resource_input_paths))',
+ 'process_resources_options': [],
+ 'conditions': [
+ ['is_test_apk == 1', {
+ 'dependencies_res_zip_paths=': [],
'additional_res_packages=': [],
- }
- }],
- ],
+ }],
+ ['res_v14_verify_only == 1', {
+ 'process_resources_options': ['--v14-verify-only']
+ }],
+ ],
+ },
'inputs': [
- '<(DEPTH)/build/android/ant/apk-codegen.xml',
'<(DEPTH)/build/android/gyp/util/build_utils.py',
- '<(DEPTH)/build/android/gyp/ant.py',
+ '<(DEPTH)/build/android/gyp/process_resources.py',
'<(android_manifest_path)',
'>@(additional_input_paths)',
- '>@(codegen_input_paths)',
- '>@(library_manifest_paths)',
'>@(resource_input_paths)',
+ '>@(dependencies_res_zip_paths)',
+ '>(inputs_list_file)',
],
'outputs': [
+ '<(resource_zip_path)',
+ '<(generated_proguard_file)',
'<(codegen_stamp)',
],
'action': [
- 'python', '<(DEPTH)/build/android/gyp/ant.py',
- '-quiet',
- '-DADDITIONAL_RES_DIRS=>(additional_res_dirs)',
- '-DADDITIONAL_RES_PACKAGES=>(additional_res_packages)',
- '-DADDITIONAL_R_TEXT_FILES=>(additional_R_text_files)',
- '-DANDROID_MANIFEST=<(android_manifest_path)',
- '-DANDROID_SDK_JAR=<(android_sdk_jar)',
- '-DANDROID_SDK_ROOT=<(android_sdk_root)',
- '-DANDROID_SDK_VERSION=<(android_sdk_version)',
- '-DANDROID_SDK_TOOLS=<(android_sdk_tools)',
- '-DLIBRARY_MANIFEST_PATHS=>(library_manifest_paths)',
- '-DOUT_DIR=<(intermediate_dir)',
- '-DRESOURCE_DIR=<(resource_dir)',
+ 'python', '<(DEPTH)/build/android/gyp/process_resources.py',
+ '--android-sdk', '<(android_sdk)',
+ '--android-sdk-tools', '<(android_sdk_tools)',
- '-DSTAMP=<(codegen_stamp)',
- '-Dbasedir=.',
- '-buildfile',
- '<(DEPTH)/build/android/ant/apk-codegen.xml',
+ '--android-manifest', '<(android_manifest_path)',
+ '--dependencies-res-zips', '>(dependencies_res_zip_paths)',
+
+ '--extra-res-packages', '>(additional_res_packages)',
+ '--extra-r-text-files', '>(additional_R_text_files)',
+
+ '--proguard-file', '<(generated_proguard_file)',
+
+ '--resource-dirs', '<(resource_dir)',
+ '--resource-zip-out', '<(resource_zip_path)',
+
+ '--R-dir', '<(intermediate_dir)/gen',
+
+ '--stamp', '<(codegen_stamp)',
- # Add list of inputs to the command line, so if inputs change
- # (e.g. if a Java file is removed), the command will be re-run.
- # TODO(newt): remove this once crbug.com/177552 is fixed in ninja.
- '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)',
+ '<@(process_resources_options)',
],
},
{
'action_name': 'javac_<(_target_name)',
'message': 'Compiling java for <(_target_name)',
'variables': {
- 'all_src_dirs': [
- '<(java_in_dir)/src',
+ 'gen_src_dirs': [
'<(intermediate_dir)/gen',
- '>@(additional_src_dirs)',
'>@(generated_src_dirs)',
],
+ # If there is a separate find for additional_src_dirs, it will find the
+ # wrong .java files when additional_src_dirs is empty.
+ # TODO(thakis): Gyp caches >! evaluation by command. Both java.gypi and
+ # java_apk.gypi evaluate the same command, and at the moment two targets
+ # set java_in_dir to "java". Add a dummy comment here to make sure
+ # that the two targets (one uses java.gypi, the other java_apk.gypi)
+ # get distinct source lists. Medium-term, make targets list all their
+ # Java files instead of using find. (As is, this will be broken if two
+ # targets use the same java_in_dir and both use java_apk.gypi or
+ # both use java.gypi.)
+ 'java_sources': ['>!@(find >(java_in_dir)/src >(additional_src_dirs) -name "*.java" # apk)'],
+
},
'inputs': [
'<(DEPTH)/build/android/gyp/util/build_utils.py',
'<(DEPTH)/build/android/gyp/javac.py',
- # If there is a separate find for additional_src_dirs, it will find the
- # wrong .java files when additional_src_dirs is empty.
- '>!@(find >(java_in_dir) >(additional_src_dirs) -name "*.java")',
+ '>@(java_sources)',
'>@(input_jars_paths)',
'<(codegen_stamp)',
- '>@(compile_input_paths)',
+ ],
+ 'conditions': [
+ ['native_lib_target != ""', {
+ 'inputs': [ '<(native_libraries_java_stamp)' ],
+ }],
],
'outputs': [
'<(compile_stamp)',
@@ -547,13 +545,11 @@
'python', '<(DEPTH)/build/android/gyp/javac.py',
'--output-dir=<(classes_dir)',
'--classpath=>(input_jars_paths) <(android_sdk_jar)',
- '--src-dirs=>(all_src_dirs)',
+ '--src-gendirs=>(gen_src_dirs)',
'--javac-includes=<(javac_includes)',
'--chromium-code=<(chromium_code)',
'--stamp=<(compile_stamp)',
-
- # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
- '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
+ '>@(java_sources)',
],
},
{
@@ -595,13 +591,14 @@
'action_name': 'jar_<(_target_name)',
'message': 'Creating <(_target_name) jar',
'inputs': [
- '<(instr_stamp)',
'<(DEPTH)/build/android/gyp/util/build_utils.py',
'<(DEPTH)/build/android/gyp/util/md5_check.py',
'<(DEPTH)/build/android/gyp/jar.py',
+ '<(instr_stamp)',
],
'outputs': [
'<(jar_stamp)',
+ '<(jar_path)',
],
'action': [
'python', '<(DEPTH)/build/android/gyp/jar.py',
@@ -609,135 +606,183 @@
'--jar-path=<(jar_path)',
'--excluded-classes=<(jar_excluded_classes)',
'--stamp=<(jar_stamp)',
-
- # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
- '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
]
},
{
- 'action_name': 'ant_obfuscate_<(_target_name)',
+ 'action_name': 'obfuscate_<(_target_name)',
'message': 'Obfuscating <(_target_name)',
+ 'variables': {
+ 'additional_obfuscate_options': [],
+ 'additional_obfuscate_input_paths': [],
+ 'proguard_out_dir': '<(intermediate_dir)/proguard',
+ 'proguard_input_jar_paths': [
+ '>@(input_jars_paths)',
+ '<(jar_path)',
+ ],
+ 'target_conditions': [
+ ['is_test_apk == 1', {
+ 'additional_obfuscate_options': [
+ '--testapp',
+ ],
+ }],
+ ['is_test_apk == 1 and tested_apk_obfuscated_jar_path != "/"', {
+ 'additional_obfuscate_options': [
+ '--tested-apk-obfuscated-jar-path', '>(tested_apk_obfuscated_jar_path)',
+ ],
+ 'additional_obfuscate_input_paths': [
+ '>(tested_apk_obfuscated_jar_path).info',
+ ],
+ }],
+ ['proguard_enabled == "true"', {
+ 'additional_obfuscate_options': [
+ '--proguard-enabled',
+ ],
+ }],
+ ],
+ 'obfuscate_input_jars_paths': [
+ '>@(input_jars_paths)',
+ '<(jar_path)',
+ ],
+ },
+ 'conditions': [
+ ['is_test_apk == 1', {
+ 'outputs': [
+ '<(test_jar_path)',
+ ],
+ }],
+ ],
'inputs': [
- '<(DEPTH)/build/android/ant/apk-obfuscate.xml',
- '<(DEPTH)/build/android/ant/create-test-jar.js',
+ '<(DEPTH)/build/android/gyp/apk_obfuscate.py',
'<(DEPTH)/build/android/gyp/util/build_utils.py',
- '<(DEPTH)/build/android/gyp/ant.py',
- '<(instr_stamp)',
'>@(proguard_flags_paths)',
+ '>@(obfuscate_input_jars_paths)',
+ '>@(additional_obfuscate_input_paths)',
+ '<(instr_stamp)',
],
'outputs': [
'<(obfuscate_stamp)',
+
+ # In non-Release builds, these paths will all be empty files.
+ '<(obfuscated_jar_path)',
+ '<(obfuscated_jar_path).info',
+ '<(obfuscated_jar_path).dump',
+ '<(obfuscated_jar_path).seeds',
+ '<(obfuscated_jar_path).mapping',
+ '<(obfuscated_jar_path).usage',
],
'action': [
- 'python', '<(DEPTH)/build/android/gyp/ant.py',
- '-quiet',
- '-DADDITIONAL_SRC_DIRS=>(additional_src_dirs)',
- '-DANDROID_SDK_JAR=<(android_sdk_jar)',
- '-DANDROID_SDK_ROOT=<(android_sdk_root)',
- '-DANDROID_SDK_VERSION=<(android_sdk_version)',
- '-DANDROID_SDK_TOOLS=<(android_sdk_tools)',
- '-DAPK_NAME=<(apk_name)',
- '-DCREATE_TEST_JAR_PATH=<(DEPTH)/build/android/ant/create-test-jar.js',
- '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)',
- '-DGENERATED_SRC_DIRS=>(generated_src_dirs)',
- '-DINPUT_JARS_PATHS=>(input_jars_paths)',
- '-DIS_TEST_APK=<(is_test_apk)',
- '-DJAR_PATH=<(PRODUCT_DIR)/lib.java/<(jar_name)',
- '-DOBFUSCATED_JAR_PATH=<(obfuscated_jar_path)',
- '-DOUT_DIR=<(intermediate_dir)',
- '-DPROGUARD_ENABLED=<(proguard_enabled)',
- '-DPROGUARD_FLAGS=<(proguard_flags_paths)',
- '-DTEST_JAR_PATH=<(PRODUCT_DIR)/test.lib.java/<(apk_name).jar',
+ 'python', '<(DEPTH)/build/android/gyp/apk_obfuscate.py',
- '-DSTAMP=<(obfuscate_stamp)',
- '-Dbasedir=.',
- '-buildfile',
- '<(DEPTH)/build/android/ant/apk-obfuscate.xml',
+ '--configuration-name', '<(CONFIGURATION_NAME)',
+
+ '--android-sdk', '<(android_sdk)',
+ '--android-sdk-tools', '<(android_sdk_tools)',
+ '--android-sdk-jar', '<(android_sdk_jar)',
+
+ '--input-jars-paths=>(proguard_input_jar_paths)',
+ '--proguard-configs=>(proguard_flags_paths)',
+
+
+ '--test-jar-path', '<(test_jar_path)',
+ '--obfuscated-jar-path', '<(obfuscated_jar_path)',
+
+ '--proguard-jar-path', '<(android_sdk_root)/tools/proguard/lib/proguard.jar',
+
+ '--stamp', '<(obfuscate_stamp)',
- # Add list of inputs to the command line, so if inputs change
- # (e.g. if a Java file is removed), the command will be re-run.
- # TODO(newt): remove this once crbug.com/177552 is fixed in ninja.
- '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)',
+ '>@(additional_obfuscate_options)',
],
},
{
'action_name': 'dex_<(_target_name)',
'variables': {
- 'conditions': [
- ['proguard_enabled == "true"', {
- 'input_paths': [ '<(obfuscate_stamp)' ],
- 'proguard_enabled_input_path': '<(obfuscated_jar_path)',
- }],
- ['emma_instrument != 0', {
- 'dex_no_locals': 1,
- }],
- ['emma_instrument != 0 and is_test_apk == 0', {
- 'dex_input_paths': [ '<(emma_device_jar)' ],
- }],
- ],
- 'input_paths': [ '<(instr_stamp)' ],
- 'dex_input_paths': [ '>@(library_dexed_jars_paths)' ],
- 'dex_generated_input_dirs': [ '<(classes_final_dir)' ],
'output_path': '<(dex_path)',
+ 'dex_input_paths': [
+ '>@(apk_dex_input_paths)',
+ '<(jar_path)',
+ ],
+ 'proguard_enabled_input_path': '<(obfuscated_jar_path)',
},
+ 'target_conditions': [
+ ['emma_instrument != 0', {
+ 'dex_no_locals': 1,
+ 'dex_input_paths': [
+ '<(emma_device_jar)'
+ ],
+ }],
+ ['is_test_apk == 1 and tested_apk_dex_path != "/"', {
+ 'variables': {
+ 'dex_additional_options': [
+ '--excluded-paths-file', '>(tested_apk_dex_path).inputs'
+ ],
+ },
+ 'inputs': [
+ '>(tested_apk_dex_path).inputs',
+ ],
+ }],
+ ['proguard_enabled == "true"', {
+ 'inputs': [ '<(obfuscate_stamp)' ]
+ }, {
+ 'inputs': [ '<(instr_stamp)' ]
+ }],
+ ],
'includes': [ 'android/dex_action.gypi' ],
},
{
- 'action_name': 'ant package resources',
- 'message': 'Packaging resources for <(_target_name) APK.',
- 'inputs': [
- '<(DEPTH)/build/android/ant/apk-package-resources.xml',
- '<(DEPTH)/build/android/gyp/util/build_utils.py',
- '<(DEPTH)/build/android/gyp/ant.py',
- '<(android_manifest_path)',
- '<(codegen_stamp)',
-
- '>@(library_manifest_paths)',
- '>@(additional_input_paths)',
- ],
+ 'action_name': 'package_resources',
+ 'message': 'packaging resources for <(_target_name)',
+ 'variables': {
+ 'package_resource_zip_input_paths': [
+ '<(resource_zip_path)',
+ '>@(dependencies_res_zip_paths)',
+ ],
+ },
'conditions': [
['is_test_apk == 1', {
'variables': {
- 'additional_res_dirs=': [],
+ 'dependencies_res_zip_paths=': [],
'additional_res_packages=': [],
}
}],
],
+ 'inputs': [
+ # TODO: This isn't always rerun correctly, http://crbug.com/351928
+ '<(DEPTH)/build/android/gyp/util/build_utils.py',
+ '<(DEPTH)/build/android/gyp/package_resources.py',
+ '<(android_manifest_path)',
+
+ '>@(package_resource_zip_input_paths)',
+
+ '<(codegen_stamp)',
+ ],
'outputs': [
- '<(package_resources_stamp)',
+ '<(resource_packaged_apk_path)',
],
'action': [
- 'python', '<(DEPTH)/build/android/gyp/ant.py',
- '-quiet',
- '-DADDITIONAL_RES_DIRS=>(additional_res_dirs)',
- '-DADDITIONAL_RES_PACKAGES=>(additional_res_packages)',
- '-DADDITIONAL_R_TEXT_FILES=>(additional_R_text_files)',
- '-DANDROID_SDK_JAR=<(android_sdk_jar)',
- '-DANDROID_SDK_ROOT=<(android_sdk_root)',
- '-DANDROID_SDK_TOOLS=<(android_sdk_tools)',
- '-DAPK_NAME=<(apk_name)',
- '-DAPP_MANIFEST_VERSION_CODE=<(app_manifest_version_code)',
- '-DAPP_MANIFEST_VERSION_NAME=<(app_manifest_version_name)',
- '-DASSET_DIR=<(asset_location)',
- '-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)',
- '-DOUT_DIR=<(intermediate_dir)',
- '-DRESOURCE_DIR=<(resource_dir)',
+ 'python', '<(DEPTH)/build/android/gyp/package_resources.py',
+ '--android-sdk', '<(android_sdk)',
+ '--android-sdk-tools', '<(android_sdk_tools)',
- '-DSTAMP=<(package_resources_stamp)',
+ '--configuration-name', '<(CONFIGURATION_NAME)',
- '-Dbasedir=.',
- '-buildfile',
- '<(DEPTH)/build/android/ant/apk-package-resources.xml',
+ '--android-manifest', '<(android_manifest_path)',
+ '--version-code', '<(app_manifest_version_code)',
+ '--version-name', '<(app_manifest_version_name)',
- # Add list of inputs to the command line, so if inputs change
- # (e.g. if a Java file is removed), the command will be re-run.
- # TODO(newt): remove this once crbug.com/177552 is fixed in ninja.
- '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)',
- ]
+ '--asset-dir', '<(asset_location)',
+ '--resource-zips', '>(package_resource_zip_input_paths)',
+
+ '--apk-path', '<(resource_packaged_apk_path)',
+ ],
},
{
'action_name': 'ant_package_<(_target_name)',
- 'message': 'Packaging <(_target_name).',
+ 'message': 'Packaging <(_target_name)',
+ 'variables': {
+ # Write the inputs list to a file, so that its mtime is updated when
+ # the list of inputs changes.
+ 'inputs_list_file': '>|(apk_package.<(_target_name).gypcmd >@(package_input_paths))'
+ },
'inputs': [
'<(DEPTH)/build/android/ant/apk-package.xml',
'<(DEPTH)/build/android/gyp/util/build_utils.py',
@@ -745,8 +790,9 @@
'<(dex_path)',
'<(codegen_stamp)',
'<(obfuscate_stamp)',
- '<(package_resources_stamp)',
+ '<(resource_packaged_apk_path)',
'>@(package_input_paths)',
+ '>(inputs_list_file)',
],
'outputs': [
'<(unsigned_apk_path)',
@@ -756,11 +802,11 @@
'-quiet',
'-DANDROID_SDK_ROOT=<(android_sdk_root)',
'-DANDROID_SDK_TOOLS=<(android_sdk_tools)',
+ '-DRESOURCE_PACKAGED_APK_NAME=<(resource_packaged_apk_name)',
'-DAPK_NAME=<(apk_name)',
'-DCONFIGURATION_NAME=<(CONFIGURATION_NAME)',
'-DNATIVE_LIBS_DIR=<(apk_package_native_libs_dir)',
'-DOUT_DIR=<(intermediate_dir)',
- '-DSOURCE_DIR=<(source_dir)',
'-DUNSIGNED_APK_PATH=<(unsigned_apk_path)',
'-DEMMA_INSTRUMENT=<(emma_instrument)',
'-DEMMA_DEVICE_JAR=<(emma_device_jar)',
@@ -768,11 +814,6 @@
'-Dbasedir=.',
'-buildfile',
'<(DEPTH)/build/android/ant/apk-package.xml',
-
- # Add list of inputs to the command line, so if inputs change
- # (e.g. if a Java file is removed), the command will be re-run.
- # TODO(newt): remove this once crbug.com/177552 is fixed in ninja.
- '-DTHIS_IS_IGNORED=>!(echo \'>(_inputs)\' | md5sum)',
]
},
],
diff --git a/chromium/build/java_prebuilt.gypi b/chromium/build/java_prebuilt.gypi
index cec881dfd11..a3a8cc0c1c7 100644
--- a/chromium/build/java_prebuilt.gypi
+++ b/chromium/build/java_prebuilt.gypi
@@ -56,7 +56,7 @@
'action_name': 'proguard_<(_target_name)',
'message': 'Proguard preprocessing <(_target_name) jar',
'inputs': [
- '<(android_sdk_root)/tools/proguard/bin/proguard.sh',
+ '<(android_sdk_root)/tools/proguard/lib/proguard.jar',
'<(DEPTH)/build/android/gyp/util/build_utils.py',
'<(DEPTH)/build/android/gyp/proguard.py',
'<(jar_path)',
@@ -67,14 +67,11 @@
],
'action': [
'python', '<(DEPTH)/build/android/gyp/proguard.py',
- '--proguard-path=<(android_sdk_root)/tools/proguard/bin/proguard.sh',
+ '--proguard-path=<(android_sdk_root)/tools/proguard/lib/proguard.jar',
'--input-path=<(jar_path)',
'--output-path=<(dex_input_jar_path)',
'--proguard-config=<(proguard_config)',
'--classpath=>(input_jars_paths)',
-
- # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
- '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
]
},
],
@@ -84,25 +81,13 @@
{
'action_name': 'dex_<(_target_name)',
'message': 'Dexing <(_target_name) jar',
- 'inputs': [
- '<(DEPTH)/build/android/gyp/util/build_utils.py',
- '<(DEPTH)/build/android/gyp/dex.py',
- '<(dex_input_jar_path)',
- ],
- 'outputs': [
- '<(dex_path)',
- ],
- 'action': [
- 'python', '<(DEPTH)/build/android/gyp/dex.py',
- '--dex-path=<(dex_path)',
- '--android-sdk-tools=<(android_sdk_tools)',
-
- # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
- '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
-
- '<(dex_input_jar_path)',
- ]
+ 'variables': {
+ 'dex_input_paths': [
+ '<(dex_input_jar_path)',
+ ],
+ 'output_path': '<(dex_path)',
+ },
+ 'includes': [ 'android/dex_action.gypi' ],
},
-
],
}
diff --git a/chromium/build/java_strings_grd.gypi b/chromium/build/java_strings_grd.gypi
new file mode 100644
index 00000000000..7534be5beea
--- /dev/null
+++ b/chromium/build/java_strings_grd.gypi
@@ -0,0 +1,62 @@
+# 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.
+
+# This file is meant to be included into a target to provide a rule
+# to generate localized strings.xml from a grd file.
+#
+# To use this, create a gyp target with the following form:
+# {
+# 'target_name': 'my-package_strings_grd',
+# 'type': 'none',
+# 'variables': {
+# 'grd_file': 'path/to/grd/file',
+# },
+# 'includes': ['path/to/this/gypi/file'],
+# }
+#
+# Required variables:
+# grd_file - The path to the grd file to use.
+{
+ 'variables': {
+ 'res_grit_dir': '<(INTERMEDIATE_DIR)/<(_target_name)/res_grit',
+ 'grit_grd_file': '<(grd_file)',
+ 'resource_zip_path': '<(PRODUCT_DIR)/res.java/<(_target_name).zip',
+ 'grit_additional_defines': ['-E', 'ANDROID_JAVA_TAGGED_ONLY=false'],
+ 'grit_out_dir': '<(res_grit_dir)',
+ # resource_ids is unneeded since we don't generate .h headers.
+ 'grit_resource_ids': '',
+ 'grit_outputs': [
+ '<!@pymod_do_main(grit_info <@(grit_defines) <@(grit_additional_defines) '
+ '--outputs \'<(grit_out_dir)\' '
+ '<(grit_grd_file) -f "<(grit_resource_ids)")',
+ ]
+ },
+ 'all_dependent_settings': {
+ 'variables': {
+ 'additional_input_paths': ['<(resource_zip_path)'],
+ 'dependencies_res_zip_paths': ['<(resource_zip_path)'],
+ },
+ },
+ 'actions': [
+ {
+ 'action_name': 'generate_localized_strings_xml',
+ 'includes': ['../build/grit_action.gypi'],
+ },
+ {
+ 'action_name': 'create_resources_zip',
+ 'inputs': [
+ '<(DEPTH)/build/android/gyp/zip.py',
+ '<@(grit_outputs)',
+ ],
+ 'outputs': [
+ '<(resource_zip_path)',
+ ],
+ 'action': [
+ 'python', '<(DEPTH)/build/android/gyp/zip.py',
+ '--input-dir', '<(res_grit_dir)',
+ '--output', '<(resource_zip_path)',
+ ],
+ }
+ ],
+}
diff --git a/chromium/build/jni_generator.gypi b/chromium/build/jni_generator.gypi
index a6c8364d44c..da99331ec52 100644
--- a/chromium/build/jni_generator.gypi
+++ b/chromium/build/jni_generator.gypi
@@ -31,7 +31,11 @@
'variables': {
'jni_generator': '<(DEPTH)/base/android/jni_generator/jni_generator.py',
'jni_generator_jarjar_file%': '',
- 'jni_generator_ptr_type%': 'int',
+ 'jni_generator_ptr_type%': 'long',
+ # A comma separated string of include files.
+ 'jni_generator_includes%': (
+ 'base/android/jni_generator/jni_generator_helper.h'
+ ),
},
'rules': [
{
@@ -49,6 +53,8 @@
'<(RULE_INPUT_PATH)',
'--output_dir',
'<(SHARED_INTERMEDIATE_DIR)/<(jni_gen_package)/jni',
+ '--includes',
+ '<(jni_generator_includes)',
'--optimize_generation',
'<(optimize_jni_generation)',
'--jarjar',
@@ -67,6 +73,11 @@
],
},
],
+ 'direct_dependent_settings': {
+ 'include_dirs': [
+ '<(SHARED_INTERMEDIATE_DIR)/<(jni_gen_package)',
+ ],
+ },
# This target exports a hard dependency because it generates header
# files.
'hard_dependency': 1,
diff --git a/chromium/build/json_schema.gni b/chromium/build/json_schema.gni
new file mode 100644
index 00000000000..4f5c712c716
--- /dev/null
+++ b/chromium/build/json_schema.gni
@@ -0,0 +1,140 @@
+# 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.
+
+# TODO(brettw) this should maybe be moved to tools/json_schema_compiler/ where
+# the script is. Currently, we keep it in the build directory with the gyp
+# version to make it easier to find.
+#
+# Or, considering the fact that it references the chrome/extensions directory,
+# it should possibly be moved there.
+
+_api_gen_dir = "//tools/json_schema_compiler"
+_api_gen = "$_api_gen_dir/compiler.py"
+_impl_dir = "chrome/browser/extensions/api"
+
+_python_files = [
+ "$_api_gen_dir/cc_generator.py",
+ "$_api_gen_dir/code.py",
+ "$_api_gen_dir/compiler.py",
+ "$_api_gen_dir/cpp_bundle_generator.py",
+ "$_api_gen_dir/cpp_type_generator.py",
+ "$_api_gen_dir/cpp_util.py",
+ "$_api_gen_dir/h_generator.py",
+ "$_api_gen_dir/idl_schema.py",
+ "$_api_gen_dir/json_schema.py",
+ "$_api_gen_dir/model.py",
+ "$_api_gen_dir/util_cc_helper.py",
+]
+
+# Runs the schema compiler over a list of sources.
+#
+# Parameters:
+# sources
+# The .json and .idl files to compile.
+#
+# root_namespace
+# The C++ namespace that all generated files go under.
+#
+# deps, visibility (optional)
+template("json_schema_compile") {
+ assert(defined(invoker.sources), "Need sources for $target_name")
+ assert(defined(invoker.root_namespace),
+ "Need root_namespace defined for $target_name")
+
+ action_name = "${target_name}_action"
+ source_set_name = target_name
+
+ action_foreach(action_name) {
+ visibility = ":$source_set_name"
+ script = _api_gen
+
+ source_prereqs = _python_files
+ sources = invoker.sources
+
+ # TODO(GYP) We should probably be using {{source_gen_dir}} instead of
+ # $target_gen_dir but support for this string isn't pushed out in GN
+ # binaries yet. Replace this when it is.
+ outputs = [
+ "$target_gen_dir/{{source_name_part}}.cc",
+ "$target_gen_dir/{{source_name_part}}.h",
+ ]
+
+ args = [
+ "--root", rebase_path("//", root_build_dir),
+ "--destdir", rebase_path(root_gen_dir, root_build_dir),
+ "--namespace", invoker.root_namespace,
+ "--generator=cpp",
+ "--impl-dir", _impl_dir,
+ "{{source}}",
+ ]
+ }
+
+ source_set(source_set_name) {
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
+
+ sources = get_target_outputs(":$action_name")
+
+ deps = [ ":$action_name" ]
+ if (defined(invoker.deps)) {
+ deps += invoker.deps
+ }
+ }
+}
+
+# Runs the schema bundler.
+#
+# Parameters:
+# sources
+# The .json and .idl files to bundle.
+#
+# root_namespace
+# The C++ namespace that all generated files go under.
+#
+# deps, visibility (optional)
+template("json_schema_bundle") {
+ assert(defined(invoker.sources), "Need sources for $target_name")
+ assert(defined(invoker.root_namespace),
+ "Need root_namespace defined for $target_name")
+
+ action_name = "${target_name}_action"
+ source_set_name = target_name
+
+ action(action_name) {
+ visibility = ":$source_set_name"
+ script = _api_gen
+
+ source_prereqs = _python_files
+ source_prereqs += invoker.sources
+
+ outputs = [
+ "$target_gen_dir/generated_api.h",
+ "$target_gen_dir/generated_api.cc",
+ "$target_gen_dir/generated_schemas.h",
+ "$target_gen_dir/generated_schemas.cc",
+ ]
+
+ args = [
+ "--root", rebase_path("//", root_build_dir),
+ "--destdir", rebase_path(root_gen_dir, root_build_dir),
+ "--namespace", invoker.root_namespace,
+ "--generator=cpp-bundle",
+ "--impl-dir", _impl_dir,
+ ] + rebase_path(invoker.sources, root_build_dir)
+ }
+
+ source_set(source_set_name) {
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
+
+ sources = get_target_outputs(":$action_name")
+
+ deps = [ ":$action_name" ]
+ if (defined(invoker.deps)) {
+ deps += invoker.deps
+ }
+ }
+}
diff --git a/chromium/build/json_schema_bundle_compile.gypi b/chromium/build/json_schema_bundle_compile.gypi
index 630e9c6ad2e..9c505ff0729 100644
--- a/chromium/build/json_schema_bundle_compile.gypi
+++ b/chromium/build/json_schema_bundle_compile.gypi
@@ -9,11 +9,16 @@
# cc_dir: path to generated files
# root_namespace: the C++ namespace that all generated files go under
# Functions and namespaces can be excluded by setting "nocompile" to true.
+ # The default root path of API implementation sources is
+ # chrome/browser/extensions/api and can be overridden by setting "impl_dir".
'api_gen_dir': '<(DEPTH)/tools/json_schema_compiler',
'api_gen': '<(api_gen_dir)/compiler.py',
+ 'impl_dir%': 'chrome/browser/extensions/api',
},
'actions': [
{
+ # GN version: //build/json_schema.gni
+ # (json_schema_bundle_compile templates)
'action_name': 'genapi_bundle',
'inputs': [
'<(api_gen_dir)/cc_generator.py',
@@ -43,6 +48,7 @@
'--destdir=<(SHARED_INTERMEDIATE_DIR)',
'--namespace=<(root_namespace)',
'--generator=cpp-bundle',
+ '--impl-dir=<(impl_dir)',
'<@(schema_files)',
'<@(non_compiled_schema_files)',
],
diff --git a/chromium/build/json_schema_compile.gypi b/chromium/build/json_schema_compile.gypi
index 4f1c295e1f8..3c4e7c6f19e 100644
--- a/chromium/build/json_schema_compile.gypi
+++ b/chromium/build/json_schema_compile.gypi
@@ -9,11 +9,16 @@
# cc_dir: path to generated files
# root_namespace: the C++ namespace that all generated files go under
# Functions and namespaces can be excluded by setting "nocompile" to true.
+ # The default root path of API implementation sources is
+ # chrome/browser/extensions/api and can be overridden by setting "impl_dir".
'api_gen_dir': '<(DEPTH)/tools/json_schema_compiler',
'api_gen': '<(api_gen_dir)/compiler.py',
+ 'impl_dir%': 'chrome/browser/extensions/api',
},
'rules': [
{
+ # GN version: //build/json_schema.gni
+ # (json_schema_compile template)
'rule_name': 'genapi',
'msvs_external_rule': 1,
'extension': 'json',
@@ -36,8 +41,8 @@
# '<@(schema_files)',
],
'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).cc',
- '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).h',
+ '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).cc',
+ '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).h',
],
'action': [
'python',
@@ -47,6 +52,7 @@
'--destdir=<(SHARED_INTERMEDIATE_DIR)',
'--namespace=<(root_namespace)',
'--generator=cpp',
+ '--impl-dir=<(impl_dir)'
],
'message': 'Generating C++ code from <(RULE_INPUT_PATH) json files',
'process_outputs_as_sources': 1,
@@ -74,8 +80,8 @@
# '<@(schema_files)',
],
'outputs': [
- '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).cc',
- '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_ROOT).h',
+ '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).cc',
+ '<(SHARED_INTERMEDIATE_DIR)/<(cc_dir)/<(RULE_INPUT_DIRNAME)/<(RULE_INPUT_ROOT).h',
],
'action': [
'python',
@@ -85,6 +91,7 @@
'--destdir=<(SHARED_INTERMEDIATE_DIR)',
'--namespace=<(root_namespace)',
'--generator=cpp',
+ '--impl-dir=<(impl_dir)'
],
'message': 'Generating C++ code from <(RULE_INPUT_PATH) IDL files',
'process_outputs_as_sources': 1,
diff --git a/chromium/build/landmine_utils.py b/chromium/build/landmine_utils.py
index 4b8b2571915..773783291f2 100644
--- a/chromium/build/landmine_utils.py
+++ b/chromium/build/landmine_utils.py
@@ -33,7 +33,7 @@ def IsWindows():
@memoize()
def IsLinux():
- return sys.platform.startswith('linux')
+ return sys.platform.startswith(('linux', 'freebsd'))
@memoize()
@@ -105,7 +105,7 @@ def builder():
elif platform() == 'ios':
return 'xcode'
elif IsWindows():
- return 'msvs'
+ return 'ninja'
elif IsLinux():
return 'ninja'
elif IsMac():
diff --git a/chromium/build/landmines.py b/chromium/build/landmines.py
index 7b4c5b5ecc6..220b8a7989f 100755
--- a/chromium/build/landmines.py
+++ b/chromium/build/landmines.py
@@ -15,7 +15,7 @@ build is clobbered.
"""
import difflib
-import gyp_helper
+import errno
import logging
import optparse
import os
@@ -58,13 +58,13 @@ def set_up_landmines(target, new_landmines):
landmine_utils.platform() == 'ios')
landmines_path = os.path.join(out_dir, '.landmines')
- if not os.path.exists(out_dir):
+ try:
os.makedirs(out_dir)
+ except OSError as e:
+ if e.errno == errno.EEXIST:
+ pass
- if not os.path.exists(landmines_path):
- with open(landmines_path, 'w') as f:
- f.writelines(new_landmines)
- else:
+ if os.path.exists(landmines_path):
triggered = os.path.join(out_dir, '.landmines_triggered')
with open(landmines_path, 'r') as f:
old_landmines = f.readlines()
@@ -79,6 +79,8 @@ def set_up_landmines(target, new_landmines):
elif os.path.exists(triggered):
# Remove false triggered landmines.
os.remove(triggered)
+ with open(landmines_path, 'w') as f:
+ f.writelines(new_landmines)
def process_options():
@@ -113,7 +115,9 @@ def process_options():
def main():
landmine_scripts = process_options()
- gyp_helper.apply_chromium_gyp_env()
+
+ if landmine_utils.builder() in ('dump_dependency_json', 'eclipse'):
+ return 0
for target in ('Debug', 'Release', 'Debug_x64', 'Release_x64'):
landmines = []
diff --git a/chromium/build/linux/bin/eu-strip.sha1 b/chromium/build/linux/bin/eu-strip.sha1
new file mode 100644
index 00000000000..43f290a701a
--- /dev/null
+++ b/chromium/build/linux/bin/eu-strip.sha1
@@ -0,0 +1 @@
+0a9b8f68615ce388b65201e6d22da7a9cf2e729c \ No newline at end of file
diff --git a/chromium/build/linux/install-arm-sysroot.py b/chromium/build/linux/install-arm-sysroot.py
index 76d073e47a2..5c278ea652e 100755
--- a/chromium/build/linux/install-arm-sysroot.py
+++ b/chromium/build/linux/install-arm-sysroot.py
@@ -32,9 +32,9 @@ import sys
SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
-URL_PREFIX = 'https://commondatastorage.googleapis.com'
+URL_PREFIX = 'https://storage.googleapis.com'
URL_PATH = 'nativeclient-archive2/toolchain'
-REVISION = 12356
+REVISION = 13035
TARBALL = 'sysroot-arm-trusted.tgz'
def main(args):
@@ -64,7 +64,12 @@ def main(args):
shutil.rmtree(sysroot)
os.mkdir(sysroot)
tarball = os.path.join(sysroot, TARBALL)
- subprocess.check_call(['curl', '-L', url, '-o', tarball])
+ curl = ['curl', '--fail', '-L', url, '-o', tarball]
+ if os.isatty(sys.stdout.fileno()):
+ curl.append('--progress')
+ else:
+ curl.append('--silent')
+ subprocess.check_call(curl)
subprocess.check_call(['tar', 'xf', tarball, '-C', sysroot])
os.remove(tarball)
diff --git a/chromium/build/linux/pkg-config-wrapper b/chromium/build/linux/pkg-config-wrapper
index 14ee01bb2da..b7595645a11 100755
--- a/chromium/build/linux/pkg-config-wrapper
+++ b/chromium/build/linux/pkg-config-wrapper
@@ -19,18 +19,20 @@ root="$1"
shift
target_arch="$1"
shift
+libpath="$1"
+shift
if [ -z "$root" -o -z "$target_arch" ]
then
- echo "usage: $0 /path/to/sysroot target_arch [pkg-config-arguments] package" >&2
+ echo "usage: $0 /path/to/sysroot target_arch libdir [pkg-config-arguments] package" >&2
exit 1
fi
if [ "$target_arch" = "x64" ]
then
- libpath="lib64"
+ : ${libpath:="lib64"}
else
- libpath="lib"
+ : ${libpath:="lib"}
fi
rewrite=`dirname $0`/rewrite_dirs.py
diff --git a/chromium/build/linux/python_arch.sh b/chromium/build/linux/python_arch.sh
deleted file mode 100755
index 3a41f94a980..00000000000
--- a/chromium/build/linux/python_arch.sh
+++ /dev/null
@@ -1,43 +0,0 @@
-#!/bin/sh
-# Copyright (c) 2011 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-# This figures out the architecture of the version of Python we are building
-# pyautolib against.
-#
-# python_arch.sh /usr/lib/libpython2.5.so.1.0
-# python_arch.sh /path/to/sysroot/usr/lib/libpython2.4.so.1.0
-#
-
-file_out=$(file --dereference "$1")
-if [ $? -ne 0 ]; then
- echo unknown
- exit 0
-fi
-
-echo $file_out | grep -qs "ARM"
-if [ $? -eq 0 ]; then
- echo arm
- exit 0
-fi
-
-echo $file_out | grep -qs "MIPS"
-if [ $? -eq 0 ]; then
- echo mipsel
- exit 0
-fi
-
-echo $file_out | grep -qs "x86-64"
-if [ $? -eq 0 ]; then
- echo x64
- exit 0
-fi
-
-echo $file_out | grep -qs "Intel 80386"
-if [ $? -eq 0 ]; then
- echo ia32
- exit 0
-fi
-
-exit 1
diff --git a/chromium/build/linux/sysroot_ld_path.sh b/chromium/build/linux/sysroot_ld_path.sh
index 74553c93638..4b8bf7305e2 100755
--- a/chromium/build/linux/sysroot_ld_path.sh
+++ b/chromium/build/linux/sysroot_ld_path.sh
@@ -46,15 +46,19 @@ process_ld_so_conf() {
echo "$ENTRY" | grep -qs ^include
if [ $? -eq 0 ]; then
local included_files=$(echo "$ENTRY" | sed 's/^include //')
- if ls $included_files >/dev/null 2>&1 ; then
- for inc_file in $included_files; do
- echo $inc_file | grep -qs ^/
- if [ $? -eq 0 ]; then
- process_ld_so_conf "$root" "$root$inc_file"
- else
- process_ld_so_conf "$root" "$(pwd)/$inc_file"
- fi
- done
+ echo "$included_files" | grep -qs ^/
+ if [ $? -eq 0 ]; then
+ if ls $root$included_files >/dev/null 2>&1 ; then
+ for inc_file in $root$included_files; do
+ process_ld_so_conf "$root" "$inc_file"
+ done
+ fi
+ else
+ if ls $(pwd)/$included_files >/dev/null 2>&1 ; then
+ for inc_file in $(pwd)/$included_files; do
+ process_ld_so_conf "$root" "$inc_file"
+ done
+ fi
fi
continue
fi
diff --git a/chromium/build/linux/system.gyp b/chromium/build/linux/system.gyp
index 4a7e857efc1..7ccd973ded1 100644
--- a/chromium/build/linux/system.gyp
+++ b/chromium/build/linux/system.gyp
@@ -6,9 +6,9 @@
'variables': {
'conditions': [
['sysroot!=""', {
- 'pkg-config': './pkg-config-wrapper "<(sysroot)" "<(target_arch)"',
+ 'pkg-config': '<(chroot_cmd) ./pkg-config-wrapper "<(sysroot)" "<(target_arch)" "<(system_libdir)"',
}, {
- 'pkg-config': 'pkg-config'
+ 'pkg-config': 'pkg-config',
}],
],
@@ -18,20 +18,9 @@
'linux_link_libbrlapi%': 0,
},
'conditions': [
- [ 'os_posix==1 and OS!="mac"', {
- 'variables': {
- # We use our own copy of libssl3, although we still need to link against
- # the rest of NSS.
- 'use_system_ssl%': 0,
- },
- }, {
- 'variables': {
- 'use_system_ssl%': 1,
- },
- }],
- [ 'chromeos==0', {
- # Hide GTK and related dependencies for Chrome OS, so they won't get
- # added back to Chrome OS. Don't try to use GTK on Chrome OS.
+ [ 'chromeos==0 and use_ozone==0', {
+ # Hide GTK and related dependencies for Chrome OS and Ozone, so they won't get
+ # added back to Chrome OS and Ozone. Don't try to use GTK on Chrome OS and Ozone.
'targets': [
{
'target_name': 'gdk',
@@ -118,6 +107,315 @@
},
], # targets
}],
+ [ 'use_x11==1 or ozone_platform_ozonex==1', {
+ # Hide X11 and related dependencies when use_x11=0
+ 'targets': [
+ {
+ 'target_name': 'x11',
+ 'type': 'none',
+ 'toolsets': ['host', 'target'],
+ 'conditions': [
+ ['_toolset=="target"', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags x11)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l x11 xi)',
+ ],
+ },
+ }, {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(pkg-config --cflags x11)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(pkg-config --libs-only-L --libs-only-other x11 xi)',
+ ],
+ 'libraries': [
+ '<!@(pkg-config --libs-only-l x11 xi)',
+ ],
+ },
+ }],
+ ],
+ },
+ {
+ 'target_name': 'xcursor',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xcursor)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xcursor)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xcursor)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'xcomposite',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xcomposite)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xcomposite)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xcomposite)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'xdamage',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xdamage)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xdamage)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xdamage)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'xext',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xext)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xext)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'xfixes',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xfixes)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xfixes)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'xi',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xi)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xi)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xi)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'xrandr',
+ 'type': 'none',
+ 'toolsets': ['host', 'target'],
+ 'conditions': [
+ ['_toolset=="target"', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xrandr)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xrandr)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xrandr)',
+ ],
+ },
+ }, {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(pkg-config --cflags xrandr)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(pkg-config --libs-only-L --libs-only-other xrandr)',
+ ],
+ 'libraries': [
+ '<!@(pkg-config --libs-only-l xrandr)',
+ ],
+ },
+ }],
+ ],
+ },
+ {
+ 'target_name': 'xrender',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xrender)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xrender)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xrender)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'xtst',
+ 'type': 'none',
+ 'toolsets': ['host', 'target'],
+ 'conditions': [
+ ['_toolset=="target"', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xtst)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xtst)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xtst)',
+ ],
+ },
+ }, {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(pkg-config --cflags xtst)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(pkg-config --libs-only-L --libs-only-other xtst)',
+ ],
+ 'libraries': [
+ '<!@(pkg-config --libs-only-l xtst)',
+ ],
+ },
+ }]
+ ]
+ }
+ ], # targets
+ }],
+ ['use_x11==1 and chromeos==0', {
+ 'targets': [
+ {
+ 'target_name': 'xscrnsaver',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags xscrnsaver)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other xscrnsaver)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l xscrnsaver)',
+ ],
+ },
+ },
+ ], # targets
+ }],
+ ['use_evdev_gestures==1', {
+ 'targets': [
+ {
+ 'target_name': 'libevdev-cros',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags libevdev-cros)'
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other libevdev-cros)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l libevdev-cros)',
+ ],
+ },
+ },
+ {
+ 'target_name': 'libgestures',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags libgestures)'
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other libgestures)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l libgestures)',
+ ],
+ },
+ },
+ ],
+ }],
+ ['ozone_platform_gbm==1', {
+ 'targets': [
+ {
+ 'target_name': 'gbm',
+ 'type': 'none',
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags gbm)',
+ ],
+ },
+ 'link_settings': {
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l gbm)',
+ ],
+ },
+ },
+ ],
+ }],
], # conditions
'targets': [
{
@@ -156,19 +454,30 @@
'type': 'none',
'conditions': [
['_toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags fontconfig)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l fontconfig)',
- ],
- },
+ 'conditions': [
+ ['use_system_fontconfig==1', {
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(<(pkg-config) --cflags fontconfig)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(<(pkg-config) --libs-only-L --libs-only-other fontconfig)',
+ ],
+ 'libraries': [
+ '<!@(<(pkg-config) --libs-only-l fontconfig)',
+ ],
+ },
+ }, { # use_system_fontconfig==0
+ 'dependencies': [
+ '../../third_party/fontconfig/fontconfig.gyp:fontconfig',
+ ],
+ 'export_dependent_settings' : [
+ '../../third_party/fontconfig/fontconfig.gyp:fontconfig',
+ ],
+ }],
+ ],
}],
],
},
@@ -329,11 +638,6 @@
],
},
}],
- ['use_x11==1', {
- 'link_settings': {
- 'libraries': [ '-lXtst' ]
- }
- }],
],
},
{
@@ -415,9 +719,6 @@
{
'target_name': 'libbrlapi',
'type': 'static_library',
- 'dependencies': [
- '../../base/base.gyp:base',
- ],
'all_dependent_settings': {
'include_dirs': [
'<(SHARED_INTERMEDIATE_DIR)',
@@ -435,6 +736,9 @@
}],
],
},
+ 'include_dirs': [
+ '../..',
+ ],
'hard_dependency': 1,
'actions': [
{
@@ -460,7 +764,6 @@
'--link-directly=<(linux_link_libbrlapi)',
'brlapi_getHandleSize',
'brlapi_error_location',
- 'brlapi_expandKeyCode',
'brlapi_strerror',
'brlapi__acceptKeys',
'brlapi__openConnection',
@@ -486,24 +789,6 @@
},
},
{
- 'target_name': 'libgcrypt',
- 'type': 'none',
- 'conditions': [
- ['_toolset=="target" and use_cups==1', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(libgcrypt-config --cflags)',
- ],
- },
- 'link_settings': {
- 'libraries': [
- '<!@(libgcrypt-config --libs)',
- ],
- },
- }],
- ],
- },
- {
'target_name': 'libpci',
'type': 'static_library',
'cflags': [
@@ -702,7 +987,7 @@
'../../third_party/openssl/openssl.gyp:openssl',
],
}],
- ['use_openssl==0 and use_system_ssl==0', {
+ ['use_openssl==0', {
'dependencies': [
'../../net/third_party/nss/ssl.gyp:libssl',
],
@@ -725,24 +1010,6 @@
],
},
}],
- ['use_openssl==0 and use_system_ssl==1', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags nss)',
- ],
- 'defines': [
- 'USE_SYSTEM_SSL',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l nss)',
- ],
- },
- }],
['use_openssl==0 and clang==1', {
'direct_dependent_settings': {
'cflags': [
@@ -778,119 +1045,5 @@
}],
],
},
- {
- 'target_name': 'x11',
- 'type': 'none',
- 'toolsets': ['host', 'target'],
- 'conditions': [
- ['_toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags x11)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other x11 xi)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l x11 xi)',
- ],
- },
- }, {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(pkg-config --cflags x11)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(pkg-config --libs-only-L --libs-only-other x11 xi)',
- ],
- 'libraries': [
- '<!@(pkg-config --libs-only-l x11 xi)',
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'xext',
- 'type': 'none',
- 'conditions': [
- ['_toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags xext)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other xext)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l xext)',
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'xfixes',
- 'type': 'none',
- 'conditions': [
- ['_toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags xfixes)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other xfixes)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l xfixes)',
- ],
- },
- }],
- ],
- },
- {
- 'target_name': 'xrandr',
- 'type': 'none',
- 'toolsets': ['host', 'target'],
- 'conditions': [
- ['_toolset=="target"', {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(<(pkg-config) --cflags xrandr)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(<(pkg-config) --libs-only-L --libs-only-other xrandr)',
- ],
- 'libraries': [
- '<!@(<(pkg-config) --libs-only-l xrandr)',
- ],
- },
- }, {
- 'direct_dependent_settings': {
- 'cflags': [
- '<!@(pkg-config --cflags xrandr)',
- ],
- },
- 'link_settings': {
- 'ldflags': [
- '<!@(pkg-config --libs-only-L --libs-only-other xrandr)',
- ],
- 'libraries': [
- '<!@(pkg-config --libs-only-l xrandr)',
- ],
- },
- }],
- ],
- },
],
}
diff --git a/chromium/build/linux/unbundle/harfbuzz.gyp b/chromium/build/linux/unbundle/harfbuzz.gyp
index 93b2a69c12d..3bc1744b073 100644
--- a/chromium/build/linux/unbundle/harfbuzz.gyp
+++ b/chromium/build/linux/unbundle/harfbuzz.gyp
@@ -33,6 +33,15 @@
'<!@(pkg-config --libs-only-l <(harfbuzz_libraries))',
],
},
+ 'variables': {
+ 'headers_root_path': 'src',
+ 'header_filenames': [
+ 'hb.h',
+ ],
+ },
+ 'includes': [
+ '../../build/shim_headers.gypi',
+ ],
},
],
}
diff --git a/chromium/build/linux/unbundle/libXNVCtrl.gyp b/chromium/build/linux/unbundle/libXNVCtrl.gyp
new file mode 100644
index 00000000000..f076bdba41f
--- /dev/null
+++ b/chromium/build/linux/unbundle/libXNVCtrl.gyp
@@ -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.
+
+{
+ 'targets': [
+ {
+ 'target_name': 'libXNVCtrl',
+ 'type': 'none',
+ 'variables': {
+ 'headers_root_path': '.',
+ 'header_filenames': [
+ 'NVCtrlLib.h',
+ 'NVCtrl.h',
+ ],
+ },
+ 'includes': [
+ '../../build/shim_headers.gypi',
+ ],
+ 'direct_dependent_settings': {
+ 'cflags': [
+ '<!@(pkg-config --cflags libXNVCtrl)',
+ ],
+ },
+ 'link_settings': {
+ 'ldflags': [
+ '<!@(pkg-config --libs-only-L --libs-only-other libXNVCtrl)',
+ ],
+ 'libraries': [
+ '<!@(pkg-config --libs-only-l libXNVCtrl)',
+ ],
+ },
+ }
+ ],
+}
diff --git a/chromium/build/linux/unbundle/replace_gyp_files.py b/chromium/build/linux/unbundle/replace_gyp_files.py
index c0fcc49f553..28ab14f8ff8 100755
--- a/chromium/build/linux/unbundle/replace_gyp_files.py
+++ b/chromium/build/linux/unbundle/replace_gyp_files.py
@@ -29,6 +29,7 @@ REPLACEMENTS = {
'use_system_libvpx': 'third_party/libvpx/libvpx.gyp',
'use_system_libwebp': 'third_party/libwebp/libwebp.gyp',
'use_system_libxml': 'third_party/libxml/libxml.gyp',
+ 'use_system_libxnvctrl' : 'third_party/libXNVCtrl/libXNVCtrl.gyp',
'use_system_libxslt': 'third_party/libxslt/libxslt.gyp',
'use_system_openssl': 'third_party/openssl/openssl.gyp',
'use_system_opus': 'third_party/opus/opus.gyp',
diff --git a/chromium/build/mac/asan.gyp b/chromium/build/mac/asan.gyp
index 73e86416c69..fabe91023a1 100644
--- a/chromium/build/mac/asan.gyp
+++ b/chromium/build/mac/asan.gyp
@@ -4,7 +4,7 @@
{
'targets': [
- {
+ {
'target_name': 'asan_dynamic_runtime',
'type': 'none',
'variables': {
@@ -13,7 +13,11 @@
'prune_self_dependency': 1,
# Path is relative to this GYP file.
'asan_rtl_mask_path':
- '../../third_party/llvm-build/Release+Asserts/lib/clang/*/lib/darwin/libclang_rt.asan_osx_dynamic.dylib',
+ '../../third_party/llvm-build/Release+Asserts/lib/clang/*/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"', {
@@ -21,12 +25,29 @@
{
'destination': '<(PRODUCT_DIR)',
'files': [
- '<!(/bin/ls <(asan_rtl_mask_path))',
+ '<!(/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/chromium/build/mac/edit_xibs.sh b/chromium/build/mac/edit_xibs.sh
index 82045910f2e..b7b749e1601 100755
--- a/chromium/build/mac/edit_xibs.sh
+++ b/chromium/build/mac/edit_xibs.sh
@@ -12,6 +12,8 @@ set -e
RELSRC=$(dirname "$0")/../..
SRC=$(cd "$RELSRC" && pwd)
-GYP_GENERATORS=xcode "$SRC/tools/gyp/gyp" "$SRC/chrome/chrome_nibs.gyp"
+export PYTHONPATH="$PYTHONPATH:$SRC/build"
+export GYP_GENERATORS=xcode
+"$SRC/tools/gyp/gyp" -I"$SRC/build/common.gypi" "$SRC/chrome/chrome_nibs.gyp"
echo "You can now edit XIB files in Xcode using:"
echo " $SRC/chrome/chrome_nibs.xcodeproj"
diff --git a/chromium/build/mac/find_sdk.py b/chromium/build/mac/find_sdk.py
index 067be638d21..1d7634391fa 100755
--- a/chromium/build/mac/find_sdk.py
+++ b/chromium/build/mac/find_sdk.py
@@ -31,6 +31,9 @@ def main():
parser.add_option("--sdk_path",
action="store", type="string", dest="sdk_path", default="",
help="user-specified SDK path; bypasses verification")
+ parser.add_option("--print_sdk_path",
+ action="store_true", dest="print_sdk_path", default=False,
+ help="Additionaly print the path the SDK (appears first).")
(options, args) = parser.parse_args()
min_sdk_version = args[0]
@@ -73,6 +76,10 @@ def main():
print >>sys.stderr, ''
return min_sdk_version
+ if options.print_sdk_path:
+ print subprocess.check_output(['xcodebuild', '-version', '-sdk',
+ 'macosx' + best_sdk, 'Path']).strip()
+
return best_sdk
diff --git a/chromium/build/mac/tweak_info_plist.py b/chromium/build/mac/tweak_info_plist.py
index 0f65e4aed20..4a6c475aa1c 100755
--- a/chromium/build/mac/tweak_info_plist.py
+++ b/chromium/build/mac/tweak_info_plist.py
@@ -76,7 +76,7 @@ def _AddVersionKeys(plist, version=None):
else:
# Pull in the Chrome version number.
- VERSION_TOOL = os.path.join(TOP, 'chrome/tools/build/version.py')
+ VERSION_TOOL = os.path.join(TOP, 'build/util/version.py')
VERSION_FILE = os.path.join(TOP, 'chrome/VERSION')
(stdout, retval1) = _GetOutput([VERSION_TOOL, '-f', VERSION_FILE, '-t',
@@ -114,7 +114,7 @@ def _DoSCMKeys(plist, add_keys):
scm_revision = None
if add_keys:
# Pull in the Chrome revision number.
- VERSION_TOOL = os.path.join(TOP, 'chrome/tools/build/version.py')
+ VERSION_TOOL = os.path.join(TOP, 'build/util/version.py')
LASTCHANGE_FILE = os.path.join(TOP, 'build/util/LASTCHANGE')
(stdout, retval) = _GetOutput([VERSION_TOOL, '-f', LASTCHANGE_FILE, '-t',
'@LASTCHANGE@'])
@@ -132,54 +132,6 @@ def _DoSCMKeys(plist, add_keys):
return True
-def _DoPDFKeys(plist, add_keys):
- """Adds PDF support to the document types list. If add_keys is True, it will
- add the type information dictionary. If it is False, it will remove it if
- present."""
-
- PDF_FILE_EXTENSION = 'pdf'
-
- def __AddPDFKeys(sub_plist):
- """Writes the keys into a sub-dictionary of the plist."""
- sub_plist['CFBundleTypeExtensions'] = [PDF_FILE_EXTENSION]
- sub_plist['CFBundleTypeIconFile'] = 'document.icns'
- sub_plist['CFBundleTypeMIMETypes'] = 'application/pdf'
- sub_plist['CFBundleTypeName'] = 'PDF Document'
- sub_plist['CFBundleTypeRole'] = 'Viewer'
-
- DOCUMENT_TYPES_KEY = 'CFBundleDocumentTypes'
-
- # First get the list of document types, creating it if necessary.
- try:
- extensions = plist[DOCUMENT_TYPES_KEY]
- except KeyError:
- # If this plist doesn't have a type dictionary, create one if set to add the
- # keys. If not, bail.
- if not add_keys:
- return
- extensions = plist[DOCUMENT_TYPES_KEY] = []
-
- # Loop over each entry in the list, looking for one that handles PDF types.
- for i, ext in enumerate(extensions):
- # If an entry for .pdf files is found...
- if 'CFBundleTypeExtensions' not in ext:
- continue
- if PDF_FILE_EXTENSION in ext['CFBundleTypeExtensions']:
- if add_keys:
- # Overwrite the existing keys with new ones.
- __AddPDFKeys(ext)
- else:
- # Otherwise, delete the entry entirely.
- del extensions[i]
- return
-
- # No PDF entry exists. If one needs to be added, do so now.
- if add_keys:
- pdf_entry = {}
- __AddPDFKeys(pdf_entry)
- extensions.append(pdf_entry)
-
-
def _AddBreakpadKeys(plist, branding):
"""Adds the Breakpad keys. This must be called AFTER _AddVersionKeys() and
also requires the |branding| argument."""
@@ -259,8 +211,6 @@ def Main(argv):
type='int', default=False, help='Enable Keystone [1 or 0]')
parser.add_option('--scm', dest='add_scm_info', action='store', type='int',
default=True, help='Add SCM metadata [1 or 0]')
- parser.add_option('--pdf', dest='add_pdf_support', action='store', type='int',
- default=False, help='Add PDF file handler support [1 or 0]')
parser.add_option('--branding', dest='branding', action='store',
type='string', default=None, help='The branding of the binary')
parser.add_option('--bundle_id', dest='bundle_identifier',
@@ -314,9 +264,6 @@ def Main(argv):
if not _DoSCMKeys(plist, options.add_scm_info):
return 3
- # Adds or removes the PDF file handler entry.
- _DoPDFKeys(plist, options.add_pdf_support)
-
# Now that all keys have been mutated, rewrite the file.
temp_info_plist = tempfile.NamedTemporaryFile()
plistlib.writePlist(plist, temp_info_plist.name)
diff --git a/chromium/build/protoc.gypi b/chromium/build/protoc.gypi
index 52fb8a2b609..fafdf9df7ab 100644
--- a/chromium/build/protoc.gypi
+++ b/chromium/build/protoc.gypi
@@ -94,7 +94,6 @@
'--cpp_out', '<(cc_generator_options)<(cc_dir)',
'--python_out', '<(py_dir)',
],
- 'msvs_cygwin_shell': 0,
'message': 'Generating C++ and Python code from <(RULE_INPUT_PATH)',
'process_outputs_as_sources': 1,
},
diff --git a/chromium/build/release.gypi b/chromium/build/release.gypi
index 7595ef5a297..9b8b11d20f3 100644
--- a/chromium/build/release.gypi
+++ b/chromium/build/release.gypi
@@ -4,6 +4,18 @@
['buildtype=="Dev"', {
'includes': ['internal/release_impl.gypi'],
}],
+ ['buildtype=="Dev" and incremental_chrome_dll==1', {
+ 'msvs_settings': {
+ 'VCLinkerTool': {
+ # Enable incremental linking and disable conflicting link options:
+ # http://msdn.microsoft.com/en-us/library/4khtbfyf.aspx
+ 'LinkIncremental': '2',
+ 'OptimizeReferences': '1',
+ 'EnableCOMDATFolding': '1',
+ 'Profile': 'false',
+ },
+ },
+ }],
['buildtype=="Official"', {
'includes': ['internal/release_impl_official.gypi'],
}],
diff --git a/chromium/build/repack_action.gypi b/chromium/build/repack_action.gypi
new file mode 100644
index 00000000000..be91ac70d65
--- /dev/null
+++ b/chromium/build/repack_action.gypi
@@ -0,0 +1,30 @@
+# 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.
+
+# This file is meant to be included into an action to invoke grit repack in a
+# consistent manner. To use this the following variables need to be
+# defined:
+# pak_inputs: list: paths of pak files that need to be combined.
+# pak_output: string: the output pak file path.
+
+{
+ 'variables': {
+ 'repack_path': '<(DEPTH)/tools/grit/grit/format/repack.py',
+ 'repack_options%': [],
+ },
+ 'inputs': [
+ '<(repack_path)',
+ '<@(pak_inputs)',
+ ],
+ 'outputs': [
+ '<(pak_output)'
+ ],
+ 'action': [
+ 'python',
+ '<(repack_path)',
+ '<@(repack_options)',
+ '<(pak_output)',
+ '<@(pak_inputs)',
+ ],
+}
diff --git a/chromium/build/sanitize-win-build-log.sed b/chromium/build/sanitize-win-build-log.sed
index 4691b76a63e..c18e664c83a 100644
--- a/chromium/build/sanitize-win-build-log.sed
+++ b/chromium/build/sanitize-win-build-log.sed
@@ -12,5 +12,4 @@
s/^[0-9]+>//
# Shorten bindings generation lines
-s/^.*"(perl|[^"]+perl\.exe)".*deprecated_generate_bindings\.pl".*("[^"]+\.idl").*$/ deprecated_generate_bindings \2/
s/^.*"python".*idl_compiler\.py".*("[^"]+\.idl").*$/ idl_compiler \1/
diff --git a/chromium/build/secondary/chrome/BUILD.gn b/chromium/build/secondary/chrome/BUILD.gn
new file mode 100644
index 00000000000..cbea517f569
--- /dev/null
+++ b/chromium/build/secondary/chrome/BUILD.gn
@@ -0,0 +1,299 @@
+# 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("//build/config/crypto.gni")
+import("//build/config/ui.gni")
+import("//tools/grit/grit_rule.gni")
+
+executable("chrome") {
+ sources = [
+ "app/breakpad_field_trial_win.cc",
+ "app/breakpad_field_trial_win.h",
+ "app/breakpad_win.cc",
+ "app/breakpad_win.h",
+ "app/chrome_dll_resource.h",
+ "app/chrome_exe_main_aura.cc",
+ "app/chrome_exe_main_gtk.cc",
+ "app/chrome_exe_main_mac.cc",
+ "app/chrome_exe_main_win.cc",
+ "app/chrome_exe_resource.h",
+ "app/chrome_main.cc",
+ "app/chrome_main_delegate.cc",
+ "app/chrome_main_delegate.h",
+ "app/client_util.cc",
+ "app/client_util.h",
+ "app/hard_error_handler_win.cc",
+ "app/hard_error_handler_win.h",
+ "app/metro_driver_win.cc",
+ "app/metro_driver_win.h",
+ "../content/app/startup_helper_win.cc",
+ ]
+
+ if (is_linux) {
+ configs += [
+ # TODO(brettw) this is wrong, it should be picked up from deps.
+ "//build/config/linux:gtk",
+ "//build/config/linux:x11",
+ ]
+ }
+
+ deps = [
+ # TODO(brettw) this is right on linux? Everything is linked into the
+ # exe, but wrong on Windows, where chrome_exe and chrome_dll are separate.
+ ":browser",
+ ":common",
+ ":debugger",
+ ":plugin",
+ ":renderer",
+ ":utility",
+ "//base",
+ ]
+
+ # TODO(brettw) this isn't right for all platforms.
+ if (!use_aura) {
+ sources -= [ "app/chrome_exe_main_aura.cc" ]
+ }
+
+ if (!is_win) {
+ sources -= [
+ "app/client_util.cc",
+ "app/client_util.h",
+ ]
+ }
+}
+
+static_library("browser") {
+ if (is_linux) {
+ configs += [
+ "//build/config/linux:x11",
+ ]
+ }
+
+ deps = [
+ "//third_party/expat",
+ ]
+}
+
+static_library("common") {
+ if (!use_openssl && is_linux) {
+ # common/net uses NSS.
+ # TODO(brettw) have a better way to express this without having to do
+ # "if (use_nss)" everywhere.
+ configs += [ "//third_party/nss:nss_linux_config" ]
+ }
+ deps = [
+ ]
+}
+
+# TODO(brettw) move to browser/devtools/BUILD.gn
+source_set("debugger") {
+ sources = [
+ "browser/devtools/device/adb/adb_client_socket.cc",
+ "browser/devtools/device/adb/adb_client_socket.h",
+ "browser/devtools/device/adb/adb_device_info_query.h",
+ "browser/devtools/device/adb/adb_device_info_query.cc",
+ "browser/devtools/device/adb/adb_device_provider.cc",
+ "browser/devtools/device/adb/adb_device_provider.h",
+ "browser/devtools/device/android_device_manager.cc",
+ "browser/devtools/device/android_device_manager.h",
+ "browser/devtools/device/android_web_socket.cc",
+ "browser/devtools/device/devtools_android_bridge.cc",
+ "browser/devtools/device/devtools_android_bridge.h",
+ "browser/devtools/device/port_forwarding_controller.cc",
+ "browser/devtools/device/port_forwarding_controller.h",
+ "browser/devtools/device/self_device_provider.cc",
+ "browser/devtools/device/self_device_provider.h",
+ "browser/devtools/device/usb/android_rsa.cc",
+ "browser/devtools/device/usb/android_rsa.h",
+ "browser/devtools/device/usb/android_usb_device.cc",
+ "browser/devtools/device/usb/android_usb_device.h",
+ "browser/devtools/device/usb/android_usb_socket.cc",
+ "browser/devtools/device/usb/android_usb_socket.h",
+ "browser/devtools/device/usb/usb_device_provider.cc",
+ "browser/devtools/device/usb/usb_device_provider.h",
+ "browser/devtools/browser_list_tabcontents_provider.cc",
+ "browser/devtools/browser_list_tabcontents_provider.h",
+ "browser/devtools/devtools_contents_resizing_strategy.cc",
+ "browser/devtools/devtools_contents_resizing_strategy.h",
+ "browser/devtools/devtools_embedder_message_dispatcher.cc",
+ "browser/devtools/devtools_embedder_message_dispatcher.h",
+ "browser/devtools/devtools_file_helper.cc",
+ "browser/devtools/devtools_file_helper.h",
+ "browser/devtools/devtools_file_system_indexer.cc",
+ "browser/devtools/devtools_file_system_indexer.h",
+ "browser/devtools/devtools_network_controller.cpp",
+ "browser/devtools/devtools_network_controller.h",
+ "browser/devtools/devtools_network_transaction.cpp",
+ "browser/devtools/devtools_network_transaction.h",
+ "browser/devtools/devtools_network_transaction_factory.cpp",
+ "browser/devtools/devtools_network_transaction_factory.h",
+ "browser/devtools/devtools_protocol.cc",
+ "browser/devtools/devtools_protocol.h",
+ "browser/devtools/devtools_toggle_action.h",
+ "browser/devtools/devtools_window.cc",
+ "browser/devtools/devtools_window.h",
+ "browser/devtools/remote_debugging_server.cc",
+ "browser/devtools/remote_debugging_server.h",
+ ]
+
+ deps = [
+# ":chrome_extra_resources",
+# ":chrome_resources",
+# ":chrome_strings",
+# ":theme_resources",
+ "//base",
+ "//net",
+ "//net:http_server",
+ "//skia",
+ "//third_party/icu",
+ "//third_party/leveldatabase",
+ "//third_party/libusb",
+ ]
+
+ if (is_android) {
+ sources -= [
+ "browser/devtools/adb/android_rsa.cc",
+ "browser/devtools/browser_list_tabcontents_provider.cc",
+ "browser/devtools/devtools_file_system_indexer.cc",
+ "browser/devtools/devtools_window.cc",
+ "browser/devtools/remote_debugging_server.cc",
+ ]
+ deps -= [ "//third_party/libusb" ]
+ }
+
+ # TODO implement debug_devtools
+ # if (debug_devtools) {
+ # defines = [ "DEBUG_DEVTOOLS=1" ]
+ # }
+ # TODO(brettw) this may be required on Windows:
+ # if (is_win) {
+ # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
+ # 'msvs_disabled_warnings': [ 4267, ]
+ # }
+
+}
+
+source_set("plugin") {
+}
+
+source_set("renderer") {
+}
+
+source_set("utility") {
+}
+
+
+# Credits ----------------------------------------------------------------------
+
+about_credits_file = "$root_gen_dir/about_credits.html"
+build_relative_about_credits_file =
+ rebase_path(about_credits_file, root_build_dir)
+
+action("about_credits") {
+ script = "//tools/licenses.py"
+ outputs = [ about_credits_file ]
+
+ # This script is impossible to write proper input dependencies for because it
+ # basically greps the source tree for third_party directories. If a directory
+ # is added or removed, it will change the result, but there is no way to
+ # express this as a build dependency. We approximate this by depending on
+ # the last change file to force an update whenever the code is updated.
+ source_prereqs = [ "//build/util/LASTCHANGE" ]
+
+ args = [ "credits", build_relative_about_credits_file ]
+}
+
+# Resources --------------------------------------------------------------------
+
+#group("chrome_resources") {
+# deps = [
+# ":browser_resources",
+# ":common_resources",
+# ":renderer_resources",
+# ]
+#}
+#grit("browser_resources") {
+# source = "browser/browser_resources.grd"
+# grit_flags = [ "-E", "about_credits_file=$build_relative_about_credits_file" ]
+# deps = [ ":about_credits" ]
+#}
+#grit("common_resources") {
+# source = "common/common_resources.grd"
+#}
+#grit("renderer_resources") {
+# source = "renderer/resources/renderer_resources.grd"
+#}
+#
+#group("chrome_strings") {
+# deps = [
+# ":locale_settings",
+# ":chromium_strings",
+# ":generated_resources",
+# ":google_chrome_strings",
+# ]
+#}
+#grit("locale_settings") {
+# source = "app/resources/locale_settings.grd"
+#}
+#grit("chromium_strings") {
+# source = "app/chromium_strings.grd"
+#}
+#grit("generated_resources") {
+# source = "app/generated_resources.grd"
+#}
+#grit("google_chrome_strings") {
+# source = "app/google_chrome_strings.grd"
+#}
+#
+#group("chrome_extra_resources") {
+# deps = [
+# ":memory_internals_resources",
+# ":net_internals_resources",
+# ":signin_internals_resources",
+# ":sync_internals_resources",
+# ":translate_internals_resources",
+# ]
+#
+# if (!is_ios) {
+# deps += [
+# ":component_extension_resources",
+# ":options_resources",
+# ":quota_internals_resources",
+# ":sync_file_system_internals_resources",
+# ]
+# }
+#}
+#grit("component_extension_resources") {
+# source = "browser/resources/component_extension_resources.grd"
+#}
+#grit("memory_internals_resources") {
+# source = "browser/resources/memory_internals_resources.grd"
+#}
+#grit("quota_internals_resources") {
+# source = "browser/resources/quota_internals_resources.grd"
+#}
+#grit("net_internals_resources") {
+# source = "browser/resources/net_internals_resources.grd"
+#}
+#grit("options_resources") {
+# source = "browser/resources/options_resources.grd"
+#}
+#grit("signin_internals_resources") {
+# source = "browser/resources/signin_internals_resources.grd"
+#}
+#grit("sync_file_system_internals_resources") {
+# source = "browser/resources/sync_file_system_internals_resources.grd"
+#}
+#grit("sync_internals_resources") {
+# source = "browser/resources/sync_internals_resources.grd"
+#}
+#grit("translate_internals_resources") {
+# source = "browser/resources/translate_internals_resources.grd"
+#}
+#
+## TODO(brettw) rename "app_theme_resources" or something when we don't support
+## GYP any more. This name is required to match the GYP build.
+#grit("theme_resources") {
+# source = "app/theme/theme_resources.grd"
+#}
diff --git a/chromium/build/secondary/testing/BUILD.gn b/chromium/build/secondary/testing/BUILD.gn
new file mode 100644
index 00000000000..2cafa68a281
--- /dev/null
+++ b/chromium/build/secondary/testing/BUILD.gn
@@ -0,0 +1,11 @@
+# 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.
+
+source_set("gmock_mutant") {
+ sources = [
+ "gmock_mutant.h", # gMock helpers
+ ]
+
+ deps = [ "//base" ]
+}
diff --git a/chromium/build/secondary/testing/gmock/BUILD.gn b/chromium/build/secondary/testing/gmock/BUILD.gn
new file mode 100644
index 00000000000..018917f8393
--- /dev/null
+++ b/chromium/build/secondary/testing/gmock/BUILD.gn
@@ -0,0 +1,45 @@
+# 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.
+
+config("gmock_config") {
+ # Gmock headers need to be able to find themselves.
+ include_dirs = [ "include" ]
+}
+
+static_library("gmock") {
+ sources = [
+ # Sources based on files in r173 of gmock.
+ "include/gmock/gmock-actions.h",
+ "include/gmock/gmock-cardinalities.h",
+ "include/gmock/gmock-generated-actions.h",
+ "include/gmock/gmock-generated-function-mockers.h",
+ "include/gmock/gmock-generated-matchers.h",
+ "include/gmock/gmock-generated-nice-strict.h",
+ "include/gmock/gmock-matchers.h",
+ "include/gmock/gmock-spec-builders.h",
+ "include/gmock/gmock.h",
+ "include/gmock/internal/gmock-generated-internal-utils.h",
+ "include/gmock/internal/gmock-internal-utils.h",
+ "include/gmock/internal/gmock-port.h",
+ #"src/gmock-all.cc", # Not needed by our build.
+ "src/gmock-cardinalities.cc",
+ "src/gmock-internal-utils.cc",
+ "src/gmock-matchers.cc",
+ "src/gmock-spec-builders.cc",
+ "src/gmock.cc",
+ ]
+
+ # This project includes some stuff form gtest's guts.
+ include_dirs = [ "../gtest/include" ]
+
+ direct_dependent_configs = [
+ ":gmock_config",
+ "//testing/gtest:gtest_config",
+ ]
+}
+
+static_library("gmock_main") {
+ sources = [ "src/gmock_main.cc" ]
+ deps = [ ":gmock" ]
+}
diff --git a/chromium/build/secondary/testing/gtest/BUILD.gn b/chromium/build/secondary/testing/gtest/BUILD.gn
new file mode 100644
index 00000000000..2c360fe8da0
--- /dev/null
+++ b/chromium/build/secondary/testing/gtest/BUILD.gn
@@ -0,0 +1,109 @@
+# 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.
+
+config("gtest_config") {
+ visibility = [
+ ":*",
+ "//testing/gmock:*", # gmock also shares this config.
+ ]
+
+ defines = [
+ "UNIT_TEST",
+
+ # In order to allow regex matches in gtest to be shared between Windows
+ # and other systems, we tell gtest to always use it's internal engine.
+ "GTEST_HAS_POSIX_RE=0",
+ ]
+
+ # Gtest headers need to be able to find themselves.
+ include_dirs = [ "include" ]
+
+ if (is_win) {
+ cflags = [ "/wd4800" ] # Unused variable warning.
+ }
+
+ if (is_posix) {
+ defines += [
+ # gtest isn't able to figure out when RTTI is disabled for gcc
+ # versions older than 4.3.2, and assumes it's enabled. Our Mac
+ # and Linux builds disable RTTI, and cannot guarantee that the
+ # compiler will be 4.3.2. or newer. The Mac, for example, uses
+ # 4.2.1 as that is the latest available on that platform. gtest
+ # must be instructed that RTTI is disabled here, and for any
+ # direct dependents that might include gtest headers.
+ "GTEST_HAS_RTTI=0",
+ ]
+ }
+
+ if (is_android) {
+ defines += [
+ # We want gtest features that use tr1::tuple, but we currently
+ # don't support the variadic templates used by libstdc++'s
+ # implementation. gtest supports this scenario by providing its
+ # own implementation but we must opt in to it.
+ "GTEST_USE_OWN_TR1_TUPLE=1",
+
+ # GTEST_USE_OWN_TR1_TUPLE only works if GTEST_HAS_TR1_TUPLE is set.
+ # gtest r625 made it so that GTEST_HAS_TR1_TUPLE is set to 0
+ # automatically on android, so it has to be set explicitly here.
+ "GTEST_HAS_TR1_TUPLE=1",
+ ]
+ }
+}
+
+static_library("gtest") {
+ sources = [
+ "include/gtest/gtest-death-test.h",
+ "include/gtest/gtest-message.h",
+ "include/gtest/gtest-param-test.h",
+ "include/gtest/gtest-printers.h",
+ "include/gtest/gtest-spi.h",
+ "include/gtest/gtest-test-part.h",
+ "include/gtest/gtest-typed-test.h",
+ "include/gtest/gtest.h",
+ "include/gtest/gtest_pred_impl.h",
+ "include/gtest/internal/gtest-death-test-internal.h",
+ "include/gtest/internal/gtest-filepath.h",
+ "include/gtest/internal/gtest-internal.h",
+ "include/gtest/internal/gtest-linked_ptr.h",
+ "include/gtest/internal/gtest-param-util-generated.h",
+ "include/gtest/internal/gtest-param-util.h",
+ "include/gtest/internal/gtest-port.h",
+ "include/gtest/internal/gtest-string.h",
+ "include/gtest/internal/gtest-tuple.h",
+ "include/gtest/internal/gtest-type-util.h",
+ #"gtest/src/gtest-all.cc", # Not needed by our build.
+ "src/gtest-death-test.cc",
+ "src/gtest-filepath.cc",
+ "src/gtest-internal-inl.h",
+ "src/gtest-port.cc",
+ "src/gtest-printers.cc",
+ "src/gtest-test-part.cc",
+ "src/gtest-typed-test.cc",
+ "src/gtest.cc",
+ "../multiprocess_func_list.cc",
+ "../multiprocess_func_list.h",
+ "../platform_test.h",
+ ]
+
+ if (is_mac) {
+ sources += [
+ "../gtest_mac.h",
+ "../gtest_mac.mm",
+ "../platform_test_mac.mm",
+ ]
+ }
+
+ include_dirs = [ "." ]
+
+ all_dependent_configs = [ ":gtest_config" ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+}
+
+source_set("gtest_main") {
+ sources = [ "src/gtest_main.cc" ]
+ deps = [ ":gtest" ]
+}
diff --git a/chromium/build/secondary/third_party/WebKit/Source/platform/BUILD.gn b/chromium/build/secondary/third_party/WebKit/Source/platform/BUILD.gn
new file mode 100644
index 00000000000..c1c0f1ed900
--- /dev/null
+++ b/chromium/build/secondary/third_party/WebKit/Source/platform/BUILD.gn
@@ -0,0 +1,73 @@
+# 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.
+
+component("platform") {
+ output_name = "blink_platform"
+
+ sources = [
+ "weborigin/DatabaseIdentifier.cpp",
+ "weborigin/DatabaseIdentifier.h",
+ "weborigin/KURL.cpp",
+ "weborigin/KURL.h",
+ "weborigin/KURLHash.h",
+ "weborigin/KnownPorts.cpp",
+ "weborigin/KnownPorts.h",
+ "weborigin/OriginAccessEntry.cpp",
+ "weborigin/OriginAccessEntry.h",
+ "weborigin/ReferrerPolicy.h",
+ "weborigin/SchemeRegistry.cpp",
+ "weborigin/SchemeRegistry.h",
+ "weborigin/SecurityOrigin.cpp",
+ "weborigin/SecurityOrigin.h",
+ "weborigin/SecurityOriginCache.h",
+ "weborigin/SecurityOriginHash.h",
+ "weborigin/SecurityPolicy.cpp",
+ "weborigin/SecurityPolicy.h",
+ "weborigin/WebOriginExport.h",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "../wtf:wtf-config"
+ "//build/config/compiler:no_chromium_code",
+ ]
+
+ include_dirs = [ "../.." ]
+
+ defines = [ "WEBORIGIN_IMPLEMENTATION=1" ]
+
+ deps = [
+ "//third_party/WebKit/Source/wtf",
+ "//third_party/icu",
+ "//url",
+ ]
+}
+
+executable("blink_platform_unittests") {
+ sources = [
+ "weborigin/DatabaseIdentifierTest.cpp",
+ "weborigin/KURLTest.cpp",
+ "weborigin/SecurityOriginTest.cpp",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "../wtf:wtf-config"
+ "//build/config/compiler:no_chromium_code",
+ "//third_party/icu:icu_config",
+ ]
+
+ deps = [
+ ":platform",
+ "../wtf:run_all_tests",
+ ]
+
+# if (is_linux && use_tcmalloc) {
+# deps += [
+# "//base:base",
+# "//base/allocator:allocator",
+# ],
+# }
+
+}
diff --git a/chromium/build/secondary/third_party/WebKit/Source/wtf/BUILD.gn b/chromium/build/secondary/third_party/WebKit/Source/wtf/BUILD.gn
new file mode 100644
index 00000000000..7cc753389df
--- /dev/null
+++ b/chromium/build/secondary/third_party/WebKit/Source/wtf/BUILD.gn
@@ -0,0 +1,364 @@
+# 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.
+
+config("wtf-config") {
+ include_dirs = [ ".." ]
+ if (is_win) {
+ include_dirs += [ "os-win32" ]
+ defines = [
+ "__STD_C",
+ "_CRT_SECURE_NO_DEPRECATE",
+ "_SCL_SECURE_NO_DEPRECATE",
+ "CRASH=__debugbreak",
+ ]
+# # Chromium windows multi-dll build enables c++ exception and this
+# # causes wtf generates 4291 warning due to operator new/delete
+# # implementations. Disable the warning for chromium windows
+# # multi-dll build.
+# 'msvs_disabled_warnings': [4291],
+# 'direct_dependent_settings': {
+# 'msvs_disabled_warnings': [4291],
+# },
+ }
+
+ if (is_linux) { # (gcc_version >= 46) {
+ # Disable warnings about c++0x compatibility, as some names (such as
+ # nullptr) conflict with upcoming c++0x types.
+ cflags_cc = [ "-Wno-c++0x-compat" ]
+ }
+
+# # Some warnings occur in WTF headers, so they must also be disabled
+# # in targets that use WTF.
+# 'msvs_disabled_warnings': [
+# # Don't complain about calling specific versions of templatized
+# # functions (e.g. in RefPtrHashMap.h).
+# 4344,
+# # Don't complain about using "this" in an initializer list
+# # (e.g. in StringImpl.h).
+# 4355,
+# # Disable c4267 warnings until we fix size_t to int truncations.
+# 4267,
+# ],
+
+}
+
+component("wtf") {
+ sources = [
+ "ASCIICType.h",
+ "Alignment.h",
+ "ArrayBuffer.cpp",
+ "ArrayBuffer.h",
+ "ArrayBufferContents.cpp",
+ "ArrayBufferContents.h",
+ "ArrayBufferDeallocationObserver.h",
+ "ArrayBufferView.cpp",
+ "ArrayBufferView.h",
+ "Assertions.cpp",
+ "Assertions.h",
+ "Atomics.h",
+ "AutodrainedPool.h",
+ "BitArray.h",
+ "BitVector.cpp",
+ "BitVector.h",
+ "BloomFilter.h",
+ "ByteOrder.h",
+ "CPU.h",
+ "CheckedArithmetic.h",
+ "Compiler.h",
+ "Complex.h",
+ "CryptographicallyRandomNumber.cpp",
+ "CryptographicallyRandomNumber.h",
+ "CurrentTime.cpp",
+ "CurrentTime.h",
+ "DataLog.cpp",
+ "DataLog.h",
+ "DateMath.cpp",
+ "DateMath.h",
+ "DecimalNumber.cpp",
+ "DecimalNumber.h",
+ "Deque.h",
+ "DoublyLinkedList.h",
+ "DynamicAnnotations.cpp",
+ "DynamicAnnotations.h",
+ "FastAllocBase.h",
+ "FastMalloc.cpp",
+ "FastMalloc.h",
+ "FilePrintStream.cpp",
+ "FilePrintStream.h",
+ "Float32Array.h",
+ "Float64Array.h",
+ "Forward.h",
+ "Functional.h",
+ "GetPtr.h",
+ "GregorianDateTime.cpp",
+ "GregorianDateTime.h",
+ "HashCountedSet.h",
+ "HashFunctions.h",
+ "HashIterators.h",
+ "HashMap.h",
+ "HashSet.h",
+ "HashTable.cpp",
+ "HashTable.h",
+ "HashTableDeletedValueType.h",
+ "HashTraits.h",
+ "HexNumber.h",
+ "Int16Array.h",
+ "Int32Array.h",
+ "Int8Array.h",
+ "IntegralTypedArrayBase.h",
+ "LeakAnnotations.h",
+ "LinkedStack.h",
+ "ListHashSet.h",
+ "Locker.h",
+ "MainThread.cpp",
+ "MainThread.h",
+ "MallocZoneSupport.h",
+ "MathExtras.h",
+ "MessageQueue.h",
+ "NonCopyingSort.h",
+ "Noncopyable.h",
+ "NotFound.h",
+ "NullPtr.cpp",
+ "NullPtr.h",
+ "NumberOfCores.cpp",
+ "NumberOfCores.h",
+ "OwnPtr.h",
+ "OwnPtrCommon.h",
+ "PageAllocator.cpp",
+ "PageAllocator.h",
+ "ParallelJobs.h",
+ "ParallelJobsLibdispatch.h",
+ "PartitionAlloc.cpp",
+ "PartitionAlloc.h",
+ "PassOwnPtr.h",
+ "PassRefPtr.h",
+ "PassTraits.h",
+ "PrintStream.cpp",
+ "PrintStream.h",
+ "ProcessID.h",
+ "QuantizedAllocation.cpp",
+ "QuantizedAllocation.h",
+ "RefCounted.h",
+ "RefCountedLeakCounter.cpp",
+ "RefCountedLeakCounter.h",
+ "RefPtr.h",
+ "RefPtrHashMap.h",
+ "RetainPtr.h",
+ "SHA1.cpp",
+ "SHA1.h",
+ "SaturatedArithmetic.h",
+ "SizeLimits.cpp",
+ "SpinLock.h",
+ "StaticConstructors.h",
+ "StdLibExtras.h",
+ "StringExtras.h",
+ "StringHasher.h",
+ "TemporaryChange.h",
+ "ThreadFunctionInvocation.h",
+ "ThreadRestrictionVerifier.h",
+ "ThreadSafeRefCounted.h",
+ "ThreadSpecific.h",
+ "Threading.cpp",
+ "Threading.h",
+ "ThreadingPrimitives.h",
+ "TypeTraits.cpp",
+ "TypeTraits.h",
+ "TypedArrayBase.h",
+ "Uint16Array.h",
+ "Uint32Array.h",
+ "Uint8Array.h",
+ "UnusedParam.h",
+ "VMTags.h",
+ "Vector.h",
+ "VectorTraits.h",
+ "WTF.cpp",
+ "WTF.h",
+ "WTFExport.h",
+ "WTFThreadData.cpp",
+ "WTFThreadData.h",
+ "WeakPtr.h",
+ "dtoa.cpp",
+ "dtoa.h",
+ "dtoa/bignum-dtoa.cc",
+ "dtoa/bignum-dtoa.h",
+ "dtoa/bignum.cc",
+ "dtoa/bignum.h",
+ "dtoa/cached-powers.cc",
+ "dtoa/cached-powers.h",
+ "dtoa/diy-fp.cc",
+ "dtoa/diy-fp.h",
+ "dtoa/double-conversion.cc",
+ "dtoa/double-conversion.h",
+ "dtoa/double.h",
+ "dtoa/fast-dtoa.cc",
+ "dtoa/fast-dtoa.h",
+ "dtoa/fixed-dtoa.cc",
+ "dtoa/fixed-dtoa.h",
+ "dtoa/strtod.cc",
+ "dtoa/strtod.h",
+ "dtoa/utils.h",
+ "text/ASCIIFastPath.h",
+ "text/AtomicString.cpp",
+ "text/AtomicString.h",
+ "text/AtomicStringHash.h",
+ "text/Base64.cpp",
+ "text/Base64.h",
+ "text/CString.cpp",
+ "text/CString.h",
+ "text/IntegerToStringConversion.h",
+ "text/StringBuffer.h",
+ "text/StringBuilder.cpp",
+ "text/StringBuilder.h",
+ "text/StringConcatenate.h",
+ "text/StringHash.h",
+ "text/StringImpl.cpp",
+ "text/StringImpl.h",
+ "text/StringOperators.h",
+ "text/StringStatics.cpp",
+ "text/StringUTF8Adaptor.h",
+ "text/StringView.h",
+ "text/TextCodec.cpp",
+ "text/TextCodecASCIIFastPath.h",
+ "text/TextCodecICU.cpp",
+ "text/TextCodecLatin1.cpp",
+ "text/TextCodecUTF16.cpp",
+ "text/TextCodecUTF8.cpp",
+ "text/TextCodecUTF8.h",
+ "text/TextCodecUserDefined.cpp",
+ "text/TextEncoding.cpp",
+ "text/TextEncodingRegistry.cpp",
+ "text/TextPosition.cpp",
+ "text/TextPosition.h",
+ "text/WTFString.cpp",
+ "text/WTFString.h",
+ "unicode/CharacterNames.h",
+ "unicode/Collator.h",
+ "unicode/UTF8.cpp",
+ "unicode/UTF8.h",
+ "unicode/Unicode.h",
+ "unicode/icu/CollatorICU.cpp",
+ "unicode/icu/UnicodeIcu.h",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":wtf-config"
+ ]
+
+ defines = [ "WTF_IMPLEMENTATION=1" ]
+ deps = [
+ "//third_party/icu",
+ ]
+
+ # # Disable c4267 warnings until we fix size_t to int truncations.
+# 'msvs_disabled_warnings': [4127, 4355, 4510, 4512, 4610, 4706, 4068, 4267],
+
+ ldflags = []
+ if (is_android) {
+ ldflags += [ "-llog" ]
+ }
+
+ if (is_mac) {
+# 'link_settings': {
+# 'libraries': [
+# '$(SDKROOT)/System/Library/Frameworks/CoreFoundation.framework',
+# '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
+# ]
+# }
+ sources += [
+ # mac is the only OS that uses WebKit's copy of TCMalloc.
+ "TCPackedCache.h",
+ "TCPageMap.h",
+ "TCSpinLock.h",
+ "TCSystemAlloc.cpp",
+ "TCSystemAlloc.h",
+
+ "AutodrainedPoolMac.mm",
+ "text/AtomicStringCF.cpp",
+ "text/StringCF.cpp",
+ "text/StringImplCF.cpp",
+ "text/StringImplMac.mm",
+ "text/StringMac.mm",
+ ]
+ }
+
+ if (is_win) {
+ sources += [
+ "ThreadSpecificWin.cpp",
+ "ThreadingWin.cpp",
+ ]
+# include_dirs -= [
+# "<(SHARED_INTERMEDIATE_DIR)/blink',
+# ]
+ } else {
+ sources += [
+ "ThreadIdentifierDataPthreads.cpp",
+ "ThreadIdentifierDataPthreads.h",
+ "ThreadingPthreads.cpp",
+ ]
+ }
+}
+
+static_library("run_all_tests") {
+ sources = [ "testing/RunAllTests.cpp" ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ ":wtf-config",
+ ]
+
+ deps = [
+ "//base/test:test_support",
+ "//testing/gmock",
+ "//testing/gtest",
+ ":wtf",
+ ]
+
+ direct_dependent_configs = [ "//testing/gtest:gtest_config" ]
+}
+
+executable("wtf_unittests") {
+ sources = [
+ "CheckedArithmeticTest.cpp",
+ "FunctionalTest.cpp",
+ "HashMapTest.cpp",
+ "HashSetTest.cpp",
+ "ListHashSetTest.cpp",
+ "MathExtrasTest.cpp",
+ "PartitionAllocTest.cpp",
+ "SHA1Test.cpp",
+ "SaturatedArithmeticTest.cpp",
+ "StringExtrasTest.cpp",
+ "StringHasherTest.cpp",
+ "TemporaryChangeTest.cpp",
+ "VectorTest.cpp",
+ "testing/WTFTestHelpers.h",
+ "text/CStringTest.cpp",
+ "text/StringBuilderTest.cpp",
+ "text/StringImplTest.cpp",
+ "text/StringOperatorsTest.cpp",
+ "text/WTFStringTest.cpp",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ "//build/config/compiler:no_chromium_code",
+ "//third_party/icu:icu_config",
+ ":wtf-config",
+ ]
+
+ deps = [ ":run_all_tests" ]
+
+ # # Disable c4267 warnings until we fix size_t to int truncations.
+# 'msvs_disabled_warnings': [4127, 4355, 4510, 4512, 4610, 4706, 4068, 4267],
+
+# if (is_linux && use_tcmalloc) {
+# deps += [
+# "//base:base",
+# "//base/allocator:allocator",
+# ],
+# }
+}
diff --git a/chromium/build/secondary/third_party/android_tools/BUILD.gn b/chromium/build/secondary/third_party/android_tools/BUILD.gn
new file mode 100644
index 00000000000..44a10d99b3e
--- /dev/null
+++ b/chromium/build/secondary/third_party/android_tools/BUILD.gn
@@ -0,0 +1,17 @@
+# 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.
+
+config("cpu_features_include") {
+ include_dirs = [ "ndk/sources/android/cpufeatures" ]
+}
+
+# This is the GN version of
+# //build/android/cpufeatures.gypi:cpufeatures
+source_set("cpu_features") {
+ sources = [ "ndk/sources/android/cpufeatures/cpu-features.c" ]
+ direct_dependent_configs = [ ":cpu_features_include" ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+}
diff --git a/chromium/build/secondary/third_party/angle/BUILD.gn b/chromium/build/secondary/third_party/angle/BUILD.gn
new file mode 100644
index 00000000000..e864c94f5e6
--- /dev/null
+++ b/chromium/build/secondary/third_party/angle/BUILD.gn
@@ -0,0 +1,644 @@
+# 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.
+
+# This config is applied to internal Angle targets (not pushed to dependents).
+config("internal_config") {
+ include_dirs = [
+ "include",
+ "src",
+ ]
+}
+
+component("translator") {
+ sources = [
+ "src/compiler/translator/ShaderLang.cpp",
+ ]
+
+ defines = [ "ANGLE_TRANSLATOR_IMPLEMENTATION" ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ ":internal_config",
+ "//build/config/compiler:no_chromium_code",
+ ]
+
+ deps = [
+ ":translator_lib",
+ ]
+}
+
+# Holds the shared includes so we only need to list them once.
+source_set("includes") {
+ sources = [
+ "include/EGL/egl.h",
+ "include/EGL/eglext.h",
+ "include/EGL/eglplatform.h",
+ "include/GLES2/gl2.h",
+ "include/GLES2/gl2ext.h",
+ "include/GLES2/gl2platform.h",
+ "include/GLES3/gl3.h",
+ "include/GLES3/gl3ext.h",
+ "include/GLES3/gl3platform.h",
+ "include/GLSLANG/ShaderLang.h",
+ "include/KHR/khrplatform.h",
+ ]
+}
+
+static_library("preprocessor") {
+ sources = [
+ "src/compiler/preprocessor/DiagnosticsBase.cpp",
+ "src/compiler/preprocessor/DiagnosticsBase.h",
+ "src/compiler/preprocessor/DirectiveHandlerBase.cpp",
+ "src/compiler/preprocessor/DirectiveHandlerBase.h",
+ "src/compiler/preprocessor/DirectiveParser.cpp",
+ "src/compiler/preprocessor/DirectiveParser.h",
+ "src/compiler/preprocessor/ExpressionParser.cpp",
+ "src/compiler/preprocessor/ExpressionParser.h",
+ "src/compiler/preprocessor/ExpressionParser.y",
+ "src/compiler/preprocessor/Input.cpp",
+ "src/compiler/preprocessor/Input.h",
+ "src/compiler/preprocessor/Lexer.cpp",
+ "src/compiler/preprocessor/Lexer.h",
+ "src/compiler/preprocessor/Macro.cpp",
+ "src/compiler/preprocessor/Macro.h",
+ "src/compiler/preprocessor/MacroExpander.cpp",
+ "src/compiler/preprocessor/MacroExpander.h",
+ "src/compiler/preprocessor/Preprocessor.cpp",
+ "src/compiler/preprocessor/Preprocessor.h",
+ "src/compiler/preprocessor/SourceLocation.h",
+ "src/compiler/preprocessor/Token.cpp",
+ "src/compiler/preprocessor/Token.h",
+ "src/compiler/preprocessor/Tokenizer.cpp",
+ "src/compiler/preprocessor/Tokenizer.h",
+ "src/compiler/preprocessor/Tokenizer.l",
+ "src/compiler/preprocessor/numeric_lex.h",
+ "src/compiler/preprocessor/pp_utils.h",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ ":internal_config",
+ "//build/config/compiler:no_chromium_code",
+ ]
+
+}
+
+static_library("translator_lib") {
+ sources = [
+ "src/common/RefCountObject.cpp",
+ "src/common/RefCountObject.h",
+ "src/common/angleutils.h",
+ "src/common/blocklayout.cpp",
+ "src/common/blocklayout.h",
+ "src/common/debug.cpp",
+ "src/common/debug.h",
+ "src/common/event_tracer.cpp",
+ "src/common/event_tracer.h",
+ "src/common/mathutil.cpp",
+ "src/common/mathutil.h",
+ "src/common/shadervars.h",
+ "src/common/utilities.cpp",
+ "src/common/utilities.h",
+ "src/common/version.h",
+ "src/compiler/translator/BaseTypes.h",
+ "src/compiler/translator/BuiltInFunctionEmulator.cpp",
+ "src/compiler/translator/BuiltInFunctionEmulator.h",
+ "src/compiler/translator/CodeGen.cpp",
+ "src/compiler/translator/Common.h",
+ "src/compiler/translator/Compiler.cpp",
+ "src/compiler/translator/ConstantUnion.h",
+ "src/compiler/translator/DetectCallDepth.cpp",
+ "src/compiler/translator/DetectCallDepth.h",
+ "src/compiler/translator/DetectDiscontinuity.cpp",
+ "src/compiler/translator/DetectDiscontinuity.h",
+ "src/compiler/translator/Diagnostics.cpp",
+ "src/compiler/translator/Diagnostics.h",
+ "src/compiler/translator/DirectiveHandler.cpp",
+ "src/compiler/translator/DirectiveHandler.h",
+ "src/compiler/translator/ExtensionBehavior.h",
+ "src/compiler/translator/FlagStd140Structs.cpp",
+ "src/compiler/translator/FlagStd140Structs.h",
+ "src/compiler/translator/ForLoopUnroll.cpp",
+ "src/compiler/translator/ForLoopUnroll.h",
+ "src/compiler/translator/HashNames.h",
+ "src/compiler/translator/InfoSink.cpp",
+ "src/compiler/translator/InfoSink.h",
+ "src/compiler/translator/Initialize.cpp",
+ "src/compiler/translator/Initialize.h",
+ "src/compiler/translator/InitializeDll.cpp",
+ "src/compiler/translator/InitializeDll.h",
+ "src/compiler/translator/InitializeGlobals.h",
+ "src/compiler/translator/InitializeParseContext.cpp",
+ "src/compiler/translator/InitializeParseContext.h",
+ "src/compiler/translator/InitializeVariables.cpp",
+ "src/compiler/translator/InitializeVariables.h",
+ "src/compiler/translator/IntermTraverse.cpp",
+ "src/compiler/translator/Intermediate.cpp",
+ "src/compiler/translator/LoopInfo.cpp",
+ "src/compiler/translator/LoopInfo.h",
+ "src/compiler/translator/MMap.h",
+ "src/compiler/translator/NodeSearch.h",
+ "src/compiler/translator/OutputESSL.cpp",
+ "src/compiler/translator/OutputESSL.h",
+ "src/compiler/translator/OutputGLSL.cpp",
+ "src/compiler/translator/OutputGLSL.h",
+ "src/compiler/translator/OutputGLSLBase.cpp",
+ "src/compiler/translator/OutputGLSLBase.h",
+ "src/compiler/translator/OutputHLSL.cpp",
+ "src/compiler/translator/OutputHLSL.h",
+ "src/compiler/translator/ParseContext.cpp",
+ "src/compiler/translator/ParseContext.h",
+ "src/compiler/translator/PoolAlloc.cpp",
+ "src/compiler/translator/PoolAlloc.h",
+ "src/compiler/translator/Pragma.h",
+ "src/compiler/translator/QualifierAlive.cpp",
+ "src/compiler/translator/QualifierAlive.h",
+ "src/compiler/translator/RemoveTree.cpp",
+ "src/compiler/translator/RemoveTree.h",
+ "src/compiler/translator/RenameFunction.h",
+ "src/compiler/translator/RewriteElseBlocks.cpp",
+ "src/compiler/translator/RewriteElseBlocks.h",
+ "src/compiler/translator/SearchSymbol.cpp",
+ "src/compiler/translator/SearchSymbol.h",
+ "src/compiler/translator/ShHandle.h",
+ "src/compiler/translator/SymbolTable.cpp",
+ "src/compiler/translator/SymbolTable.h",
+ "src/compiler/translator/TranslatorESSL.cpp",
+ "src/compiler/translator/TranslatorESSL.h",
+ "src/compiler/translator/TranslatorGLSL.cpp",
+ "src/compiler/translator/TranslatorGLSL.h",
+ "src/compiler/translator/TranslatorHLSL.cpp",
+ "src/compiler/translator/TranslatorHLSL.h",
+ "src/compiler/translator/Types.cpp",
+ "src/compiler/translator/Types.h",
+ "src/compiler/translator/UnfoldShortCircuit.cpp",
+ "src/compiler/translator/UnfoldShortCircuit.h",
+ "src/compiler/translator/UnfoldShortCircuitAST.cpp",
+ "src/compiler/translator/UnfoldShortCircuitAST.h",
+ "src/compiler/translator/ValidateLimitations.cpp",
+ "src/compiler/translator/ValidateLimitations.h",
+ "src/compiler/translator/ValidateOutputs.cpp",
+ "src/compiler/translator/ValidateOutputs.h",
+ "src/compiler/translator/VariableInfo.cpp",
+ "src/compiler/translator/VariableInfo.h",
+ "src/compiler/translator/VariablePacker.cpp",
+ "src/compiler/translator/VariablePacker.h",
+ "src/compiler/translator/VersionGLSL.cpp",
+ "src/compiler/translator/VersionGLSL.h",
+ "src/compiler/translator/compilerdebug.cpp",
+ "src/compiler/translator/compilerdebug.h",
+ "src/compiler/translator/depgraph/DependencyGraph.cpp",
+ "src/compiler/translator/depgraph/DependencyGraph.h",
+ "src/compiler/translator/depgraph/DependencyGraphBuilder.cpp",
+ "src/compiler/translator/depgraph/DependencyGraphBuilder.h",
+ "src/compiler/translator/depgraph/DependencyGraphOutput.cpp",
+ "src/compiler/translator/depgraph/DependencyGraphOutput.h",
+ "src/compiler/translator/depgraph/DependencyGraphTraverse.cpp",
+ "src/compiler/translator/glslang.h",
+ "src/compiler/translator/glslang.l",
+ "src/compiler/translator/glslang.y",
+ "src/compiler/translator/glslang_lex.cpp",
+ "src/compiler/translator/glslang_tab.cpp",
+ "src/compiler/translator/glslang_tab.h",
+ "src/compiler/translator/intermOut.cpp",
+ "src/compiler/translator/intermediate.h",
+ "src/compiler/translator/length_limits.h",
+ "src/compiler/translator/localintermediate.h",
+ "src/compiler/translator/osinclude.h",
+ "src/compiler/translator/ossource_posix.cpp",
+ "src/compiler/translator/ossource_win.cpp",
+ "src/compiler/translator/parseConst.cpp",
+ "src/compiler/translator/timing/RestrictFragmentShaderTiming.cpp",
+ "src/compiler/translator/timing/RestrictFragmentShaderTiming.h",
+ "src/compiler/translator/timing/RestrictVertexShaderTiming.cpp",
+ "src/compiler/translator/timing/RestrictVertexShaderTiming.h",
+ "src/compiler/translator/util.cpp",
+ "src/compiler/translator/util.h",
+ "src/third_party/compiler/ArrayBoundsClamper.cpp",
+ "src/third_party/compiler/ArrayBoundsClamper.h",
+ ]
+
+ if (is_win) {
+ sources -= [ "src/compiler/translator/ossource_posix.cpp" ]
+ } else {
+ sources -= [ "src/compiler/translator/ossource_win.cpp" ]
+ }
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ ":internal_config",
+ "//build/config/compiler:no_chromium_code",
+ ]
+
+ deps = [
+ ":includes",
+ ":preprocessor",
+ ]
+}
+
+config("translator_static_config") {
+ defines = [ "ANGLE_TRANSLATOR_STATIC" ]
+}
+
+static_library("translator_static") {
+ sources = [
+ "src/compiler/translator/ShaderLang.cpp",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ ":internal_config",
+ "//build/config/compiler:no_chromium_code",
+ ]
+ direct_dependent_configs = [ ":translator_static_config" ]
+
+ deps = [
+ ":translator_lib",
+ ]
+}
+
+# TODO(GYP) this requires some changes to the script before it will work.
+# https://chromium-review.googlesource.com/#/c/202048/
+if (false) {
+ action("commit_id") {
+ script = "src/commit_id.py"
+
+ output_file = "$root_gen_dir/angle_commit.h"
+ outputs = [ output_file ]
+
+ args = [
+ rebase_path(".", root_build_dir),
+ rebase_path(output_file, root_build_dir),
+ ]
+ }
+} else {
+ # While Angle is being updated, we copy a temporary hardcoded commit.h. This
+ # is copied both as commit.h and angle_commit.h. The angle roll will rename
+ # this file from commit.h to angle_commit.h and we don't want to make the
+ # udpate more complicated than necessary.
+ group("commit_id") {
+ deps = [ ":copy_angle_commit_h", ":copy_commit_h" ]
+ }
+
+ hardcoded_commit = [ "//build/secondary/third_party/angle/angle_commit.h" ]
+ copy("copy_angle_commit_h") {
+ sources = hardcoded_commit
+ outputs = [ "$root_gen_dir/angle_commit.h" ]
+ }
+ copy("copy_commit_h") {
+ sources = hardcoded_commit
+ outputs = [ "$root_gen_dir/commit.h" ]
+ }
+}
+
+if (is_win) {
+ angle_enable_d3d9 = true
+ angle_enable_d3d11 = true
+
+ shared_library("libGLESv2") {
+ sources = [
+ "src/common/RefCountObject.cpp",
+ "src/common/RefCountObject.h",
+ "src/common/angleutils.h",
+ "src/common/blocklayout.cpp",
+ "src/common/blocklayout.h",
+ "src/common/debug.cpp",
+ "src/common/debug.h",
+ "src/common/event_tracer.cpp",
+ "src/common/event_tracer.h",
+ "src/common/mathutil.cpp",
+ "src/common/mathutil.h",
+ "src/common/shadervars.h",
+ "src/common/utilities.cpp",
+ "src/common/utilities.h",
+ "src/common/version.h",
+ "src/libGLESv2/BinaryStream.h",
+ "src/libGLESv2/Buffer.cpp",
+ "src/libGLESv2/Buffer.h",
+ "src/libGLESv2/Context.cpp",
+ "src/libGLESv2/Context.h",
+ "src/libGLESv2/DynamicHLSL.cpp",
+ "src/libGLESv2/DynamicHLSL.h",
+ "src/libGLESv2/Fence.cpp",
+ "src/libGLESv2/Fence.h",
+ "src/libGLESv2/Float16ToFloat32.cpp",
+ "src/libGLESv2/Framebuffer.cpp",
+ "src/libGLESv2/Framebuffer.h",
+ "src/libGLESv2/FramebufferAttachment.cpp",
+ "src/libGLESv2/FramebufferAttachment.h",
+ "src/libGLESv2/HandleAllocator.cpp",
+ "src/libGLESv2/HandleAllocator.h",
+ "src/libGLESv2/Program.cpp",
+ "src/libGLESv2/Program.h",
+ "src/libGLESv2/ProgramBinary.cpp",
+ "src/libGLESv2/ProgramBinary.h",
+ "src/libGLESv2/Query.cpp",
+ "src/libGLESv2/Query.h",
+ "src/libGLESv2/Renderbuffer.cpp",
+ "src/libGLESv2/Renderbuffer.h",
+ "src/libGLESv2/RenderbufferProxySet.cpp",
+ "src/libGLESv2/RenderbufferProxySet.h",
+ "src/libGLESv2/ResourceManager.cpp",
+ "src/libGLESv2/ResourceManager.h",
+ "src/libGLESv2/Sampler.cpp",
+ "src/libGLESv2/Sampler.h",
+ "src/libGLESv2/Shader.cpp",
+ "src/libGLESv2/Shader.h",
+ "src/libGLESv2/Texture.cpp",
+ "src/libGLESv2/Texture.h",
+ "src/libGLESv2/TransformFeedback.cpp",
+ "src/libGLESv2/TransformFeedback.h",
+ "src/libGLESv2/Uniform.cpp",
+ "src/libGLESv2/Uniform.h",
+ "src/libGLESv2/VertexArray.cpp",
+ "src/libGLESv2/VertexArray.h",
+ "src/libGLESv2/VertexAttribute.h",
+ "src/libGLESv2/angletypes.cpp",
+ "src/libGLESv2/angletypes.h",
+ "src/libGLESv2/constants.h",
+ "src/libGLESv2/formatutils.cpp",
+ "src/libGLESv2/formatutils.h",
+ "src/libGLESv2/libGLESv2.cpp",
+ "src/libGLESv2/libGLESv2.def",
+ "src/libGLESv2/libGLESv2.rc",
+ "src/libGLESv2/main.cpp",
+ "src/libGLESv2/main.h",
+ "src/libGLESv2/precompiled.cpp",
+ "src/libGLESv2/precompiled.h",
+ "src/libGLESv2/queryconversions.cpp",
+ "src/libGLESv2/queryconversions.h",
+ "src/libGLESv2/renderer/BufferStorage.cpp",
+ "src/libGLESv2/renderer/BufferStorage.h",
+ "src/libGLESv2/renderer/FenceImpl.h",
+ "src/libGLESv2/renderer/Image.cpp",
+ "src/libGLESv2/renderer/Image.h",
+ "src/libGLESv2/renderer/IndexBuffer.cpp",
+ "src/libGLESv2/renderer/IndexBuffer.h",
+ "src/libGLESv2/renderer/IndexDataManager.cpp",
+ "src/libGLESv2/renderer/IndexDataManager.h",
+ "src/libGLESv2/renderer/IndexRangeCache.cpp",
+ "src/libGLESv2/renderer/IndexRangeCache.h",
+ "src/libGLESv2/renderer/QueryImpl.h",
+ "src/libGLESv2/renderer/RenderTarget.h",
+ "src/libGLESv2/renderer/Renderer.cpp",
+ "src/libGLESv2/renderer/Renderer.h",
+ "src/libGLESv2/renderer/ShaderExecutable.h",
+ "src/libGLESv2/renderer/SwapChain.h",
+ "src/libGLESv2/renderer/TextureStorage.cpp",
+ "src/libGLESv2/renderer/TextureStorage.h",
+ "src/libGLESv2/renderer/VertexBuffer.cpp",
+ "src/libGLESv2/renderer/VertexBuffer.h",
+ "src/libGLESv2/renderer/VertexDataManager.cpp",
+ "src/libGLESv2/renderer/VertexDataManager.h",
+ "src/libGLESv2/renderer/copyimage.cpp",
+ "src/libGLESv2/renderer/copyimage.h",
+ "src/libGLESv2/renderer/copyvertex.h",
+ "src/libGLESv2/renderer/generatemip.h",
+ "src/libGLESv2/renderer/imageformats.h",
+ "src/libGLESv2/renderer/loadimage.cpp",
+ "src/libGLESv2/renderer/loadimage.h",
+ "src/libGLESv2/renderer/loadimageSSE2.cpp",
+ "src/libGLESv2/renderer/vertexconversion.h",
+ "src/libGLESv2/resource.h",
+ "src/libGLESv2/validationES.cpp",
+ "src/libGLESv2/validationES.h",
+ "src/libGLESv2/validationES2.cpp",
+ "src/libGLESv2/validationES2.h",
+ "src/libGLESv2/validationES3.cpp",
+ "src/libGLESv2/validationES3.h",
+ "src/third_party/murmurhash/MurmurHash3.cpp",
+ "src/third_party/murmurhash/MurmurHash3.h",
+ "src/third_party/systeminfo/SystemInfo.cpp",
+ "src/third_party/systeminfo/SystemInfo.h",
+ ]
+
+ defines = [
+ "ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES={ " +
+ "TEXT(\"d3dcompiler_46.dll\"), TEXT(\"d3dcompiler_43.dll\") }",
+ "GL_APICALL=",
+ "GL_GLEXT_PROTOTYPES=",
+ "EGLAPI=",
+ ]
+ libs = []
+
+ # Shared D3dD sources.
+ if (angle_enable_d3d9 || angle_enable_d3d11) {
+ sources += [
+ "src/libGLESv2/renderer/d3d/HLSLCompiler.cpp",
+ "src/libGLESv2/renderer/d3d/HLSLCompiler.h",
+ ]
+ }
+
+ if (angle_enable_d3d9) {
+ sources += [
+ "src/libGLESv2/renderer/d3d9/Blit9.cpp",
+ "src/libGLESv2/renderer/d3d9/Blit9.h",
+ "src/libGLESv2/renderer/d3d9/BufferStorage9.cpp",
+ "src/libGLESv2/renderer/d3d9/BufferStorage9.h",
+ "src/libGLESv2/renderer/d3d9/Fence9.cpp",
+ "src/libGLESv2/renderer/d3d9/Fence9.h",
+ "src/libGLESv2/renderer/d3d9/Image9.cpp",
+ "src/libGLESv2/renderer/d3d9/Image9.h",
+ "src/libGLESv2/renderer/d3d9/IndexBuffer9.cpp",
+ "src/libGLESv2/renderer/d3d9/IndexBuffer9.h",
+ "src/libGLESv2/renderer/d3d9/Query9.cpp",
+ "src/libGLESv2/renderer/d3d9/Query9.h",
+ "src/libGLESv2/renderer/d3d9/RenderTarget9.cpp",
+ "src/libGLESv2/renderer/d3d9/RenderTarget9.h",
+ "src/libGLESv2/renderer/d3d9/Renderer9.cpp",
+ "src/libGLESv2/renderer/d3d9/Renderer9.h",
+ "src/libGLESv2/renderer/d3d9/ShaderCache.h",
+ "src/libGLESv2/renderer/d3d9/ShaderExecutable9.cpp",
+ "src/libGLESv2/renderer/d3d9/ShaderExecutable9.h",
+ "src/libGLESv2/renderer/d3d9/SwapChain9.cpp",
+ "src/libGLESv2/renderer/d3d9/SwapChain9.h",
+ "src/libGLESv2/renderer/d3d9/TextureStorage9.cpp",
+ "src/libGLESv2/renderer/d3d9/TextureStorage9.h",
+ "src/libGLESv2/renderer/d3d9/VertexBuffer9.cpp",
+ "src/libGLESv2/renderer/d3d9/VertexBuffer9.h",
+ "src/libGLESv2/renderer/d3d9/VertexDeclarationCache.cpp",
+ "src/libGLESv2/renderer/d3d9/VertexDeclarationCache.h",
+ "src/libGLESv2/renderer/d3d9/formatutils9.cpp",
+ "src/libGLESv2/renderer/d3d9/formatutils9.h",
+ "src/libGLESv2/renderer/d3d9/renderer9_utils.cpp",
+ "src/libGLESv2/renderer/d3d9/renderer9_utils.h",
+ "src/libGLESv2/renderer/d3d9/shaders/compiled/componentmaskps.h",
+ "src/libGLESv2/renderer/d3d9/shaders/compiled/flipyvs.h",
+ "src/libGLESv2/renderer/d3d9/shaders/compiled/luminanceps.h",
+ "src/libGLESv2/renderer/d3d9/shaders/compiled/passthroughps.h",
+ "src/libGLESv2/renderer/d3d9/shaders/compiled/standardvs.h",
+ ]
+
+ defines += [ "ANGLE_ENABLE_D3D9" ]
+ libs += [ "d3d9.lib" ]
+ }
+
+ if (angle_enable_d3d11) {
+ sources += [
+ "src/libGLESv2/renderer/d3d11/Blit11.cpp",
+ "src/libGLESv2/renderer/d3d11/Blit11.h",
+ "src/libGLESv2/renderer/d3d11/BufferStorage11.cpp",
+ "src/libGLESv2/renderer/d3d11/BufferStorage11.h",
+ "src/libGLESv2/renderer/d3d11/Clear11.cpp",
+ "src/libGLESv2/renderer/d3d11/Clear11.h",
+ "src/libGLESv2/renderer/d3d11/Fence11.cpp",
+ "src/libGLESv2/renderer/d3d11/Fence11.h",
+ "src/libGLESv2/renderer/d3d11/Image11.cpp",
+ "src/libGLESv2/renderer/d3d11/Image11.h",
+ "src/libGLESv2/renderer/d3d11/IndexBuffer11.cpp",
+ "src/libGLESv2/renderer/d3d11/IndexBuffer11.h",
+ "src/libGLESv2/renderer/d3d11/InputLayoutCache.cpp",
+ "src/libGLESv2/renderer/d3d11/InputLayoutCache.h",
+ "src/libGLESv2/renderer/d3d11/PixelTransfer11.cpp",
+ "src/libGLESv2/renderer/d3d11/PixelTransfer11.h",
+ "src/libGLESv2/renderer/d3d11/Query11.cpp",
+ "src/libGLESv2/renderer/d3d11/Query11.h",
+ "src/libGLESv2/renderer/d3d11/RenderStateCache.cpp",
+ "src/libGLESv2/renderer/d3d11/RenderStateCache.h",
+ "src/libGLESv2/renderer/d3d11/RenderTarget11.cpp",
+ "src/libGLESv2/renderer/d3d11/RenderTarget11.h",
+ "src/libGLESv2/renderer/d3d11/Renderer11.cpp",
+ "src/libGLESv2/renderer/d3d11/Renderer11.h",
+ "src/libGLESv2/renderer/d3d11/ShaderExecutable11.cpp",
+ "src/libGLESv2/renderer/d3d11/ShaderExecutable11.h",
+ "src/libGLESv2/renderer/d3d11/SwapChain11.cpp",
+ "src/libGLESv2/renderer/d3d11/SwapChain11.h",
+ "src/libGLESv2/renderer/d3d11/TextureStorage11.cpp",
+ "src/libGLESv2/renderer/d3d11/TextureStorage11.h",
+ "src/libGLESv2/renderer/d3d11/VertexBuffer11.cpp",
+ "src/libGLESv2/renderer/d3d11/VertexBuffer11.h",
+ "src/libGLESv2/renderer/d3d11/formatutils11.cpp",
+ "src/libGLESv2/renderer/d3d11/formatutils11.h",
+ "src/libGLESv2/renderer/d3d11/renderer11_utils.cpp",
+ "src/libGLESv2/renderer/d3d11/renderer11_utils.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_gs.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_ps_4f.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_ps_4i.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_ps_4ui.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/buffertotexture11_vs.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/clearfloat11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/clearfloat11vs.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/clearsint11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/clearsint11vs.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/clearuint11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/clearuint11vs.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthrough2d11vs.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthrough3d11gs.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthrough3d11vs.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughdepth2d11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughlum2d11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughlum3d11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughlumalpha2d11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughlumalpha3d11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughr2d11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughr2di11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughr2dui11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughr3d11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughr3di11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughr3dui11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrg2d11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrg2di11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrg2dui11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrg3d11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrg3di11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrg3dui11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgb2d11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgb2di11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgb2dui11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgb3d11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgb3di11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgb3dui11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgba2d11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgba2di11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgba2dui11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgba3d11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgba3di11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/passthroughrgba3dui11ps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/swizzlef2darrayps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/swizzlef2dps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/swizzlef3dps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/swizzlei2darrayps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/swizzlei2dps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/swizzlei3dps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/swizzleui2darrayps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/swizzleui2dps.h",
+ "src/libGLESv2/renderer/d3d11/shaders/compiled/swizzleui3dps.h",
+ ]
+
+ defines += [ "ANGLE_ENABLE_D3D11" ]
+ libs += [ "dxguid.lib" ]
+ }
+
+ if (is_debug) {
+ defines += [ "ANGLE_ENABLE_PERF" ]
+ libs += [ "d3d9.lib" ]
+ }
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ ":internal_config",
+ "//build/config/compiler:no_chromium_code",
+ ]
+
+ include_dirs = [ "src/libGLESv2" ]
+
+ deps = [
+ ":commit_id",
+ ":includes",
+ ":translator",
+ #":copy_compiler_dll", TODO(GYP)
+ ]
+ }
+
+ shared_library("libEGL") {
+ sources = [
+ "src/common/RefCountObject.cpp",
+ "src/common/RefCountObject.h",
+ "src/common/angleutils.h",
+ "src/common/blocklayout.cpp",
+ "src/common/blocklayout.h",
+ "src/common/debug.cpp",
+ "src/common/debug.h",
+ "src/common/event_tracer.cpp",
+ "src/common/event_tracer.h",
+ "src/common/mathutil.cpp",
+ "src/common/mathutil.h",
+ "src/common/shadervars.h",
+ "src/common/utilities.cpp",
+ "src/common/utilities.h",
+ "src/common/version.h",
+ "src/libEGL/Config.cpp",
+ "src/libEGL/Config.h",
+ "src/libEGL/Display.cpp",
+ "src/libEGL/Display.h",
+ "src/libEGL/Surface.cpp",
+ "src/libEGL/Surface.h",
+ "src/libEGL/libEGL.cpp",
+ "src/libEGL/libEGL.def",
+ "src/libEGL/libEGL.rc",
+ "src/libEGL/main.cpp",
+ "src/libEGL/main.h",
+ "src/libEGL/resource.h",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [
+ ":internal_config",
+ "//build/config/compiler:no_chromium_code",
+ ]
+
+ if (is_debug) {
+ defines = [ "ANGLE_ENABLE_PERF" ]
+ }
+
+ include_dirs = [ "src/libGLESv2" ]
+ libs = [ "d3d9.lib" ]
+
+ deps = [
+ ":commit_id",
+ ":includes",
+ ":libGLESv2",
+ ]
+ }
+} # is_win
diff --git a/chromium/build/secondary/third_party/angle/angle_commit.h b/chromium/build/secondary/third_party/angle/angle_commit.h
new file mode 100644
index 00000000000..20045d3026f
--- /dev/null
+++ b/chromium/build/secondary/third_party/angle/angle_commit.h
@@ -0,0 +1,8 @@
+// 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.
+
+#define ANGLE_COMMIT_HASH "dummy_gn_cid"
+#define ANGLE_COMMIT_HASH_SIZE 12
+#define ANGLE_COMMIT_DATE "0000-00-00 00:00:00 +0000"
+
diff --git a/chromium/build/secondary/third_party/flac/BUILD.gn b/chromium/build/secondary/third_party/flac/BUILD.gn
new file mode 100644
index 00000000000..53a2b05077a
--- /dev/null
+++ b/chromium/build/secondary/third_party/flac/BUILD.gn
@@ -0,0 +1,76 @@
+# 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.
+
+config("flac_config") {
+ defines = [ "FLAC__NO_DLL" ]
+}
+
+static_library("flac") {
+ sources = [
+ "include/FLAC/all.h",
+ "include/FLAC/assert.h",
+ "include/FLAC/callback.h",
+ "include/FLAC/export.h",
+ "include/FLAC/format.h",
+ "include/FLAC/metadata.h",
+ "include/FLAC/ordinals.h",
+ "include/FLAC/stream_decoder.h",
+ "include/FLAC/stream_encoder.h",
+ "include/share/alloc.h",
+ "src/libFLAC/alloc.c",
+ "src/libFLAC/bitmath.c",
+ "src/libFLAC/bitreader.c",
+ "src/libFLAC/bitwriter.c",
+ "src/libFLAC/cpu.c",
+ "src/libFLAC/crc.c",
+ "src/libFLAC/fixed.c",
+ "src/libFLAC/float.c",
+ "src/libFLAC/format.c",
+ "src/libFLAC/lpc.c",
+ "src/libFLAC/md5.c",
+ "src/libFLAC/memory.c",
+ "src/libFLAC/stream_decoder.c",
+ "src/libFLAC/stream_encoder.c",
+ "src/libFLAC/stream_encoder_framing.c",
+ "src/libFLAC/window.c",
+ "src/libFLAC/include/private/all.h",
+ "src/libFLAC/include/private/bitmath.h",
+ "src/libFLAC/include/private/bitreader.h",
+ "src/libFLAC/include/private/bitwriter.h",
+ "src/libFLAC/include/private/cpu.h",
+ "src/libFLAC/include/private/crc.h",
+ "src/libFLAC/include/private/fixed.h",
+ "src/libFLAC/include/private/float.h",
+ "src/libFLAC/include/private/format.h",
+ "src/libFLAC/include/private/lpc.h",
+ "src/libFLAC/include/private/md5.h",
+ "src/libFLAC/include/private/memory.h",
+ "src/libFLAC/include/private/metadata.h",
+ "src/libFLAC/include/private/stream_encoder_framing.h",
+ "src/libFLAC/include/private/window.h",
+ "src/libFLAC/include/protected/all.h",
+ "src/libFLAC/include/protected/stream_decoder.h",
+ "src/libFLAC/include/protected/stream_encoder.h",
+ ]
+
+ defines = [
+ "FLAC__OVERFLOW_DETECT",
+ "VERSION=\"1.2.1\"",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ direct_dependent_configs = [ ":flac_config" ]
+
+ include_dirs = [
+ "include",
+ "src/libFLAC/include",
+ ]
+
+ if (is_clang) {
+ # libflac converts between FLAC__StreamDecoderState and
+ # FLAC__StreamDecoderInitStatus a lot in stream_decoder.c.
+ cflags = [ "-Wno-conversion" ]
+ }
+}
diff --git a/chromium/build/secondary/third_party/freetype/BUILD.gn b/chromium/build/secondary/third_party/freetype/BUILD.gn
new file mode 100644
index 00000000000..ee70c4e89cf
--- /dev/null
+++ b/chromium/build/secondary/third_party/freetype/BUILD.gn
@@ -0,0 +1,52 @@
+# 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.
+
+assert(is_android, "This library is only used on Android")
+
+config("freetype_config") {
+ include_dirs = [ "include" ]
+}
+
+source_set("freetype") {
+ sources = [
+ # The following files are not sorted alphabetically, but in the
+ # same order as in Android.mk to ease maintenance.
+ "src/base/ftbbox.c",
+ "src/base/ftbitmap.c",
+ "src/base/ftfstype.c",
+ "src/base/ftglyph.c",
+ "src/base/ftlcdfil.c",
+ "src/base/ftstroke.c",
+ "src/base/fttype1.c",
+ "src/base/ftxf86.c",
+ "src/base/ftbase.c",
+ "src/base/ftsystem.c",
+ "src/base/ftinit.c",
+ "src/base/ftgasp.c",
+ "src/raster/raster.c",
+ "src/sfnt/sfnt.c",
+ "src/smooth/smooth.c",
+ "src/autofit/autofit.c",
+ "src/truetype/truetype.c",
+ "src/cff/cff.c",
+ "src/psnames/psnames.c",
+ "src/pshinter/pshinter.c",
+ ]
+
+ defines = [
+ "FT2_BUILD_LIBRARY",
+ "DARWIN_NO_CARBON",
+ ]
+
+ include_dirs = [
+ "build",
+ ]
+
+ direct_dependent_configs = [ ":freetype_config" ]
+
+ deps = [
+ "//third_party/libpng",
+ "//third_party/zlib",
+ ]
+}
diff --git a/chromium/build/secondary/third_party/icu/BUILD.gn b/chromium/build/secondary/third_party/icu/BUILD.gn
new file mode 100644
index 00000000000..cfb49f6f10e
--- /dev/null
+++ b/chromium/build/secondary/third_party/icu/BUILD.gn
@@ -0,0 +1,444 @@
+# 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.
+
+# Meta target that includes both icuuc and icui18n. Most targets want both.
+# You can depend on the individually if you need to.
+group("icu") {
+ deps = [
+ ":icui18n",
+ ":icuuc",
+ ]
+}
+
+# Shared config used by ICU and all dependents.
+config("icu_config") {
+ defines = [
+ "U_USING_ICU_NAMESPACE=0",
+ ]
+
+ if (component_mode != "shared_library") {
+ defines += [ "U_STATIC_IMPLEMENTATION" ]
+ }
+
+ include_dirs = [
+ "source/common",
+ "source/i18n",
+ ]
+}
+
+# Config used only by ICU code.
+config("icu_code") {
+ if (is_win) {
+ # Disable some compiler warnings.
+ cflags = [
+ "/wd4005", # Macro redefinition.
+ "/wd4068", # Unknown pragmas.
+ "/wd4267", # Conversion from size_t on 64-bits.
+ "/wd4996", # Deprecated functions.
+ ]
+ } else if (is_linux) {
+ cflags = [
+ # Since ICU wants to internally use its own deprecated APIs, don't
+ # complain about it.
+ "-Wno-deprecated-declarations",
+ "-Wno-unused-function",
+ ]
+ } else if (is_clang) {
+ cflags = [
+ "-Wno-deprecated-declarations",
+ "-Wno-logical-op-parentheses",
+ "-Wno-tautological-compare",
+ "-Wno-switch",
+ ]
+ }
+}
+
+component("icui18n") {
+ sources = [
+ "source/i18n/anytrans.cpp",
+ "source/i18n/astro.cpp",
+ "source/i18n/basictz.cpp",
+ "source/i18n/bms.cpp",
+ "source/i18n/bmsearch.cpp",
+ "source/i18n/bocsu.c",
+ "source/i18n/brktrans.cpp",
+ "source/i18n/buddhcal.cpp",
+ "source/i18n/calendar.cpp",
+ "source/i18n/casetrn.cpp",
+ "source/i18n/cecal.cpp",
+ "source/i18n/chnsecal.cpp",
+ "source/i18n/choicfmt.cpp",
+ "source/i18n/coleitr.cpp",
+ "source/i18n/coll.cpp",
+ "source/i18n/colldata.cpp",
+ "source/i18n/coptccal.cpp",
+ "source/i18n/cpdtrans.cpp",
+ "source/i18n/csdetect.cpp",
+ "source/i18n/csmatch.cpp",
+ "source/i18n/csr2022.cpp",
+ "source/i18n/csrecog.cpp",
+ "source/i18n/csrmbcs.cpp",
+ "source/i18n/csrsbcs.cpp",
+ "source/i18n/csrucode.cpp",
+ "source/i18n/csrutf8.cpp",
+ "source/i18n/curramt.cpp",
+ "source/i18n/currfmt.cpp",
+ "source/i18n/currpinf.cpp",
+ "source/i18n/currunit.cpp",
+ "source/i18n/datefmt.cpp",
+ "source/i18n/dcfmtsym.cpp",
+ "source/i18n/decContext.c",
+ "source/i18n/decNumber.c",
+ "source/i18n/decimfmt.cpp",
+ "source/i18n/digitlst.cpp",
+ "source/i18n/dtfmtsym.cpp",
+ "source/i18n/dtitvfmt.cpp",
+ "source/i18n/dtitvinf.cpp",
+ "source/i18n/dtptngen.cpp",
+ "source/i18n/dtrule.cpp",
+ "source/i18n/esctrn.cpp",
+ "source/i18n/ethpccal.cpp",
+ "source/i18n/fmtable.cpp",
+ "source/i18n/fmtable_cnv.cpp",
+ "source/i18n/format.cpp",
+ "source/i18n/fphdlimp.cpp",
+ "source/i18n/fpositer.cpp",
+ "source/i18n/funcrepl.cpp",
+ "source/i18n/gregocal.cpp",
+ "source/i18n/gregoimp.cpp",
+ "source/i18n/hebrwcal.cpp",
+ "source/i18n/indiancal.cpp",
+ "source/i18n/inputext.cpp",
+ "source/i18n/islamcal.cpp",
+ "source/i18n/japancal.cpp",
+ "source/i18n/locdspnm.cpp",
+ "source/i18n/measfmt.cpp",
+ "source/i18n/measure.cpp",
+ "source/i18n/msgfmt.cpp",
+ "source/i18n/name2uni.cpp",
+ "source/i18n/nfrs.cpp",
+ "source/i18n/nfrule.cpp",
+ "source/i18n/nfsubs.cpp",
+ "source/i18n/nortrans.cpp",
+ "source/i18n/nultrans.cpp",
+ "source/i18n/numfmt.cpp",
+ "source/i18n/numsys.cpp",
+ "source/i18n/olsontz.cpp",
+ "source/i18n/persncal.cpp",
+ "source/i18n/plurfmt.cpp",
+ "source/i18n/plurrule.cpp",
+ "source/i18n/quant.cpp",
+ "source/i18n/rbnf.cpp",
+ "source/i18n/rbt.cpp",
+ "source/i18n/rbt_data.cpp",
+ "source/i18n/rbt_pars.cpp",
+ "source/i18n/rbt_rule.cpp",
+ "source/i18n/rbt_set.cpp",
+ "source/i18n/rbtz.cpp",
+ "source/i18n/regexcmp.cpp",
+ "source/i18n/regexst.cpp",
+ "source/i18n/regextxt.cpp",
+ "source/i18n/reldtfmt.cpp",
+ "source/i18n/rematch.cpp",
+ "source/i18n/remtrans.cpp",
+ "source/i18n/repattrn.cpp",
+ "source/i18n/search.cpp",
+ "source/i18n/selfmt.cpp",
+ "source/i18n/simpletz.cpp",
+ "source/i18n/smpdtfmt.cpp",
+ "source/i18n/sortkey.cpp",
+ "source/i18n/strmatch.cpp",
+ "source/i18n/strrepl.cpp",
+ "source/i18n/stsearch.cpp",
+ "source/i18n/taiwncal.cpp",
+ "source/i18n/tblcoll.cpp",
+ "source/i18n/timezone.cpp",
+ "source/i18n/titletrn.cpp",
+ "source/i18n/tmunit.cpp",
+ "source/i18n/tmutamt.cpp",
+ "source/i18n/tmutfmt.cpp",
+ "source/i18n/tolowtrn.cpp",
+ "source/i18n/toupptrn.cpp",
+ "source/i18n/translit.cpp",
+ "source/i18n/transreg.cpp",
+ "source/i18n/tridpars.cpp",
+ "source/i18n/tzrule.cpp",
+ "source/i18n/tztrans.cpp",
+ "source/i18n/ucal.cpp",
+ "source/i18n/ucln_in.c",
+ "source/i18n/ucol.cpp",
+ "source/i18n/ucol_bld.cpp",
+ "source/i18n/ucol_cnt.cpp",
+ "source/i18n/ucol_elm.cpp",
+ "source/i18n/ucol_res.cpp",
+ "source/i18n/ucol_sit.cpp",
+ "source/i18n/ucol_tok.cpp",
+ "source/i18n/ucol_wgt.cpp",
+ "source/i18n/ucoleitr.cpp",
+ "source/i18n/ucsdet.cpp",
+ "source/i18n/ucurr.cpp",
+ "source/i18n/udat.cpp",
+ "source/i18n/udatpg.cpp",
+ "source/i18n/ulocdata.c",
+ "source/i18n/umsg.cpp",
+ "source/i18n/unesctrn.cpp",
+ "source/i18n/uni2name.cpp",
+ "source/i18n/unum.cpp",
+ "source/i18n/uregex.cpp",
+ "source/i18n/uregexc.cpp",
+ "source/i18n/usearch.cpp",
+ "source/i18n/uspoof.cpp",
+ "source/i18n/uspoof_build.cpp",
+ "source/i18n/uspoof_conf.cpp",
+ "source/i18n/uspoof_impl.cpp",
+ "source/i18n/uspoof_wsconf.cpp",
+ "source/i18n/utmscale.c",
+ "source/i18n/utrans.cpp",
+ "source/i18n/vtzone.cpp",
+ "source/i18n/vzone.cpp",
+ "source/i18n/windtfmt.cpp",
+ "source/i18n/winnmfmt.cpp",
+ "source/i18n/wintzimpl.cpp",
+ "source/i18n/zonemeta.cpp",
+ "source/i18n/zrule.cpp",
+ "source/i18n/zstrfmt.cpp",
+ "source/i18n/ztrans.cpp",
+ ]
+ defines = [
+ "U_I18N_IMPLEMENTATION",
+ ]
+ deps = [
+ ":icuuc",
+ ]
+
+ # ICU uses RTTI, replace the default "no rtti" config.
+ configs -= [
+ "//build/config/compiler:no_rtti", # ICU uses RTTI.
+ "//build/config/compiler:chromium_code",
+ ]
+ configs += [
+ "//build/config/compiler:rtti",
+ "//build/config/compiler:no_chromium_code",
+ ]
+
+ configs += [ ":icu_code" ]
+ direct_dependent_configs = [ ":icu_config" ]
+
+ if (is_clang) {
+ # uspoof.h has a U_NAMESPACE_USE macro. That's a bug,
+ # the header should use U_NAMESPACE_BEGIN instead.
+ # http://bugs.icu-project.org/trac/ticket/9054
+ configs -= [ "//build/config/clang:extra_warnings" ]
+
+ cflags = [
+ "-Wno-header-hygiene",
+ # Looks like a real issue, see http://crbug.com/114660
+ "-Wno-return-type-c-linkage",
+ ]
+ }
+}
+
+component("icuuc") {
+ sources = [
+ "source/common/bmpset.cpp",
+ "source/common/brkeng.cpp",
+ "source/common/brkiter.cpp",
+ "source/common/bytestream.cpp",
+ "source/common/caniter.cpp",
+ "source/common/chariter.cpp",
+ "source/common/charstr.cpp",
+ "source/common/cmemory.c",
+ "source/common/cstring.c",
+ "source/common/cwchar.c",
+ "source/common/dictbe.cpp",
+ "source/common/dtintrv.cpp",
+ "source/common/errorcode.cpp",
+ "source/common/filterednormalizer2.cpp",
+ "source/common/icudataver.c",
+ "source/common/icuplug.c",
+ "source/common/locavailable.cpp",
+ "source/common/locbased.cpp",
+ "source/common/locdispnames.cpp",
+ "source/common/locid.cpp",
+ "source/common/loclikely.cpp",
+ "source/common/locmap.c",
+ "source/common/locresdata.cpp",
+ "source/common/locutil.cpp",
+ "source/common/mutex.cpp",
+ "source/common/normalizer2.cpp",
+ "source/common/normalizer2impl.cpp",
+ "source/common/normlzr.cpp",
+ "source/common/parsepos.cpp",
+ "source/common/propname.cpp",
+ "source/common/propsvec.c",
+ "source/common/punycode.c",
+ "source/common/putil.c",
+ "source/common/rbbi.cpp",
+ "source/common/rbbidata.cpp",
+ "source/common/rbbinode.cpp",
+ "source/common/rbbirb.cpp",
+ "source/common/rbbiscan.cpp",
+ "source/common/rbbisetb.cpp",
+ "source/common/rbbistbl.cpp",
+ "source/common/rbbitblb.cpp",
+ "source/common/resbund.cpp",
+ "source/common/resbund_cnv.cpp",
+ "source/common/ruleiter.cpp",
+ "source/common/schriter.cpp",
+ "source/common/serv.cpp",
+ "source/common/servlk.cpp",
+ "source/common/servlkf.cpp",
+ "source/common/servls.cpp",
+ "source/common/servnotf.cpp",
+ "source/common/servrbf.cpp",
+ "source/common/servslkf.cpp",
+ "source/common/stringpiece.cpp",
+ "source/common/triedict.cpp",
+ "source/common/uarrsort.c",
+ "source/common/ubidi.c",
+ "source/common/ubidi_props.c",
+ "source/common/ubidiln.c",
+ "source/common/ubidiwrt.c",
+ "source/common/ubrk.cpp",
+ "source/common/ucase.c",
+ "source/common/ucasemap.c",
+ "source/common/ucat.c",
+ "source/common/uchar.c",
+ "source/common/uchriter.cpp",
+ "source/common/ucln_cmn.c",
+ "source/common/ucmndata.c",
+ "source/common/ucnv.c",
+ "source/common/ucnv2022.c",
+ "source/common/ucnv_bld.c",
+ "source/common/ucnv_cb.c",
+ "source/common/ucnv_cnv.c",
+ "source/common/ucnv_err.c",
+ "source/common/ucnv_ext.c",
+ "source/common/ucnv_io.c",
+ "source/common/ucnv_lmb.c",
+ "source/common/ucnv_set.c",
+ "source/common/ucnv_u16.c",
+ "source/common/ucnv_u32.c",
+ "source/common/ucnv_u7.c",
+ "source/common/ucnv_u8.c",
+ "source/common/ucnvbocu.c",
+ "source/common/ucnvdisp.c",
+ "source/common/ucnvhz.c",
+ "source/common/ucnvisci.c",
+ "source/common/ucnvlat1.c",
+ "source/common/ucnvmbcs.c",
+ "source/common/ucnvscsu.c",
+ "source/common/ucnvsel.cpp",
+ "source/common/ucol_swp.cpp",
+ "source/common/udata.cpp",
+ "source/common/udatamem.c",
+ "source/common/udataswp.c",
+ "source/common/uenum.c",
+ "source/common/uhash.c",
+ "source/common/uhash_us.cpp",
+ "source/common/uidna.cpp",
+ "source/common/uinit.c",
+ "source/common/uinvchar.c",
+ "source/common/uiter.cpp",
+ "source/common/ulist.c",
+ "source/common/uloc.c",
+ "source/common/uloc_tag.c",
+ "source/common/umapfile.c",
+ "source/common/umath.c",
+ "source/common/umutex.c",
+ "source/common/unames.c",
+ "source/common/unifilt.cpp",
+ "source/common/unifunct.cpp",
+ "source/common/uniset.cpp",
+ "source/common/uniset_props.cpp",
+ "source/common/unisetspan.cpp",
+ "source/common/unistr.cpp",
+ "source/common/unistr_case.cpp",
+ "source/common/unistr_cnv.cpp",
+ "source/common/unistr_props.cpp",
+ "source/common/unorm.cpp",
+ "source/common/unorm_it.c",
+ "source/common/unormcmp.cpp",
+ "source/common/uobject.cpp",
+ "source/common/uprops.cpp",
+ "source/common/ures_cnv.c",
+ "source/common/uresbund.c",
+ "source/common/uresdata.c",
+ "source/common/usc_impl.c",
+ "source/common/uscript.c",
+ "source/common/uset.cpp",
+ "source/common/uset_props.cpp",
+ "source/common/usetiter.cpp",
+ "source/common/ushape.c",
+ "source/common/usprep.cpp",
+ "source/common/ustack.cpp",
+ "source/common/ustr_cnv.c",
+ "source/common/ustr_wcs.c",
+ "source/common/ustrcase.c",
+ "source/common/ustrenum.cpp",
+ "source/common/ustrfmt.c",
+ "source/common/ustring.c",
+ "source/common/ustrtrns.c",
+ "source/common/utext.cpp",
+ "source/common/utf_impl.c",
+ "source/common/util.cpp",
+ "source/common/util_props.cpp",
+ "source/common/utrace.c",
+ "source/common/utrie.c",
+ "source/common/utrie2.cpp",
+ "source/common/utrie2_builder.c",
+ "source/common/uts46.cpp",
+ "source/common/utypes.c",
+ "source/common/uvector.cpp",
+ "source/common/uvectr32.cpp",
+ "source/common/uvectr64.cpp",
+ "source/common/wintz.c",
+ "source/stubdata/stubdata.c",
+ ]
+ defines = [
+ "U_COMMON_IMPLEMENTATION",
+ ]
+ deps = [
+ ":icudata",
+ ]
+ configs += [ ":icu_code" ]
+
+ configs -= [
+ "//build/config/compiler:no_rtti", # ICU uses RTTI.
+ "//build/config/compiler:chromium_code",
+ ]
+ configs += [
+ "//build/config/compiler:rtti",
+ "//build/config/compiler:no_chromium_code",
+ ]
+
+ direct_dependent_configs = [ ":icu_config" ]
+
+ if (!is_win) {
+ sources -= [ "source/stubdata/stubdata.c" ]
+ }
+}
+
+if (is_win) {
+ # On Windows the target DLL is pre-built so just use a copy rule.
+ copy("icudata") {
+ sources = [ "windows/icudt.dll" ]
+ outputs = [ "$root_out_dir/icudt.dll" ]
+ }
+} else {
+ source_set("icudata") {
+ sources = [
+ # These are hand-generated, but will do for now. The linux version is an
+ # identical copy of the (mac) icudt46l_dat.S file, modulo removal of the
+ # .private_extern and .const directives and with no leading underscore on
+ # the icudt46_dat symbol.
+ "android/icudt46l_dat.S",
+ "linux/icudt46l_dat.S",
+ "mac/icudt46l_dat.S",
+ ]
+ defines = [ "U_HIDE_DATA_SYMBOL" ]
+
+ # TODO(brettw) support use_system_icu and icu_use_data_file_flag.
+ }
+}
diff --git a/chromium/build/secondary/third_party/leveldatabase/BUILD.gn b/chromium/build/secondary/third_party/leveldatabase/BUILD.gn
new file mode 100644
index 00000000000..60a600bf07b
--- /dev/null
+++ b/chromium/build/secondary/third_party/leveldatabase/BUILD.gn
@@ -0,0 +1,338 @@
+# 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.
+
+# Snappy is a compression library we use.
+# TODO(brettw) It's not clear why this needs to be parameterized.
+use_snappy = true
+
+defines = [ "LEVELDB_PLATFORM_CHROMIUM=1" ]
+
+config("leveldatabase_config") {
+ include_dirs = [
+ ".",
+ "src",
+ "src/include",
+ ]
+ if (is_win) {
+ include_dirs += [ "src/port/win" ]
+ }
+}
+
+static_library("leveldatabase") {
+ sources = [
+ "env_chromium.cc",
+ "env_chromium.h",
+ "env_chromium_stdio.cc",
+ "env_chromium_stdio.h",
+ "env_idb.h",
+ "port/port_chromium.cc",
+ "port/port_chromium.h",
+ "src/db/builder.cc",
+ "src/db/builder.h",
+ "src/db/db_impl.cc",
+ "src/db/db_impl.h",
+ "src/db/db_iter.cc",
+ "src/db/db_iter.h",
+ "src/db/filename.cc",
+ "src/db/filename.h",
+ "src/db/dbformat.cc",
+ "src/db/dbformat.h",
+ "src/db/log_format.h",
+ "src/db/log_reader.cc",
+ "src/db/log_reader.h",
+ "src/db/log_writer.cc",
+ "src/db/log_writer.h",
+ "src/db/memtable.cc",
+ "src/db/memtable.h",
+ "src/db/repair.cc",
+ "src/db/skiplist.h",
+ "src/db/snapshot.h",
+ "src/db/table_cache.cc",
+ "src/db/table_cache.h",
+ "src/db/version_edit.cc",
+ "src/db/version_edit.h",
+ "src/db/version_set.cc",
+ "src/db/version_set.h",
+ "src/db/write_batch.cc",
+ "src/db/write_batch_internal.h",
+ "src/helpers/memenv/memenv.cc",
+ "src/helpers/memenv/memenv.h",
+ "src/include/leveldb/cache.h",
+ "src/include/leveldb/comparator.h",
+ "src/include/leveldb/db.h",
+ "src/include/leveldb/env.h",
+ "src/include/leveldb/filter_policy.h",
+ "src/include/leveldb/iterator.h",
+ "src/include/leveldb/options.h",
+ "src/include/leveldb/slice.h",
+ "src/include/leveldb/status.h",
+ "src/include/leveldb/table.h",
+ "src/include/leveldb/table_builder.h",
+ "src/include/leveldb/write_batch.h",
+ "src/port/port.h",
+ "src/port/port_example.h",
+ #"src/port/port_posix.cc", # We use the chromium port instead of this.
+ #"src/port/port_posix.h",
+ "src/table/block.cc",
+ "src/table/block.h",
+ "src/table/block_builder.cc",
+ "src/table/block_builder.h",
+ "src/table/filter_block.cc",
+ "src/table/filter_block.h",
+ "src/table/format.cc",
+ "src/table/format.h",
+ "src/table/iterator.cc",
+ "src/table/iterator_wrapper.h",
+ "src/table/merger.cc",
+ "src/table/merger.h",
+ "src/table/table.cc",
+ "src/table/table_builder.cc",
+ "src/table/two_level_iterator.cc",
+ "src/table/two_level_iterator.h",
+ "src/util/arena.cc",
+ "src/util/arena.h",
+ "src/util/bloom.cc",
+ "src/util/cache.cc",
+ "src/util/coding.cc",
+ "src/util/coding.h",
+ "src/util/comparator.cc",
+ "src/util/crc32c.cc",
+ "src/util/crc32c.h",
+ "src/util/env.cc",
+ "src/util/filter_policy.cc",
+ "src/util/hash.cc",
+ "src/util/hash.h",
+ "src/util/logging.cc",
+ "src/util/logging.h",
+ "src/util/mutexlock.h",
+ "src/util/options.cc",
+ "src/util/random.h",
+ "src/util/status.cc",
+ ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+
+ direct_dependent_configs = [ ":leveldatabase_config" ]
+
+ deps = [
+ "//base",
+ "//base/third_party/dynamic_annotations",
+ "//third_party/re2",
+ ]
+
+ if (use_snappy) {
+ defines += [ "USE_SNAPPY=1" ]
+ deps += [ "//third_party/snappy" ]
+ }
+}
+
+if (!is_android) {
+ test("env_chromium_unittests") {
+ sources = [
+ "env_chromium_unittest.cc",
+ ]
+ deps = [
+ ":leveldatabase",
+ "//base/test:test_support",
+ "//testing/gtest",
+ ]
+ }
+
+ static_library("leveldb_testutil") {
+ sources = [
+ "src/util/histogram.cc",
+ "src/util/histogram.h",
+ "src/util/testharness.cc",
+ "src/util/testharness.h",
+ "src/util/testutil.cc",
+ "src/util/testutil.h",
+ ]
+
+ forward_dependent_configs_from = [ ":leveldatabase" ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+
+ deps = [
+ ":leveldatabase",
+ "//base",
+ ]
+ }
+
+ test("leveldb_arena_test") {
+ sources = [
+ "src/util/arena_test.cc",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ deps = [
+ ":leveldb_testutil",
+ ]
+ }
+
+ test("leveldb_bloom_test") {
+ sources = [
+ "src/util/bloom_test.cc",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ deps = [
+ ":leveldb_testutil",
+ ]
+ }
+
+ test("leveldb_cache_test") {
+ sources = [
+ "src/util/cache_test.cc",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ deps = [
+ ":leveldb_testutil",
+ ]
+ }
+
+ test("leveldb_corruption_test") {
+ sources = [
+ "src/db/corruption_test.cc",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ deps = [
+ ":leveldb_testutil",
+ ]
+ }
+
+ test("leveldb_crc32c_test") {
+ sources = [
+ "src/util/crc32c_test.cc"
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ deps = [
+ ":leveldb_testutil",
+ ]
+ }
+
+ test("leveldb_db_bench") {
+ sources = [
+ "src/db/db_bench.cc",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ deps = [
+ ":leveldb_testutil",
+ ]
+ }
+
+ test("leveldb_db_test") {
+ sources = [
+ "src/db/db_test.cc",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ deps = [
+ ":leveldb_testutil",
+ ]
+ }
+
+ test("leveldb_dbformat_test") {
+ sources = [
+ "src/db/dbformat_test.cc",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ deps = [
+ ":leveldb_testutil",
+ ]
+ }
+
+ test("leveldb_env_test") {
+ sources = [
+ "src/util/env_test.cc",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ deps = [
+ ":leveldb_testutil",
+ ]
+ }
+
+ test("leveldb_filename_test") {
+ sources = [
+ "src/db/filename_test.cc",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ deps = [
+ ":leveldb_testutil",
+ ]
+ }
+
+ test("leveldb_filter_block_test") {
+ sources = [
+ "src/table/filter_block_test.cc",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ deps = [
+ ":leveldb_testutil",
+ ]
+ }
+
+ test("leveldb_log_test") {
+ sources = [
+ "src/db/log_test.cc",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ deps = [
+ ":leveldb_testutil",
+ ]
+ }
+
+ test("leveldb_skiplist_test") {
+ sources = [
+ "src/db/skiplist_test.cc",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ deps = [
+ ":leveldb_testutil",
+ ]
+ }
+
+ test("leveldb_table_test") {
+ sources = [
+ "src/table/table_test.cc",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ deps = [
+ ":leveldb_testutil",
+ ]
+ }
+
+ test("leveldb_version_edit_test") {
+ sources = [
+ "src/db/version_edit_test.cc",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ deps = [
+ ":leveldb_testutil",
+ ]
+ }
+
+ test("leveldb_write_batch_test") {
+ sources = [
+ "src/db/write_batch_test.cc",
+ ]
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ deps = [
+ ":leveldb_testutil",
+ ]
+ }
+}
diff --git a/chromium/build/secondary/third_party/libjpeg_turbo/BUILD.gn b/chromium/build/secondary/third_party/libjpeg_turbo/BUILD.gn
new file mode 100644
index 00000000000..f594fbecb50
--- /dev/null
+++ b/chromium/build/secondary/third_party/libjpeg_turbo/BUILD.gn
@@ -0,0 +1,216 @@
+# 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.
+
+# Do not use the targets in this file unless you need a certain libjpeg
+# implementation. Use the meta target //third_party:jpeg instead.
+
+if (cpu_arch == "arm") {
+ import("//build/config/arm.gni")
+}
+
+if (cpu_arch == "x86" || cpu_arch == "x64") {
+
+import("//third_party/yasm/yasm_assemble.gni")
+
+yasm_assemble("simd_asm") {
+ defines = []
+
+ if (cpu_arch == "x86") {
+ sources = [
+ "simd/jccolmmx.asm",
+ "simd/jccolss2.asm",
+ "simd/jcgrammx.asm",
+ "simd/jcgrass2.asm",
+ "simd/jcqnt3dn.asm",
+ "simd/jcqntmmx.asm",
+ "simd/jcqnts2f.asm",
+ "simd/jcqnts2i.asm",
+ "simd/jcqntsse.asm",
+ "simd/jcsammmx.asm",
+ "simd/jcsamss2.asm",
+ "simd/jdcolmmx.asm",
+ "simd/jdcolss2.asm",
+ "simd/jdmermmx.asm",
+ "simd/jdmerss2.asm",
+ "simd/jdsammmx.asm",
+ "simd/jdsamss2.asm",
+ "simd/jf3dnflt.asm",
+ "simd/jfmmxfst.asm",
+ "simd/jfmmxint.asm",
+ "simd/jfss2fst.asm",
+ "simd/jfss2int.asm",
+ "simd/jfsseflt.asm",
+ "simd/ji3dnflt.asm",
+ "simd/jimmxfst.asm",
+ "simd/jimmxint.asm",
+ "simd/jimmxred.asm",
+ "simd/jiss2flt.asm",
+ "simd/jiss2fst.asm",
+ "simd/jiss2int.asm",
+ "simd/jiss2red.asm",
+ "simd/jisseflt.asm",
+ "simd/jsimdcpu.asm",
+ ]
+ defines += [
+ "__x86__",
+ ]
+ } else if (cpu_arch == "x64") {
+ sources = [
+ "simd/jccolss2-64.asm",
+ "simd/jcgrass2-64.asm",
+ "simd/jcqnts2f-64.asm",
+ "simd/jcqnts2i-64.asm",
+ "simd/jcsamss2-64.asm",
+ "simd/jdcolss2-64.asm",
+ "simd/jdmerss2-64.asm",
+ "simd/jdsamss2-64.asm",
+ "simd/jfss2fst-64.asm",
+ "simd/jfss2int-64.asm",
+ "simd/jfsseflt-64.asm",
+ "simd/jiss2flt-64.asm",
+ "simd/jiss2fst-64.asm",
+ "simd/jiss2int-64.asm",
+ "simd/jiss2red-64.asm",
+ ]
+ defines += [
+ "__x86_64__",
+ ]
+ }
+
+ if (is_win) {
+ defines += [
+ "MSVC",
+ ]
+ include_dirs = [ "win" ]
+ if (cpu_arch == "x86") {
+ defines += [
+ "WIN32",
+ ]
+ } else {
+ defines += [
+ "WIN64",
+ ]
+ }
+ } else if (is_mac) {
+ defines += [
+ "MACHO",
+ ]
+ include_dirs = [ "mac" ]
+ } else if (is_linux) {
+ defines += [
+ "ELF",
+ ]
+ include_dirs = [ "linux" ]
+ }
+}
+
+}
+
+source_set("simd") {
+ if (cpu_arch == "x86") {
+ deps = [ ":simd_asm" ]
+ sources = [
+ "simd/jsimd_i386.c",
+ ]
+ } else if (cpu_arch == "x64") {
+ deps = [ ":simd_asm" ]
+ sources = [
+ "simd/jsimd_x86_64.c",
+ ]
+ } else if (cpu_arch == "arm" && arm_version >= 7 &&
+ (arm_use_neon || arm_optionally_use_neon)) {
+ sources = [
+ "simd/jsimd_arm.c",
+ "simd/jsimd_arm_neon.S",
+ ]
+ } else {
+ sources = [ "jsimd_none.c" ]
+ }
+}
+
+config("libjpeg_config") {
+ include_dirs = [ "." ]
+}
+
+source_set("libjpeg") {
+ sources = [
+ "jcapimin.c",
+ "jcapistd.c",
+ "jccoefct.c",
+ "jccolor.c",
+ "jcdctmgr.c",
+ "jchuff.c",
+ "jchuff.h",
+ "jcinit.c",
+ "jcmainct.c",
+ "jcmarker.c",
+ "jcmaster.c",
+ "jcomapi.c",
+ "jconfig.h",
+ "jcparam.c",
+ "jcphuff.c",
+ "jcprepct.c",
+ "jcsample.c",
+ "jdapimin.c",
+ "jdapistd.c",
+ "jdatadst.c",
+ "jdatasrc.c",
+ "jdcoefct.c",
+ "jdcolor.c",
+ "jdct.h",
+ "jddctmgr.c",
+ "jdhuff.c",
+ "jdhuff.h",
+ "jdinput.c",
+ "jdmainct.c",
+ "jdmarker.c",
+ "jdmaster.c",
+ "jdmerge.c",
+ "jdphuff.c",
+ "jdpostct.c",
+ "jdsample.c",
+ "jerror.c",
+ "jerror.h",
+ "jfdctflt.c",
+ "jfdctfst.c",
+ "jfdctint.c",
+ "jidctflt.c",
+ "jidctfst.c",
+ "jidctint.c",
+ "jidctred.c",
+ "jinclude.h",
+ "jmemmgr.c",
+ "jmemnobs.c",
+ "jmemsys.h",
+ "jmorecfg.h",
+ "jpegint.h",
+ "jpeglib.h",
+ "jpeglibmangler.h",
+ "jquant1.c",
+ "jquant2.c",
+ "jutils.c",
+ "jversion.h",
+ ]
+
+ defines = [
+ "WITH_SIMD",
+ "MOTION_JPEG_SUPPORTED",
+ "NO_GETENV",
+ ]
+
+ configs += [ ":libjpeg_config" ]
+
+ direct_dependent_configs = [ ":libjpeg_config" ]
+
+ # MemorySanitizer doesn't support assembly code, so keep it disabled in
+ # MSan builds for now.
+ # TODO: Enable on Linux when .asm files are recognized.
+ if (is_msan || is_linux) {
+ sources += [ "jsimd_none.c" ]
+ } else {
+ deps = [ ":simd" ]
+ }
+
+ # TODO(GYP): Compile the .asm files with YASM as GYP does.
+}
diff --git a/chromium/build/secondary/third_party/nss/BUILD.gn b/chromium/build/secondary/third_party/nss/BUILD.gn
new file mode 100644
index 00000000000..7c05da7860d
--- /dev/null
+++ b/chromium/build/secondary/third_party/nss/BUILD.gn
@@ -0,0 +1,1159 @@
+# 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("//build/config/linux/pkg_config.gni")
+
+if (is_linux) {
+ # This is a dependency on NSS with no libssl. On Linux we use a built-in SSL
+ # library but the system NSS libraries. Non-Linux platforms using NSS use the
+ # hermetic one in //third_party/nss.
+ #
+ # Generally you should depend on //crypto:platform instead of using this
+ # config since that will properly pick up NSS or OpenSSL depending on
+ # platform and build config.
+ pkg_config("system_nss_no_ssl_config") {
+ packages = [ "nss" ]
+ extra_args = [ "-v", "-lssl3" ]
+ }
+} else {
+ include_nss_root_certs = is_ios
+ include_nss_libpkix = is_ios
+
+ config("nspr_config") {
+ defines = [ "NO_NSPR_10_SUPPORT" ]
+ include_dirs = [
+ "nspr/pr/include",
+ "nspr/lib/ds",
+ "nspr/lib/libc/include",
+ ]
+
+ if (component_mode != "shared_library") {
+ defines += [ "NSPR_STATIC" ]
+ }
+ }
+
+ component("nspr") {
+ output_name = "crnspr"
+ sources = [
+ "nspr/lib/ds/plarena.c",
+ "nspr/lib/ds/plarena.h",
+ "nspr/lib/ds/plarenas.h",
+ "nspr/lib/ds/plhash.c",
+ "nspr/lib/ds/plhash.h",
+ "nspr/lib/libc/include/plbase64.h",
+ "nspr/lib/libc/include/plerror.h",
+ "nspr/lib/libc/include/plgetopt.h",
+ "nspr/lib/libc/include/plstr.h",
+ "nspr/lib/libc/src/base64.c",
+ "nspr/lib/libc/src/plerror.c",
+ "nspr/lib/libc/src/plgetopt.c",
+ "nspr/lib/libc/src/strcase.c",
+ "nspr/lib/libc/src/strcat.c",
+ "nspr/lib/libc/src/strchr.c",
+ "nspr/lib/libc/src/strcmp.c",
+ "nspr/lib/libc/src/strcpy.c",
+ "nspr/lib/libc/src/strdup.c",
+ "nspr/lib/libc/src/strlen.c",
+ "nspr/lib/libc/src/strpbrk.c",
+ "nspr/lib/libc/src/strstr.c",
+ "nspr/lib/libc/src/strtok.c",
+ "nspr/pr/include/md/prosdep.h",
+ "nspr/pr/include/md/_darwin.cfg",
+ "nspr/pr/include/md/_darwin.h",
+ "nspr/pr/include/md/_pcos.h",
+ "nspr/pr/include/md/_pth.h",
+ "nspr/pr/include/md/_unixos.h",
+ "nspr/pr/include/md/_unix_errors.h",
+ "nspr/pr/include/md/_win32_errors.h",
+ "nspr/pr/include/md/_win95.cfg",
+ "nspr/pr/include/md/_win95.h",
+ "nspr/pr/include/nspr.h",
+ "nspr/pr/include/obsolete/pralarm.h",
+ "nspr/pr/include/obsolete/probslet.h",
+ "nspr/pr/include/obsolete/protypes.h",
+ "nspr/pr/include/obsolete/prsem.h",
+ "nspr/pr/include/pratom.h",
+ "nspr/pr/include/prbit.h",
+ "nspr/pr/include/prclist.h",
+ "nspr/pr/include/prcmon.h",
+ "nspr/pr/include/prcountr.h",
+ "nspr/pr/include/prcpucfg.h",
+ "nspr/pr/include/prcvar.h",
+ "nspr/pr/include/prdtoa.h",
+ "nspr/pr/include/prenv.h",
+ "nspr/pr/include/prerr.h",
+ "nspr/pr/include/prerror.h",
+ "nspr/pr/include/prinet.h",
+ "nspr/pr/include/prinit.h",
+ "nspr/pr/include/prinrval.h",
+ "nspr/pr/include/prio.h",
+ "nspr/pr/include/pripcsem.h",
+ "nspr/pr/include/private/pprio.h",
+ "nspr/pr/include/private/pprmwait.h",
+ "nspr/pr/include/private/pprthred.h",
+ "nspr/pr/include/private/primpl.h",
+ "nspr/pr/include/private/prpriv.h",
+ "nspr/pr/include/prlink.h",
+ "nspr/pr/include/prlock.h",
+ "nspr/pr/include/prlog.h",
+ "nspr/pr/include/prlong.h",
+ "nspr/pr/include/prmem.h",
+ "nspr/pr/include/prmon.h",
+ "nspr/pr/include/prmwait.h",
+ "nspr/pr/include/prnetdb.h",
+ "nspr/pr/include/prolock.h",
+ "nspr/pr/include/prpdce.h",
+ "nspr/pr/include/prprf.h",
+ "nspr/pr/include/prproces.h",
+ "nspr/pr/include/prrng.h",
+ "nspr/pr/include/prrwlock.h",
+ "nspr/pr/include/prshm.h",
+ "nspr/pr/include/prshma.h",
+ "nspr/pr/include/prsystem.h",
+ "nspr/pr/include/prthread.h",
+ "nspr/pr/include/prtime.h",
+ "nspr/pr/include/prtpool.h",
+ "nspr/pr/include/prtrace.h",
+ "nspr/pr/include/prtypes.h",
+ "nspr/pr/include/prvrsion.h",
+ "nspr/pr/include/prwin16.h",
+ "nspr/pr/src/io/prdir.c",
+ "nspr/pr/src/io/prfdcach.c",
+ "nspr/pr/src/io/prfile.c",
+ "nspr/pr/src/io/prio.c",
+ "nspr/pr/src/io/priometh.c",
+ "nspr/pr/src/io/pripv6.c",
+ "nspr/pr/src/io/prlayer.c",
+ "nspr/pr/src/io/prlog.c",
+ "nspr/pr/src/io/prmapopt.c",
+ "nspr/pr/src/io/prmmap.c",
+ "nspr/pr/src/io/prmwait.c",
+ "nspr/pr/src/io/prpolevt.c",
+ "nspr/pr/src/io/prprf.c",
+ "nspr/pr/src/io/prscanf.c",
+ "nspr/pr/src/io/prsocket.c",
+ "nspr/pr/src/io/prstdio.c",
+ "nspr/pr/src/linking/prlink.c",
+ "nspr/pr/src/malloc/prmalloc.c",
+ "nspr/pr/src/malloc/prmem.c",
+ "nspr/pr/src/md/prosdep.c",
+ "nspr/pr/src/md/unix/darwin.c",
+ "nspr/pr/src/md/unix/os_Darwin.s",
+ "nspr/pr/src/md/unix/unix.c",
+ "nspr/pr/src/md/unix/unix_errors.c",
+ "nspr/pr/src/md/unix/uxproces.c",
+ "nspr/pr/src/md/unix/uxrng.c",
+ "nspr/pr/src/md/unix/uxshm.c",
+ "nspr/pr/src/md/unix/uxwrap.c",
+ "nspr/pr/src/md/windows/ntgc.c",
+ "nspr/pr/src/md/windows/ntinrval.c",
+ "nspr/pr/src/md/windows/ntmisc.c",
+ "nspr/pr/src/md/windows/ntsec.c",
+ "nspr/pr/src/md/windows/ntsem.c",
+ "nspr/pr/src/md/windows/w32ipcsem.c",
+ "nspr/pr/src/md/windows/w32poll.c",
+ "nspr/pr/src/md/windows/w32rng.c",
+ "nspr/pr/src/md/windows/w32shm.c",
+ "nspr/pr/src/md/windows/w95cv.c",
+ "nspr/pr/src/md/windows/w95dllmain.c",
+ "nspr/pr/src/md/windows/w95io.c",
+ "nspr/pr/src/md/windows/w95sock.c",
+ "nspr/pr/src/md/windows/w95thred.c",
+ "nspr/pr/src/md/windows/win32_errors.c",
+ "nspr/pr/src/memory/prseg.c",
+ "nspr/pr/src/memory/prshm.c",
+ "nspr/pr/src/memory/prshma.c",
+ "nspr/pr/src/misc/pralarm.c",
+ "nspr/pr/src/misc/pratom.c",
+ "nspr/pr/src/misc/praton.c",
+ "nspr/pr/src/misc/prcountr.c",
+ "nspr/pr/src/misc/prdtoa.c",
+ "nspr/pr/src/misc/prenv.c",
+ "nspr/pr/src/misc/prerr.c",
+ "nspr/pr/src/misc/prerror.c",
+ "nspr/pr/src/misc/prerrortable.c",
+ "nspr/pr/src/misc/prinit.c",
+ "nspr/pr/src/misc/prinrval.c",
+ "nspr/pr/src/misc/pripc.c",
+ "nspr/pr/src/misc/pripcsem.c",
+ "nspr/pr/src/misc/prlog2.c",
+ "nspr/pr/src/misc/prlong.c",
+ "nspr/pr/src/misc/prnetdb.c",
+ "nspr/pr/src/misc/prolock.c",
+ "nspr/pr/src/misc/prrng.c",
+ "nspr/pr/src/misc/prsystem.c",
+ "nspr/pr/src/misc/prthinfo.c",
+ "nspr/pr/src/misc/prtime.c",
+ "nspr/pr/src/misc/prtpool.c",
+ "nspr/pr/src/misc/prtrace.c",
+ "nspr/pr/src/pthreads/ptio.c",
+ "nspr/pr/src/pthreads/ptmisc.c",
+ "nspr/pr/src/pthreads/ptsynch.c",
+ "nspr/pr/src/pthreads/ptthread.c",
+ "nspr/pr/src/threads/combined/prucpu.c",
+ "nspr/pr/src/threads/combined/prucv.c",
+ "nspr/pr/src/threads/combined/prulock.c",
+ "nspr/pr/src/threads/combined/prustack.c",
+ "nspr/pr/src/threads/combined/pruthr.c",
+ "nspr/pr/src/threads/prcmon.c",
+ "nspr/pr/src/threads/prcthr.c",
+ "nspr/pr/src/threads/prdump.c",
+ "nspr/pr/src/threads/prmon.c",
+ "nspr/pr/src/threads/prrwlock.c",
+ "nspr/pr/src/threads/prsem.c",
+ "nspr/pr/src/threads/prtpd.c",
+ ]
+
+ direct_dependent_configs = [ ":nspr_config" ]
+
+ configs -= [
+ "//build/config/compiler:chromium_code",
+ ]
+ if (is_win) {
+ configs -= [
+ "//build/config/win:unicode", # Requires 8-bit mode.
+ "//build/config/win:lean_and_mean", # Won"t compile with lean and mean.
+ ]
+ }
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+
+ cflags = []
+ defines = [
+ "_NSPR_BUILD",
+ "FORCE_PR_LOG",
+ ]
+
+ include_dirs = [
+ "nspr/pr/include/private",
+ ]
+
+ if (is_win) {
+ cflags = [
+ "/wd4554", # Check precidence.
+ "/wd4267", # Conversion from size_t to "type".
+ ]
+ defines += [
+ "XP_PC",
+ "WIN32",
+ "WIN95",
+ "_PR_GLOBAL_THREADS_ONLY",
+ "_CRT_SECURE_NO_WARNINGS",
+ ]
+ } else {
+ sources -= [
+ "nspr/pr/src/md/windows/ntgc.c",
+ "nspr/pr/src/md/windows/ntinrval.c",
+ "nspr/pr/src/md/windows/ntmisc.c",
+ "nspr/pr/src/md/windows/ntsec.c",
+ "nspr/pr/src/md/windows/ntsem.c",
+ "nspr/pr/src/md/windows/w32ipcsem.c",
+ "nspr/pr/src/md/windows/w32poll.c",
+ "nspr/pr/src/md/windows/w32rng.c",
+ "nspr/pr/src/md/windows/w32shm.c",
+ "nspr/pr/src/md/windows/w95cv.c",
+ "nspr/pr/src/md/windows/w95dllmain.c",
+ "nspr/pr/src/md/windows/w95io.c",
+ "nspr/pr/src/md/windows/w95sock.c",
+ "nspr/pr/src/md/windows/w95thred.c",
+ "nspr/pr/src/md/windows/win32_errors.c",
+ "nspr/pr/src/threads/combined/prucpu.c",
+ "nspr/pr/src/threads/combined/prucv.c",
+ "nspr/pr/src/threads/combined/prulock.c",
+ "nspr/pr/src/threads/combined/prustack.c",
+ "nspr/pr/src/threads/combined/pruthr.c",
+ ]
+ }
+
+ if (!is_posix) {
+ sources -= [
+ "nspr/pr/src/md/unix/darwin.c",
+ "nspr/pr/src/md/unix/os_Darwin.s",
+ "nspr/pr/src/md/unix/unix.c",
+ "nspr/pr/src/md/unix/unix_errors.c",
+ "nspr/pr/src/md/unix/uxproces.c",
+ "nspr/pr/src/md/unix/uxrng.c",
+ "nspr/pr/src/md/unix/uxshm.c",
+ "nspr/pr/src/md/unix/uxwrap.c",
+ "nspr/pr/src/pthreads/ptio.c",
+ "nspr/pr/src/pthreads/ptmisc.c",
+ "nspr/pr/src/pthreads/ptsynch.c",
+ "nspr/pr/src/pthreads/ptthread.c",
+ ]
+ }
+
+ if (cpu_arch == "x86") {
+ defines += [ "_X86_" ]
+ } else if (cpu_arch == "x64") {
+ defines += [ "_AMD64_" ]
+ }
+
+ if (is_mac || is_ios) {
+ sources -= [
+ "nspr/pr/src/io/prdir.c",
+ "nspr/pr/src/io/prfile.c",
+ "nspr/pr/src/io/prio.c",
+ "nspr/pr/src/io/prsocket.c",
+ "nspr/pr/src/misc/pripcsem.c",
+ "nspr/pr/src/threads/prcthr.c",
+ "nspr/pr/src/threads/prdump.c",
+ "nspr/pr/src/threads/prmon.c",
+ "nspr/pr/src/threads/prsem.c",
+ ]
+ defines += [
+ "XP_UNIX",
+ "DARWIN",
+ "XP_MACOSX",
+ "_PR_PTHREADS",
+ "HAVE_BSD_FLOCK",
+ "HAVE_DLADDR",
+ "HAVE_LCHOWN",
+ "HAVE_SOCKLEN_T",
+ "HAVE_STRERROR",
+ ]
+ }
+
+ if (is_mac) {
+ defines += [
+ "HAVE_CRT_EXTERNS_H",
+ ]
+ libs = [
+ "CoreFoundation.framework",
+ "CoreServices.framework",
+ ]
+ }
+
+ if (is_clang) {
+ cflags += [
+ # nspr uses a bunch of deprecated functions (NSLinkModule etc) in
+ # prlink.c on mac.
+ "-Wno-deprecated-declarations",
+ # nspr passes "const char*" through "void*".
+ "-Wno-incompatible-pointer-types",
+ # nspr passes "int*" through "unsigned int*".
+ "-Wno-pointer-sign",
+
+ "-Wno-incompatible-pointer-types",
+ "-Wno-pointer-sign",
+ ]
+ }
+ }
+
+ component("nss") {
+ output_name = "crnss"
+ sources = [
+ # Ensure at least one object file is produced, so that MSVC does not
+ # warn when creating the static/shared library. See the note for
+ # the "nssckbi" target for why the "nss" target was split as such.
+ "nss/lib/nss/nssver.c",
+ ]
+
+ deps = [ ":nss_static" ]
+
+ if (include_nss_root_certs) {
+ deps += [ ":nssckbi" ]
+ }
+
+ if (component_mode == "shared_library") {
+ if (is_mac) {
+ ldflags = [ "-all_load" ]
+ } else if (is_win) {
+ # Pass the def file to the linker.
+ ldflags = [ rebase_path("nss/exports_win.def", root_build_dir) ]
+ }
+ }
+
+ forward_dependent_configs_from = deps
+ }
+
+ config("nssckbi_config") {
+ include_dirs = [ "nss/lib/ckfw/builtins" ]
+ }
+
+ # This is really more of a pseudo-target to work around the fact that
+ # a single static_library target cannot contain two object files of the
+ # same name (hash.o / hash.obj). Logically, this is part of the
+ # "nss_static" target. By separating it out, it creates a possible
+ # circular dependency between "nss_static" and "nssckbi" when
+ # "exclude_nss_root_certs" is not specified, as "nss_static" depends on
+ # the "builtinsC_GetFunctionList" exported by this target. This is an
+ # artifact of how NSS is being statically built, which is not an
+ # officially supported configuration - normally, "nssckbi.dll/so" would
+ # depend on libnss3.dll/so, and the higher layer caller would instruct
+ # libnss3.dll to dynamically load nssckbi.dll, breaking the circle.
+ #
+ # TODO(rsleevi): http://crbug.com/128134 - Break the circular dependency
+ # without requiring nssckbi to be built as a shared library.
+ source_set("nssckbi") {
+ visibility = ":nss" # This target is internal implementation detail.
+
+ sources = [
+ "nss/lib/ckfw/builtins/anchor.c",
+ "nss/lib/ckfw/builtins/bfind.c",
+ "nss/lib/ckfw/builtins/binst.c",
+ "nss/lib/ckfw/builtins/bobject.c",
+ "nss/lib/ckfw/builtins/bsession.c",
+ "nss/lib/ckfw/builtins/bslot.c",
+ "nss/lib/ckfw/builtins/btoken.c",
+ "nss/lib/ckfw/builtins/builtins.h",
+ "nss/lib/ckfw/builtins/certdata.c",
+ "nss/lib/ckfw/builtins/ckbiver.c",
+ "nss/lib/ckfw/builtins/constants.c",
+ "nss/lib/ckfw/builtins/nssckbi.h",
+ "nss/lib/ckfw/ck.h",
+ "nss/lib/ckfw/ckfw.h",
+ "nss/lib/ckfw/ckfwm.h",
+ "nss/lib/ckfw/ckfwtm.h",
+ "nss/lib/ckfw/ckmd.h",
+ "nss/lib/ckfw/ckt.h",
+ "nss/lib/ckfw/crypto.c",
+ "nss/lib/ckfw/find.c",
+ "nss/lib/ckfw/hash.c",
+ "nss/lib/ckfw/instance.c",
+ "nss/lib/ckfw/mechanism.c",
+ "nss/lib/ckfw/mutex.c",
+ "nss/lib/ckfw/nssck.api",
+ "nss/lib/ckfw/nssckepv.h",
+ "nss/lib/ckfw/nssckft.h",
+ "nss/lib/ckfw/nssckfw.h",
+ "nss/lib/ckfw/nssckfwc.h",
+ "nss/lib/ckfw/nssckfwt.h",
+ "nss/lib/ckfw/nssckg.h",
+ "nss/lib/ckfw/nssckmdt.h",
+ "nss/lib/ckfw/nssckt.h",
+ "nss/lib/ckfw/object.c",
+ "nss/lib/ckfw/session.c",
+ "nss/lib/ckfw/sessobj.c",
+ "nss/lib/ckfw/slot.c",
+ "nss/lib/ckfw/token.c",
+ "nss/lib/ckfw/wrap.c",
+ ]
+
+ configs -= [
+ "//build/config/compiler:chromium_code"
+ ]
+
+ if (is_win) {
+ configs -= [
+ "//build/config/win:unicode", # Requires 8-bit mode.
+ ]
+ }
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+
+ include_dirs = [ "nss/lib/ckfw" ]
+ direct_dependent_configs = [ ":nssckbi_config" ]
+
+ deps = [
+ ":nss_static",
+ ]
+ forward_dependent_configs_from = deps
+ }
+
+ config("nss_static_config") {
+ defines = [
+ "NSS_STATIC",
+ "NSS_USE_STATIC_LIBS",
+ "USE_UTIL_DIRECTLY",
+ ]
+ if (is_win) {
+ defines += [ "_WINDOWS" ]
+ }
+ include_dirs = [
+ "nspr/pr/include",
+ "nspr/lib/ds",
+ "nspr/lib/libc/include",
+ "nss/lib/base",
+ "nss/lib/certdb",
+ "nss/lib/certhigh",
+ "nss/lib/cryptohi",
+ "nss/lib/dev",
+ "nss/lib/freebl",
+ "nss/lib/freebl/ecl",
+ "nss/lib/nss",
+ "nss/lib/pk11wrap",
+ "nss/lib/pkcs7",
+ "nss/lib/pki",
+ "nss/lib/smime",
+ "nss/lib/softoken",
+ "nss/lib/util",
+ ]
+ }
+
+ source_set("nss_static") {
+ visibility = [ ":*" ] # Internal implementation detail.
+
+ sources = [
+ "nss/lib/base/arena.c",
+ "nss/lib/base/base.h",
+ "nss/lib/base/baset.h",
+ "nss/lib/base/error.c",
+ "nss/lib/base/errorval.c",
+ "nss/lib/base/hash.c",
+ "nss/lib/base/hashops.c",
+ "nss/lib/base/item.c",
+ "nss/lib/base/libc.c",
+ "nss/lib/base/list.c",
+ "nss/lib/base/nssbase.h",
+ "nss/lib/base/nssbaset.h",
+ "nss/lib/base/nssutf8.c",
+ "nss/lib/base/tracker.c",
+ "nss/lib/certdb/alg1485.c",
+ "nss/lib/certdb/cert.h",
+ "nss/lib/certdb/certdb.c",
+ "nss/lib/certdb/certdb.h",
+ "nss/lib/certdb/certi.h",
+ "nss/lib/certdb/certt.h",
+ "nss/lib/certdb/certv3.c",
+ "nss/lib/certdb/certxutl.c",
+ "nss/lib/certdb/certxutl.h",
+ "nss/lib/certdb/crl.c",
+ "nss/lib/certdb/genname.c",
+ "nss/lib/certdb/genname.h",
+ "nss/lib/certdb/polcyxtn.c",
+ "nss/lib/certdb/secname.c",
+ "nss/lib/certdb/stanpcertdb.c",
+ "nss/lib/certdb/xauthkid.c",
+ "nss/lib/certdb/xbsconst.c",
+ "nss/lib/certdb/xconst.c",
+ "nss/lib/certdb/xconst.h",
+ "nss/lib/certhigh/certhigh.c",
+ "nss/lib/certhigh/certhtml.c",
+ "nss/lib/certhigh/certreq.c",
+ "nss/lib/certhigh/certvfy.c",
+ "nss/lib/certhigh/crlv2.c",
+ "nss/lib/certhigh/ocsp.c",
+ "nss/lib/certhigh/ocsp.h",
+ "nss/lib/certhigh/ocspi.h",
+ "nss/lib/certhigh/ocspsig.c",
+ "nss/lib/certhigh/ocspt.h",
+ "nss/lib/certhigh/ocspti.h",
+ "nss/lib/certhigh/xcrldist.c",
+ "nss/lib/cryptohi/cryptohi.h",
+ "nss/lib/cryptohi/cryptoht.h",
+ "nss/lib/cryptohi/dsautil.c",
+ "nss/lib/cryptohi/key.h",
+ "nss/lib/cryptohi/keyhi.h",
+ "nss/lib/cryptohi/keyi.h",
+ "nss/lib/cryptohi/keyt.h",
+ "nss/lib/cryptohi/keythi.h",
+ "nss/lib/cryptohi/sechash.c",
+ "nss/lib/cryptohi/sechash.h",
+ "nss/lib/cryptohi/seckey.c",
+ "nss/lib/cryptohi/secsign.c",
+ "nss/lib/cryptohi/secvfy.c",
+ "nss/lib/dev/ckhelper.c",
+ "nss/lib/dev/ckhelper.h",
+ "nss/lib/dev/dev.h",
+ "nss/lib/dev/devm.h",
+ "nss/lib/dev/devslot.c",
+ "nss/lib/dev/devt.h",
+ "nss/lib/dev/devtm.h",
+ "nss/lib/dev/devtoken.c",
+ "nss/lib/dev/devutil.c",
+ "nss/lib/dev/nssdev.h",
+ "nss/lib/dev/nssdevt.h",
+ "nss/lib/freebl/aeskeywrap.c",
+ "nss/lib/freebl/alg2268.c",
+ "nss/lib/freebl/alghmac.c",
+ "nss/lib/freebl/alghmac.h",
+ "nss/lib/freebl/arcfive.c",
+ "nss/lib/freebl/arcfour.c",
+ "nss/lib/freebl/blapi.h",
+ "nss/lib/freebl/blapii.h",
+ "nss/lib/freebl/blapit.h",
+ "nss/lib/freebl/build_config_mac.h",
+ "nss/lib/freebl/camellia.c",
+ "nss/lib/freebl/camellia.h",
+ "nss/lib/freebl/chacha20/chacha20.c",
+ "nss/lib/freebl/chacha20/chacha20.h",
+ "nss/lib/freebl/chacha20/chacha20_vec.c",
+ "nss/lib/freebl/chacha20poly1305.c",
+ "nss/lib/freebl/chacha20poly1305.h",
+ "nss/lib/freebl/ctr.c",
+ "nss/lib/freebl/ctr.h",
+ "nss/lib/freebl/cts.c",
+ "nss/lib/freebl/cts.h",
+ "nss/lib/freebl/des.c",
+ "nss/lib/freebl/des.h",
+ "nss/lib/freebl/desblapi.c",
+ "nss/lib/freebl/dh.c",
+ "nss/lib/freebl/drbg.c",
+ "nss/lib/freebl/dsa.c",
+ "nss/lib/freebl/ec.c",
+ "nss/lib/freebl/ec.h",
+ "nss/lib/freebl/ecdecode.c",
+ "nss/lib/freebl/ecl/ec2.h",
+ "nss/lib/freebl/ecl/ecl-curve.h",
+ "nss/lib/freebl/ecl/ecl-exp.h",
+ "nss/lib/freebl/ecl/ecl-priv.h",
+ "nss/lib/freebl/ecl/ecl.c",
+ "nss/lib/freebl/ecl/ecl.h",
+ "nss/lib/freebl/ecl/ecl_curve.c",
+ "nss/lib/freebl/ecl/ecl_gf.c",
+ "nss/lib/freebl/ecl/ecl_mult.c",
+ "nss/lib/freebl/ecl/ecp.h",
+ "nss/lib/freebl/ecl/ecp_256.c",
+ "nss/lib/freebl/ecl/ecp_256_32.c",
+ "nss/lib/freebl/ecl/ecp_384.c",
+ "nss/lib/freebl/ecl/ecp_521.c",
+ "nss/lib/freebl/ecl/ecp_aff.c",
+ "nss/lib/freebl/ecl/ecp_jac.c",
+ "nss/lib/freebl/ecl/ecp_jm.c",
+ "nss/lib/freebl/ecl/ecp_mont.c",
+ "nss/lib/freebl/ecl/ec_naf.c",
+ "nss/lib/freebl/gcm.c",
+ "nss/lib/freebl/gcm.h",
+ "nss/lib/freebl/hmacct.c",
+ "nss/lib/freebl/hmacct.h",
+ "nss/lib/freebl/jpake.c",
+ "nss/lib/freebl/md2.c",
+ "nss/lib/freebl/md5.c",
+ "nss/lib/freebl/mpi/logtab.h",
+ "nss/lib/freebl/mpi/mpcpucache.c",
+ "nss/lib/freebl/mpi/mpi-config.h",
+ "nss/lib/freebl/mpi/mpi-priv.h",
+ "nss/lib/freebl/mpi/mpi.c",
+ "nss/lib/freebl/mpi/mpi.h",
+ "nss/lib/freebl/mpi/mpi_amd64.c",
+ "nss/lib/freebl/mpi/mpi_arm.c",
+ "nss/lib/freebl/mpi/mpi_arm_mac.c",
+ "nss/lib/freebl/mpi/mpi_x86_asm.c",
+ "nss/lib/freebl/mpi/mplogic.c",
+ "nss/lib/freebl/mpi/mplogic.h",
+ "nss/lib/freebl/mpi/mpmontg.c",
+ "nss/lib/freebl/mpi/mpprime.c",
+ "nss/lib/freebl/mpi/mpprime.h",
+ "nss/lib/freebl/mpi/mp_gf2m-priv.h",
+ "nss/lib/freebl/mpi/mp_gf2m.c",
+ "nss/lib/freebl/mpi/mp_gf2m.h",
+ "nss/lib/freebl/mpi/primes.c",
+ "nss/lib/freebl/poly1305/poly1305-donna-x64-sse2-incremental-source.c",
+ "nss/lib/freebl/poly1305/poly1305.c",
+ "nss/lib/freebl/poly1305/poly1305.h",
+ "nss/lib/freebl/pqg.c",
+ "nss/lib/freebl/pqg.h",
+ "nss/lib/freebl/rawhash.c",
+ "nss/lib/freebl/rijndael.c",
+ "nss/lib/freebl/rijndael.h",
+ "nss/lib/freebl/rijndael32.tab",
+ "nss/lib/freebl/rsa.c",
+ "nss/lib/freebl/rsapkcs.c",
+ "nss/lib/freebl/secmpi.h",
+ "nss/lib/freebl/secrng.h",
+ "nss/lib/freebl/seed.c",
+ "nss/lib/freebl/seed.h",
+ "nss/lib/freebl/sha256.h",
+ "nss/lib/freebl/sha512.c",
+ "nss/lib/freebl/sha_fast.c",
+ "nss/lib/freebl/sha_fast.h",
+ "nss/lib/freebl/shsign.h",
+ "nss/lib/freebl/shvfy.c",
+ "nss/lib/freebl/sysrand.c",
+ "nss/lib/freebl/tlsprfalg.c",
+ "nss/lib/freebl/unix_rand.c",
+ "nss/lib/freebl/win_rand.c",
+ "nss/lib/nss/nss.h",
+ "nss/lib/nss/nssinit.c",
+ "nss/lib/nss/nssrenam.h",
+ "nss/lib/nss/utilwrap.c",
+ "nss/lib/pk11wrap/debug_module.c",
+ "nss/lib/pk11wrap/dev3hack.c",
+ "nss/lib/pk11wrap/dev3hack.h",
+ "nss/lib/pk11wrap/pk11akey.c",
+ "nss/lib/pk11wrap/pk11auth.c",
+ "nss/lib/pk11wrap/pk11cert.c",
+ "nss/lib/pk11wrap/pk11cxt.c",
+ "nss/lib/pk11wrap/pk11err.c",
+ "nss/lib/pk11wrap/pk11func.h",
+ "nss/lib/pk11wrap/pk11kea.c",
+ "nss/lib/pk11wrap/pk11list.c",
+ "nss/lib/pk11wrap/pk11load.c",
+ "nss/lib/pk11wrap/pk11mech.c",
+ "nss/lib/pk11wrap/pk11merge.c",
+ "nss/lib/pk11wrap/pk11nobj.c",
+ "nss/lib/pk11wrap/pk11obj.c",
+ "nss/lib/pk11wrap/pk11pars.c",
+ "nss/lib/pk11wrap/pk11pbe.c",
+ "nss/lib/pk11wrap/pk11pk12.c",
+ "nss/lib/pk11wrap/pk11pqg.c",
+ "nss/lib/pk11wrap/pk11pqg.h",
+ "nss/lib/pk11wrap/pk11priv.h",
+ "nss/lib/pk11wrap/pk11pub.h",
+ "nss/lib/pk11wrap/pk11sdr.c",
+ "nss/lib/pk11wrap/pk11sdr.h",
+ "nss/lib/pk11wrap/pk11skey.c",
+ "nss/lib/pk11wrap/pk11slot.c",
+ "nss/lib/pk11wrap/pk11util.c",
+ "nss/lib/pk11wrap/secmod.h",
+ "nss/lib/pk11wrap/secmodi.h",
+ "nss/lib/pk11wrap/secmodt.h",
+ "nss/lib/pk11wrap/secmodti.h",
+ "nss/lib/pk11wrap/secpkcs5.h",
+ "nss/lib/pkcs7/certread.c",
+ "nss/lib/pkcs7/p7common.c",
+ "nss/lib/pkcs7/p7create.c",
+ "nss/lib/pkcs7/p7decode.c",
+ "nss/lib/pkcs7/p7encode.c",
+ "nss/lib/pkcs7/p7local.c",
+ "nss/lib/pkcs7/p7local.h",
+ "nss/lib/pkcs7/pkcs7t.h",
+ "nss/lib/pkcs7/secmime.c",
+ "nss/lib/pkcs7/secmime.h",
+ "nss/lib/pkcs7/secpkcs7.h",
+ "nss/lib/pki/asymmkey.c",
+ "nss/lib/pki/certdecode.c",
+ "nss/lib/pki/certificate.c",
+ "nss/lib/pki/cryptocontext.c",
+ "nss/lib/pki/nsspki.h",
+ "nss/lib/pki/nsspkit.h",
+ "nss/lib/pki/pki.h",
+ "nss/lib/pki/pki3hack.c",
+ "nss/lib/pki/pki3hack.h",
+ "nss/lib/pki/pkibase.c",
+ "nss/lib/pki/pkim.h",
+ "nss/lib/pki/pkistore.c",
+ "nss/lib/pki/pkistore.h",
+ "nss/lib/pki/pkit.h",
+ "nss/lib/pki/pkitm.h",
+ "nss/lib/pki/symmkey.c",
+ "nss/lib/pki/tdcache.c",
+ "nss/lib/pki/trustdomain.c",
+ "nss/lib/smime/cms.h",
+ "nss/lib/smime/cmslocal.h",
+ "nss/lib/smime/cmsreclist.h",
+ "nss/lib/smime/cmst.h",
+ "nss/lib/smime/smime.h",
+ "nss/lib/softoken/fipsaudt.c",
+ "nss/lib/softoken/fipstest.c",
+ "nss/lib/softoken/fipstokn.c",
+ "nss/lib/softoken/jpakesftk.c",
+ "nss/lib/softoken/lgglue.c",
+ "nss/lib/softoken/lgglue.h",
+ "nss/lib/softoken/lowkey.c",
+ "nss/lib/softoken/lowkeyi.h",
+ "nss/lib/softoken/lowkeyti.h",
+ "nss/lib/softoken/lowpbe.c",
+ "nss/lib/softoken/lowpbe.h",
+ "nss/lib/softoken/padbuf.c",
+ "nss/lib/softoken/pkcs11.c",
+ "nss/lib/softoken/pkcs11c.c",
+ "nss/lib/softoken/pkcs11i.h",
+ "nss/lib/softoken/pkcs11ni.h",
+ "nss/lib/softoken/pkcs11u.c",
+ "nss/lib/softoken/sdb.c",
+ "nss/lib/softoken/sdb.h",
+ "nss/lib/softoken/sftkdb.c",
+ "nss/lib/softoken/sftkdb.h",
+ "nss/lib/softoken/sftkdbt.h",
+ "nss/lib/softoken/sftkdbti.h",
+ "nss/lib/softoken/sftkhmac.c",
+ "nss/lib/softoken/sftkpars.c",
+ "nss/lib/softoken/sftkpars.h",
+ "nss/lib/softoken/sftkpwd.c",
+ "nss/lib/softoken/softkver.c",
+ "nss/lib/softoken/softkver.h",
+ "nss/lib/softoken/softoken.h",
+ "nss/lib/softoken/softoknt.h",
+ "nss/lib/softoken/tlsprf.c",
+ "nss/lib/ssl/sslerr.h",
+ "nss/lib/util/SECerrs.h",
+ "nss/lib/util/base64.h",
+ "nss/lib/util/ciferfam.h",
+ "nss/lib/util/derdec.c",
+ "nss/lib/util/derenc.c",
+ "nss/lib/util/dersubr.c",
+ "nss/lib/util/dertime.c",
+ "nss/lib/util/errstrs.c",
+ "nss/lib/util/hasht.h",
+ "nss/lib/util/nssb64.h",
+ "nss/lib/util/nssb64d.c",
+ "nss/lib/util/nssb64e.c",
+ "nss/lib/util/nssb64t.h",
+ "nss/lib/util/nssilckt.h",
+ "nss/lib/util/nssilock.c",
+ "nss/lib/util/nssilock.h",
+ "nss/lib/util/nsslocks.h",
+ "nss/lib/util/nssrwlk.c",
+ "nss/lib/util/nssrwlk.h",
+ "nss/lib/util/nssrwlkt.h",
+ "nss/lib/util/nssutil.h",
+ "nss/lib/util/oidstring.c",
+ "nss/lib/util/pkcs11.h",
+ "nss/lib/util/pkcs11f.h",
+ "nss/lib/util/pkcs11n.h",
+ "nss/lib/util/pkcs11p.h",
+ "nss/lib/util/pkcs11t.h",
+ "nss/lib/util/pkcs11u.h",
+ "nss/lib/util/portreg.c",
+ "nss/lib/util/portreg.h",
+ "nss/lib/util/quickder.c",
+ "nss/lib/util/secalgid.c",
+ "nss/lib/util/secasn1.h",
+ "nss/lib/util/secasn1d.c",
+ "nss/lib/util/secasn1e.c",
+ "nss/lib/util/secasn1t.h",
+ "nss/lib/util/secasn1u.c",
+ "nss/lib/util/seccomon.h",
+ "nss/lib/util/secder.h",
+ "nss/lib/util/secdert.h",
+ "nss/lib/util/secdig.c",
+ "nss/lib/util/secdig.h",
+ "nss/lib/util/secdigt.h",
+ "nss/lib/util/secerr.h",
+ "nss/lib/util/secitem.c",
+ "nss/lib/util/secitem.h",
+ "nss/lib/util/secoid.c",
+ "nss/lib/util/secoid.h",
+ "nss/lib/util/secoidt.h",
+ "nss/lib/util/secport.c",
+ "nss/lib/util/secport.h",
+ "nss/lib/util/sectime.c",
+ "nss/lib/util/templates.c",
+ "nss/lib/util/utf8.c",
+ "nss/lib/util/utilmod.c",
+ "nss/lib/util/utilmodt.h",
+ "nss/lib/util/utilpars.c",
+ "nss/lib/util/utilpars.h",
+ "nss/lib/util/utilparst.h",
+ "nss/lib/util/utilrename.h",
+ ]
+
+ sources -= [
+ # mpi_arm.c is included by mpi_arm_mac.c.
+ # NOTE: mpi_arm.c can be used directly on Linux. mpi_arm.c will need
+ # to be excluded conditionally if we start to build NSS on Linux.
+ "nss/lib/freebl/mpi/mpi_arm.c",
+ # primes.c is included by mpprime.c.
+ "nss/lib/freebl/mpi/primes.c",
+ # unix_rand.c and win_rand.c are included by sysrand.c.
+ "nss/lib/freebl/unix_rand.c",
+ "nss/lib/freebl/win_rand.c",
+ # debug_module.c is included by pk11load.c.
+ "nss/lib/pk11wrap/debug_module.c",
+ ]
+
+ configs -= [
+ "//build/config/compiler:chromium_code"
+ ]
+ if (is_win) {
+ configs -= [
+ "//build/config/win:unicode", # Requires 8-bit mode.
+ ]
+ }
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+ direct_dependent_configs = [ ":nss_static_config" ]
+
+ cflags = []
+
+ # Only need the defines and includes not in nss_static_config.
+ defines = [
+ "MP_API_COMPATIBLE",
+ "NSS_DISABLE_DBM",
+ "RIJNDAEL_INCLUDE_TABLES",
+ "SHLIB_VERSION=\"3\"",
+ "SOFTOKEN_SHLIB_VERSION=\"3\"",
+ ]
+ include_dirs = [
+ "nss/lib/freebl/mpi",
+ "nss/lib/ssl",
+ ]
+
+ if (is_win) {
+ cflags += [
+ "/wd4101", # Unreferenced local variable.
+ "/wd4267", # Conversion from size_t to "type".
+ ]
+ }
+
+ if (include_nss_libpkix) {
+ sources += [
+ "nss/lib/certhigh/certvfypkix.c",
+ "nss/lib/certhigh/certvfypkixprint.c",
+ "nss/lib/libpkix/include/pkix.h",
+ "nss/lib/libpkix/include/pkix_certsel.h",
+ "nss/lib/libpkix/include/pkix_certstore.h",
+ "nss/lib/libpkix/include/pkix_checker.h",
+ "nss/lib/libpkix/include/pkix_crlsel.h",
+ "nss/lib/libpkix/include/pkix_errorstrings.h",
+ "nss/lib/libpkix/include/pkix_params.h",
+ "nss/lib/libpkix/include/pkix_pl_pki.h",
+ "nss/lib/libpkix/include/pkix_pl_system.h",
+ "nss/lib/libpkix/include/pkix_results.h",
+ "nss/lib/libpkix/include/pkix_revchecker.h",
+ "nss/lib/libpkix/include/pkix_sample_modules.h",
+ "nss/lib/libpkix/include/pkix_util.h",
+ "nss/lib/libpkix/include/pkixt.h",
+ "nss/lib/libpkix/pkix/certsel/pkix_certselector.c",
+ "nss/lib/libpkix/pkix/certsel/pkix_certselector.h",
+ "nss/lib/libpkix/pkix/certsel/pkix_comcertselparams.c",
+ "nss/lib/libpkix/pkix/certsel/pkix_comcertselparams.h",
+ "nss/lib/libpkix/pkix/checker/pkix_basicconstraintschecker.c",
+ "nss/lib/libpkix/pkix/checker/pkix_basicconstraintschecker.h",
+ "nss/lib/libpkix/pkix/checker/pkix_certchainchecker.c",
+ "nss/lib/libpkix/pkix/checker/pkix_certchainchecker.h",
+ "nss/lib/libpkix/pkix/checker/pkix_crlchecker.c",
+ "nss/lib/libpkix/pkix/checker/pkix_crlchecker.h",
+ "nss/lib/libpkix/pkix/checker/pkix_ekuchecker.c",
+ "nss/lib/libpkix/pkix/checker/pkix_ekuchecker.h",
+ "nss/lib/libpkix/pkix/checker/pkix_expirationchecker.c",
+ "nss/lib/libpkix/pkix/checker/pkix_expirationchecker.h",
+ "nss/lib/libpkix/pkix/checker/pkix_namechainingchecker.c",
+ "nss/lib/libpkix/pkix/checker/pkix_namechainingchecker.h",
+ "nss/lib/libpkix/pkix/checker/pkix_nameconstraintschecker.c",
+ "nss/lib/libpkix/pkix/checker/pkix_nameconstraintschecker.h",
+ "nss/lib/libpkix/pkix/checker/pkix_ocspchecker.c",
+ "nss/lib/libpkix/pkix/checker/pkix_ocspchecker.h",
+ "nss/lib/libpkix/pkix/checker/pkix_policychecker.c",
+ "nss/lib/libpkix/pkix/checker/pkix_policychecker.h",
+ "nss/lib/libpkix/pkix/checker/pkix_revocationchecker.c",
+ "nss/lib/libpkix/pkix/checker/pkix_revocationchecker.h",
+ "nss/lib/libpkix/pkix/checker/pkix_revocationmethod.c",
+ "nss/lib/libpkix/pkix/checker/pkix_revocationmethod.h",
+ "nss/lib/libpkix/pkix/checker/pkix_signaturechecker.c",
+ "nss/lib/libpkix/pkix/checker/pkix_signaturechecker.h",
+ "nss/lib/libpkix/pkix/checker/pkix_targetcertchecker.c",
+ "nss/lib/libpkix/pkix/checker/pkix_targetcertchecker.h",
+ "nss/lib/libpkix/pkix/crlsel/pkix_comcrlselparams.c",
+ "nss/lib/libpkix/pkix/crlsel/pkix_comcrlselparams.h",
+ "nss/lib/libpkix/pkix/crlsel/pkix_crlselector.c",
+ "nss/lib/libpkix/pkix/crlsel/pkix_crlselector.h",
+ "nss/lib/libpkix/pkix/params/pkix_procparams.c",
+ "nss/lib/libpkix/pkix/params/pkix_procparams.h",
+ "nss/lib/libpkix/pkix/params/pkix_resourcelimits.c",
+ "nss/lib/libpkix/pkix/params/pkix_resourcelimits.h",
+ "nss/lib/libpkix/pkix/params/pkix_trustanchor.c",
+ "nss/lib/libpkix/pkix/params/pkix_trustanchor.h",
+ "nss/lib/libpkix/pkix/params/pkix_valparams.c",
+ "nss/lib/libpkix/pkix/params/pkix_valparams.h",
+ "nss/lib/libpkix/pkix/results/pkix_buildresult.c",
+ "nss/lib/libpkix/pkix/results/pkix_buildresult.h",
+ "nss/lib/libpkix/pkix/results/pkix_policynode.c",
+ "nss/lib/libpkix/pkix/results/pkix_policynode.h",
+ "nss/lib/libpkix/pkix/results/pkix_valresult.c",
+ "nss/lib/libpkix/pkix/results/pkix_valresult.h",
+ "nss/lib/libpkix/pkix/results/pkix_verifynode.c",
+ "nss/lib/libpkix/pkix/results/pkix_verifynode.h",
+ "nss/lib/libpkix/pkix/store/pkix_store.c",
+ "nss/lib/libpkix/pkix/store/pkix_store.h",
+ "nss/lib/libpkix/pkix/top/pkix_build.c",
+ "nss/lib/libpkix/pkix/top/pkix_build.h",
+ "nss/lib/libpkix/pkix/top/pkix_lifecycle.c",
+ "nss/lib/libpkix/pkix/top/pkix_lifecycle.h",
+ "nss/lib/libpkix/pkix/top/pkix_validate.c",
+ "nss/lib/libpkix/pkix/top/pkix_validate.h",
+ "nss/lib/libpkix/pkix/util/pkix_error.c",
+ "nss/lib/libpkix/pkix/util/pkix_error.h",
+ "nss/lib/libpkix/pkix/util/pkix_errpaths.c",
+ "nss/lib/libpkix/pkix/util/pkix_list.c",
+ "nss/lib/libpkix/pkix/util/pkix_list.h",
+ "nss/lib/libpkix/pkix/util/pkix_logger.c",
+ "nss/lib/libpkix/pkix/util/pkix_logger.h",
+ "nss/lib/libpkix/pkix/util/pkix_tools.c",
+ "nss/lib/libpkix/pkix/util/pkix_tools.h",
+ "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.c",
+ "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_aiamgr.h",
+ "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_colcertstore.c",
+ "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_colcertstore.h",
+ "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.c",
+ "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpcertstore.h",
+ "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.c",
+ "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_httpdefaultclient.h",
+ "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.c",
+ "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_nsscontext.h",
+ "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.c",
+ "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_pk11certstore.h",
+ "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.c",
+ "nss/lib/libpkix/pkix_pl_nss/module/pkix_pl_socket.h",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_basicconstraints.c",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_basicconstraints.h",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_cert.c",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_cert.h",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyinfo.c",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyinfo.h",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicymap.c",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicymap.h",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyqualifier.c",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_certpolicyqualifier.h",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crl.c",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crl.h",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.c",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crldp.h",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.c",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_crlentry.h",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_date.c",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_date.h",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_generalname.c",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_generalname.h",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.c",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_infoaccess.h",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.c",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_nameconstraints.h",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.c",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspcertid.h",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.c",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocsprequest.h",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.c",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_ocspresponse.h",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_publickey.c",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_publickey.h",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.c",
+ "nss/lib/libpkix/pkix_pl_nss/pki/pkix_pl_x500name.h",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bigint.c",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bigint.h",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bytearray.c",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_bytearray.h",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_common.c",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_common.h",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_error.c",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.c",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_hashtable.h",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_lifecycle.c",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_lifecycle.h",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mem.c",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mem.h",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_monitorlock.c",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_monitorlock.h",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mutex.c",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_mutex.h",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_object.c",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_object.h",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.c",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_oid.h",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.c",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_primhash.h",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_rwlock.c",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_rwlock.h",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_string.c",
+ "nss/lib/libpkix/pkix_pl_nss/system/pkix_pl_string.h",
+ ]
+
+ # Disable the LDAP code in libpkix.
+ defines += [ "NSS_PKIX_NO_LDAP" ]
+
+ include_dirs += [
+ "nss/lib/libpkix/include",
+ "nss/lib/libpkix/pkix/certsel",
+ "nss/lib/libpkix/pkix/checker",
+ "nss/lib/libpkix/pkix/crlsel",
+ "nss/lib/libpkix/pkix/params",
+ "nss/lib/libpkix/pkix/results",
+ "nss/lib/libpkix/pkix/store",
+ "nss/lib/libpkix/pkix/top",
+ "nss/lib/libpkix/pkix/util",
+ "nss/lib/libpkix/pkix_pl_nss/module",
+ "nss/lib/libpkix/pkix_pl_nss/pki",
+ "nss/lib/libpkix/pkix_pl_nss/system",
+ ]
+ } else {
+ defines += [ "NSS_DISABLE_LIBPKIX" ]
+ }
+
+ if (!include_nss_root_certs) {
+ defines += [ "NSS_DISABLE_ROOT_CERTS" ]
+ }
+
+ if (cpu_arch == "x64" && !is_win) {
+ sources -= [
+ "nss/lib/freebl/chacha20/chacha20.c",
+ "nss/lib/freebl/poly1305/poly1305.c",
+ ]
+ } else {
+ sources -= [
+ "nss/lib/freebl/chacha20/chacha20_vec.c",
+ "nss/lib/freebl/poly1305/poly1305-donna-x64-sse2-incremental-source.c",
+ ]
+ }
+
+ if (is_mac || is_ios) {
+ sources -= [
+ "nss/lib/freebl/mpi/mpi_amd64.c",
+ ]
+ cflags += [
+ "-include",
+ rebase_path("//third_party/nss/nss/lib/freebl/build_config_mac.h",
+ root_build_dir),
+ ]
+ defines += [
+ "XP_UNIX",
+ "DARWIN",
+ "HAVE_STRERROR",
+ "HAVE_BSD_FLOCK",
+ "SHLIB_SUFFIX=\"dylib\"",
+ "SHLIB_PREFIX=\"lib\"",
+ "SOFTOKEN_LIB_NAME=\"libsoftokn3.dylib\"",
+ ]
+
+ configs -= [ "//build/config/gcc:symbol_visibility_hidden" ]
+ } else {
+ # Not Mac/iOS.
+ sources -= [ "nss/lib/freebl/mpi/mpi_arm_mac.c" ]
+ }
+
+ if (is_win) {
+ defines += [
+ "SHLIB_SUFFIX=\"dll\"",
+ "SHLIB_PREFIX=\"\"",
+ "SOFTOKEN_LIB_NAME=\"softokn3.dll\"",
+ "XP_PC",
+ "WIN32",
+ "WIN95",
+ ]
+
+ if (cpu_arch == "x86") {
+ sources -= [ "nss/lib/freebl/mpi/mpi_amd64.c" ]
+ defines += [
+ "NSS_X86_OR_X64",
+ "NSS_X86",
+ "_X86_",
+ "MP_ASSEMBLY_MULTIPLY",
+ "MP_ASSEMBLY_SQUARE",
+ "MP_ASSEMBLY_DIV_2DX1D",
+ "MP_USE_UINT_DIGIT",
+ "MP_NO_MP_WORD",
+ "USE_HW_AES",
+ "INTEL_GCM",
+ ]
+ } else if (cpu_arch == "x64") {
+ sources -= [ "nss/lib/freebl/mpi/mpi_x86_asm.c" ]
+ defines += [
+ "NSS_USE_64",
+ "NSS_X86_OR_X64",
+ "NSS_X64",
+ "_AMD64_",
+ "MP_CHAR_STORE_SLOW",
+ "MP_IS_LITTLE_ENDIAN",
+ "WIN64",
+ ]
+ }
+ } else {
+ # Not Windows.
+ sources -= [
+ # mpi_x86_asm.c contains MSVC inline assembly code.
+ "nss/lib/freebl/mpi/mpi_x86_asm.c",
+ ]
+ }
+
+ if (is_clang) {
+ cflags += [
+ # nss doesn"t explicitly cast between different enum types.
+ "-Wno-conversion",
+ # nss passes "const char*" through "void*".
+ "-Wno-incompatible-pointer-types",
+ # nss prefers `a && b || c` over `(a && b) || c`.
+ "-Wno-logical-op-parentheses",
+ # nss doesn"t use exhaustive switches on enums
+ "-Wno-switch",
+ # nss has some `unsigned < 0` checks.
+ "-Wno-tautological-compare",
+ ]
+ }
+
+ deps = [
+ ":nspr",
+ "//third_party/sqlite",
+ ]
+
+ forward_dependent_configs_from = [ ":nspr" ]
+ }
+} # Windows/Mac/iOS.
+
diff --git a/chromium/build/secondary/third_party/ots/BUILD.gn b/chromium/build/secondary/third_party/ots/BUILD.gn
new file mode 100644
index 00000000000..513dce64725
--- /dev/null
+++ b/chromium/build/secondary/third_party/ots/BUILD.gn
@@ -0,0 +1,90 @@
+# 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.
+
+config("ots_config") {
+ include_dirs = [ "include" ]
+}
+
+source_set("ots") {
+ sources = [
+ "include/ots-memory-stream.h",
+ "include/opentype-sanitiser.h",
+ "src/cff.cc",
+ "src/cff.h",
+ "src/cff_type2_charstring.cc",
+ "src/cff_type2_charstring.h",
+ "src/cmap.cc",
+ "src/cmap.h",
+ "src/cvt.cc",
+ "src/cvt.h",
+ "src/fpgm.cc",
+ "src/fpgm.h",
+ "src/gasp.cc",
+ "src/gasp.h",
+ "src/gdef.cc",
+ "src/gdef.h",
+ "src/glyf.cc",
+ "src/glyf.h",
+ "src/gpos.cc",
+ "src/gpos.h",
+ "src/gsub.cc",
+ "src/gsub.h",
+ "src/hdmx.cc",
+ "src/hdmx.h",
+ "src/head.cc",
+ "src/head.h",
+ "src/hhea.cc",
+ "src/hhea.h",
+ "src/hmtx.cc",
+ "src/hmtx.h",
+ "src/kern.cc",
+ "src/kern.h",
+ "src/layout.cc",
+ "src/layout.h",
+ "src/loca.cc",
+ "src/loca.h",
+ "src/ltsh.cc",
+ "src/ltsh.h",
+ "src/maxp.cc",
+ "src/maxp.h",
+ "src/math.cc",
+ "src/math_.h",
+ "src/metrics.cc",
+ "src/metrics.h",
+ "src/name.cc",
+ "src/name.h",
+ "src/os2.cc",
+ "src/os2.h",
+ "src/ots.cc",
+ "src/ots.h",
+ "src/post.cc",
+ "src/post.h",
+ "src/prep.cc",
+ "src/prep.h",
+ "src/vdmx.cc",
+ "src/vdmx.h",
+ "src/vhea.cc",
+ "src/vhea.h",
+ "src/vmtx.cc",
+ "src/vmtx.h",
+ "src/vorg.cc",
+ "src/vorg.h",
+ "src/woff2.cc",
+ "src/woff2.h",
+ ]
+
+ direct_dependent_configs = [ ":ots_config" ]
+
+ deps = [
+ "//third_party/brotli",
+ "//third_party/zlib",
+ ]
+
+ if (is_win) {
+ cflags = [
+ "/wd4267", # Conversion from size_t to 'type'.
+ "/wd4334", # 32-bit shift implicitly converted to 64-bits.
+ ]
+ }
+}
diff --git a/chromium/build/secondary/third_party/sfntly/BUILD.gn b/chromium/build/secondary/third_party/sfntly/BUILD.gn
new file mode 100644
index 00000000000..74107afbda6
--- /dev/null
+++ b/chromium/build/secondary/third_party/sfntly/BUILD.gn
@@ -0,0 +1,129 @@
+# 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.
+
+static_library("sfntly") {
+ sources = [
+ "cpp/src/sfntly/data/byte_array.cc",
+ "cpp/src/sfntly/data/byte_array.h",
+ "cpp/src/sfntly/data/font_data.cc",
+ "cpp/src/sfntly/data/font_data.h",
+ "cpp/src/sfntly/data/font_input_stream.cc",
+ "cpp/src/sfntly/data/font_input_stream.h",
+ "cpp/src/sfntly/data/font_output_stream.cc",
+ "cpp/src/sfntly/data/font_output_stream.h",
+ "cpp/src/sfntly/data/growable_memory_byte_array.cc",
+ "cpp/src/sfntly/data/growable_memory_byte_array.h",
+ "cpp/src/sfntly/data/memory_byte_array.cc",
+ "cpp/src/sfntly/data/memory_byte_array.h",
+ "cpp/src/sfntly/data/readable_font_data.cc",
+ "cpp/src/sfntly/data/readable_font_data.h",
+ "cpp/src/sfntly/data/writable_font_data.cc",
+ "cpp/src/sfntly/data/writable_font_data.h",
+ "cpp/src/sfntly/font.cc",
+ "cpp/src/sfntly/font.h",
+ "cpp/src/sfntly/font_factory.cc",
+ "cpp/src/sfntly/font_factory.h",
+ "cpp/src/sfntly/math/fixed1616.h",
+ "cpp/src/sfntly/math/font_math.h",
+ "cpp/src/sfntly/port/atomic.h",
+ "cpp/src/sfntly/port/config.h",
+ "cpp/src/sfntly/port/endian.h",
+ "cpp/src/sfntly/port/exception_type.h",
+ "cpp/src/sfntly/port/file_input_stream.cc",
+ "cpp/src/sfntly/port/file_input_stream.h",
+ "cpp/src/sfntly/port/input_stream.h",
+ "cpp/src/sfntly/port/lock.cc",
+ "cpp/src/sfntly/port/lock.h",
+ "cpp/src/sfntly/port/memory_input_stream.cc",
+ "cpp/src/sfntly/port/memory_input_stream.h",
+ "cpp/src/sfntly/port/memory_output_stream.cc",
+ "cpp/src/sfntly/port/memory_output_stream.h",
+ "cpp/src/sfntly/port/output_stream.h",
+ "cpp/src/sfntly/port/refcount.h",
+ "cpp/src/sfntly/port/type.h",
+ "cpp/src/sfntly/table/bitmap/big_glyph_metrics.cc",
+ "cpp/src/sfntly/table/bitmap/big_glyph_metrics.h",
+ "cpp/src/sfntly/table/bitmap/bitmap_glyph.cc",
+ "cpp/src/sfntly/table/bitmap/bitmap_glyph.h",
+ "cpp/src/sfntly/table/bitmap/bitmap_glyph_info.cc",
+ "cpp/src/sfntly/table/bitmap/bitmap_glyph_info.h",
+ "cpp/src/sfntly/table/bitmap/bitmap_size_table.cc",
+ "cpp/src/sfntly/table/bitmap/bitmap_size_table.h",
+ "cpp/src/sfntly/table/bitmap/composite_bitmap_glyph.cc",
+ "cpp/src/sfntly/table/bitmap/composite_bitmap_glyph.h",
+ "cpp/src/sfntly/table/bitmap/ebdt_table.cc",
+ "cpp/src/sfntly/table/bitmap/ebdt_table.h",
+ "cpp/src/sfntly/table/bitmap/eblc_table.cc",
+ "cpp/src/sfntly/table/bitmap/eblc_table.h",
+ "cpp/src/sfntly/table/bitmap/ebsc_table.cc",
+ "cpp/src/sfntly/table/bitmap/ebsc_table.h",
+ "cpp/src/sfntly/table/bitmap/glyph_metrics.cc",
+ "cpp/src/sfntly/table/bitmap/glyph_metrics.h",
+ "cpp/src/sfntly/table/bitmap/index_sub_table.cc",
+ "cpp/src/sfntly/table/bitmap/index_sub_table.h",
+ "cpp/src/sfntly/table/bitmap/index_sub_table_format1.cc",
+ "cpp/src/sfntly/table/bitmap/index_sub_table_format1.h",
+ "cpp/src/sfntly/table/bitmap/index_sub_table_format2.cc",
+ "cpp/src/sfntly/table/bitmap/index_sub_table_format2.h",
+ "cpp/src/sfntly/table/bitmap/index_sub_table_format3.cc",
+ "cpp/src/sfntly/table/bitmap/index_sub_table_format3.h",
+ "cpp/src/sfntly/table/bitmap/index_sub_table_format4.cc",
+ "cpp/src/sfntly/table/bitmap/index_sub_table_format4.h",
+ "cpp/src/sfntly/table/bitmap/index_sub_table_format5.cc",
+ "cpp/src/sfntly/table/bitmap/index_sub_table_format5.h",
+ "cpp/src/sfntly/table/bitmap/simple_bitmap_glyph.cc",
+ "cpp/src/sfntly/table/bitmap/simple_bitmap_glyph.h",
+ "cpp/src/sfntly/table/bitmap/small_glyph_metrics.cc",
+ "cpp/src/sfntly/table/bitmap/small_glyph_metrics.h",
+ "cpp/src/sfntly/table/byte_array_table_builder.cc",
+ "cpp/src/sfntly/table/byte_array_table_builder.h",
+ "cpp/src/sfntly/table/core/cmap_table.cc",
+ "cpp/src/sfntly/table/core/cmap_table.h",
+ "cpp/src/sfntly/table/core/font_header_table.cc",
+ "cpp/src/sfntly/table/core/font_header_table.h",
+ "cpp/src/sfntly/table/core/horizontal_device_metrics_table.cc",
+ "cpp/src/sfntly/table/core/horizontal_device_metrics_table.h",
+ "cpp/src/sfntly/table/core/horizontal_header_table.cc",
+ "cpp/src/sfntly/table/core/horizontal_header_table.h",
+ "cpp/src/sfntly/table/core/horizontal_metrics_table.cc",
+ "cpp/src/sfntly/table/core/horizontal_metrics_table.h",
+ "cpp/src/sfntly/table/core/maximum_profile_table.cc",
+ "cpp/src/sfntly/table/core/maximum_profile_table.h",
+ "cpp/src/sfntly/table/core/name_table.cc",
+ "cpp/src/sfntly/table/core/name_table.h",
+ "cpp/src/sfntly/table/core/os2_table.cc",
+ "cpp/src/sfntly/table/core/os2_table.h",
+ "cpp/src/sfntly/table/font_data_table.cc",
+ "cpp/src/sfntly/table/font_data_table.h",
+ "cpp/src/sfntly/table/generic_table_builder.cc",
+ "cpp/src/sfntly/table/generic_table_builder.h",
+ "cpp/src/sfntly/table/header.cc",
+ "cpp/src/sfntly/table/header.h",
+ "cpp/src/sfntly/table/subtable.cc",
+ "cpp/src/sfntly/table/subtable.h",
+ "cpp/src/sfntly/table/subtable_container_table.h",
+ "cpp/src/sfntly/table/table.cc",
+ "cpp/src/sfntly/table/table.h",
+ "cpp/src/sfntly/table/table_based_table_builder.cc",
+ "cpp/src/sfntly/table/table_based_table_builder.h",
+ "cpp/src/sfntly/table/truetype/glyph_table.cc",
+ "cpp/src/sfntly/table/truetype/glyph_table.h",
+ "cpp/src/sfntly/table/truetype/loca_table.cc",
+ "cpp/src/sfntly/table/truetype/loca_table.h",
+ "cpp/src/sfntly/tag.cc",
+ "cpp/src/sfntly/tag.h",
+ "cpp/src/sample/chromium/font_subsetter.cc",
+ "cpp/src/sample/chromium/font_subsetter.h",
+ "cpp/src/sample/chromium/subsetter_impl.cc",
+ "cpp/src/sample/chromium/subsetter_impl.h",
+ ]
+
+ defines = [ "SFNTLY_NO_EXCEPTION" ]
+ include_dirs = [ "cpp/src" ]
+
+ configs -= [ "//build/config/compiler:chromium_code" ]
+ configs += [ "//build/config/compiler:no_chromium_code" ]
+
+ deps = [ "//third_party/icu:icuuc" ]
+}
diff --git a/chromium/build/secondary/third_party/trace-viewer/BUILD.gn b/chromium/build/secondary/third_party/trace-viewer/BUILD.gn
new file mode 100644
index 00000000000..9245cbc3b9e
--- /dev/null
+++ b/chromium/build/secondary/third_party/trace-viewer/BUILD.gn
@@ -0,0 +1,320 @@
+# 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.
+
+tracing_html_files = [
+ "trace_viewer/about_tracing/profiling_view.html",
+ "trace_viewer/tracing/record_selection_dialog.html",
+ "trace_viewer/tracing/sampling_summary_side_panel.html",
+ "trace_viewer/tracing/time_summary_side_panel.html",
+ "trace_viewer/tracing/input_latency_side_panel.html",
+ "trace_viewer/tracing/timeline_view.html",
+ "trace_viewer/tracing/analysis/cpu_slice_view.html",
+ "trace_viewer/tracing/analysis/thread_time_slice_view.html",
+ "trace_viewer/tracing/find_control.html",
+ "third_party/tvcm/src/tvcm/unittest/html_test_results.html",
+ "third_party/tvcm/src/tvcm/unittest/interactive_test_runner.html",
+ "third_party/tvcm/src/tvcm/unittest/module_test_case_runner.html",
+ "third_party/tvcm/src/tvcm/ui/chart_base.html",
+ "third_party/tvcm/src/tvcm/ui/mouse_mode_selector.html",
+ "third_party/tvcm/src/tvcm/ui/overlay.html",
+ "third_party/tvcm/src/tvcm/ui/quad_stack_view.html",
+ "trace_viewer/cc/picture_debugger.html",
+]
+tracing_css_files = [
+ "trace_viewer/about_tracing/common.css",
+ "trace_viewer/cc/layer_picker.css",
+ "trace_viewer/cc/layer_tree_host_impl_view.css",
+ "trace_viewer/cc/layer_tree_quad_stack_view.css",
+ "trace_viewer/cc/layer_view.css",
+ "trace_viewer/cc/picture_debugger.css",
+ "trace_viewer/cc/picture_ops_chart_summary_view.css",
+ "trace_viewer/cc/picture_ops_chart_view.css",
+ "trace_viewer/cc/picture_ops_list_view.css",
+ "trace_viewer/cc/picture_view.css",
+ "trace_viewer/cc/raster_task_slice_view.css",
+ "trace_viewer/gpu/state_view.css",
+ "trace_viewer/system_stats/system_stats_instance_track.css",
+ "trace_viewer/system_stats/system_stats_snapshot_view.css",
+ "trace_viewer/tcmalloc/heap_instance_track.css",
+ "trace_viewer/tcmalloc/tcmalloc_instance_view.css",
+ "trace_viewer/tcmalloc/tcmalloc_snapshot_view.css",
+ "trace_viewer/tracing/analysis/analysis_link.css",
+ "trace_viewer/tracing/analysis/analysis_results.css",
+ "trace_viewer/tracing/analysis/analysis_view.css",
+ "trace_viewer/tracing/analysis/analyze_slices.css",
+ "trace_viewer/tracing/analysis/default_object_view.css",
+ "trace_viewer/tracing/analysis/generic_object_view.css",
+ "trace_viewer/tracing/timeline_track_view.css",
+ "trace_viewer/tracing/timeline_view.css",
+ "trace_viewer/tracing/timeline_view_side_panel.css",
+ "trace_viewer/tracing/tracks/counter_track.css",
+ "trace_viewer/tracing/tracks/drawing_container.css",
+ "trace_viewer/tracing/tracks/heading_track.css",
+ "trace_viewer/tracing/tracks/object_instance_track.css",
+ "trace_viewer/tracing/tracks/process_track_base.css",
+ "trace_viewer/tracing/tracks/ruler_track.css",
+ "trace_viewer/tracing/tracks/slice_track.css",
+ "trace_viewer/tracing/tracks/spacing_track.css",
+ "trace_viewer/tracing/tracks/stacked_bars_track.css",
+ "trace_viewer/tracing/tracks/thread_track.css",
+ "trace_viewer/tracing/tracks/trace_model_track.css",
+ "trace_viewer/tracing/tracks/track.css",
+ "third_party/tvcm/src/tvcm/unittest/common.css",
+ "third_party/tvcm/src/tvcm/ui/common.css",
+ "third_party/tvcm/src/tvcm/ui/bar_chart.css",
+ "third_party/tvcm/src/tvcm/ui/drag_handle.css",
+ "third_party/tvcm/src/tvcm/ui/info_bar.css",
+ "third_party/tvcm/src/tvcm/ui/line_chart.css",
+ "third_party/tvcm/src/tvcm/ui/list_and_associated_view.css",
+ "third_party/tvcm/src/tvcm/ui/list_view.css",
+ "third_party/tvcm/src/tvcm/ui/mouse_mode_selector.css",
+ "third_party/tvcm/src/tvcm/ui/pie_chart.css",
+ "third_party/tvcm/src/tvcm/ui/quad_stack_view.css",
+ "third_party/tvcm/src/tvcm/ui/sortable_table.css",
+ "third_party/tvcm/src/tvcm/ui/sunburst_chart.css",
+ "third_party/tvcm/src/tvcm/ui/tool_button.css",
+]
+tracing_js_files = [
+ "trace_viewer/about_tracing/__init__.js",
+ "trace_viewer/about_tracing/features.js",
+ "trace_viewer/about_tracing/mock_request_handler.js",
+ "trace_viewer/about_tracing/profiling_view.js",
+ "trace_viewer/about_tracing/tracing_ui_client.js",
+ "trace_viewer/cc/__init__.js",
+ "trace_viewer/cc/constants.js",
+ "trace_viewer/cc/debug_colors.js",
+ "trace_viewer/cc/layer_impl.js",
+ "trace_viewer/cc/layer_picker.js",
+ "trace_viewer/cc/layer_tree_host_impl.js",
+ "trace_viewer/cc/layer_tree_host_impl_view.js",
+ "trace_viewer/cc/layer_tree_impl.js",
+ "trace_viewer/cc/layer_tree_quad_stack_view.js",
+ "trace_viewer/cc/layer_view.js",
+ "trace_viewer/cc/picture.js",
+ "trace_viewer/cc/picture_as_image_data.js",
+ "trace_viewer/cc/picture_debugger.js",
+ "trace_viewer/cc/picture_ops_chart_summary_view.js",
+ "trace_viewer/cc/picture_ops_chart_view.js",
+ "trace_viewer/cc/picture_ops_list_view.js",
+ "trace_viewer/cc/picture_view.js",
+ "trace_viewer/cc/raster_task_slice_view.js",
+ "trace_viewer/cc/region.js",
+ "trace_viewer/cc/render_pass.js",
+ "trace_viewer/cc/selection.js",
+ "trace_viewer/cc/tile.js",
+ "trace_viewer/cc/tile_coverage_rect.js",
+ "trace_viewer/cc/tile_view.js",
+ "trace_viewer/cc/util.js",
+ "trace_viewer/gpu/__init__.js",
+ "trace_viewer/gpu/state.js",
+ "trace_viewer/gpu/state_view.js",
+ "trace_viewer/system_stats/__init__.js",
+ "trace_viewer/system_stats/system_stats_instance_track.js",
+ "trace_viewer/system_stats/system_stats_snapshot.js",
+ "trace_viewer/system_stats/system_stats_snapshot_view.js",
+ "trace_viewer/tcmalloc/__init__.js",
+ "trace_viewer/tcmalloc/heap.js",
+ "trace_viewer/tcmalloc/heap_instance_track.js",
+ "trace_viewer/tcmalloc/tcmalloc_instance_view.js",
+ "trace_viewer/tcmalloc/tcmalloc_snapshot_view.js",
+ "trace_viewer/tracing/analysis/analysis_link.js",
+ "trace_viewer/tracing/analysis/analysis_results.js",
+ "trace_viewer/tracing/analysis/analysis_view.js",
+ "trace_viewer/tracing/analysis/analyze_counters.js",
+ "trace_viewer/tracing/analysis/analyze_selection.js",
+ "trace_viewer/tracing/analysis/analyze_slices.js",
+ "trace_viewer/tracing/analysis/cpu_slice_view.js",
+ "trace_viewer/tracing/analysis/default_object_view.js",
+ "trace_viewer/tracing/analysis/generic_object_view.js",
+ "trace_viewer/tracing/analysis/object_instance_view.js",
+ "trace_viewer/tracing/analysis/object_snapshot_view.js",
+ "trace_viewer/tracing/analysis/slice_view.js",
+ "trace_viewer/tracing/analysis/stub_analysis_results.js",
+ "trace_viewer/tracing/analysis/stub_analysis_table.js",
+ "trace_viewer/tracing/analysis/thread_time_slice_view.js",
+ "trace_viewer/tracing/analysis/util.js",
+ "trace_viewer/tracing/color_scheme.js",
+ "trace_viewer/tracing/constants.js",
+ "trace_viewer/tracing/draw_helpers.js",
+ "trace_viewer/tracing/elided_cache.js",
+ "trace_viewer/tracing/fast_rect_renderer.js",
+ "trace_viewer/tracing/filter.js",
+ "trace_viewer/tracing/find_control.js",
+ "trace_viewer/tracing/importer/__init__.js",
+ "trace_viewer/tracing/importer/gzip_importer.js",
+ "trace_viewer/tracing/importer/importer.js",
+ "trace_viewer/tracing/importer/simple_line_reader.js",
+ "trace_viewer/tracing/importer/linux_perf/android_parser.js",
+ "trace_viewer/tracing/importer/linux_perf/bus_parser.js",
+ "trace_viewer/tracing/importer/linux_perf/clock_parser.js",
+ "trace_viewer/tracing/importer/linux_perf/cpufreq_parser.js",
+ "trace_viewer/tracing/importer/linux_perf/disk_parser.js",
+ "trace_viewer/tracing/importer/linux_perf/drm_parser.js",
+ "trace_viewer/tracing/importer/linux_perf/exynos_parser.js",
+ "trace_viewer/tracing/importer/linux_perf/gesture_parser.js",
+ "trace_viewer/tracing/importer/linux_perf/i915_parser.js",
+ "trace_viewer/tracing/importer/linux_perf/kfunc_parser.js",
+ "trace_viewer/tracing/importer/linux_perf/mali_parser.js",
+ "trace_viewer/tracing/importer/linux_perf/parser.js",
+ "trace_viewer/tracing/importer/linux_perf/power_parser.js",
+ "trace_viewer/tracing/importer/linux_perf/sched_parser.js",
+ "trace_viewer/tracing/importer/linux_perf/sync_parser.js",
+ "trace_viewer/tracing/importer/linux_perf/workqueue_parser.js",
+ "trace_viewer/tracing/importer/linux_perf_importer.js",
+ "trace_viewer/tracing/importer/task.js",
+ "trace_viewer/tracing/importer/timeline_stream_importer.js",
+ "trace_viewer/tracing/importer/trace2html_importer.js",
+ "trace_viewer/tracing/importer/trace_event_importer.js",
+ "trace_viewer/tracing/importer/etw/parser.js",
+ "trace_viewer/tracing/importer/etw/eventtrace_parser.js",
+ "trace_viewer/tracing/importer/etw/process_parser.js",
+ "trace_viewer/tracing/importer/etw/thread_parser.js",
+ "trace_viewer/tracing/importer/etw_importer.js",
+ "trace_viewer/tracing/importer/v8/codemap.js",
+ "trace_viewer/tracing/importer/v8/log_reader.js",
+ "trace_viewer/tracing/importer/v8/splaytree.js",
+ "trace_viewer/tracing/importer/v8_log_importer.js",
+ "trace_viewer/tracing/importer/zip_importer.js",
+ "trace_viewer/tracing/record_selection_dialog.js",
+ "trace_viewer/tracing/sampling_summary_side_panel.js",
+ "trace_viewer/tracing/selection.js",
+ "trace_viewer/tracing/standalone_timeline_view.js",
+ "trace_viewer/tracing/test_utils.js",
+ "trace_viewer/tracing/time_summary_side_panel.js",
+ "trace_viewer/tracing/input_latency_side_panel.js",
+ "trace_viewer/tracing/timeline_display_transform.js",
+ "trace_viewer/tracing/timeline_display_transform_animations.js",
+ "trace_viewer/tracing/timeline_interest_range.js",
+ "trace_viewer/tracing/timeline_track_view.js",
+ "trace_viewer/tracing/timeline_view.js",
+ "trace_viewer/tracing/timeline_view_side_panel.js",
+ "trace_viewer/tracing/timeline_viewport.js",
+ "trace_viewer/tracing/timing_tool.js",
+ "trace_viewer/tracing/trace_model.js",
+ "trace_viewer/tracing/trace_model/async_slice.js",
+ "trace_viewer/tracing/trace_model/async_slice_group.js",
+ "trace_viewer/tracing/trace_model/counter.js",
+ "trace_viewer/tracing/trace_model/counter_sample.js",
+ "trace_viewer/tracing/trace_model/counter_series.js",
+ "trace_viewer/tracing/trace_model/cpu.js",
+ "trace_viewer/tracing/trace_model/event.js",
+ "trace_viewer/tracing/trace_model/flow_event.js",
+ "trace_viewer/tracing/trace_model/instant_event.js",
+ "trace_viewer/tracing/trace_model/kernel.js",
+ "trace_viewer/tracing/trace_model/object_collection.js",
+ "trace_viewer/tracing/trace_model/object_instance.js",
+ "trace_viewer/tracing/trace_model/object_snapshot.js",
+ "trace_viewer/tracing/trace_model/process.js",
+ "trace_viewer/tracing/trace_model/process_base.js",
+ "trace_viewer/tracing/trace_model/sample.js",
+ "trace_viewer/tracing/trace_model/stack_frame.js",
+ "trace_viewer/tracing/trace_model/slice.js",
+ "trace_viewer/tracing/trace_model/slice_group.js",
+ "trace_viewer/tracing/trace_model/thread.js",
+ "trace_viewer/tracing/trace_model/time_to_object_instance_map.js",
+ "trace_viewer/tracing/trace_model/timed_event.js",
+ "trace_viewer/tracing/trace_model_settings.js",
+ "trace_viewer/tracing/tracks/async_slice_group_track.js",
+ "trace_viewer/tracing/tracks/container_track.js",
+ "trace_viewer/tracing/tracks/counter_track.js",
+ "trace_viewer/tracing/tracks/cpu_track.js",
+ "trace_viewer/tracing/tracks/drawing_container.js",
+ "trace_viewer/tracing/tracks/heading_track.js",
+ "trace_viewer/tracing/tracks/kernel_track.js",
+ "trace_viewer/tracing/tracks/object_instance_track.js",
+ "trace_viewer/tracing/tracks/process_track.js",
+ "trace_viewer/tracing/tracks/process_track_base.js",
+ "trace_viewer/tracing/tracks/ruler_track.js",
+ "trace_viewer/tracing/tracks/slice_group_track.js",
+ "trace_viewer/tracing/tracks/slice_track.js",
+ "trace_viewer/tracing/tracks/spacing_track.js",
+ "trace_viewer/tracing/tracks/stacked_bars_track.js",
+ "trace_viewer/tracing/tracks/thread_track.js",
+ "trace_viewer/tracing/tracks/trace_model_track.js",
+ "trace_viewer/tracing/tracks/track.js",
+ "third_party/tvcm/src/tvcm/__init__.js",
+ "third_party/tvcm/src/tvcm/base64.js",
+ "third_party/tvcm/src/tvcm/bbox2.js",
+ "third_party/tvcm/src/tvcm/color.js",
+ "third_party/tvcm/src/tvcm/event_target.js",
+ "third_party/tvcm/src/tvcm/events.js",
+ "third_party/tvcm/src/tvcm/gl_matrix.js",
+ "third_party/tvcm/src/tvcm/guid.js",
+ "third_party/tvcm/src/tvcm/interval_tree.js",
+ "third_party/tvcm/src/tvcm/iteration_helpers.js",
+ "third_party/tvcm/src/tvcm/key_event_manager.js",
+ "third_party/tvcm/src/tvcm/measuring_stick.js",
+ "third_party/tvcm/src/tvcm/polymer.js",
+ "third_party/tvcm/src/tvcm/promise.js",
+ "third_party/tvcm/src/tvcm/properties.js",
+ "third_party/tvcm/src/tvcm/quad.js",
+ "third_party/tvcm/src/tvcm/raf.js",
+ "third_party/tvcm/src/tvcm/range.js",
+ "third_party/tvcm/src/tvcm/rect.js",
+ "third_party/tvcm/src/tvcm/settings.js",
+ "third_party/tvcm/src/tvcm/sorted_array_utils.js",
+ "third_party/tvcm/src/tvcm/statistics.js",
+ "third_party/tvcm/src/tvcm/unittest/__init__.js",
+ "third_party/tvcm/src/tvcm/unittest/assertions.js",
+ "third_party/tvcm/src/tvcm/unittest/constants.js",
+ "third_party/tvcm/src/tvcm/unittest/html_test_results.js",
+ "third_party/tvcm/src/tvcm/unittest/interactive_test_runner.js",
+ "third_party/tvcm/src/tvcm/unittest/suite_loader.js",
+ "third_party/tvcm/src/tvcm/unittest/test_case.js",
+ "third_party/tvcm/src/tvcm/unittest/test_error.js",
+ "third_party/tvcm/src/tvcm/unittest/test_runner.js",
+ "third_party/tvcm/src/tvcm/unittest/test_suite.js",
+ "third_party/tvcm/src/tvcm/unittest/text_test_results.js",
+ "third_party/tvcm/src/tvcm/utils.js",
+ "third_party/tvcm/src/tvcm/ui/__init__.js",
+ "third_party/tvcm/src/tvcm/ui/animation.js",
+ "third_party/tvcm/src/tvcm/ui/animation_controller.js",
+ "third_party/tvcm/src/tvcm/ui/bar_chart.js",
+ "third_party/tvcm/src/tvcm/ui/camera.js",
+ "third_party/tvcm/src/tvcm/ui/chart_base.js",
+ "third_party/tvcm/src/tvcm/ui/color_scheme.js",
+ "third_party/tvcm/src/tvcm/ui/container_that_decorates_its_children.js",
+ "third_party/tvcm/src/tvcm/ui/d3.js",
+ "third_party/tvcm/src/tvcm/ui/dom_helpers.js",
+ "third_party/tvcm/src/tvcm/ui/drag_handle.js",
+ "third_party/tvcm/src/tvcm/ui/info_bar.js",
+ "third_party/tvcm/src/tvcm/ui/line_chart.js",
+ "third_party/tvcm/src/tvcm/ui/list_and_associated_view.js",
+ "third_party/tvcm/src/tvcm/ui/list_view.js",
+ "third_party/tvcm/src/tvcm/ui/mouse_mode_selector.js",
+ "third_party/tvcm/src/tvcm/ui/mouse_tracker.js",
+ "third_party/tvcm/src/tvcm/ui/overlay.js",
+ "third_party/tvcm/src/tvcm/ui/pie_chart.js",
+ "third_party/tvcm/src/tvcm/ui/quad_stack_view.js",
+ "third_party/tvcm/src/tvcm/ui/sortable_table.js",
+ "third_party/tvcm/src/tvcm/ui/sunburst_chart.js",
+]
+tracing_img_files = [
+ "trace_viewer/images/checkerboard.png",
+ "trace_viewer/images/collapse.png",
+ "trace_viewer/images/expand.png",
+ "third_party/tvcm/src/tvcm/images/chrome-left.png",
+ "third_party/tvcm/src/tvcm/images/chrome-right.png",
+ "third_party/tvcm/src/tvcm/images/chrome-mid.png",
+ "third_party/tvcm/src/tvcm/images/ui-states.png",
+]
+
+# TODO: ideally this would go into the target_gen_dir, but this requires some
+# changes to the scripts that process them.
+output_resource_dir = "$root_gen_dir/content/browser/tracing"
+
+action("generate_about_tracing") {
+ script = "trace_viewer/build/generate_about_tracing_contents"
+
+ source_prereqs = tracing_html_files + tracing_css_files + tracing_js_files +
+ tracing_img_files
+ outputs = [
+ "$output_resource_dir/about_tracing.js",
+ "$output_resource_dir/about_tracing.html",
+ ]
+
+ args = [
+ "--outdir", rebase_path(output_resource_dir, root_build_dir),
+ ]
+}
diff --git a/chromium/build/secondary/tools/grit/grit_rule.gni b/chromium/build/secondary/tools/grit/grit_rule.gni
new file mode 100644
index 00000000000..1e67474802b
--- /dev/null
+++ b/chromium/build/secondary/tools/grit/grit_rule.gni
@@ -0,0 +1,153 @@
+# 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.
+
+# Instantiate grit. This will produce a script target to run grit, and a
+# static library that compiles the .cc files.
+#
+# Parameters
+#
+# source
+# Path to .grd file.
+#
+# grit_flags (optional)
+# List of strings containing extra command-line flags to pass to Grit.
+#
+# deps (optional)
+# visibility (optional)
+# Normal meaning.
+#
+# Example
+#
+# grit("my_resources") {
+# source = "myfile.grd" # source is required.
+# grit_flags = [ "-E", "foo=bar" ] # Optional extra flags.
+# # You can also put deps here if the grit source depends on generated
+# # files.
+# }
+import ("//build/config/features.gni")
+import ("//build/config/ui.gni")
+
+grit_defines = []
+
+if (is_chromeos) {
+ grit_defines += [
+ "-D", "chromeos",
+ "-D", "scale_factors=2x"
+ ]
+}
+
+if (is_desktop_linux) {
+ grit_defines += [ "-D", "desktop_linux" ]
+}
+
+if (is_android) {
+ grit_defines += [
+ "-t", "android",
+ "-E", "ANDROID_JAVA_TAGGED_ONLY=true",
+ ]
+}
+
+if (enable_extensions) {
+ grit_defines += [ "-D", "enable_extensions" ]
+}
+if (enable_plugins) {
+ grit_defines += [ "-D", "enable_plugins" ]
+}
+
+# TODO(GYP) the rest of the grit_defines from the gyp build.
+
+grit_resource_id_file = "//tools/gritsettings/resource_ids"
+grit_info_script = "//tools/grit/grit_info.py"
+
+template("grit") {
+ assert(defined(invoker.source),
+ "\"source\" must be defined for the grit template $target_name")
+ assert(!defined(invoker.sources) && !defined(invoker.outputs),
+ "Neither \"sources\" nor \"outputs\" can be defined for the grit " +
+ "template $target_name")
+
+ # These are all passed as arguments to the script so have to be relative to
+ # the build directory.
+ resource_ids =
+ rebase_path(grit_resource_id_file, root_build_dir)
+ output_dir = rebase_path(target_gen_dir, root_build_dir)
+ source_path = rebase_path(invoker.source, root_build_dir)
+
+ if (defined(invoker.grit_flags)) {
+ grit_flags = invoker.grit_flags
+ } else {
+ grit_flags = [] # These are optional so default to empty list.
+ }
+
+ grit_inputs_build_rel = exec_script(grit_info_script,
+ [ "--inputs", source_path, "-f", resource_ids] + grit_flags, "list lines")
+ # The inputs are relative to the current (build) directory, rebase to
+ # the current one.
+ grit_inputs = rebase_path(grit_inputs_build_rel, ".", root_build_dir) + [
+ grit_resource_id_file,
+ ]
+
+ grit_outputs_build_rel = exec_script(grit_info_script,
+ [ "--outputs", "$output_dir", source_path, "-f", resource_ids ] +
+ grit_flags,
+ "list lines")
+
+ # The inputs are relative to the current (build) directory, rebase to
+ # the current one.
+ grit_outputs = rebase_path(grit_outputs_build_rel, ".", root_build_dir)
+
+ # The config and the action below get this visibility son only the generated
+ # source set can depend on them. The variable "target_name" will get
+ # overwritten inside the innter classes so we need to compute it here.
+ target_visibility = ":$target_name"
+
+ # The current grit setup makes an file in $target_gen_dir/grit/foo.h that
+ # the source code expects to include via "grit/foo.h". It would be nice to
+ # change this to including absolute paths relative to the root gen directory
+ # (like "mycomponent/foo.h"). This config sets up the include path.
+ grit_config = target_name + "_grit_config"
+ config(grit_config) {
+ include_dirs = [ target_gen_dir ]
+ visibility = target_visibility
+ }
+
+ grit_custom_target = target_name + "_grit"
+ action(grit_custom_target) {
+ script = "//tools/grit/grit.py"
+ source_prereqs = grit_inputs
+ outputs = grit_outputs
+
+ args = [
+ "-i", source_path, "build",
+ "-f", resource_ids,
+ "-o", output_dir,
+ ] + grit_defines + grit_flags
+
+ visibility = target_visibility
+
+ if (defined(invoker.deps)) {
+ deps = invoker.deps
+ }
+ }
+
+ # This is the thing that people actually link with, it must be named the
+ # same as the argument the template was invoked with.
+ source_set(target_name) {
+ # Since we generate a file, we need to be run before the targets that
+ # depend on us.
+ sources = grit_outputs
+
+ # Deps set on the template invocation will go on the grit script running
+ # target rather than this library.
+ deps = [ ":$grit_custom_target" ]
+ direct_dependent_configs = [ ":$grit_config" ]
+
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
+ if (defined(invoker.output_name)) {
+ output_name = invoker.output_name
+ }
+ }
+}
diff --git a/chromium/build/secondary/ui/BUILD.gn b/chromium/build/secondary/ui/BUILD.gn
new file mode 100644
index 00000000000..05d5c22aa72
--- /dev/null
+++ b/chromium/build/secondary/ui/BUILD.gn
@@ -0,0 +1,11 @@
+# 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.
+
+component("ui") {
+ # TODO(brettw) do this target, this current stuff is only to make Chrome
+ # link.
+
+ configs += "//build/config/linux:x11"
+ }
+}
diff --git a/chromium/build/toolchain/android/BUILD.gn b/chromium/build/toolchain/android/BUILD.gn
new file mode 100644
index 00000000000..dc3bfeddab7
--- /dev/null
+++ b/chromium/build/toolchain/android/BUILD.gn
@@ -0,0 +1,67 @@
+# 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("//build/config/sysroot.gni") # Imports android/config.gni.
+import("//build/toolchain/clang.gni")
+import("//build/toolchain/goma.gni")
+import("//build/toolchain/gcc_toolchain.gni")
+
+# The Android GCC toolchains share most of the same parameters, so we have this
+# wrapper around gcc_toolchain to avoid duplication of logic.
+#
+# Parameters:
+# - android_ndk_sysroot
+# Sysroot for this architecture.
+# - android_ndk_lib_dir
+# Subdirectory inside of android_ndk_sysroot where libs go.
+# - tool_prefix
+# Prefix to be added to the tool names.
+# - toolchain_cpu_arch
+# Same as gcc_toolchain
+template("android_gcc_toolchain") {
+ gcc_toolchain(target_name) {
+ # Make our manually injected libs relative to the build dir.
+ android_ndk_lib = rebase_path(
+ invoker.android_ndk_sysroot + "/" + invoker.android_ndk_lib_dir,
+ root_build_dir)
+
+ libs_section_prefix = "$android_ndk_lib/crtbegin_dynamic.o"
+ libs_section_postfix = "$android_ndk_lib/crtend_android.o"
+
+ # The tools should be run relative to the build dir.
+ tool_prefix = rebase_path(invoker.tool_prefix, root_build_dir)
+
+ cc = tool_prefix + "gcc"
+ cxx = tool_prefix + "g++"
+ ar = tool_prefix + "ar"
+ ld = cxx
+
+ toolchain_os = "android"
+ toolchain_cpu_arch = invoker.toolchain_cpu_arch
+ }
+}
+
+android_gcc_toolchain("x86") {
+ android_ndk_sysroot = "$android_ndk_root/$x86_android_sysroot_subdir"
+ android_ndk_lib_dir = "usr/lib"
+
+ tool_prefix = "$x86_android_toolchain_root/bin/i686-linux-android-"
+ toolchain_cpu_arch = "x86"
+}
+
+android_gcc_toolchain("arm") {
+ android_ndk_sysroot = "$android_ndk_root/$arm_android_sysroot_subdir"
+ android_ndk_lib_dir = "usr/lib"
+
+ tool_prefix = "$arm_android_toolchain_root/bin/arm-linux-androideabi-"
+ toolchain_cpu_arch = "arm"
+}
+
+android_gcc_toolchain("mipsel") {
+ android_ndk_sysroot = "$android_ndk_root/$mips_android_sysroot_subdir"
+ android_ndk_lib_dir = "usr/lib"
+
+ tool_prefix = "$mips_android_toolchain_root/bin/mipsel-linux-android-"
+ toolchain_cpu_arch = "mipsel"
+}
diff --git a/chromium/build/toolchain/android/find_android_compiler.py b/chromium/build/toolchain/android/find_android_compiler.py
new file mode 100644
index 00000000000..d806ead80d5
--- /dev/null
+++ b/chromium/build/toolchain/android/find_android_compiler.py
@@ -0,0 +1,41 @@
+# 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 script locates the Android compilers given the bin directory of the
+# android toolchain.
+
+import glob
+import subprocess
+import sys
+
+if len(sys.argv) != 2:
+ print "Error: expecting one argument of the android toolchain dir."
+ sys.exit(1)
+
+# TODO(brettw) this logic seems like a bad idea. It was copied from
+# common.gypi. It seems like the toolchain should just know the name given the
+# current platform rather than having to rely on glob.
+android_toolchain = sys.argv[1]
+cc = glob.glob(android_toolchain + "/*-gcc")
+cxx = glob.glob(android_toolchain + "/*-g++")
+
+# We tolerate "no matches." In the Android AOSP WebView build, it runs this
+# logic and the directory doesn't exist, giving no matches. But that build runs
+# GYP to generate Android Makefiles which specify the compiler separately. So
+# all we need to do in this case is ignore the error and continue with empty
+# target compilers.
+if len(cc) == 0:
+ cc = [""]
+if len(cxx) == 0:
+ cxx = [""]
+if len(cc) != 1 or len(cxx) != 1:
+ print "More than one matching compiler."
+ sys.exit(1)
+
+# Get the host compilers from the current path.
+which_gcc = subprocess.check_output(["which gcc"], shell=True).strip()
+which_gxx = subprocess.check_output(["which g++"], shell=True).strip()
+
+print ('["' + cc[0] + '","' + cxx[0] + '","' + which_gcc + '","' +
+ which_gxx + '"]')
diff --git a/chromium/build/toolchain/clang.gni b/chromium/build/toolchain/clang.gni
new file mode 100644
index 00000000000..c6803844d8b
--- /dev/null
+++ b/chromium/build/toolchain/clang.gni
@@ -0,0 +1,9 @@
+# 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.
+
+declare_args() {
+ # Enable the optional type profiler in Clang, which will tag heap allocations
+ # with the allocation type.
+ use_clang_type_profiler = false
+}
diff --git a/chromium/build/toolchain/gcc_toolchain.gni b/chromium/build/toolchain/gcc_toolchain.gni
new file mode 100644
index 00000000000..bc5288300fa
--- /dev/null
+++ b/chromium/build/toolchain/gcc_toolchain.gni
@@ -0,0 +1,111 @@
+# 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.
+
+# This template defines a GCC toolchain.
+#
+# It requires the following variables specifying the executables to run:
+# - cc
+# - cxx
+# - ar
+# - ld
+# and the following which is used in the toolchain_args
+# - toolchain_cpu_arch (What "cpu_arch" should be set to when invoking a
+# build using this toolchain.)
+# - toolchain_os (What "os" should be set to when invoking a build using this
+# toolchain.)
+#
+# Optional parameters:
+# - libs_section_prefix
+# - libs_section_postfix
+# The contents of these strings, if specified, will be placed around
+# the libs section of the linker line. It allows one to inject libraries
+# at the beginning and end for all targets in a toolchain.
+template("gcc_toolchain") {
+ toolchain(target_name) {
+ assert(defined(invoker.cc), "gcc_toolchain() must specify a \"cc\" value")
+ assert(defined(invoker.cxx), "gcc_toolchain() must specify a \"cxx\" value")
+ assert(defined(invoker.ar), "gcc_toolchain() must specify a \"ar\" value")
+ assert(defined(invoker.ld), "gcc_toolchain() must specify a \"ld\" value")
+ assert(defined(invoker.toolchain_cpu_arch),
+ "gcc_toolchain() must specify a \"toolchain_cpu_arch\"")
+ assert(defined(invoker.toolchain_os),
+ "gcc_toolchain() must specify a \"toolchain_os\"")
+
+ # We can't do string interpolation ($ in strings) on things with dots in
+ # them. To allow us to use $cc below, for example, we create copies of
+ # these values in our scope.
+ cc = invoker.cc
+ cxx = invoker.cxx
+ ar = invoker.ar
+ ld = invoker.ld
+
+ # Bring these into our scope for string interpolation with default values.
+ if (defined(invoker.libs_section_prefix)) {
+ libs_section_prefix = invoker.libs_section_prefix
+ } else {
+ libs_section_prefix = ""
+ }
+
+ if (defined(invoker.libs_section_postfix)) {
+ libs_section_postfix = invoker.libs_section_postfix
+ } else {
+ libs_section_postfix = ""
+ }
+
+ # Make these apply to all tools below.
+ lib_prefix = "-l"
+ lib_dir_prefix="-L"
+
+ tool("cc") {
+ # cflags_pch_c
+ command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c -c \$in -o \$out"
+ description = "CC \$out"
+ depfile = "\$out.d"
+ deps = "gcc"
+ }
+ tool("cxx") {
+ # cflags_pch_cc
+ command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc -c \$in -o \$out"
+ description = "CXX \$out"
+ depfile = "\$out.d"
+ deps = "gcc"
+ }
+ tool("alink") {
+ command = "rm -f \$out && $ar rcs \$out @\$rspfile"
+ description = "AR \$out"
+ rspfile = "\$out.rsp"
+ rspfile_content = "\$in"
+ }
+ tool("solink") {
+ command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ]; then $ld -shared \$ldflags -o \$lib -Wl,-soname=\$soname @\$rspfile && { readelf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.TOC; else $ld -shared \$ldflags -o \$lib -Wl,-soname=\$soname -Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archive $libs_section_prefix \$libs $libs_section_postfix && { readelf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.tmp && if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi"
+ description = "SOLINK \$lib"
+ rspfile = "\$out.rsp"
+ rspfile_content = "-Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archive \$libs"
+ #pool = "link_pool"
+ restat = "1"
+ }
+ tool("link") {
+ command = "$ld \$ldflags -o \$out -Wl,--start-group @\$rspfile \$solibs -Wl,--end-group $libs_section_prefix \$libs $libs_section_postfix"
+ description = "LINK \$out"
+ rspfile = "\$out.rsp"
+ rspfile_content = "\$in"
+ #pool = "link_pool"
+ }
+ tool("stamp") {
+ command = "\${postbuilds}touch \$out"
+ description = "STAMP \$out"
+ }
+ tool("copy") {
+ command = "ln -f \$in \$out 2>/dev/null || (rm -rf \$out && cp -af \$in \$out)"
+ description = "COPY \$in \$out"
+ }
+
+ # When invoking this toolchain not as the default one, these args will be
+ # passed to the build. They are ignored when this is the default toolchain.
+ toolchain_args() {
+ cpu_arch = invoker.toolchain_cpu_arch
+ os = invoker.toolchain_os
+ }
+ }
+}
diff --git a/chromium/build/toolchain/goma.gni b/chromium/build/toolchain/goma.gni
new file mode 100644
index 00000000000..1f34723ad42
--- /dev/null
+++ b/chromium/build/toolchain/goma.gni
@@ -0,0 +1,31 @@
+# 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.
+
+# Defines the configuration of Goma.
+#
+# This is currently designed to match the GYP build exactly, so as not to break
+# people during the transition.
+
+declare_args() {
+ # Set to true to enable distributed compilation using Goma.
+ use_goma = false
+
+ # Set the default value based on the platform.
+ if (is_win) {
+ # Absolute directory containing the Goma source code.
+ goma_dir = "C:\goma\goma-win"
+ } else {
+ # Absolute directory containing the Goma source code.
+ goma_dir = getenv("HOME") + "/goma"
+ }
+}
+
+if (use_goma) {
+ # Define the toolchain for the GYP build when using goma.
+ make_goma_global_settings =
+ "['CC_wrapper', '$goma_dir/gomacc']," +
+ "['CXX_wrapper', '$goma_dir/gomacc']," +
+ "['CC.host_wrapper', '$goma_dir/gomacc']," +
+ "['CXX.host_wrapper', '$goma_dir/gomacc'],"
+}
diff --git a/chromium/build/toolchain/linux/BUILD.gn b/chromium/build/toolchain/linux/BUILD.gn
index ffb378beb88..dd98cb4e0e3 100644
--- a/chromium/build/toolchain/linux/BUILD.gn
+++ b/chromium/build/toolchain/linux/BUILD.gn
@@ -1,180 +1,74 @@
-# Copyright (c) 2013 The Chromium Authors. All rights reserved.
+# 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.
-cc = "gcc"
-cxx = "g++"
-ar = "ar"
-ld = cxx
+import("//build/config/sysroot.gni")
+import("//build/toolchain/clang.gni")
+import("//build/toolchain/gcc_toolchain.gni")
+import("//build/toolchain/goma.gni")
-# The toolchains below all issue the same commands with some different flags.
-# TODO(brettw) it would be nice to have a different way to express this without
-# so much duplication.
-cc_command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c -c \$in -o \$out"
-cxx_command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc -c \$in -o \$out"
-alink_command = "rm -f \$out && $ar rcs \$out \$in"
-solink_command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ]; then $ld -shared \$ldflags -o \$lib -Wl,-soname=\$soname -Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archive \$libs && { readelf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.TOC; else $ld -shared \$ldflags -o \$lib -Wl,-soname=\$soname -Wl,--whole-archive \$in \$solibs -Wl,--no-whole-archive \$libs && { readelf -d \${lib} | grep SONAME ; nm -gD -f p \${lib} | cut -f1-2 -d' '; } > \${lib}.tmp && if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi"
-link_command = "$ld \$ldflags -o \$out -Wl,--start-group \$in \$solibs -Wl,--end-group \$libs"
-stamp_command = "\${postbuilds}touch \$out"
-copy_command = "ln -f \$in \$out 2>/dev/null || (rm -rf \$out && cp -af \$in \$out)"
+gcc_toolchain("arm") {
+ cc = "arm-linux-gnueabi-gcc"
+ cxx = "arm-linux-gnueabi-g++"
+ ar = "arm-linux-gnueabi-ar"
+ ld = cxx
-# ARM --------------------------------------------------------------------------
-
-cc = "arm-linux-gnueabi-gcc"
-cxx = "arm-linux-gnueabi-g++"
-ar = "arm-linux-gnueabi-ar"
-ld = cxx
-
-toolchain("arm") {
- # Make these apply to all tools below.
- lib_prefix = "-l"
- lib_dir_prefix="-L"
-
- tool("cc") {
- # cflags_pch_c
- command = cc_command
- description = "CC \$out"
- depfile = "\$out.d"
- deps = "gcc"
- }
- tool("cxx") {
- # cflags_pch_cc
- command = cxx_command
- description = "CXX \$out"
- depfile = "\$out.d"
- deps = "gcc"
- }
- tool("alink") {
- command = alink_command
- description = "AR \$out"
- }
- tool("solink") {
- command = solink_command
- description = "SOLINK \$lib"
- #pool = "link_pool"
- restat = "1"
- }
- tool("link") {
- command = link_command
- description = "LINK \$out"
- #pool = "link_pool"
- }
- tool("stamp") {
- command = stamp_command
- description = "STAMP \$out"
- }
- tool("copy") {
- command = copy_command
- description = "COPY \$in \$out"
- }
-
- # When invoking this toolchain not as the default one, these args will be
- # passed to the build. They are ignored when this is the default toolchain.
- toolchain_args() {
- cpu_arch = "arm"
- }
+ toolchain_cpu_arch = "arm"
+ toolchain_os = "linux"
}
-# 32-bit -----------------------------------------------------------------------
+gcc_toolchain("x86") {
+ if (is_clang) {
+ if (use_clang_type_profiler) {
+ prefix = rebase_path("//third_party/llvm-allocated-type/Linux_ia32/bin",
+ root_build_dir)
+ } else {
+ prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
+ root_build_dir)
+ }
+ cc = "$prefix/clang"
+ cxx = "$prefix/clang++"
+ } else {
+ cc = "gcc"
+ cxx = "g++"
+ }
-toolchain("32") {
- # Make these apply to all tools below.
- lib_prefix = "-l"
- lib_dir_prefix="-L"
+ ar = "ar"
+ ld = cxx
- tool("cc") {
- # cflags_pch_c
- command = cc_command
- description = "CC \$out"
- depfile = "\$out.d"
- deps = "gcc"
- }
- tool("cxx") {
- # cflags_pch_cc
- command = cxx_command
- description = "CXX \$out"
- depfile = "\$out.d"
- deps = "gcc"
- }
- tool("alink") {
- command = alink_command
- description = "AR \$out"
- }
- tool("solink") {
- command = solink_command
- description = "SOLINK \$lib"
- #pool = "link_pool"
- restat = "1"
- }
- tool("link") {
- command = link_command
- description = "LINK \$out"
- #pool = "link_pool"
- }
- tool("stamp") {
- command = stamp_command
- description = "STAMP \$out"
- }
- tool("copy") {
- command = copy_command
- description = "COPY \$in \$out"
- }
+ toolchain_cpu_arch = "x86"
+ toolchain_os = "linux"
+}
- # When invoking this toolchain not as the default one, these args will be
- # passed to the build. They are ignored when this is the default toolchain.
- toolchain_args() {
- cpu_arch = "x32"
+gcc_toolchain("x64") {
+ if (is_clang) {
+ if (use_clang_type_profiler) {
+ prefix = rebase_path("//third_party/llvm-allocated-type/Linux_x64/bin",
+ root_build_dir)
+ } else {
+ prefix = rebase_path("//third_party/llvm-build/Release+Asserts/bin",
+ root_build_dir)
+ }
+ cc = "$prefix/clang"
+ cxx = "$prefix/clang++"
+ } else {
+ cc = "gcc"
+ cxx = "g++"
}
-}
-# 64-bit -----------------------------------------------------------------------
+ ar = "ar"
+ ld = cxx
-toolchain("64") {
- # Make these apply to all tools below.
- lib_prefix = "-l"
- lib_dir_prefix="-L"
+ toolchain_cpu_arch = "x64"
+ toolchain_os = "linux"
+}
- tool("cc") {
- # cflags_pch_c
- command = cc_command
- description = "CC \$out"
- depfile = "\$out.d"
- deps = "gcc"
- }
- tool("cxx") {
- # cflags_pch_cc
- command = cxx_command
- description = "CXX \$out"
- depfile = "\$out.d"
- deps = "gcc"
- }
- tool("alink") {
- command = alink_command
- description = "AR \$out"
- }
- tool("solink") {
- command = solink_command
- description = "SOLINK \$lib"
- #pool = "link_pool"
- restat = "1"
- }
- tool("link") {
- command = link_command
- description = "LINK \$out"
- #pool = "link_pool"
- }
- tool("stamp") {
- command = stamp_command
- description = "STAMP \$out"
- }
- tool("copy") {
- command = copy_command
- description = "COPY \$in \$out"
- }
+gcc_toolchain("mipsel") {
+ cc = "mipsel-linux-gnu-gcc"
+ cxx = "mipsel-linux-gnu-g++"
+ ar = "mipsel-linux-gnu-ar"
+ ld = cxx
- # When invoking this toolchain not as the default one, these args will be
- # passed to the build. They are ignored when this is the default toolchain.
- toolchain_args() {
- cpu_arch = "x64"
- }
+ toolchain_cpu_arch = "mipsel"
+ toolchain_os = "linux"
}
diff --git a/chromium/build/toolchain/mac/BUILD.gn b/chromium/build/toolchain/mac/BUILD.gn
index b8a3c5eef17..e95e540b384 100644
--- a/chromium/build/toolchain/mac/BUILD.gn
+++ b/chromium/build/toolchain/mac/BUILD.gn
@@ -2,81 +2,136 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+# TODO(brettw) Use "gcc_toolchain.gni" like the Linux toolchains. This requires
+# some enhancements since the commands on Mac are slightly different than on
+# Linux.
+
+import("../goma.gni")
+
# Should only be running on Mac.
-assert(is_mac)
+assert(is_mac || is_ios)
+
+import("//build/toolchain/clang.gni")
+import("//build/toolchain/goma.gni")
-cc = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang", ".", root_build_dir)
-cxx = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang++", ".", root_build_dir)
+if (is_clang) {
+ cc = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang",
+ root_build_dir)
+ cxx = rebase_path("//third_party/llvm-build/Release+Asserts/bin/clang++",
+ root_build_dir)
+} else {
+ cc = "gcc"
+ cxx = "g++"
+}
ld = cxx
# This will copy the gyp-mac-tool to the build directory. We pass in the source
# file of the win tool.
gyp_mac_tool_source =
- rebase_path("//tools/gyp/pylib/gyp/mac_tool.py", ".", root_build_dir)
+ rebase_path("//tools/gyp/pylib/gyp/mac_tool.py", root_build_dir)
exec_script("setup_toolchain.py", [ gyp_mac_tool_source ], "value")
-toolchain("clang") {
- # Make these apply to all tools below.
- lib_prefix = "-l"
- lib_dir_prefix="-L"
+# Shared toolchain definition. Invocations should set toolchain_os to set the
+# build args in this definition.
+template("mac_clang_toolchain") {
+ toolchain(target_name) {
+ assert(defined(invoker.cc),
+ "mac_clang_toolchain() must specify a \"cc\" value")
+ assert(defined(invoker.cxx),
+ "mac_clang_toolchain() must specify a \"cxx\" value")
+ assert(defined(invoker.ld),
+ "mac_clang_toolchain() must specify a \"ld\" value")
+ assert(defined(invoker.toolchain_os),
+ "mac_clang_toolchain() must specify a \"toolchain_os\"")
- tool("cc") {
- command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c \$cflags_pch_c -c \$in -o \$out"
- description = "CC \$out"
- depfile = "\$out.d"
- deps = "gcc"
- }
- tool("cxx") {
- command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc \$cflags_pch_cc -c \$in -o \$out"
- description = "CXX \$out"
- depfile = "\$out.d"
- deps = "gcc"
- }
- tool("objc") {
- command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c \$cflags_objc \$cflags_pch_objc -c \$in -o \$out"
- description = "OBJC \$out"
- depfile = "\$out.d"
- deps = "gcc"
- }
- tool("objcxx") {
- command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc \$cflags_objcc \$cflags_pch_objcc -c \$in -o \$out"
- description = "OBJCXX \$out"
- depfile = "\$out.d"
- deps = "gcc"
- }
- tool("alink") {
- command = "rm -f \$out && ./gyp-mac-tool filter-libtool libtool \$libtool_flags -static -o \$out \$in \$postbuilds"
- description = "LIBTOOL-STATIC \$out, POSTBUILDS"
- }
- tool("solink") {
- command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ] || otool -l \$lib | grep -q LC_REEXPORT_DYLIB ; then $ld -shared \$ldflags -o \$lib \$in \$solibs \$libs \$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | cut -f1-2 -d' ' | grep -v U\$\$; true; } > \${lib}.TOC; else $ld -shared \$ldflags -o \$lib \$in \$solibs \$libs \$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | cut -f1-2 -d' ' | grep -v U\$\$; true; } > \${lib}.tmp && if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi"
- description = "SOLINK \$lib, POSTBUILDS"
- #pool = "link_pool"
- restat = "1"
- }
- tool("link") {
- command = "$ld \$ldflags -o \$out \$in \$solibs \$libs \$postbuilds"
- description = "LINK \$out, POSTBUILDS"
- #pool = "link_pool"
- }
- #tool("infoplist") {
- # command = "$cc -E -P -Wno-trigraphs -x c \$defines \$in -o \$out && plutil -convert xml1 \$out \$out"
- # description = "INFOPLIST \$out"
- #}
- #tool("mac_tool") {
- # command = "\$env ./gyp-mac-tool \$mactool_cmd \$in \$out"
- # description = "MACTOOL \$mactool_cmd \$in"
- #}
- #tool("package_framework") {
- # command = "./gyp-mac-tool package-framework \$out \$version \$postbuilds && touch \$out"
- # description = "PACKAGE FRAMEWORK \$out, POSTBUILDS"
- #}
- tool("stamp") {
- command = "\${postbuilds}touch \$out"
- description = "STAMP \$out"
- }
- tool("copy") {
- command = "ln -f \$in \$out 2>/dev/null || (rm -rf \$out && cp -af \$in \$out)"
- description = "COPY \$in \$out"
+ # We can't do string interpolation ($ in strings) on things with dots in
+ # them. To allow us to use $cc below, for example, we create copies of
+ # these values in our scope.
+ cc = invoker.cc
+ cxx = invoker.cxx
+ ld = invoker.ld
+
+ # Make these apply to all tools below.
+ lib_prefix = "-l"
+ lib_dir_prefix="-L"
+
+ tool("cc") {
+ command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c \$cflags_pch_c -c \$in -o \$out"
+ description = "CC \$out"
+ depfile = "\$out.d"
+ deps = "gcc"
+ }
+ tool("cxx") {
+ command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc \$cflags_pch_cc -c \$in -o \$out"
+ description = "CXX \$out"
+ depfile = "\$out.d"
+ deps = "gcc"
+ }
+ tool("objc") {
+ command = "$cc -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_c \$cflags_objc \$cflags_pch_objc -c \$in -o \$out"
+ description = "OBJC \$out"
+ depfile = "\$out.d"
+ deps = "gcc"
+ }
+ tool("objcxx") {
+ command = "$cxx -MMD -MF \$out.d \$defines \$includes \$cflags \$cflags_cc \$cflags_objcc \$cflags_pch_objcc -c \$in -o \$out"
+ description = "OBJCXX \$out"
+ depfile = "\$out.d"
+ deps = "gcc"
+ }
+ tool("alink") {
+ command = "rm -f \$out && ./gyp-mac-tool filter-libtool libtool \$libtool_flags -static -o \$out \$in \$postbuilds"
+ description = "LIBTOOL-STATIC \$out"
+ }
+ tool("solink") {
+ command = "if [ ! -e \$lib -o ! -e \${lib}.TOC ] || otool -l \$lib | grep -q LC_REEXPORT_DYLIB ; then $ld -shared \$ldflags -o \$lib -Wl,-filelist,\$rspfile \$solibs \$libs \$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | cut -f1-2 -d' ' | grep -v U\$\$; true; } > \${lib}.TOC; else $ld -shared \$ldflags -o \$lib \$in \$solibs \$libs \$postbuilds && { otool -l \$lib | grep LC_ID_DYLIB -A 5; nm -gP \$lib | cut -f1-2 -d' ' | grep -v U\$\$; true; } > \${lib}.tmp && if ! cmp -s \${lib}.tmp \${lib}.TOC; then mv \${lib}.tmp \${lib}.TOC ; fi; fi"
+ description = "SOLINK \$lib"
+ rspfile = "\$out.rsp"
+ rspfile_content = "\$in_newline"
+ #pool = "link_pool"
+ restat = "1"
+ }
+ tool("link") {
+ command = "$ld \$ldflags -o \$out -Wl,-filelist,\$rspfile \$solibs \$libs \$postbuilds"
+ description = "LINK \$out"
+ rspfile = "\$out.rsp"
+ rspfile_content = "\$in_newline"
+ #pool = "link_pool"
+ }
+ #tool("infoplist") {
+ # command = "$cc -E -P -Wno-trigraphs -x c \$defines \$in -o \$out && plutil -convert xml1 \$out \$out"
+ # description = "INFOPLIST \$out"
+ #}
+ #tool("mac_tool") {
+ # command = "\$env ./gyp-mac-tool \$mactool_cmd \$in \$out"
+ # description = "MACTOOL \$mactool_cmd \$in"
+ #}
+ #tool("package_framework") {
+ # command = "./gyp-mac-tool package-framework \$out \$version \$postbuilds && touch \$out"
+ # description = "PACKAGE FRAMEWORK \$out, POSTBUILDS"
+ #}
+ tool("stamp") {
+ command = "\${postbuilds}touch \$out"
+ description = "STAMP \$out"
+ }
+ tool("copy") {
+ command = "ln -f \$in \$out 2>/dev/null || (rm -rf \$out && cp -af \$in \$out)"
+ description = "COPY \$in \$out"
+ }
+
+ toolchain_args() {
+ os = invoker.toolchain_os
+ }
}
}
+
+# Toolchain representing the target build (either mac or iOS).
+mac_clang_toolchain("clang") {
+ toolchain_os = os
+}
+
+# This toolchain provides a way for iOS target compiles to reference targets
+# compiled for the host system. It just overrides the OS back to "mac".
+mac_clang_toolchain("host_clang") {
+ toolchain_os = "mac"
+}
diff --git a/chromium/build/toolchain/nacl/BUILD.gn b/chromium/build/toolchain/nacl/BUILD.gn
index fbced9732d7..362e9124ae9 100644
--- a/chromium/build/toolchain/nacl/BUILD.gn
+++ b/chromium/build/toolchain/nacl/BUILD.gn
@@ -2,7 +2,6 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-
toolchain("x86_newlib") {
toolprefix = "gen/sdk/toolchain/linux_x86_newlib/bin/x86_64-nacl-"
cc = toolprefix + "gcc"
diff --git a/chromium/build/toolchain/win/BUILD.gn b/chromium/build/toolchain/win/BUILD.gn
index 6abf8082daa..11ff2f25d26 100644
--- a/chromium/build/toolchain/win/BUILD.gn
+++ b/chromium/build/toolchain/win/BUILD.gn
@@ -2,26 +2,22 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import("//build/config/win/visual_studio_version.gni")
+import("//build/toolchain/goma.gni")
+
# Should only be running on Windows.
assert(is_win)
# Setup the Visual Studio state.
#
-# Its argument is the location to write the environment files.
-# It will write "environment.x86" and "environment.x64" to this directory,
-# and return a list to us.
-#
-# The list contains the include path as its only element. (I'm expecting to
-# add more so it's currently a list inside a list.)
-#exec_script("get_msvc_config.py",
- # [relative_root_output_dir],
- # "value")
-
-# This will save the environment block and and copy the gyp-win-tool to the
-# build directory. We pass in the source file of the win tool.
-gyp_win_tool_source =
- rebase_path("//tools/gyp/pylib/gyp/win_tool.py", ".", root_build_dir)
-exec_script("setup_toolchain.py", [ gyp_win_tool_source ], "value")
+# Its arguments are the VS path and the compiler wrapper tool. It will write
+# "environment.x86" and "environment.x64" to the build directory and return a
+# list to us.
+gyp_win_tool_path = rebase_path("//tools/gyp/pylib/gyp/win_tool.py",
+ root_build_dir)
+exec_script("setup_toolchain.py",
+ [ visual_studio_path, gyp_win_tool_path, windows_sdk_path ],
+ "string")
stamp_command = "$python_path gyp-win-tool stamp \$out"
copy_command = "$python_path gyp-win-tool recursive-mirror \$in \$out"
@@ -57,20 +53,20 @@ toolchain("32") {
description = "ASM \$in"
}
tool("alink") {
- command = "$python_path gyp-win-tool link-wrapper environment.x86 lib.exe /nologo /ignore:4221 /OUT:\$out @\$out.rsp"
+ command = "$python_path gyp-win-tool link-wrapper environment.x86 False lib.exe /nologo /ignore:4221 /OUT:\$out @\$out.rsp"
description = "LIB \$out"
rspfile = "\$out.rsp"
rspfile_content = "\$in_newline \$libflags"
}
tool("solink") {
- command = "cmd /c $python_path gyp-win-tool link-wrapper environment.x86 link.exe /nologo \$implibflag /DLL /OUT:\$dll /PDB:\$dll.pdb @\$dll.rsp && $python_path gyp-win-tool manifest-wrapper environment.x86 cmd /c if exist \$dll.manifest del \$dll.manifest && $python_path gyp-win-tool manifest-wrapper environment.x86 mt.exe -nologo -manifest \$manifests -out:\$dll.manifest"
+ command = "cmd /c $python_path gyp-win-tool link-wrapper environment.x86 False link.exe /nologo \$implibflag /DLL /OUT:\$dll /PDB:\$dll.pdb @\$dll.rsp && $python_path gyp-win-tool manifest-wrapper environment.x86 mt.exe -nologo -manifest \$manifests -out:\$dll.manifest"
description = "LINK(DLL) \$dll"
restat = "1"
rspfile = "\$dll.rsp"
rspfile_content = "\$libs \$in_newline \$ldflags"
}
tool("link") {
- command = "cmd /c $python_path gyp-win-tool link-wrapper environment.x86 link.exe /nologo /OUT:\$out /PDB:\$out.pdb @\$out.rsp && $python_path gyp-win-tool manifest-wrapper environment.x86 cmd /c if exist \$out.manifest del \$out.manifest && $python_path gyp-win-tool manifest-wrapper environment.x86 mt.exe -nologo -manifest \$manifests -out:\$out.manifest"
+ command = "cmd /c $python_path gyp-win-tool link-wrapper environment.x86 False link.exe /nologo /OUT:\$out /PDB:\$out.pdb @\$out.rsp && $python_path gyp-win-tool manifest-wrapper environment.x86 mt.exe -nologo -manifest \$manifests -out:\$out.manifest"
description = "LINK \$out"
rspfile = "\$out.rsp"
rspfile_content = "\$in_newline \$libs \$ldflags"
@@ -116,20 +112,20 @@ toolchain("64") {
description = "ASM \$in"
}
tool("alink") {
- command = "$python_path gyp-win-tool link-wrapper environment.x64 lib.exe /nologo /ignore:4221 /OUT:\$out @\$out.rsp"
+ command = "$python_path gyp-win-tool link-wrapper environment.x64 False lib.exe /nologo /ignore:4221 /OUT:\$out @\$out.rsp"
description = "LIB \$out"
rspfile = "\$out.rsp"
rspfile_content = "\$in_newline \$libflags"
}
tool("solink") {
- command = "cmd /c $python_path gyp-win-tool link-wrapper environment.x64 link.exe /nologo \$implibflag /DLL /OUT:\$dll /PDB:\$dll.pdb @\$dll.rsp && $python_path gyp-win-tool manifest-wrapper environment.x64 cmd /c if exist \$dll.manifest del \$dll.manifest && $python_path gyp-win-tool manifest-wrapper environment.x64 mt.exe -nologo -manifest \$manifests -out:\$dll.manifest"
+ command = "cmd /c $python_path gyp-win-tool link-wrapper environment.x64 False link.exe /nologo \$implibflag /DLL /OUT:\$dll /PDB:\$dll.pdb @\$dll.rsp && $python_path gyp-win-tool manifest-wrapper environment.x64 mt.exe -nologo -manifest \$manifests -out:\$dll.manifest"
description = "LINK(DLL) \$dll"
restat = "1"
rspfile = "\$dll.rsp"
rspfile_content = "\$libs \$in_newline \$ldflags"
}
tool("link") {
- command = "cmd /c $python_path gyp-win-tool link-wrapper environment.x64 link.exe /nologo /OUT:\$out /PDB:\$out.pdb @\$out.rsp && $python_path gyp-win-tool manifest-wrapper environment.x64 cmd /c if exist \$out.manifest del \$out.manifest && $python_path gyp-win-tool manifest-wrapper environment.x64 mt.exe -nologo -manifest \$manifests -out:\$out.manifest"
+ command = "cmd /c $python_path gyp-win-tool link-wrapper environment.x64 False link.exe /nologo /OUT:\$out /PDB:\$out.pdb @\$out.rsp && $python_path gyp-win-tool manifest-wrapper environment.x64 mt.exe -nologo -manifest \$manifests -out:\$out.manifest"
description = "LINK \$out"
rspfile = "\$out.rsp"
rspfile_content = "\$in_newline \$libs \$ldflags"
diff --git a/chromium/build/toolchain/win/midl.gni b/chromium/build/toolchain/win/midl.gni
new file mode 100644
index 00000000000..a8cf4ffdc3b
--- /dev/null
+++ b/chromium/build/toolchain/win/midl.gni
@@ -0,0 +1,94 @@
+# 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.
+
+assert(is_win)
+
+# This template defines a rule to invoke the MS IDL compiler.
+#
+# Parameters
+#
+# sources
+# List of .idl file to process.
+#
+# out_dir (optional)
+# Directory to write the generated files to. Defaults to target_gen_dir.
+#
+# visibility (optional)
+
+template("midl") {
+ action_name = "${target_name}_idl_action"
+ source_set_name = target_name
+
+ assert(defined(invoker.sources), "Source must be defined for $target_name")
+
+ if (defined(invoker.out_dir)) {
+ out_dir = invoker.out_dir
+ } else {
+ out_dir = target_gen_dir
+ }
+
+ header_file = "{{source_name_part}}.h"
+ dlldata_file = "{{source_name_part}}.dlldata.c"
+ interface_identifier_file = "{{source_name_part}}_i.c"
+ proxy_file = "{{source_name_part}}_p.c"
+ type_library_file = "{{source_name_part}}.tlb"
+
+ action_foreach(action_name) {
+ visibility = ":$source_set_name"
+
+ # This functionality is handled by the win-tool because the GYP build has
+ # MIDL support built-in.
+ # TODO(brettw) move this to a separate MIDL wrapper script for better
+ # clarity once GYP support is not needed.
+ script = "$root_build_dir/gyp-win-tool"
+
+ sources = invoker.sources
+
+ # Note that .tlb is not included in the outputs as it is not always
+ # generated depending on the content of the input idl file.
+ outputs = [
+ "$out_dir/$header_file",
+ "$out_dir/$dlldata_file",
+ "$out_dir/$interface_identifier_file",
+ "$out_dir/$proxy_file",
+ ]
+
+ if (cpu_arch == "x86") {
+ win_tool_arch = "environment.x86"
+ idl_target_platform = "win32"
+ } else if (cpu_arch == "x64") {
+ win_tool_arch = "environment.x64"
+ idl_target_platform = "x64"
+ } else {
+ assert(false, "Need environment for this arch")
+ }
+
+ args = [
+ "midl-wrapper", win_tool_arch,
+ rebase_path(out_dir, root_build_dir),
+ type_library_file,
+ header_file,
+ dlldata_file,
+ interface_identifier_file,
+ proxy_file,
+ "{{source}}",
+ "/char", "signed",
+ "/env", idl_target_platform,
+ "/Oicf",
+ ]
+ }
+
+ source_set(target_name) {
+ if (defined(invoker.visibility)) {
+ visibility = invoker.visibility
+ }
+
+ # We only compile the IID files from the IDL tool rather than all outputs.
+ sources = process_file_template(
+ invoker.sources,
+ [ "$out_dir/$interface_identifier_file" ])
+
+ deps = [ ":$action_name" ]
+ }
+}
diff --git a/chromium/build/toolchain/win/setup_toolchain.py b/chromium/build/toolchain/win/setup_toolchain.py
index 162c2e16cef..5e292ab0784 100644
--- a/chromium/build/toolchain/win/setup_toolchain.py
+++ b/chromium/build/toolchain/win/setup_toolchain.py
@@ -2,25 +2,40 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+import errno
import os
import re
+import subprocess
import sys
+"""
+Copies the given "win tool" (which the toolchain uses to wrap compiler
+invocations) and the environment blocks for the 32-bit and 64-bit builds on
+Windows to the build directory.
+
+The arguments are the visual studio install location and the location of the
+win tool. The script assumes that the root build directory is the current dir
+and the files will be written to the current directory.
+"""
+
+
def ExtractImportantEnvironment():
"""Extracts environment variables required for the toolchain from the
current environment."""
envvars_to_save = (
- 'goma_.*', # TODO(scottmg): This is ugly, but needed for goma.
- 'Path',
- 'PATHEXT',
- 'SystemRoot',
- 'TEMP',
- 'TMP',
+ 'goma_.*', # TODO(scottmg): This is ugly, but needed for goma.
+ 'include', # Needed by midl compiler.
+ 'path',
+ 'pathext',
+ 'systemroot',
+ 'temp',
+ 'tmp',
)
result = {}
for envvar in envvars_to_save:
if envvar in os.environ:
- if envvar == 'Path':
+ envvar = envvar.lower()
+ if envvar == 'path':
# Our own rules (for running gyp-win-tool) and other actions in
# Chromium rely on python being in the path. Add the path to this
# python here so that if it's not in the path when ninja is run
@@ -36,48 +51,6 @@ def ExtractImportantEnvironment():
return result
-# VC setup will add a path like this in 32-bit mode:
-# c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN
-# And this in 64-bit mode:
-# c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\BIN\amd64
-# Note that in 64-bit it's duplicated but the 64-bit one comes first.
-#
-# What we get as the path when running this will depend on which VS setup
-# script you've run. The following two functions try to do this.
-
-# For 32-bit compiles remove anything that ends in "\VC\WIN\amd64".
-def FixupPath32(path):
- find_64 = re.compile("VC\\\\BIN\\\\amd64\\\\*$", flags=re.IGNORECASE)
-
- for i in range(len(path)):
- if find_64.search(path[i]):
- # Found 32-bit path, insert the 64-bit one immediately before it.
- dir_64 = path[i].rstrip("\\")
- dir_64 = dir_64[:len(dir_64) - 6] # Trim off "\amd64".
- path[i] = dir_64
- break
- return path
-
-# For 64-bit compiles, append anything ending in "\VC\BIN" with "\amd64" as
-# long as that thing isn't already in the list, and append it immediately
-# before the non-amd64-one.
-def FixupPath64(path):
- find_32 = re.compile("VC\\\\BIN\\\\*$", flags=re.IGNORECASE)
-
- for i in range(len(path)):
- if find_32.search(path[i]):
- # Found 32-bit path, insert the 64-bit one immediately before it.
- dir_32 = path[i]
- if dir_32[len(dir_32) - 1] == '\\':
- dir_64 = dir_32 + "amd64"
- else:
- dir_64 = dir_32 + "\\amd64"
- path.insert(i, dir_64)
- break
-
- return path
-
-
def FormatAsEnvironmentBlock(envvar_dict):
"""Format as an 'environment block' directly suitable for CreateProcess.
Briefly this is a list of key=value\0, terminated by an additional \0. See
@@ -89,6 +62,7 @@ def FormatAsEnvironmentBlock(envvar_dict):
block += nul
return block
+
def CopyTool(source_path):
"""Copies the given tool to the current directory, including a warning not
to edit it."""
@@ -102,22 +76,33 @@ def CopyTool(source_path):
'# Generated by setup_toolchain.py do not edit.\n']
+ tool_source[1:]))
+if len(sys.argv) != 4:
+ print('Usage setup_toolchain.py '
+ '<visual studio path> <win tool path> <win sdk path>')
+ sys.exit(2)
+vs_path = sys.argv[1]
+tool_source = sys.argv[2]
+win_sdk_path = sys.argv[3]
-# Find the tool source, it's the first argument, and copy it.
-if len(sys.argv) != 2:
- print "Need one argument (win_tool source path)."
- sys.exit(1)
-CopyTool(sys.argv[1])
+CopyTool(tool_source)
important_env_vars = ExtractImportantEnvironment()
path = important_env_vars["PATH"].split(";")
-important_env_vars["PATH"] = ";".join(FixupPath32(path))
+# Add 32-bit compiler path to the beginning and write the block.
+path32 = [os.path.join(vs_path, "VC\\BIN")] + \
+ [os.path.join(win_sdk_path, "bin\\x86")] + \
+ path
+important_env_vars["PATH"] = ";".join(path32)
environ = FormatAsEnvironmentBlock(important_env_vars)
with open('environment.x86', 'wb') as env_file:
env_file.write(environ)
-important_env_vars["PATH"] = ";".join(FixupPath64(path))
+# Add 64-bit compiler path to the beginning and write the block.
+path64 = [os.path.join(vs_path, "VC\\BIN\\amd64")] + \
+ [os.path.join(win_sdk_path, "bin\\x64")] + \
+ path
+important_env_vars["PATH"] = ";".join(path64)
environ = FormatAsEnvironmentBlock(important_env_vars)
with open('environment.x64', 'wb') as env_file:
env_file.write(environ)
diff --git a/chromium/build/toolchain_vs2013.hash b/chromium/build/toolchain_vs2013.hash
new file mode 100644
index 00000000000..e0c43951200
--- /dev/null
+++ b/chromium/build/toolchain_vs2013.hash
@@ -0,0 +1,2 @@
+27eac9b2869ef6c89391f305a3f01285ea317867
+9d9a93134b3eabd003b85b4e7dea06c0eae150ed
diff --git a/chromium/build/uiautomator_test.gypi b/chromium/build/uiautomator_test.gypi
index 2fcc3d8f200..0f341abd88e 100644
--- a/chromium/build/uiautomator_test.gypi
+++ b/chromium/build/uiautomator_test.gypi
@@ -24,24 +24,13 @@
{
'action_name': 'dex_<(_target_name)',
'message': 'Dexing <(_target_name) jar',
- 'inputs': [
- '<(DEPTH)/build/android/gyp/util/build_utils.py',
- '<(DEPTH)/build/android/gyp/dex.py',
- '>@(library_dexed_jars_paths)',
- ],
- 'outputs': [
- '<(output_dex_path)',
- ],
- 'action': [
- 'python', '<(DEPTH)/build/android/gyp/dex.py',
- '--dex-path=<(output_dex_path)',
- '--android-sdk-tools=<(android_sdk_tools)',
-
- # TODO(newt): remove this once http://crbug.com/177552 is fixed in ninja.
- '--ignore=>!(echo \'>(_inputs)\' | md5sum)',
-
- '>@(library_dexed_jars_paths)',
- ],
+ 'variables': {
+ 'dex_input_paths': [
+ '>@(library_dexed_jars_paths)',
+ ],
+ 'output_path': '<(output_dex_path)',
+ },
+ 'includes': [ 'android/dex_action.gypi' ],
},
],
}
diff --git a/chromium/build/util/BUILD.gn b/chromium/build/util/BUILD.gn
index bf704c80b70..91090081736 100644
--- a/chromium/build/util/BUILD.gn
+++ b/chromium/build/util/BUILD.gn
@@ -10,13 +10,10 @@
# The version is a string rather than an integer for extra flexibility (for
# example, we may require git hashes in the future).
#
-# All you nede to do is depend on this target, and then from your source code:
+# All you need to do is depend on this target, and then from your source code:
# #include "build/util/last_change.h"
-custom("last_change") {
- script = "//build/util/lastchange.py"
-
- # This script must be run before targets depending on us.
- hard_dep = true
+action("last_change") {
+ script = "lastchange.py"
# Rerun the script any time this file changes.
source_prereqs = [ "//build/util/LASTCHANGE" ]
@@ -24,8 +21,8 @@ custom("last_change") {
output_header = "$target_gen_dir/last_change.h"
outputs = [ output_header ]
- build_relative_src = rebase_path("//", ".", root_build_dir)
- build_relative_outputs = rebase_path(output_header, ".", root_build_dir)
+ build_relative_src = rebase_path("//", root_build_dir)
+ build_relative_outputs = rebase_path(output_header, root_build_dir)
args = [
"--source-dir=$build_relative_src",
@@ -33,3 +30,21 @@ custom("last_change") {
"--version-macro=LAST_CHANGE",
]
}
+
+action("webkit_version") {
+ script = "version.py"
+
+ lastchange_file = "LASTCHANGE.blink"
+ # TODO(brettw) move from content to this directory.
+ template_file = "//content/webkit_version.h.in"
+ source_prereqs = [ lastchange_file, template_file ]
+
+ output_file = "$root_gen_dir/webkit_version.h"
+ outputs = [ output_file ]
+
+ args = [
+ "-f", rebase_path(lastchange_file, root_build_dir),
+ rebase_path(template_file, root_build_dir),
+ rebase_path(output_file, root_build_dir),
+ ]
+}
diff --git a/chromium/build/util/LASTCHANGE b/chromium/build/util/LASTCHANGE
index 8eb16b7d774..129bedbf753 100644
--- a/chromium/build/util/LASTCHANGE
+++ b/chromium/build/util/LASTCHANGE
@@ -1 +1 @@
-LASTCHANGE=258314
+LASTCHANGE=287650
diff --git a/chromium/build/util/LASTCHANGE.blink b/chromium/build/util/LASTCHANGE.blink
index 2193b4ba815..8755db11438 100644
--- a/chromium/build/util/LASTCHANGE.blink
+++ b/chromium/build/util/LASTCHANGE.blink
@@ -1 +1 @@
-LASTCHANGE=169177
+LASTCHANGE=179513
diff --git a/chromium/build/util/version.gypi b/chromium/build/util/version.gypi
new file mode 100644
index 00000000000..9d295b5c673
--- /dev/null
+++ b/chromium/build/util/version.gypi
@@ -0,0 +1,20 @@
+# 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.
+
+{
+ 'variables': {
+ 'variables': {
+ 'version_py_path': '<(DEPTH)/build/util/version.py',
+ 'version_path': '<(DEPTH)/chrome/VERSION',
+ },
+ 'version_py_path': '<(version_py_path)',
+ 'version_path': '<(version_path)',
+ 'version_full':
+ '<!(python <(version_py_path) -f <(version_path) -t "@MAJOR@.@MINOR@.@BUILD@.@PATCH@")',
+ 'version_libchrome_short':
+ '<!(python <(version_py_path) -f <(version_path) -t "@BUILD@.@PATCH@")',
+ 'version_mac_dylib':
+ '<!(python <(version_py_path) -f <(version_path) -t "@BUILD@.@PATCH_HI@.@PATCH_LO@" -e "PATCH_HI=int(PATCH)/256" -e "PATCH_LO=int(PATCH)%256")',
+ }, # variables
+}
diff --git a/chromium/build/util/version.py b/chromium/build/util/version.py
new file mode 100755
index 00000000000..4d3691ae373
--- /dev/null
+++ b/chromium/build/util/version.py
@@ -0,0 +1,166 @@
+#!/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.
+
+"""
+version.py -- Chromium version string substitution utility.
+"""
+
+import argparse
+import os
+import sys
+
+
+def fetch_values_from_file(values_dict, file_name):
+ """
+ Fetches KEYWORD=VALUE settings from the specified file.
+
+ Everything to the left of the first '=' is the keyword,
+ everything to the right is the value. No stripping of
+ white space, so beware.
+
+ The file must exist, otherwise you get the Python exception from open().
+ """
+ for line in open(file_name, 'r').readlines():
+ key, val = line.rstrip('\r\n').split('=', 1)
+ values_dict[key] = val
+
+
+def fetch_values(file_list):
+ """
+ Returns a dictionary of values to be used for substitution, populating
+ the dictionary with KEYWORD=VALUE settings from the files in 'file_list'.
+
+ Explicitly adds the following value from internal calculations:
+
+ OFFICIAL_BUILD
+ """
+ CHROME_BUILD_TYPE = os.environ.get('CHROME_BUILD_TYPE')
+ if CHROME_BUILD_TYPE == '_official':
+ official_build = '1'
+ else:
+ official_build = '0'
+
+ values = dict(
+ OFFICIAL_BUILD = official_build,
+ )
+
+ for file_name in file_list:
+ fetch_values_from_file(values, file_name)
+
+ return values
+
+
+def subst_template(contents, values):
+ """
+ Returns the template with substituted values from the specified dictionary.
+
+ Keywords to be substituted are surrounded by '@': @KEYWORD@.
+
+ No attempt is made to avoid recursive substitution. The order
+ of evaluation is random based on the order of the keywords returned
+ by the Python dictionary. So do NOT substitute a value that
+ contains any @KEYWORD@ strings expecting them to be recursively
+ substituted, okay?
+ """
+ for key, val in values.iteritems():
+ try:
+ contents = contents.replace('@' + key + '@', val)
+ except TypeError:
+ print repr(key), repr(val)
+ return contents
+
+
+def subst_file(file_name, values):
+ """
+ Returns the contents of the specified file_name with substituted
+ values from the specified dictionary.
+
+ This is like subst_template, except it operates on a file.
+ """
+ template = open(file_name, 'r').read()
+ return subst_template(template, values);
+
+
+def write_if_changed(file_name, contents):
+ """
+ Writes the specified contents to the specified file_name
+ iff the contents are different than the current contents.
+ """
+ try:
+ old_contents = open(file_name, 'r').read()
+ except EnvironmentError:
+ pass
+ else:
+ if contents == old_contents:
+ return
+ os.unlink(file_name)
+ open(file_name, 'w').write(contents)
+
+
+def main():
+ parser = argparse.ArgumentParser()
+ parser.add_argument('-f', '--file', action='append', default=[],
+ help='Read variables from FILE.')
+ parser.add_argument('-i', '--input', default=None,
+ help='Read strings to substitute from FILE.')
+ parser.add_argument('-o', '--output', default=None,
+ help='Write substituted strings to FILE.')
+ parser.add_argument('-t', '--template', default=None,
+ help='Use TEMPLATE as the strings to substitute.')
+ parser.add_argument('-e', '--eval', action='append', default=[],
+ help='Evaluate VAL after reading variables. Can be used '
+ 'to synthesize variables. e.g. -e \'PATCH_HI=int('
+ 'PATCH)/256.')
+ parser.add_argument('args', nargs=argparse.REMAINDER,
+ help='For compatibility: INPUT and OUTPUT can be '
+ 'passed as positional arguments.')
+ options = parser.parse_args()
+
+ evals = {}
+ for expression in options.eval:
+ try:
+ evals.update(dict([expression.split('=', 1)]))
+ except ValueError:
+ parser.error('-e requires VAR=VAL')
+
+ # Compatibility with old versions that considered the first two positional
+ # arguments shorthands for --input and --output.
+ while len(options.args) and (options.input is None or \
+ options.output is None):
+ if options.input is None:
+ options.input = options.args.pop(0)
+ elif options.output is None:
+ options.output = options.args.pop(0)
+ if options.args:
+ parser.error('Unexpected arguments: %r' % options.args)
+
+ values = fetch_values(options.file)
+ for key, val in evals.iteritems():
+ values[key] = str(eval(val, globals(), values))
+
+ if options.template is not None:
+ contents = subst_template(options.template, values)
+ elif options.input:
+ contents = subst_file(options.input, values)
+ else:
+ # Generate a default set of version information.
+ contents = """MAJOR=%(MAJOR)s
+MINOR=%(MINOR)s
+BUILD=%(BUILD)s
+PATCH=%(PATCH)s
+LASTCHANGE=%(LASTCHANGE)s
+OFFICIAL_BUILD=%(OFFICIAL_BUILD)s
+""" % values
+
+ if options.output is not None:
+ write_if_changed(options.output, contents)
+ else:
+ print contents
+
+ return 0
+
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/chromium/build/vs_toolchain.py b/chromium/build/vs_toolchain.py
new file mode 100644
index 00000000000..558ad3abeab
--- /dev/null
+++ b/chromium/build/vs_toolchain.py
@@ -0,0 +1,173 @@
+# 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 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(1, os.path.join(chrome_src, 'tools'))
+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
+
+
+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.
+ """
+ vs2013_runtime_dll_dirs = None
+ depot_tools_win_toolchain = \
+ bool(int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', '1')))
+ if sys.platform in ('win32', 'cygwin') and depot_tools_win_toolchain:
+ with open(json_data_file, 'r') as tempf:
+ toolchain_data = json.load(tempf)
+
+ toolchain = toolchain_data['path']
+ version = toolchain_data['version']
+ version_is_pro = version[-1] != 'e'
+ win8sdk = 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
+ vs2013_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'] = win8sdk
+ os.environ['GYP_DEFINES'] = ' '.join('%s=%s' % (k, pipes.quote(str(v)))
+ for k, v in gyp_defines_dict.iteritems())
+ os.environ['WINDOWSSDKDIR'] = win8sdk
+ os.environ['WDK_DIR'] = wdk
+ # Include the VS runtime in the PATH in case it's not machine-installed.
+ runtime_path = ';'.join(vs2013_runtime_dll_dirs)
+ os.environ['PATH'] = runtime_path + ';' + os.environ['PATH']
+ return vs2013_runtime_dll_dirs
+
+
+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.
+ """
+ assert sys.platform.startswith(('win32', 'cygwin'))
+
+ def copy_runtime(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 which in ('p', 'r'):
+ dll = dll_pattern % which
+ target = os.path.join(target_dir, dll)
+ source = os.path.join(source_dir, dll)
+ # If gyp generated to that output dir, and the runtime isn't already
+ # there, then copy it over.
+ if (os.path.isdir(target_dir) and
+ (not os.path.isfile(target) or
+ os.stat(target).st_mtime != os.stat(source).st_mtime)):
+ print 'Copying %s to %s...' % (source, target)
+ if os.path.exists(target):
+ os.unlink(target)
+ shutil.copy2(source, target)
+
+ 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)
+ copy_runtime(out_debug, x86, 'msvc%s120d.dll')
+ copy_runtime(out_release, x86, 'msvc%s120.dll')
+ copy_runtime(out_debug_x64, x64, 'msvc%s120d.dll')
+ copy_runtime(out_release_x64, x64, 'msvc%s120.dll')
+ copy_runtime(out_debug_nacl64, x64, 'msvc%s120d.dll')
+ copy_runtime(out_release_nacl64, x64, 'msvc%s120.dll')
+
+
+def _GetDesiredVsToolchainHashes():
+ """Load a list of SHA1s corresponding to the toolchains that we want installed
+ to build with."""
+ sha1path = os.path.join(script_dir, 'toolchain_vs2013.hash')
+ with open(sha1path, 'rb') as f:
+ return f.read().strip().splitlines()
+
+
+def Update():
+ """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()|.
+ """
+ depot_tools_win_toolchain = \
+ bool(int(os.environ.get('DEPOT_TOOLS_WIN_TOOLCHAIN', '1')))
+ if sys.platform in ('win32', 'cygwin') and depot_tools_win_toolchain:
+ import find_depot_tools
+ depot_tools_path = find_depot_tools.add_depot_tools_to_path()
+ json_data_file = os.path.join(script_dir, 'win_toolchain.json')
+ get_toolchain_args = [
+ sys.executable,
+ os.path.join(depot_tools_path,
+ 'win_toolchain',
+ 'get_toolchain_if_necessary.py'),
+ '--output-json', json_data_file,
+ ] + _GetDesiredVsToolchainHashes()
+ subprocess.check_call(get_toolchain_args)
+
+ return 0
+
+
+def GetToolchainDir():
+ """Gets location information about the current toolchain (must have been
+ previously updated by 'update'). This is used for the GN build."""
+ SetEnvironmentAndGetRuntimeDllDirs()
+ print '''vs_path = "%s"
+sdk_path = "%s"
+vs_version = "%s"
+wdk_dir = "%s"
+''' % (
+ os.environ['GYP_MSVS_OVERRIDE_PATH'],
+ os.environ['WINDOWSSDKDIR'],
+ os.environ['GYP_MSVS_VERSION'],
+ os.environ['WDK_DIR'])
+
+
+def main():
+ if not sys.platform.startswith(('win32', 'cygwin')):
+ return 0
+ commands = {
+ 'update': Update,
+ 'get_toolchain_dir': GetToolchainDir,
+ # TODO(scottmg): Add copy_dlls for GN builds (gyp_chromium calls
+ # CopyVsRuntimeDlls via import, currently).
+ }
+ 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]]()
+
+
+if __name__ == '__main__':
+ sys.exit(main())
diff --git a/chromium/build/whitespace_file.txt b/chromium/build/whitespace_file.txt
index d217aebcd23..a572ea5c186 100644
--- a/chromium/build/whitespace_file.txt
+++ b/chromium/build/whitespace_file.txt
@@ -1,4 +1,4 @@
-Copyright (c) 2013 The Chromium Authors. All rights reserved.
+Copyright 20014 The Chromium Authors. All rights reserved.
Use of this useless file is governed by a BSD-style license that can be
found in the LICENSE file.
@@ -8,9 +8,9 @@ any modification below this line.
=====================================================================
-Let's make a story. Add one sentence for every commit:
+Let's make a story. Add one sentence for every commit:
-CHAPTER 1:
+CHÄPTER 1:
It was a dark and blinky night; the rain fell in torrents -- except at
occasional intervals, when it was checked by a violent gust of wind which
swept up the streets (for it is in London that our scene lies), rattling along
@@ -54,11 +54,11 @@ adorning breakfast cereal with halibut -- shameful.
CHAPTER 4:
The taste of stale sushi in his mouth the next morning was unbearable. He
wondered where the sushi came from as he attempted to wash the taste away with
-a bottle of 3000¥ sake. He tries to recall the cook's face. Purple?
+a bottle of 3000¥ sake. He tries to recall the cook's face. Purple? Probably.
CHAPTER 5:
Many tears later, Mr. Usagi would laugh at the memory of the earnest,
-well-intentioned Domo-Kun. Another day in the life. That is whe he realized that
+well-intentioned Domo-Kun. Another day in the life. That is when he realized that
life goes on.
TRUISMS (1978-1983)
@@ -76,5 +76,52 @@ BEING SURE OF YOURSELF MEANS YOU'RE A FOOL
AM NOT
ARE TOO
IF AT FIRST YOU DON'T SUCCEED: TRY, EXCEPT, FINALLY
-AND THEN, TIME LEAPT BACKWARDS
-A LOT
+AND THEN, TIME LEAPT BACKWARDS
+AAAAAAAAAAAAAAAAAAAAAAAAAAAAAaaaaaaaaaaaaaaaaaaaaaaaaaaaahhhh LOT
+I'm really tempted to change something above the line.
+Reeccciiiipppppeeeeeesssssss!!!!!!!!!
+PEOPLE SAY "FAILURE IS NOT AN OPTION", BUT FAILURE IS ALWAYS AN OPTION.
+WHAT GOES UP MUST HAVE A NON-ZERO VELOCITY
+
+I can feel the heat closing in, feel them out there making their moves...
+What could possibly go wrong? We've already ate our cake.
+
+Stand Still. Pause Clocks. We can make the World Stop.
+
+I want a 1917 build and you will give me what I want.
+
+This sentence is false.
+
+Beauty is in the eyes of a Beholder.
+
+
+The first time Yossarian saw the chaplain, he fell madly in love with him.
+*
+*
+*
+Give not thyself up, then, to fire, lest it invert thee, deaden thee; as for
+the time it did me. There is a wisdom that is woe; but there is a woe that is
+madness. And there is a Catskill eagle in some souls that can alike dive down
+into the blackest gorges, and soar out of them again and become invisible in
+the sunny spaces. And even if he for ever flies within the gorge, that gorge
+is in the mountains; so that even in his lowest swoop the mountain eagle is
+still higher than other birds upon the plain, even though they soar.
+*
+*
+*
+
+I'm here to commit lines and drop rhymes
+*
+This is a line to test and try uploading a cl.
+
+And lo, in the year 2014, there was verily an attempt to upgrade to GCC 4.8 on
+the Android bots, and it was good. Except on one bot, where it was bad. And
+lo, the change was reverted, and GCC went back to 4.6, where code is slower
+and less optimized. And verily did it break the build, because artifacts had
+been created with 4.8, and alignment was no longer the same, and a great
+sadness descended upon the Android GN buildbot, and it did refuseth to build
+any more. But the sheriffs thought to themselves: Placebo! Let us clobber the
+bot, and perhaps it will rebuild with GCC 4.6, which hath worked for many many
+seasons. And so they modified the whitespace file with these immortal lines,
+and visited it upon the bots, that great destruction might be wrought upon
+their outdated binaries. In clobberus, veritas.
diff --git a/chromium/build/win/importlibs/create_import_lib.gypi b/chromium/build/win/importlibs/create_import_lib.gypi
index c809eab84f4..9cb0d345480 100644
--- a/chromium/build/win/importlibs/create_import_lib.gypi
+++ b/chromium/build/win/importlibs/create_import_lib.gypi
@@ -46,7 +46,6 @@
'--output-file', '<@(_outputs)',
'<(RULE_INPUT_PATH)',
],
- 'msvs_cygwin_shell': 0,
'message': 'Generating import library from <(RULE_INPUT_PATH)',
'process_outputs_as_sources': 0,
},
diff --git a/chromium/build/win/reorder-imports.py b/chromium/build/win/reorder-imports.py
new file mode 100755
index 00000000000..281668fff5b
--- /dev/null
+++ b/chromium/build/win/reorder-imports.py
@@ -0,0 +1,57 @@
+#!/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 optparse
+import os
+import shutil
+import subprocess
+import sys
+
+def reorder_imports(input_dir, output_dir, architecture):
+ """Run swapimports.exe on the initial chrome.exe, and write to the output
+ directory. Also copy over any related files that might be needed
+ (pdbs, manifests etc.).
+ """
+
+ input_image = os.path.join(input_dir, 'chrome.exe')
+ output_image = os.path.join(output_dir, 'chrome.exe')
+
+ swap_exe = os.path.join(
+ __file__,
+ '..\\..\\..\\third_party\\syzygy\\binaries\\exe\\swapimport.exe')
+
+ args = [swap_exe, '--input-image=%s' % input_image,
+ '--output-image=%s' % output_image, '--overwrite', '--no-logo']
+
+ if architecture == 'x64':
+ args.append('--x64');
+
+ args.append('chrome_elf.dll');
+
+ subprocess.call(args)
+
+ for fname in glob.iglob(os.path.join(input_dir, 'chrome.exe.*')):
+ shutil.copy(fname, os.path.join(output_dir, os.path.basename(fname)))
+ return 0
+
+
+def main(argv):
+ usage = 'reorder_imports.py -i <input_dir> -o <output_dir> -a <target_arch>'
+ parser = optparse.OptionParser(usage=usage)
+ parser.add_option('-i', '--input', help='reorder chrome.exe in DIR',
+ metavar='DIR')
+ parser.add_option('-o', '--output', help='write new chrome.exe to DIR',
+ metavar='DIR')
+ parser.add_option('-a', '--arch', help='architecture of build (optional)',
+ default='ia32')
+ opts, args = parser.parse_args()
+
+ if not opts.input or not opts.output:
+ parser.error('Please provide and input and output directory')
+ return reorder_imports(opts.input, opts.output, opts.arch)
+
+if __name__ == "__main__":
+ sys.exit(main(sys.argv[1:]))
diff --git a/chromium/build/win/setup_cygwin_mount.py b/chromium/build/win/setup_cygwin_mount.py
deleted file mode 100644
index d68a3af41de..00000000000
--- a/chromium/build/win/setup_cygwin_mount.py
+++ /dev/null
@@ -1,20 +0,0 @@
-# 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.
-
-import os
-import sys
-
-def main():
- if len(sys.argv) != 2 or sys.argv[1] != '--win-only':
- return 1
- if sys.platform in ('win32', 'cygwin'):
- self_dir = os.path.dirname(sys.argv[0])
- mount_path = os.path.join(self_dir, "../../third_party/cygwin")
- batch_path = os.path.join(mount_path, "setup_mount.bat")
- return os.system(os.path.normpath(batch_path) + ">nul")
- return 0
-
-
-if __name__ == "__main__":
- sys.exit(main())