Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Side by Side Diff: build/common.gypi

Issue 1043913002: Remove most android_webview_build conditions from build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
780 'proprietary_codecs%': 1, 778 'proprietary_codecs%': 1,
781 }, { 779 }, {
782 'proprietary_codecs%': 0, 780 'proprietary_codecs%': 0,
783 }], 781 }],
784 782
785 ['OS=="mac" or OS=="ios"', { 783 ['OS=="mac" or OS=="ios"', {
786 'native_memory_pressure_signals%': 1, 784 'native_memory_pressure_signals%': 1,
787 }], 785 }],
788 786
789 # Enable autofill dialog for Android, Mac and Views-enabled platforms. 787 # Enable autofill dialog for Android, Mac and Views-enabled platforms.
790 ['toolkit_views==1 or (OS=="android" and android_webview_build==0) or OS =="mac"', { 788 ['toolkit_views==1 or OS=="android" or OS=="mac"', {
791 'enable_autofill_dialog%': 1, 789 'enable_autofill_dialog%': 1,
792 790
793 'conditions': [ 791 'conditions': [
794 ['buildtype=="Official"', { 792 ['buildtype=="Official"', {
795 'enable_prod_wallet_service%': 1, 793 'enable_prod_wallet_service%': 1,
796 }], 794 }],
797 ] 795 ]
798 }], 796 }],
799 797
800 ['OS=="android"', { 798 ['OS=="android"', {
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
1009 1007
1010 # Turn on JNI generation optimizations on non-WebView builds. 1008 # Turn on JNI generation optimizations on non-WebView builds.
1011 ['OS=="android" and android_webview_build==0', { 1009 ['OS=="android" and android_webview_build==0', {
1012 'optimize_jni_generation%': 1, 1010 'optimize_jni_generation%': 1,
1013 }, { 1011 }, {
1014 'optimize_jni_generation%': 0, 1012 'optimize_jni_generation%': 0,
1015 }], 1013 }],
1016 1014
1017 # TODO(rmcilroy): Enable v8_use_external_startup_data on ChromeOS 1015 # TODO(rmcilroy): Enable v8_use_external_startup_data on ChromeOS
1018 # http://crbug.com/421063 1016 # http://crbug.com/421063
1019 ['android_webview_build==0 and chromecast==0 and chromeos==0 and OS!="io s"', { 1017 ['chromecast==0 and chromeos==0 and OS!="ios"', {
1020 'v8_use_external_startup_data%': 1, 1018 'v8_use_external_startup_data%': 1,
1021 }, { 1019 }, {
1022 'v8_use_external_startup_data%': 0, 1020 'v8_use_external_startup_data%': 0,
1023 }], 1021 }],
1024 1022
1025 # Controls whether Wallet cards can be saved to the local instance of 1023 # Controls whether Wallet cards can be saved to the local instance of
1026 # chrome. TODO(estade): set to 0 for Linux before M43 branch. 1024 # chrome. TODO(estade): set to 0 for Linux before M43 branch.
1027 ['desktop_linux==1', { 1025 ['desktop_linux==1', {
1028 'enable_save_wallet_cards_locally%': 1, 1026 'enable_save_wallet_cards_locally%': 1,
1029 }, { 1027 }, {
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
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 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
2083 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia', 2074 'ast', 'bs', 'ca@valencia', 'en-AU', 'eo', 'eu', 'gl', 'hy', 'ia',
2084 'ka', 'ku', 'kw', 'ms', 'ug' 2075 'ka', 'ku', 'kw', 'ms', 'ug'
2085 ], 2076 ],
2086 }], 2077 }],
2087 ['OS=="android"', { 2078 ['OS=="android"', {
2088 'grit_defines': [ 2079 'grit_defines': [
2089 '-t', 'android', 2080 '-t', 'android',
2090 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true', 2081 '-E', 'ANDROID_JAVA_TAGGED_ONLY=true',
2091 '--no-output-all-resource-defines', 2082 '--no-output-all-resource-defines',
2092 ], 2083 ],
2093 'conditions': [
2094 ['<(android_webview_build)==1', {
2095 'grit_defines': ['-D', 'is_android_webview_build'],
Nico 2015/03/30 17:55:46 You need to delete this conditional too: https://c
Torne 2015/03/31 13:50:02 Already being removed in my components change: htt
Nico 2015/03/31 15:28:03 That's not good enough. This CL here removes the i
Nico 2015/03/31 15:33:29 You're right, the grd file checks "if this isn't s
2096 }],
2097 ],
2098 }], 2084 }],
2099 ['OS=="mac" or OS=="ios"', { 2085 ['OS=="mac" or OS=="ios"', {
2100 'grit_defines': ['-D', 'scale_factors=2x'], 2086 'grit_defines': ['-D', 'scale_factors=2x'],
2101 }], 2087 }],
2102 ['OS == "ios"', { 2088 ['OS == "ios"', {
2103 'variables': { 2089 'variables': {
2104 'enable_coverage%': 0, 2090 'enable_coverage%': 0,
2105 }, 2091 },
2106 'grit_defines': [ 2092 'grit_defines': [
2107 '-t', 'ios', 2093 '-t', 'ios',
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
2308 # Keep the code under #ifndef NVALGRIND. 2294 # Keep the code under #ifndef NVALGRIND.
2309 'release_valgrind_build': 1, 2295 'release_valgrind_build': 1,
2310 }], 2296 }],
2311 2297
2312 # Enable RLZ on Win, Mac, iOS and ChromeOS. 2298 # Enable RLZ on Win, Mac, iOS and ChromeOS.
2313 ['branding=="Chrome" and (OS=="win" or OS=="mac" or OS=="ios" or chromeos= =1)', { 2299 ['branding=="Chrome" and (OS=="win" or OS=="mac" or OS=="ios" or chromeos= =1)', {
2314 'enable_rlz%': 1, 2300 'enable_rlz%': 1,
2315 }], 2301 }],
2316 2302
2317 # Set default compiler flags depending on ARM version. 2303 # Set default compiler flags depending on ARM version.
2318 ['arm_version==6 and android_webview_build==0', { 2304 ['arm_version==6', {
2319 'arm_arch%': 'armv6', 2305 'arm_arch%': 'armv6',
2320 'arm_tune%': '', 2306 'arm_tune%': '',
2321 'arm_fpu%': 'vfp', 2307 'arm_fpu%': 'vfp',
2322 'arm_float_abi%': 'softfp', 2308 'arm_float_abi%': 'softfp',
2323 'arm_thumb%': 0, 2309 'arm_thumb%': 0,
2324 }], 2310 }],
2325 ['arm_version==7 and android_webview_build==0', { 2311 ['arm_version==7', {
2326 'arm_arch%': 'armv7-a', 2312 'arm_arch%': 'armv7-a',
2327 'arm_tune%': 'generic-armv7-a', 2313 'arm_tune%': 'generic-armv7-a',
2328 'conditions': [ 2314 'conditions': [
2329 ['arm_neon==1', { 2315 ['arm_neon==1', {
2330 'arm_fpu%': 'neon', 2316 'arm_fpu%': 'neon',
2331 }, { 2317 }, {
2332 'arm_fpu%': 'vfpv3-d16', 2318 'arm_fpu%': 'vfpv3-d16',
2333 }], 2319 }],
2334 ], 2320 ],
2335 # Change the default to hard once the armhf transition is complete. 2321 # Change the default to hard once the armhf transition is complete.
2336 'arm_float_abi%': 'softfp', 2322 'arm_float_abi%': 'softfp',
2337 'arm_thumb%': 1, 2323 'arm_thumb%': 1,
2338 }], 2324 }],
2339 2325
2340 # Set default compiler flags for MIPS floating-point support. 2326 # Set default compiler flags for MIPS floating-point support.
2341 ['target_arch=="mipsel" and android_webview_build==0', { 2327 ['target_arch=="mipsel"', {
2342 'mips_float_abi%': 'hard', 2328 'mips_float_abi%': 'hard',
2343 }], 2329 }],
2344 ['target_arch=="mipsel" and mips_arch_variant=="r2" and android_webview_bu ild==0', { 2330 ['target_arch=="mipsel" and mips_arch_variant=="r2"', {
2345 'mips_fpu_mode%': 'fp32', 2331 'mips_fpu_mode%': 'fp32',
2346 }], 2332 }],
2347 2333
2348 ['android_webview_build==1', {
2349 # The WebView build gets its cpu-specific flags from the Android build s ystem.
2350 'arm_arch%': '',
2351 'arm_tune%': '',
2352 'arm_fpu%': '',
2353 'arm_float_abi%': '',
2354 'arm_thumb%': 0,
2355 'mips_float_abi%': '',
2356 'mips_fpu_mode%': '',
2357 }],
2358
2359 # Enable brlapi by default for chromeos. 2334 # Enable brlapi by default for chromeos.
2360 [ 'chromeos==1', { 2335 [ 'chromeos==1', {
2361 'use_brlapi%': 1, 2336 'use_brlapi%': 1,
2362 }], 2337 }],
2363 2338
2364 ['use_ozone==1 and ozone_auto_platforms==1', { 2339 ['use_ozone==1 and ozone_auto_platforms==1', {
2365 # Use test as the default platform. 2340 # Use test as the default platform.
2366 'ozone_platform%': 'test', 2341 'ozone_platform%': 'test',
2367 2342
2368 # Build all platforms whose deps are in install-build-deps.sh. 2343 # Build all platforms whose deps are in install-build-deps.sh.
(...skipping 1711 matching lines...) Expand 10 before | Expand all | Expand 10 after
4080 ], 4055 ],
4081 }], 4056 }],
4082 ['target_arch=="arm64"', { 4057 ['target_arch=="arm64"', {
4083 'target_conditions': [ 4058 'target_conditions': [
4084 ['_toolset=="target"', { 4059 ['_toolset=="target"', {
4085 'conditions': [ 4060 'conditions': [
4086 ['OS=="android"', { 4061 ['OS=="android"', {
4087 'cflags!': [ 4062 'cflags!': [
4088 '-fstack-protector', # stack protector is always enabled on arm64. 4063 '-fstack-protector', # stack protector is always enabled on arm64.
4089 ], 4064 ],
4090 }],
4091 # TODO: Remove webview test once webview fully compiles from
4092 # Chromium. crbug.com/440793
4093 ['OS=="android" and android_webview_build==0', {
4094 'ldflags': [ 4065 'ldflags': [
4095 '-fuse-ld=gold', 4066 '-fuse-ld=gold',
4096 ], 4067 ],
4097 }], 4068 }],
4098 ], 4069 ],
4099 }], 4070 }],
4100 ], 4071 ],
4101 }], 4072 }],
4102 ['target_arch=="mipsel"', { 4073 ['target_arch=="mipsel"', {
4103 'target_conditions': [ 4074 'target_conditions': [
4104 ['_toolset=="target"', { 4075 ['_toolset=="target"', {
4105 'conditions': [ 4076 'conditions': [
4106 ['android_webview_build==0', { 4077 ['mips_arch_variant=="r6"', {
4107 'conditions': [ 4078 'conditions': [
4108 ['mips_arch_variant=="r6"', { 4079 ['clang==1', {
4080 'cflags': [ '-target mipsel-linux-gnu', '-march=mips32r6 ', ],
4081 'ldflags': [ '-target mipsel-linux-gnu', ],
4082 }, { # clang==0
4083 'cflags': ['-mips32r6', '-Wa,-mips32r6', ],
4084 }],
4085 ['clang==0 and OS=="android"', {
4086 'ldflags': ['-mips32r6', '-Wl,-melf32ltsmip',],
4087 }],
4088 ],
4089 }],
4090 ['mips_arch_variant=="r2"', {
4091 'conditions': [
4092 ['mips_float_abi=="hard" and mips_fpu_mode!=""', {
4093 'cflags': ['-m<(mips_fpu_mode)'],
4094 }],
4095 ['clang==1', {
4096 'conditions': [
4097 ['OS=="android"', {
4098 'cflags': [ '-target mipsel-linux-android', '-march= mipsel', '-mcpu=mips32r2'],
4099 'ldflags': [ '-target mipsel-linux-android', ],
4100 }],
4101 ],
4102 }, { # clang==0
4103 'cflags': ['-mips32r2', '-Wa,-mips32r2', ],
4104 }],
4105 ],
4106 }],
4107 ['mips_arch_variant=="r1"', {
4108 'conditions': [
4109 ['clang==1', {
4109 'conditions': [ 4110 'conditions': [
4110 ['clang==1', { 4111 ['OS=="android"', {
4111 'cflags': [ '-target mipsel-linux-gnu', '-march=mips 32r6', ], 4112 'cflags': [ '-target mipsel-linux-android', '-march= mipsel', '-mcpu=mips32'],
4112 'ldflags': [ '-target mipsel-linux-gnu', ], 4113 'ldflags': [ '-target mipsel-linux-android', ],
4113 }, { # clang==0
4114 'cflags': ['-mips32r6', '-Wa,-mips32r6', ],
4115 }],
4116 ['clang==0 and OS=="android"', {
4117 'ldflags': ['-mips32r6', '-Wl,-melf32ltsmip',],
4118 }], 4114 }],
4119 ], 4115 ],
4120 }], 4116 }, { # clang==0
4121 ['mips_arch_variant=="r2"', { 4117 'cflags': ['-mips32', '-Wa,-mips32', ],
4122 'conditions': [
4123 ['mips_float_abi=="hard" and mips_fpu_mode!=""', {
4124 'cflags': ['-m<(mips_fpu_mode)'],
4125 }],
4126 ['clang==1', {
4127 'conditions': [
4128 ['OS=="android"', {
4129 'cflags': [ '-target mipsel-linux-android', '-ma rch=mipsel', '-mcpu=mips32r2'],
4130 'ldflags': [ '-target mipsel-linux-android', ],
4131 }],
4132 ],
4133 }, { # clang==0
4134 'cflags': ['-mips32r2', '-Wa,-mips32r2', ],
4135 }],
4136 ],
4137 }],
4138 ['mips_arch_variant=="r1"', {
4139 'conditions': [
4140 ['clang==1', {
4141 'conditions': [
4142 ['OS=="android"', {
4143 'cflags': [ '-target mipsel-linux-android', '-ma rch=mipsel', '-mcpu=mips32'],
4144 'ldflags': [ '-target mipsel-linux-android', ],
4145 }],
4146 ],
4147 }, { # clang==0
4148 'cflags': ['-mips32', '-Wa,-mips32', ],
4149 }],
4150 ],
4151 }],
4152 ['clang==1', {
4153 'cflags!': [
4154 # Clang does not support the following options.
4155 '-finline-limit=64',
4156 ],
4157 'cflags': [
4158 # TODO(gordanac) Enable integrated-as.
4159 '-no-integrated-as',
4160 '-B<(android_toolchain)', # Else /usr/bin/as gets pic ked up.
4161 ],
4162 'ldflags': [
4163 # Let clang find the ld in the NDK.
4164 '--gcc-toolchain=<(android_toolchain)/..',
4165 ],
4166 }],
4167 ['mips_dsp_rev==1', {
4168 'cflags': ['-mdsp'],
4169 }],
4170 ['mips_dsp_rev==2', {
4171 'cflags': ['-mdspr2'],
4172 }], 4118 }],
4173 ], 4119 ],
4120 }],
4121 ['clang==1', {
4122 'cflags!': [
4123 # Clang does not support the following options.
4124 '-finline-limit=64',
4125 ],
4174 'cflags': [ 4126 'cflags': [
4175 '-m<(mips_float_abi)-float' 4127 # TODO(gordanac) Enable integrated-as.
4128 '-no-integrated-as',
4129 '-B<(android_toolchain)', # Else /usr/bin/as gets picked up.
4130 ],
4131 'ldflags': [
4132 # Let clang find the ld in the NDK.
4133 '--gcc-toolchain=<(android_toolchain)/..',
4176 ], 4134 ],
4177 }], 4135 }],
4136 ['mips_dsp_rev==1', {
4137 'cflags': ['-mdsp'],
4138 }],
4139 ['mips_dsp_rev==2', {
4140 'cflags': ['-mdspr2'],
4141 }],
4142 ],
4143 'cflags': [
4144 '-m<(mips_float_abi)-float'
4178 ], 4145 ],
4179 'ldflags': [ 4146 'ldflags': [
4180 '-Wl,--no-keep-memory' 4147 '-Wl,--no-keep-memory'
4181 ], 4148 ],
4182 'cflags_cc': [ 4149 'cflags_cc': [
4183 '-Wno-uninitialized', 4150 '-Wno-uninitialized',
4184 ], 4151 ],
4185 }], 4152 }],
4186 ], 4153 ],
4187 }], 4154 }],
4188 ['target_arch=="mips64el"', { 4155 ['target_arch=="mips64el"', {
4189 'target_conditions': [ 4156 'target_conditions': [
4190 ['_toolset=="target"', { 4157 ['_toolset=="target"', {
4191 'conditions': [ 4158 'conditions': [
4192 ['android_webview_build==0', { 4159 ['mips_arch_variant=="r6"', {
4193 'conditions': [ 4160 'cflags': ['-mips64r6', '-Wa,-mips64r6'],
4194 ['mips_arch_variant=="r6"', { 4161 'ldflags': ['-mips64r6'],
4195 'cflags': ['-mips64r6', '-Wa,-mips64r6'], 4162 }],
4196 'ldflags': ['-mips64r6'], 4163 ['mips_arch_variant=="r2"', {
4197 }], 4164 'cflags': ['-mips64r2', '-Wa,-mips64r2'],
4198 ['mips_arch_variant=="r2"', { 4165 'ldflags': ['-mips64r2'],
4199 'cflags': ['-mips64r2', '-Wa,-mips64r2'],
4200 'ldflags': ['-mips64r2'],
4201 }],
4202 ],
4203 }], 4166 }],
4204 ], 4167 ],
4205 'cflags_cc': [ 4168 'cflags_cc': [
4206 '-Wno-uninitialized', 4169 '-Wno-uninitialized',
4207 ], 4170 ],
4208 }], 4171 }],
4209 ], 4172 ],
4210 }], 4173 }],
4211 ['linux_fpic==1', { 4174 ['linux_fpic==1', {
4212 'cflags': [ 4175 'cflags': [
(...skipping 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
4714 ], 4677 ],
4715 'cflags': [ 4678 'cflags': [
4716 '-ffunction-sections', 4679 '-ffunction-sections',
4717 '-funwind-tables', 4680 '-funwind-tables',
4718 '-g', 4681 '-g',
4719 '-fstack-protector', 4682 '-fstack-protector',
4720 '-fno-short-enums', 4683 '-fno-short-enums',
4721 '-finline-limit=64', 4684 '-finline-limit=64',
4722 '-Wa,--noexecstack', 4685 '-Wa,--noexecstack',
4723 '<@(release_extra_cflags)', 4686 '<@(release_extra_cflags)',
4687 '--sysroot=<(android_ndk_sysroot)',
4688 # NOTE: The stlport header include paths below are specified in
4689 # cflags rather than include_dirs because they need to come
4690 # after include_dirs. Think of them like system headers, but
4691 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
Nico 2015/03/30 17:55:46 hm, this comment should probably be updated, given
Torne 2015/03/31 13:50:02 Removed the obsolete part of this comment.
4692 # toolchain (circa Gingerbread) will exhibit strange errors.
4693 # The include ordering here is important; change with caution.
4694 '-isystem<(android_stlport_include)',
4724 ], 4695 ],
4725 'defines': [ 4696 'defines': [
4726 'ANDROID', 4697 'ANDROID',
4727 '__GNU_SOURCE=1', # Necessary for clone() 4698 '__GNU_SOURCE=1', # Necessary for clone()
4728 'USE_STLPORT=1', 4699 'USE_STLPORT=1',
4729 '_STLP_USE_PTR_SPECIALIZATIONS=1', 4700 '_STLP_USE_PTR_SPECIALIZATIONS=1',
4730 'CHROME_BUILD_ID="<(chrome_build_id)"', 4701 'CHROME_BUILD_ID="<(chrome_build_id)"',
4702 # The NDK has these things, but doesn't define the constants
4703 # to say that it does. Define them here instead.
4704 'HAVE_SYS_UIO_H',
4731 ], 4705 ],
4732 'ldflags!': [ 4706 'ldflags!': [
4733 '-pthread', # Not supported by Android toolchain. 4707 '-pthread', # Not supported by Android toolchain.
4734 ], 4708 ],
4735 'ldflags': [ 4709 'ldflags': [
4736 '-Wl,--no-undefined', 4710 '-Wl,--no-undefined',
4711 '--sysroot=<(android_ndk_sysroot)',
4712 '-nostdlib',
4713 '-L<(android_stlport_libs_dir)',
4714 # Don't allow visible symbols from libgcc or stlport to be
4715 # re-exported.
4716 '-Wl,--exclude-libs=libgcc.a',
4717 '-Wl,--exclude-libs=libstlport_static.a',
4718 # Don't allow visible symbols from libraries that contain
4719 # assembly code with symbols that aren't hidden properly.
4720 # http://crbug.com/448386
4721 '-Wl,--exclude-libs=libcommon_audio.a',
4722 '-Wl,--exclude-libs=libcommon_audio_neon.a',
4723 '-Wl,--exclude-libs=libcommon_audio_sse2.a',
4724 '-Wl,--exclude-libs=libiSACFix.a',
4725 '-Wl,--exclude-libs=libisac_neon.a',
4726 '-Wl,--exclude-libs=libopus.a',
4727 '-Wl,--exclude-libs=libvpx.a',
4728 ],
4729 'libraries': [
4730 '-l<(android_stlport_library)',
4731 # Manually link the libgcc.a that the cross compiler uses.
4732 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
4733 '-lc',
4734 '-ldl',
4735 '-lm',
4737 ], 4736 ],
4738 'conditions': [ 4737 'conditions': [
4739 ['component=="static_library" and android_webview_build==0', { 4738 ['component=="static_library"', {
4740 'target_conditions': [ 4739 'target_conditions': [
4741 ['use_native_jni_exports==0', { 4740 ['use_native_jni_exports==0', {
4742 # Use a linker version script to strip JNI exports from 4741 # Use a linker version script to strip JNI exports from
4743 # binaries which have not specifically asked to use them. 4742 # binaries which have not specifically asked to use them.
4744 'ldflags': [ 4743 'ldflags': [
4745 '-Wl,--version-script=<!(cd <(DEPTH) && pwd -P)/build/andr oid/android_no_jni_exports.lst', 4744 '-Wl,--version-script=<!(cd <(DEPTH) && pwd -P)/build/andr oid/android_no_jni_exports.lst',
4746 ], 4745 ],
4747 }], 4746 }],
4748 ], 4747 ],
4749 }], 4748 }],
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
4785 }], 4784 }],
4786 ['asan==1', { 4785 ['asan==1', {
4787 'cflags': [ 4786 'cflags': [
4788 # Android build relies on -Wl,--gc-sections removing 4787 # Android build relies on -Wl,--gc-sections removing
4789 # unreachable code. ASan instrumentation for globals inhibits 4788 # unreachable code. ASan instrumentation for globals inhibits
4790 # this and results in a library with unresolvable relocations. 4789 # this and results in a library with unresolvable relocations.
4791 # TODO(eugenis): find a way to reenable this. 4790 # TODO(eugenis): find a way to reenable this.
4792 '-mllvm -asan-globals=0', 4791 '-mllvm -asan-globals=0',
4793 ], 4792 ],
4794 }], 4793 }],
4795 ['android_webview_build==0', {
4796 'defines': [
4797 # The NDK has these things, but doesn't define the constants
4798 # to say that it does. Define them here instead.
4799 'HAVE_SYS_UIO_H',
4800 ],
4801 'cflags': [
4802 '--sysroot=<(android_ndk_sysroot)',
4803 ],
4804 'ldflags': [
4805 '--sysroot=<(android_ndk_sysroot)',
4806 '-nostdlib',
4807 # Don't allow visible symbols from libgcc or stlport to be
4808 # re-exported.
4809 '-Wl,--exclude-libs=libgcc.a',
4810 '-Wl,--exclude-libs=libstlport_static.a',
4811 # Don't allow visible symbols from libraries that contain
4812 # assembly code with symbols that aren't hidden properly.
4813 # http://crbug.com/448386
4814 '-Wl,--exclude-libs=libcommon_audio.a',
4815 '-Wl,--exclude-libs=libcommon_audio_neon.a',
4816 '-Wl,--exclude-libs=libcommon_audio_sse2.a',
4817 '-Wl,--exclude-libs=libiSACFix.a',
4818 '-Wl,--exclude-libs=libisac_neon.a',
4819 '-Wl,--exclude-libs=libopus.a',
4820 '-Wl,--exclude-libs=libvpx.a',
4821 ],
4822 'libraries': [
4823 '-l<(android_stlport_library)',
4824 # Manually link the libgcc.a that the cross compiler uses.
4825 '<!(<(android_toolchain)/*-gcc -print-libgcc-file-name)',
4826 '-lc',
4827 '-ldl',
4828 '-lm',
4829 ],
4830 }],
4831 ['android_webview_build==1', {
4832 'cflags': [
4833 # Android predefines this as 1; undefine it here so Chromium
4834 # can redefine it later to be 2 for chromium code and unset
4835 # for third party code. This works because cflags are added
4836 # before defines.
4837 '-U_FORTIFY_SOURCE',
4838 # Disable any additional warnings enabled by the Android build system but which
4839 # chromium does not build cleanly with (when treating warning as errors).
4840 # Things that are part of -Wextra:
4841 '-Wno-extra', # Enabled by -Wextra, but no specific flag
4842 '-Wno-ignored-qualifiers',
4843 '-Wno-type-limits',
4844 '-Wno-unused-but-set-variable',
4845 ],
4846 'cflags_cc': [
4847 # Other things unrelated to -Wextra:
4848 '-Wno-non-virtual-dtor',
4849 '-Wno-sign-promo',
4850 ],
4851 'libraries': [
4852 '-ldl',
4853 ],
4854 }],
4855 ['android_webview_build==1', {
4856 'target_conditions': [
4857 ['chromium_code==0', {
4858 'cflags': [
4859 # There is a class of warning which:
4860 # 1) Android always enables and also treats as errors
4861 # 2) Chromium ignores in third party code
4862 # So we re-enable those warnings when building Android.
4863 '-Wno-address',
4864 '-Wno-format-security',
4865 '-Wno-return-type',
4866 '-Wno-sequence-point',
4867 ],
4868 'cflags_cc': [
4869 '-Wno-non-virtual-dtor',
4870 ],
4871 }],
4872 ],
4873 }],
4874 ['target_arch == "arm" and order_profiling==0', { 4794 ['target_arch == "arm" and order_profiling==0', {
4875 'ldflags': [ 4795 'ldflags': [
4876 # Enable identical code folding to reduce size. 4796 # Enable identical code folding to reduce size.
4877 '-Wl,--icf=<(gold_icf_level)', 4797 '-Wl,--icf=<(gold_icf_level)',
4878 ], 4798 ],
4879 }], 4799 }],
4880 # NOTE: The stlport header include paths below are specified in
4881 # cflags rather than include_dirs because they need to come
4882 # after include_dirs. Think of them like system headers, but
4883 # don't use '-isystem' because the arm-linux-androideabi-4.4.3
4884 # toolchain (circa Gingerbread) will exhibit strange errors.
4885 # The include ordering here is important; change with caution.
4886 ['android_webview_build==0', {
4887 'cflags': [
4888 '-isystem<(android_stlport_include)',
4889 ],
4890 'ldflags': [
4891 '-L<(android_stlport_libs_dir)',
4892 ],
4893 }, { # else: android_webview_build!=0
4894 'aosp_build_settings': {
4895 # Specify that we want to statically link stlport from the
4896 # NDK. This will provide all the include and library paths
4897 # automatically at build time, and link the right library.
4898 'LOCAL_NDK_STL_VARIANT': 'stlport_static',
4899 },
4900 }],
4901 ['target_arch=="ia32"', { 4800 ['target_arch=="ia32"', {
4902 # The x86 toolchain currently has problems with stack-protector. 4801 # The x86 toolchain currently has problems with stack-protector.
4903 'cflags!': [ 4802 'cflags!': [
4904 '-fstack-protector', 4803 '-fstack-protector',
4905 ], 4804 ],
4906 'cflags': [ 4805 'cflags': [
4907 '-fno-stack-protector', 4806 '-fno-stack-protector',
4908 ], 4807 ],
4909 }], 4808 }],
4910 ], 4809 ],
(...skipping 18 matching lines...) Expand all
4929 ], 4828 ],
4930 'libraries': [ 4829 'libraries': [
4931 # crtend_android.o needs to be the last item in libraries. 4830 # crtend_android.o needs to be the last item in libraries.
4932 # Do not add any libraries after this! 4831 # Do not add any libraries after this!
4933 '<(android_ndk_lib)/crtend_android.o', 4832 '<(android_ndk_lib)/crtend_android.o',
4934 ], 4833 ],
4935 }], 4834 }],
4936 ['_type=="shared_library" or _type=="loadable_module"', { 4835 ['_type=="shared_library" or _type=="loadable_module"', {
4937 'ldflags': [ 4836 'ldflags': [
4938 '-Wl,-shared,-Bsymbolic', 4837 '-Wl,-shared,-Bsymbolic',
4838 # crtbegin_so.o should be the last item in ldflags.
4839 '<(android_ndk_lib)/crtbegin_so.o',
4939 ], 4840 ],
4940 'conditions': [ 4841 'libraries': [
4941 ['android_webview_build==0', { 4842 # crtend_so.o needs to be the last item in libraries.
4942 'ldflags': [ 4843 # Do not add any libraries after this!
4943 # crtbegin_so.o should be the last item in ldflags. 4844 '<(android_ndk_lib)/crtend_so.o',
4944 '<(android_ndk_lib)/crtbegin_so.o',
4945 ],
4946 'libraries': [
4947 # crtend_so.o needs to be the last item in libraries.
4948 # Do not add any libraries after this!
4949 '<(android_ndk_lib)/crtend_so.o',
4950 ],
4951 }],
4952 ], 4845 ],
4953 }], 4846 }],
4954 ], 4847 ],
4955 }], 4848 }],
4956 # Settings for building host targets using the system toolchain. 4849 # Settings for building host targets using the system toolchain.
4957 ['_toolset=="host"', { 4850 ['_toolset=="host"', {
4958 'cflags!': [ 4851 'cflags!': [
4959 # Due to issues in Clang build system, using ASan on 32-bit 4852 # Due to issues in Clang build system, using ASan on 32-bit
4960 # binaries on x86_64 host is problematic. 4853 # binaries on x86_64 host is problematic.
4961 # TODO(eugenis): re-enable. 4854 # TODO(eugenis): re-enable.
(...skipping 895 matching lines...) Expand 10 before | Expand all | Expand 10 after
5857 ], 5750 ],
5858 }, 5751 },
5859 }], 5752 }],
5860 ['gcc_version>=48 and clang==0 and host_clang==1', { 5753 ['gcc_version>=48 and clang==0 and host_clang==1', {
5861 'target_defaults': { 5754 'target_defaults': {
5862 'target_conditions': [ 5755 'target_conditions': [
5863 ['_toolset=="host"', { 'cflags!': [ '-Wno-unused-local-typedefs' ]}], 5756 ['_toolset=="host"', { 'cflags!': [ '-Wno-unused-local-typedefs' ]}],
5864 ], 5757 ],
5865 }, 5758 },
5866 }], 5759 }],
5867 # In the android webview build, force host targets to be compiled with clang
5868 # as the hermetic host gcc is very old on some platforms. This is already
5869 # the default on the current development version of AOSP but we force it
5870 # here in case we need to compile against an older release version. We also
5871 # explicitly set it to false for target binaries to avoid causing problems
5872 # for the work to enable clang by default in AOSP. We also force the use of
5873 # libstdc++ on host as peculiarities of the android gyp backend mean that
5874 # using libc++ doesn't work, and Chromium doesn't yet require a more modern
5875 # C++ library.
5876 ['android_webview_build==1', {
5877 'target_defaults': {
5878 'target_conditions': [
5879 ['_toolset=="host"', {
5880 'aosp_build_settings': {
5881 'LOCAL_CLANG': 'true',
5882 'LOCAL_CXX_STL': 'libstdc++',
5883 },
5884 }, { # else: _toolset != "host"
5885 'aosp_build_settings': {
5886 'LOCAL_CLANG': 'false',
5887 },
5888 }],
5889 ],
5890 },
5891 }],
5892 # We need a special case to handle the android webview build on mac because
5893 # the host gcc there doesn't accept this flag, but the target gcc may
5894 # require it.
5895 ['gcc_version>=48 and android_webview_build==1 and host_os=="mac"', {
5896 'target_defaults': {
5897 'target_conditions': [
5898 ['_toolset=="host"', {
5899 'cflags!': [
5900 '-Wno-unused-local-typedefs',
5901 ],
5902 }],
5903 ],
5904 },
5905 }],
5906 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) ' 5760 ['clang==1 and ((OS!="mac" and OS!="ios") or clang_xcode==0) '
5907 'and OS!="win"', { 5761 'and OS!="win"', {
5908 'make_global_settings': [ 5762 'make_global_settings': [
5909 ['CC', '<(make_clang_dir)/bin/clang'], 5763 ['CC', '<(make_clang_dir)/bin/clang'],
5910 ['CXX', '<(make_clang_dir)/bin/clang++'], 5764 ['CXX', '<(make_clang_dir)/bin/clang++'],
5911 ['CC.host', '$(CC)'], 5765 ['CC.host', '$(CC)'],
5912 ['CXX.host', '$(CXX)'], 5766 ['CXX.host', '$(CXX)'],
5913 ], 5767 ],
5914 }], 5768 }],
5915 ['clang==1 and OS=="win"', { 5769 ['clang==1 and OS=="win"', {
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after
6144 # settings in target dicts. SYMROOT is a special case, because many other 5998 # settings in target dicts. SYMROOT is a special case, because many other
6145 # Xcode variables depend on it, including variables such as 5999 # Xcode variables depend on it, including variables such as
6146 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 6000 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
6147 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 6001 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
6148 # files to appear (when present) in the UI as actual files and not red 6002 # files to appear (when present) in the UI as actual files and not red
6149 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 6003 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
6150 # and therefore SYMROOT, needs to be set at the project level. 6004 # and therefore SYMROOT, needs to be set at the project level.
6151 'SYMROOT': '<(DEPTH)/xcodebuild', 6005 'SYMROOT': '<(DEPTH)/xcodebuild',
6152 }, 6006 },
6153 } 6007 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698