OLD | NEW |
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # IMPORTANT: | 5 # IMPORTANT: |
6 # Please don't directly include this file if you are building via gyp_chromium, | 6 # Please don't directly include this file if you are building via gyp_chromium, |
7 # since gyp_chromium is automatically forcing its inclusion. | 7 # since gyp_chromium is automatically forcing its inclusion. |
8 { | 8 { |
9 # Variables expected to be overriden on the GYP command line (-D) or by | 9 # Variables expected to be overriden on the GYP command line (-D) or by |
10 # ~/.gyp/include.gypi. | 10 # ~/.gyp/include.gypi. |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 'branding%': '<(branding)', | 148 'branding%': '<(branding)', |
149 'host_arch%': '<(host_arch)', | 149 'host_arch%': '<(host_arch)', |
150 'target_arch%': '<(target_arch)', | 150 'target_arch%': '<(target_arch)', |
151 | 151 |
152 'target_subarch%': '', | 152 'target_subarch%': '', |
153 | 153 |
154 # The channel to build on Android: stable, beta, dev, canary, or | 154 # The channel to build on Android: stable, beta, dev, canary, or |
155 # default. "default" should be used on non-official builds. | 155 # default. "default" should be used on non-official builds. |
156 'android_channel%': 'default', | 156 'android_channel%': 'default', |
157 | 157 |
158 # This is set when building the Android WebView inside the Android | 158 # WebView now builds in a normal android build; don't use this. |
159 # build system, using the 'android' gyp backend. The WebView code is | 159 # TODO(torne): remove this. http://crbug.com/440793 |
160 # still built when this is unset, but builds using the normal chromium | |
161 # build system. | |
162 'android_webview_build%': 0, | 160 'android_webview_build%': 0, |
163 | 161 |
164 # Set ARM architecture version. | 162 # Set ARM architecture version. |
165 'arm_version%': 7, | 163 'arm_version%': 7, |
166 | 164 |
167 # Use aurax11 for clipboard implementation. This is true on linux_aura. | 165 # Use aurax11 for clipboard implementation. This is true on linux_aura. |
168 'use_clipboard_aurax11%': 0, | 166 'use_clipboard_aurax11%': 0, |
169 | 167 |
170 # goma settings. | 168 # goma settings. |
171 # 1 to use goma. | 169 # 1 to use goma. |
(...skipping 614 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
786 ['OS=="android" or branding=="Chrome" or chromecast==1', { | 784 ['OS=="android" or branding=="Chrome" or chromecast==1', { |
787 'proprietary_codecs%': 1, | 785 'proprietary_codecs%': 1, |
788 }, { | 786 }, { |
789 'proprietary_codecs%': 0, | 787 'proprietary_codecs%': 0, |
790 }], | 788 }], |
791 | 789 |
792 ['OS=="mac" or OS=="ios"', { | 790 ['OS=="mac" or OS=="ios"', { |
793 'native_memory_pressure_signals%': 1, | 791 'native_memory_pressure_signals%': 1, |
794 }], | 792 }], |
795 | 793 |
796 # Enable autofill dialog for Android, Mac and Views-enabled platforms. | 794 # Enable autofill dialog when not on iOS. |
797 ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS
=="mac"', { | 795 ['OS!="ios"', { |
798 'enable_autofill_dialog%': 1, | 796 'enable_autofill_dialog%': 1, |
799 | 797 |
800 'conditions': [ | 798 'conditions': [ |
801 ['buildtype=="Official"', { | 799 ['buildtype=="Official"', { |
802 'enable_prod_wallet_service%': 1, | 800 'enable_prod_wallet_service%': 1, |
803 }], | 801 }], |
804 ] | 802 ] |
805 }], | 803 }], |
806 | 804 |
807 ['OS=="android"', { | 805 ['OS=="android"', { |
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1016 | 1014 |
1017 # Turn on JNI generation optimizations on non-WebView builds. | 1015 # Turn on JNI generation optimizations on non-WebView builds. |
1018 ['OS=="android" and android_webview_build==0', { | 1016 ['OS=="android" and android_webview_build==0', { |
1019 'optimize_jni_generation%': 1, | 1017 'optimize_jni_generation%': 1, |
1020 }, { | 1018 }, { |
1021 'optimize_jni_generation%': 0, | 1019 'optimize_jni_generation%': 0, |
1022 }], | 1020 }], |
1023 | 1021 |
1024 # TODO(rmcilroy): Enable v8_use_external_startup_data on ChromeOS | 1022 # TODO(rmcilroy): Enable v8_use_external_startup_data on ChromeOS |
1025 # http://crbug.com/421063 | 1023 # http://crbug.com/421063 |
1026 ['android_webview_build==0 and chromecast==0 and chromeos==0 and OS!="io
s"', { | 1024 ['chromecast==0 and chromeos==0 and OS!="ios"', { |
1027 'v8_use_external_startup_data%': 1, | 1025 'v8_use_external_startup_data%': 1, |
1028 }, { | 1026 }, { |
1029 'v8_use_external_startup_data%': 0, | 1027 'v8_use_external_startup_data%': 0, |
1030 }], | 1028 }], |
1031 ], | 1029 ], |
1032 | 1030 |
1033 # Set this to 1 to enable use of concatenated impulse responses | 1031 # Set this to 1 to enable use of concatenated impulse responses |
1034 # for the HRTF panner in WebAudio. | 1032 # for the HRTF panner in WebAudio. |
1035 'use_concatenated_impulse_responses': 1, | 1033 'use_concatenated_impulse_responses': 1, |
1036 | 1034 |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1567 }, { | 1565 }, { |
1568 'binutils_version%': 0, | 1566 'binutils_version%': 0, |
1569 }], | 1567 }], |
1570 # The version of GCC in use, set later in platforms that use GCC and have | 1568 # The version of GCC in use, set later in platforms that use GCC and have |
1571 # not explicitly chosen to build with clang. Currently, this means all | 1569 # not explicitly chosen to build with clang. Currently, this means all |
1572 # platforms except Windows, Mac and iOS. | 1570 # platforms except Windows, Mac and iOS. |
1573 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that | 1571 # TODO(glider): set clang to 1 earlier for ASan and TSan builds so that |
1574 # it takes effect here. | 1572 # it takes effect here. |
1575 ['os_posix==1 and OS!="mac" and OS!="ios" and clang==0 and asan==0 and lsa
n==0 and tsan==0 and msan==0 and ubsan_vptr==0', { | 1573 ['os_posix==1 and OS!="mac" and OS!="ios" and clang==0 and asan==0 and lsa
n==0 and tsan==0 and msan==0 and ubsan_vptr==0', { |
1576 'conditions': [ | 1574 'conditions': [ |
1577 ['OS=="android" and android_webview_build==0', { | 1575 ['OS=="android"', { |
1578 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler
)', | 1576 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler
)', |
1579 # We directly set the gcc version since we know what we use. | 1577 # We directly set the gcc version since we know what we use. |
1580 'gcc_version%': 49, | 1578 'gcc_version%': 49, |
1581 }], | 1579 }, { |
1582 ['OS=="android" and android_webview_build==1', { | |
1583 # Android WebView uses a hermetic clang toolchain for host builds. | |
1584 'host_gcc_version%': 0, | |
1585 # Android WebView uses the GCC toolchain from the Android build. | |
1586 'gcc_version%': 48, | |
1587 }], | |
1588 ['OS!="android"', { | |
1589 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler
)', | 1580 'host_gcc_version%': '<!pymod_do_main(compiler_version host compiler
)', |
1590 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)', | 1581 'gcc_version%': '<!pymod_do_main(compiler_version target compiler)', |
1591 }], | 1582 }], |
1592 ], | 1583 ], |
1593 }, { | 1584 }, { |
1594 'host_gcc_version%': 0, | 1585 'host_gcc_version%': 0, |
1595 'gcc_version%': 0, | 1586 'gcc_version%': 0, |
1596 }], | 1587 }], |
1597 ['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"=
="True"', { | 1588 ['OS=="win" and "<!pymod_do_main(dir_exists <(windows_sdk_default_path))"=
="True"', { |
1598 'windows_sdk_path%': '<(windows_sdk_default_path)', | 1589 'windows_sdk_path%': '<(windows_sdk_default_path)', |
(...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2078 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia', | 2069 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia', |
2079 'ka', 'ku', 'kw', 'ms', 'ug' | 2070 'ka', 'ku', 'kw', 'ms', 'ug' |
2080 ], | 2071 ], |
2081 }], | 2072 }], |
2082 ['OS=="android"', { | 2073 ['OS=="android"', { |
2083 'grit_defines': [ | 2074 'grit_defines': [ |
2084 '-t', 'android', | 2075 '-t', 'android', |
2085 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true', | 2076 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true', |
2086 '--no-output-all-resource-defines', | 2077 '--no-output-all-resource-defines', |
2087 ], | 2078 ], |
2088 'conditions': [ | |
2089 ['<(android_webview_build)==1', { | |
2090 'grit_defines': ['-D', 'is_android_webview_build'], | |
2091 }], | |
2092 ], | |
2093 }], | 2079 }], |
2094 ['OS=="mac" or OS=="ios"', { | 2080 ['OS=="mac" or OS=="ios"', { |
2095 'grit_defines': ['-D', 'scale_factors=2x'], | 2081 'grit_defines': ['-D', 'scale_factors=2x'], |
2096 }], | 2082 }], |
2097 ['OS == "ios"', { | 2083 ['OS == "ios"', { |
2098 'variables': { | 2084 'variables': { |
2099 'enable_coverage%': 0, | 2085 'enable_coverage%': 0, |
2100 }, | 2086 }, |
2101 'grit_defines': [ | 2087 'grit_defines': [ |
2102 '-t', 'ios', | 2088 '-t', 'ios', |
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2303 # Keep the code under #ifndef NVALGRIND. | 2289 # Keep the code under #ifndef NVALGRIND. |
2304 'release_valgrind_build': 1, | 2290 'release_valgrind_build': 1, |
2305 }], | 2291 }], |
2306 | 2292 |
2307 # Enable RLZ on Win, Mac, iOS and ChromeOS. | 2293 # Enable RLZ on Win, Mac, iOS and ChromeOS. |
2308 ['branding=="Chrome" and (OS=="win" or OS=="mac" or OS=="ios" or chromeos=
=1)', { | 2294 ['branding=="Chrome" and (OS=="win" or OS=="mac" or OS=="ios" or chromeos=
=1)', { |
2309 'enable_rlz%': 1, | 2295 'enable_rlz%': 1, |
2310 }], | 2296 }], |
2311 | 2297 |
2312 # Set default compiler flags depending on ARM version. | 2298 # Set default compiler flags depending on ARM version. |
2313 ['arm_version==6 and android_webview_build==0', { | 2299 ['arm_version==6', { |
2314 'arm_arch%': 'armv6', | 2300 'arm_arch%': 'armv6', |
2315 'arm_tune%': '', | 2301 'arm_tune%': '', |
2316 'arm_fpu%': 'vfp', | 2302 'arm_fpu%': 'vfp', |
2317 'arm_float_abi%': 'softfp', | 2303 'arm_float_abi%': 'softfp', |
2318 'arm_thumb%': 0, | 2304 'arm_thumb%': 0, |
2319 }], | 2305 }], |
2320 ['arm_version==7 and android_webview_build==0', { | 2306 ['arm_version==7', { |
2321 'arm_arch%': 'armv7-a', | 2307 'arm_arch%': 'armv7-a', |
2322 'arm_tune%': 'generic-armv7-a', | 2308 'arm_tune%': 'generic-armv7-a', |
2323 'conditions': [ | 2309 'conditions': [ |
2324 ['arm_neon==1', { | 2310 ['arm_neon==1', { |
2325 'arm_fpu%': 'neon', | 2311 'arm_fpu%': 'neon', |
2326 }, { | 2312 }, { |
2327 'arm_fpu%': 'vfpv3-d16', | 2313 'arm_fpu%': 'vfpv3-d16', |
2328 }], | 2314 }], |
2329 ], | 2315 ], |
2330 # Change the default to hard once the armhf transition is complete. | 2316 # Change the default to hard once the armhf transition is complete. |
2331 'arm_float_abi%': 'softfp', | 2317 'arm_float_abi%': 'softfp', |
2332 'arm_thumb%': 1, | 2318 'arm_thumb%': 1, |
2333 }], | 2319 }], |
2334 | 2320 |
2335 # Set default compiler flags for MIPS floating-point support. | 2321 # Set default compiler flags for MIPS floating-point support. |
2336 ['target_arch=="mipsel" and android_webview_build==0', { | 2322 ['target_arch=="mipsel"', { |
2337 'mips_float_abi%': 'hard', | 2323 'mips_float_abi%': 'hard', |
2338 }], | 2324 }], |
2339 ['target_arch=="mipsel" and mips_arch_variant=="r2" and android_webview_bu
ild==0', { | 2325 ['target_arch=="mipsel" and mips_arch_variant=="r2"', { |
2340 'mips_fpu_mode%': 'fp32', | 2326 'mips_fpu_mode%': 'fp32', |
2341 }], | 2327 }], |
2342 | 2328 |
2343 ['android_webview_build==1', { | |
2344 # The WebView build gets its cpu-specific flags from the Android build s
ystem. | |
2345 'arm_arch%': '', | |
2346 'arm_tune%': '', | |
2347 'arm_fpu%': '', | |
2348 'arm_float_abi%': '', | |
2349 'arm_thumb%': 0, | |
2350 'mips_float_abi%': '', | |
2351 'mips_fpu_mode%': '', | |
2352 }], | |
2353 | |
2354 # Enable brlapi by default for chromeos. | 2329 # Enable brlapi by default for chromeos. |
2355 [ 'chromeos==1', { | 2330 [ 'chromeos==1', { |
2356 'use_brlapi%': 1, | 2331 'use_brlapi%': 1, |
2357 }], | 2332 }], |
2358 | 2333 |
2359 ['use_ozone==1 and ozone_auto_platforms==1', { | 2334 ['use_ozone==1 and ozone_auto_platforms==1', { |
2360 # Use test as the default platform. | 2335 # Use test as the default platform. |
2361 'ozone_platform%': 'test', | 2336 'ozone_platform%': 'test', |
2362 | 2337 |
2363 # Build all platforms whose deps are in install-build-deps.sh. | 2338 # Build all platforms whose deps are in install-build-deps.sh. |
(...skipping 1708 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4072 ], | 4047 ], |
4073 }], | 4048 }], |
4074 ['target_arch=="arm64"', { | 4049 ['target_arch=="arm64"', { |
4075 'target_conditions': [ | 4050 'target_conditions': [ |
4076 ['_toolset=="target"', { | 4051 ['_toolset=="target"', { |
4077 'conditions': [ | 4052 'conditions': [ |
4078 ['OS=="android"', { | 4053 ['OS=="android"', { |
4079 'cflags!': [ | 4054 'cflags!': [ |
4080 '-fstack-protector', # stack protector is always enabled
on arm64. | 4055 '-fstack-protector', # stack protector is always enabled
on arm64. |
4081 ], | 4056 ], |
4082 }], | |
4083 # TODO: Remove webview test once webview fully compiles from | |
4084 # Chromium. crbug.com/440793 | |
4085 ['OS=="android" and android_webview_build==0', { | |
4086 'ldflags': [ | 4057 'ldflags': [ |
4087 '-fuse-ld=gold', | 4058 '-fuse-ld=gold', |
4088 ], | 4059 ], |
4089 }], | 4060 }], |
4090 ], | 4061 ], |
4091 }], | 4062 }], |
4092 ], | 4063 ], |
4093 }], | 4064 }], |
4094 ['target_arch=="mipsel"', { | 4065 ['target_arch=="mipsel"', { |
4095 'target_conditions': [ | 4066 'target_conditions': [ |
4096 ['_toolset=="target"', { | 4067 ['_toolset=="target"', { |
4097 'conditions': [ | 4068 'conditions': [ |
4098 ['android_webview_build==0', { | 4069 ['mips_arch_variant=="r6"', { |
4099 'conditions': [ | 4070 'conditions': [ |
4100 ['mips_arch_variant=="r6"', { | 4071 ['clang==1', { |
| 4072 'cflags': [ '-target mipsel-linux-gnu', '-march=mips32r6
', ], |
| 4073 'ldflags': [ '-target mipsel-linux-gnu', ], |
| 4074 }, { # clang==0 |
| 4075 'cflags': ['-mips32r6', '-Wa,-mips32r6', ], |
| 4076 }], |
| 4077 ['clang==0 and OS=="android"', { |
| 4078 'ldflags': ['-mips32r6', '-Wl,-melf32ltsmip',], |
| 4079 }], |
| 4080 ], |
| 4081 }], |
| 4082 ['mips_arch_variant=="r2"', { |
| 4083 'conditions': [ |
| 4084 ['mips_float_abi=="hard" and mips_fpu_mode!=""', { |
| 4085 'cflags': ['-m<(mips_fpu_mode)'], |
| 4086 }], |
| 4087 ['clang==1', { |
| 4088 'conditions': [ |
| 4089 ['OS=="android"', { |
| 4090 'cflags': [ '-target mipsel-linux-android', '-march=
mipsel', '-mcpu=mips32r2'], |
| 4091 'ldflags': [ '-target mipsel-linux-android', ], |
| 4092 }], |
| 4093 ], |
| 4094 }, { # clang==0 |
| 4095 'cflags': ['-mips32r2', '-Wa,-mips32r2', ], |
| 4096 }], |
| 4097 ], |
| 4098 }], |
| 4099 ['mips_arch_variant=="r1"', { |
| 4100 'conditions': [ |
| 4101 ['clang==1', { |
4101 'conditions': [ | 4102 'conditions': [ |
4102 ['clang==1', { | 4103 ['OS=="android"', { |
4103 'cflags': [ '-target mipsel-linux-gnu', '-march=mips
32r6', ], | 4104 'cflags': [ '-target mipsel-linux-android', '-march=
mipsel', '-mcpu=mips32'], |
4104 'ldflags': [ '-target mipsel-linux-gnu', ], | 4105 'ldflags': [ '-target mipsel-linux-android', ], |
4105 }, { # clang==0 | |
4106 'cflags': ['-mips32r6', '-Wa,-mips32r6', ], | |
4107 }], | |
4108 ['clang==0 and OS=="android"', { | |
4109 'ldflags': ['-mips32r6', '-Wl,-melf32ltsmip',], | |
4110 }], | 4106 }], |
4111 ], | 4107 ], |
4112 }], | 4108 }, { # clang==0 |
4113 ['mips_arch_variant=="r2"', { | 4109 'cflags': ['-mips32', '-Wa,-mips32', ], |
4114 'conditions': [ | |
4115 ['mips_float_abi=="hard" and mips_fpu_mode!=""', { | |
4116 'cflags': ['-m<(mips_fpu_mode)'], | |
4117 }], | |
4118 ['clang==1', { | |
4119 'conditions': [ | |
4120 ['OS=="android"', { | |
4121 'cflags': [ '-target mipsel-linux-android', '-ma
rch=mipsel', '-mcpu=mips32r2'], | |
4122 'ldflags': [ '-target mipsel-linux-android', ], | |
4123 }], | |
4124 ], | |
4125 }, { # clang==0 | |
4126 'cflags': ['-mips32r2', '-Wa,-mips32r2', ], | |
4127 }], | |
4128 ], | |
4129 }], | |
4130 ['mips_arch_variant=="r1"', { | |
4131 'conditions': [ | |
4132 ['clang==1', { | |
4133 'conditions': [ | |
4134 ['OS=="android"', { | |
4135 'cflags': [ '-target mipsel-linux-android', '-ma
rch=mipsel', '-mcpu=mips32'], | |
4136 'ldflags': [ '-target mipsel-linux-android', ], | |
4137 }], | |
4138 ], | |
4139 }, { # clang==0 | |
4140 'cflags': ['-mips32', '-Wa,-mips32', ], | |
4141 }], | |
4142 ], | |
4143 }], | |
4144 ['clang==1', { | |
4145 'cflags!': [ | |
4146 # Clang does not support the following options. | |
4147 '-finline-limit=64', | |
4148 ], | |
4149 'cflags': [ | |
4150 # TODO(gordanac) Enable integrated-as. | |
4151 '-no-integrated-as', | |
4152 '-B<(android_toolchain)', # Else /usr/bin/as gets pic
ked up. | |
4153 ], | |
4154 'ldflags': [ | |
4155 # Let clang find the ld in the NDK. | |
4156 '--gcc-toolchain=<(android_toolchain)/..', | |
4157 ], | |
4158 }], | |
4159 ['mips_dsp_rev==1', { | |
4160 'cflags': ['-mdsp'], | |
4161 }], | |
4162 ['mips_dsp_rev==2', { | |
4163 'cflags': ['-mdspr2'], | |
4164 }], | 4110 }], |
4165 ], | 4111 ], |
| 4112 }], |
| 4113 ['clang==1', { |
| 4114 'cflags!': [ |
| 4115 # Clang does not support the following options. |
| 4116 '-finline-limit=64', |
| 4117 ], |
4166 'cflags': [ | 4118 'cflags': [ |
4167 '-m<(mips_float_abi)-float' | 4119 # TODO(gordanac) Enable integrated-as. |
| 4120 '-no-integrated-as', |
| 4121 '-B<(android_toolchain)', # Else /usr/bin/as gets picked
up. |
| 4122 ], |
| 4123 'ldflags': [ |
| 4124 # Let clang find the ld in the NDK. |
| 4125 '--gcc-toolchain=<(android_toolchain)/..', |
4168 ], | 4126 ], |
4169 }], | 4127 }], |
| 4128 ['mips_dsp_rev==1', { |
| 4129 'cflags': ['-mdsp'], |
| 4130 }], |
| 4131 ['mips_dsp_rev==2', { |
| 4132 'cflags': ['-mdspr2'], |
| 4133 }], |
| 4134 ], |
| 4135 'cflags': [ |
| 4136 '-m<(mips_float_abi)-float' |
4170 ], | 4137 ], |
4171 'ldflags': [ | 4138 'ldflags': [ |
4172 '-Wl,--no-keep-memory' | 4139 '-Wl,--no-keep-memory' |
4173 ], | 4140 ], |
4174 'cflags_cc': [ | 4141 'cflags_cc': [ |
4175 '-Wno-uninitialized', | 4142 '-Wno-uninitialized', |
4176 ], | 4143 ], |
4177 }], | 4144 }], |
4178 ], | 4145 ], |
4179 }], | 4146 }], |
4180 ['target_arch=="mips64el"', { | 4147 ['target_arch=="mips64el"', { |
4181 'target_conditions': [ | 4148 'target_conditions': [ |
4182 ['_toolset=="target"', { | 4149 ['_toolset=="target"', { |
4183 'conditions': [ | 4150 'conditions': [ |
4184 ['android_webview_build==0', { | 4151 ['mips_arch_variant=="r6"', { |
4185 'conditions': [ | 4152 'cflags': ['-mips64r6', '-Wa,-mips64r6'], |
4186 ['mips_arch_variant=="r6"', { | 4153 'ldflags': ['-mips64r6'], |
4187 'cflags': ['-mips64r6', '-Wa,-mips64r6'], | 4154 }], |
4188 'ldflags': ['-mips64r6'], | 4155 ['mips_arch_variant=="r2"', { |
4189 }], | 4156 'cflags': ['-mips64r2', '-Wa,-mips64r2'], |
4190 ['mips_arch_variant=="r2"', { | 4157 'ldflags': ['-mips64r2'], |
4191 'cflags': ['-mips64r2', '-Wa,-mips64r2'], | |
4192 'ldflags': ['-mips64r2'], | |
4193 }], | |
4194 ], | |
4195 }], | 4158 }], |
4196 ], | 4159 ], |
4197 'cflags_cc': [ | 4160 'cflags_cc': [ |
4198 '-Wno-uninitialized', | 4161 '-Wno-uninitialized', |
4199 ], | 4162 ], |
4200 }], | 4163 }], |
4201 ], | 4164 ], |
4202 }], | 4165 }], |
4203 ['linux_fpic==1', { | 4166 ['linux_fpic==1', { |
4204 'cflags': [ | 4167 'cflags': [ |
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4706 ], | 4669 ], |
4707 'cflags': [ | 4670 'cflags': [ |
4708 '-ffunction-sections', | 4671 '-ffunction-sections', |
4709 '-funwind-tables', | 4672 '-funwind-tables', |
4710 '-g', | 4673 '-g', |
4711 '-fstack-protector', | 4674 '-fstack-protector', |
4712 '-fno-short-enums', | 4675 '-fno-short-enums', |
4713 '-finline-limit=64', | 4676 '-finline-limit=64', |
4714 '-Wa,--noexecstack', | 4677 '-Wa,--noexecstack', |
4715 '<@(release_extra_cflags)', | 4678 '<@(release_extra_cflags)', |
| 4679 '--sysroot=<(android_ndk_sysroot)', |
| 4680 # NOTE: The stlport header include paths below are specified in |
| 4681 # cflags rather than include_dirs because they need to come |
| 4682 # after include_dirs. |
| 4683 # The include ordering here is important; change with caution. |
| 4684 '-isystem<(android_stlport_include)', |
4716 ], | 4685 ], |
4717 'defines': [ | 4686 'defines': [ |
4718 'ANDROID', | 4687 'ANDROID', |
4719 '__GNU_SOURCE=1', # Necessary for clone() | 4688 '__GNU_SOURCE=1', # Necessary for clone() |
4720 'USE_STLPORT=1', | 4689 'USE_STLPORT=1', |
4721 '_STLP_USE_PTR_SPECIALIZATIONS=1', | 4690 '_STLP_USE_PTR_SPECIALIZATIONS=1', |
4722 'CHROME_BUILD_ID="<(chrome_build_id)"', | 4691 'CHROME_BUILD_ID="<(chrome_build_id)"', |
| 4692 # The NDK has these things, but doesn't define the constants |
| 4693 # to say that it does. Define them here instead. |
| 4694 'HAVE_SYS_UIO_H', |
4723 ], | 4695 ], |
4724 'ldflags!': [ | 4696 'ldflags!': [ |
4725 '-pthread', # Not supported by Android toolchain. | 4697 '-pthread', # Not supported by Android toolchain. |
4726 ], | 4698 ], |
4727 'ldflags': [ | 4699 'ldflags': [ |
4728 '-Wl,--no-undefined', | 4700 '-Wl,--no-undefined', |
| 4701 '--sysroot=<(android_ndk_sysroot)', |
| 4702 '-nostdlib', |
| 4703 '-L<(android_stlport_libs_dir)', |
| 4704 # Don't allow visible symbols from libgcc or stlport to be |
| 4705 # re-exported. |
| 4706 '-Wl,--exclude-libs=libgcc.a', |
| 4707 '-Wl,--exclude-libs=libstlport_static.a', |
| 4708 # Don't allow visible symbols from libraries that contain |
| 4709 # assembly code with symbols that aren't hidden properly. |
| 4710 # http://crbug.com/448386 |
| 4711 '-Wl,--exclude-libs=libcommon_audio.a', |
| 4712 '-Wl,--exclude-libs=libcommon_audio_neon.a', |
| 4713 '-Wl,--exclude-libs=libcommon_audio_sse2.a', |
| 4714 '-Wl,--exclude-libs=libiSACFix.a', |
| 4715 '-Wl,--exclude-libs=libisac_neon.a', |
| 4716 '-Wl,--exclude-libs=libopus.a', |
| 4717 '-Wl,--exclude-libs=libvpx.a', |
| 4718 ], |
| 4719 'libraries': [ |
| 4720 '-l<(android_stlport_library)', |
| 4721 # Manually link the libgcc.a that the cross compiler uses. |
| 4722 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', |
| 4723 '-lc', |
| 4724 '-ldl', |
| 4725 '-lm', |
4729 ], | 4726 ], |
4730 'conditions': [ | 4727 'conditions': [ |
4731 ['component=="static_library" and android_webview_build==0', { | 4728 ['component=="static_library"', { |
4732 'target_conditions': [ | 4729 'target_conditions': [ |
4733 ['use_native_jni_exports==0', { | 4730 ['use_native_jni_exports==0', { |
4734 # Use a linker version script to strip JNI exports from | 4731 # Use a linker version script to strip JNI exports from |
4735 # binaries which have not specifically asked to use them. | 4732 # binaries which have not specifically asked to use them. |
4736 'ldflags': [ | 4733 'ldflags': [ |
4737 '-Wl,--version-script=<!(cd <(DEPTH) && pwd -P)/build/andr
oid/android_no_jni_exports.lst', | 4734 '-Wl,--version-script=<!(cd <(DEPTH) && pwd -P)/build/andr
oid/android_no_jni_exports.lst', |
4738 ], | 4735 ], |
4739 }], | 4736 }], |
4740 ], | 4737 ], |
4741 }], | 4738 }], |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4777 }], | 4774 }], |
4778 ['asan==1', { | 4775 ['asan==1', { |
4779 'cflags': [ | 4776 'cflags': [ |
4780 # Android build relies on -Wl,--gc-sections removing | 4777 # Android build relies on -Wl,--gc-sections removing |
4781 # unreachable code. ASan instrumentation for globals inhibits | 4778 # unreachable code. ASan instrumentation for globals inhibits |
4782 # this and results in a library with unresolvable relocations. | 4779 # this and results in a library with unresolvable relocations. |
4783 # TODO(eugenis): find a way to reenable this. | 4780 # TODO(eugenis): find a way to reenable this. |
4784 '-mllvm -asan-globals=0', | 4781 '-mllvm -asan-globals=0', |
4785 ], | 4782 ], |
4786 }], | 4783 }], |
4787 ['android_webview_build==0', { | |
4788 'defines': [ | |
4789 # The NDK has these things, but doesn't define the constants | |
4790 # to say that it does. Define them here instead. | |
4791 'HAVE_SYS_UIO_H', | |
4792 ], | |
4793 'cflags': [ | |
4794 '--sysroot=<(android_ndk_sysroot)', | |
4795 ], | |
4796 'ldflags': [ | |
4797 '--sysroot=<(android_ndk_sysroot)', | |
4798 '-nostdlib', | |
4799 # Don't allow visible symbols from libgcc or stlport to be | |
4800 # re-exported. | |
4801 '-Wl,--exclude-libs=libgcc.a', | |
4802 '-Wl,--exclude-libs=libstlport_static.a', | |
4803 # Don't allow visible symbols from libraries that contain | |
4804 # assembly code with symbols that aren't hidden properly. | |
4805 # http://crbug.com/448386 | |
4806 '-Wl,--exclude-libs=libcommon_audio.a', | |
4807 '-Wl,--exclude-libs=libcommon_audio_neon.a', | |
4808 '-Wl,--exclude-libs=libcommon_audio_sse2.a', | |
4809 '-Wl,--exclude-libs=libiSACFix.a', | |
4810 '-Wl,--exclude-libs=libisac_neon.a', | |
4811 '-Wl,--exclude-libs=libopus.a', | |
4812 '-Wl,--exclude-libs=libvpx.a', | |
4813 ], | |
4814 'libraries': [ | |
4815 '-l<(android_stlport_library)', | |
4816 # Manually link the libgcc.a that the cross compiler uses. | |
4817 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)', | |
4818 '-lc', | |
4819 '-ldl', | |
4820 '-lm', | |
4821 ], | |
4822 }], | |
4823 ['android_webview_build==1', { | |
4824 'cflags': [ | |
4825 # Android predefines this as 1; undefine it here so Chromium | |
4826 # can redefine it later to be 2 for chromium code and unset | |
4827 # for third party code. This works because cflags are added | |
4828 # before defines. | |
4829 '-U_FORTIFY_SOURCE', | |
4830 # Disable any additional warnings enabled by the Android build
system but which | |
4831 # chromium does not build cleanly with (when treating warning
as errors). | |
4832 # Things that are part of -Wextra: | |
4833 '-Wno-extra', # Enabled by -Wextra, but no specific flag | |
4834 '-Wno-ignored-qualifiers', | |
4835 '-Wno-type-limits', | |
4836 '-Wno-unused-but-set-variable', | |
4837 ], | |
4838 'cflags_cc': [ | |
4839 # Other things unrelated to -Wextra: | |
4840 '-Wno-non-virtual-dtor', | |
4841 '-Wno-sign-promo', | |
4842 ], | |
4843 'libraries': [ | |
4844 '-ldl', | |
4845 ], | |
4846 }], | |
4847 ['android_webview_build==1', { | |
4848 'target_conditions': [ | |
4849 ['chromium_code==0', { | |
4850 'cflags': [ | |
4851 # There is a class of warning which: | |
4852 # 1) Android always enables and also treats as errors | |
4853 # 2) Chromium ignores in third party code | |
4854 # So we re-enable those warnings when building Android. | |
4855 '-Wno-address', | |
4856 '-Wno-format-security', | |
4857 '-Wno-return-type', | |
4858 '-Wno-sequence-point', | |
4859 ], | |
4860 'cflags_cc': [ | |
4861 '-Wno-non-virtual-dtor', | |
4862 ], | |
4863 }], | |
4864 ], | |
4865 }], | |
4866 ['target_arch == "arm" and order_profiling==0', { | 4784 ['target_arch == "arm" and order_profiling==0', { |
4867 'ldflags': [ | 4785 'ldflags': [ |
4868 # Enable identical code folding to reduce size. | 4786 # Enable identical code folding to reduce size. |
4869 '-Wl,--icf=<(gold_icf_level)', | 4787 '-Wl,--icf=<(gold_icf_level)', |
4870 ], | 4788 ], |
4871 }], | 4789 }], |
4872 # NOTE: The stlport header include paths below are specified in | |
4873 # cflags rather than include_dirs because they need to come | |
4874 # after include_dirs. Think of them like system headers, but | |
4875 # don't use '-isystem' because the arm-linux-androideabi-4.4.3 | |
4876 # toolchain (circa Gingerbread) will exhibit strange errors. | |
4877 # The include ordering here is important; change with caution. | |
4878 ['android_webview_build==0', { | |
4879 'cflags': [ | |
4880 '-isystem<(android_stlport_include)', | |
4881 ], | |
4882 'ldflags': [ | |
4883 '-L<(android_stlport_libs_dir)', | |
4884 ], | |
4885 }, { # else: android_webview_build!=0 | |
4886 'aosp_build_settings': { | |
4887 # Specify that we want to statically link stlport from the | |
4888 # NDK. This will provide all the include and library paths | |
4889 # automatically at build time, and link the right library. | |
4890 'LOCAL_NDK_STL_VARIANT': 'stlport_static', | |
4891 }, | |
4892 }], | |
4893 ['target_arch=="ia32"', { | 4790 ['target_arch=="ia32"', { |
4894 # The x86 toolchain currently has problems with stack-protector. | 4791 # The x86 toolchain currently has problems with stack-protector. |
4895 'cflags!': [ | 4792 'cflags!': [ |
4896 '-fstack-protector', | 4793 '-fstack-protector', |
4897 ], | 4794 ], |
4898 'cflags': [ | 4795 'cflags': [ |
4899 '-fno-stack-protector', | 4796 '-fno-stack-protector', |
4900 ], | 4797 ], |
4901 }], | 4798 }], |
4902 ], | 4799 ], |
(...skipping 18 matching lines...) Expand all Loading... |
4921 ], | 4818 ], |
4922 'libraries': [ | 4819 'libraries': [ |
4923 # crtend_android.o needs to be the last item in libraries. | 4820 # crtend_android.o needs to be the last item in libraries. |
4924 # Do not add any libraries after this! | 4821 # Do not add any libraries after this! |
4925 '<(android_ndk_lib)/crtend_android.o', | 4822 '<(android_ndk_lib)/crtend_android.o', |
4926 ], | 4823 ], |
4927 }], | 4824 }], |
4928 ['_type=="shared_library" or _type=="loadable_module"', { | 4825 ['_type=="shared_library" or _type=="loadable_module"', { |
4929 'ldflags': [ | 4826 'ldflags': [ |
4930 '-Wl,-shared,-Bsymbolic', | 4827 '-Wl,-shared,-Bsymbolic', |
| 4828 # crtbegin_so.o should be the last item in ldflags. |
| 4829 '<(android_ndk_lib)/crtbegin_so.o', |
4931 ], | 4830 ], |
4932 'conditions': [ | 4831 'libraries': [ |
4933 ['android_webview_build==0', { | 4832 # crtend_so.o needs to be the last item in libraries. |
4934 'ldflags': [ | 4833 # Do not add any libraries after this! |
4935 # crtbegin_so.o should be the last item in ldflags. | 4834 '<(android_ndk_lib)/crtend_so.o', |
4936 '<(android_ndk_lib)/crtbegin_so.o', | |
4937 ], | |
4938 'libraries': [ | |
4939 # crtend_so.o needs to be the last item in libraries. | |
4940 # Do not add any libraries after this! | |
4941 '<(android_ndk_lib)/crtend_so.o', | |
4942 ], | |
4943 }], | |
4944 ], | 4835 ], |
4945 }], | 4836 }], |
4946 ], | 4837 ], |
4947 }], | 4838 }], |
4948 # Settings for building host targets using the system toolchain. | 4839 # Settings for building host targets using the system toolchain. |
4949 ['_toolset=="host"', { | 4840 ['_toolset=="host"', { |
4950 'cflags!': [ | 4841 'cflags!': [ |
4951 # Due to issues in Clang build system, using ASan on 32-bit | 4842 # Due to issues in Clang build system, using ASan on 32-bit |
4952 # binaries on x86_64 host is problematic. | 4843 # binaries on x86_64 host is problematic. |
4953 # TODO(eugenis): re-enable. | 4844 # TODO(eugenis): re-enable. |
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5849 ], | 5740 ], |
5850 }, | 5741 }, |
5851 }], | 5742 }], |
5852 ['gcc_version>=48 and clang==0 and host_clang==1', { | 5743 ['gcc_version>=48 and clang==0 and host_clang==1', { |
5853 'target_defaults': { | 5744 'target_defaults': { |
5854 'target_conditions': [ | 5745 'target_conditions': [ |
5855 ['_toolset=="host"', { 'cflags!': [ '-Wno-unused-local-typedefs' ]}], | 5746 ['_toolset=="host"', { 'cflags!': [ '-Wno-unused-local-typedefs' ]}], |
5856 ], | 5747 ], |
5857 }, | 5748 }, |
5858 }], | 5749 }], |
5859 # In the android webview build, force host targets to be compiled with clang | |
5860 # as the hermetic host gcc is very old on some platforms. This is already | |
5861 # the default on the current development version of AOSP but we force it | |
5862 # here in case we need to compile against an older release version. We also | |
5863 # explicitly set it to false for target binaries to avoid causing problems | |
5864 # for the work to enable clang by default in AOSP. We also force the use of | |
5865 # libstdc++ on host as peculiarities of the android gyp backend mean that | |
5866 # using libc++ doesn't work, and Chromium doesn't yet require a more modern | |
5867 # C++ library. | |
5868 ['android_webview_build==1', { | |
5869 'target_defaults': { | |
5870 'target_conditions': [ | |
5871 ['_toolset=="host"', { | |
5872 'aosp_build_settings': { | |
5873 'LOCAL_CLANG': 'true', | |
5874 'LOCAL_CXX_STL': 'libstdc++', | |
5875 }, | |
5876 }, { # else: _toolset != "host" | |
5877 'aosp_build_settings': { | |
5878 'LOCAL_CLANG': 'false', | |
5879 }, | |
5880 }], | |
5881 ], | |
5882 }, | |
5883 }], | |
5884 # We need a special case to handle the android webview build on mac because | |
5885 # the host gcc there doesn't accept this flag, but the target gcc may | |
5886 # require it. | |
5887 ['gcc_version>=48 and android_webview_build==1 and host_os=="mac"', { | |
5888 'target_defaults': { | |
5889 'target_conditions': [ | |
5890 ['_toolset=="host"', { | |
5891 'cflags!': [ | |
5892 '-Wno-unused-local-typedefs', | |
5893 ], | |
5894 }], | |
5895 ], | |
5896 }, | |
5897 }], | |
5898 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) ' | 5750 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) ' |
5899 'and OS!="win"', { | 5751 'and OS!="win"', { |
5900 'make_global_settings': [ | 5752 'make_global_settings': [ |
5901 ['CC', '<(make_clang_dir)/bin/clang'], | 5753 ['CC', '<(make_clang_dir)/bin/clang'], |
5902 ['CXX', '<(make_clang_dir)/bin/clang++'], | 5754 ['CXX', '<(make_clang_dir)/bin/clang++'], |
5903 ['CC.host', '$(CC)'], | 5755 ['CC.host', '$(CC)'], |
5904 ['CXX.host', '$(CXX)'], | 5756 ['CXX.host', '$(CXX)'], |
5905 ], | 5757 ], |
5906 }], | 5758 }], |
5907 ['clang==1 and OS=="win"', { | 5759 ['clang==1 and OS=="win"', { |
(...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6223 # settings in target dicts. SYMROOT is a special case, because many other | 6075 # settings in target dicts. SYMROOT is a special case, because many other |
6224 # Xcode variables depend on it, including variables such as | 6076 # Xcode variables depend on it, including variables such as |
6225 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 6077 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
6226 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 6078 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
6227 # files to appear (when present) in the UI as actual files and not red | 6079 # files to appear (when present) in the UI as actual files and not red |
6228 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 6080 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
6229 # and therefore SYMROOT, needs to be set at the project level. | 6081 # and therefore SYMROOT, needs to be set at the project level. |
6230 'SYMROOT': '<(DEPTH)/xcodebuild', | 6082 'SYMROOT': '<(DEPTH)/xcodebuild', |
6231 }, | 6083 }, |
6232 } | 6084 } |
OLD | NEW |