OLD | NEW |
---|---|
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 import("//build/config/android/config.gni") | 5 import("//build/config/android/config.gni") |
6 if (cpu_arch == "arm") { | 6 if (cpu_arch == "arm") { |
7 import("//build/config/arm.gni") | 7 import("//build/config/arm.gni") |
8 } | 8 } |
9 if (cpu_arch == "mipsel" || cpu_arch == "mips64el") { | |
10 import("//build/config/mips.gni") | |
wtc
2015/01/07 23:56:35
I decided to add build/config/mips.gni and declare
| |
11 } | |
9 if (is_posix) { | 12 if (is_posix) { |
10 import("//build/config/gcc/gcc_version.gni") | 13 import("//build/config/gcc/gcc_version.gni") |
11 } | 14 } |
12 | 15 |
13 import("//build/toolchain/ccache.gni") | 16 import("//build/toolchain/ccache.gni") |
14 | 17 |
15 declare_args() { | 18 declare_args() { |
16 # Normally, Android builds are lightly optimized, even for debug builds, to | 19 # Normally, Android builds are lightly optimized, even for debug builds, to |
17 # keep binary size down. Setting this flag to true disables such optimization | 20 # keep binary size down. Setting this flag to true disables such optimization |
18 android_full_debug = false | 21 android_full_debug = false |
(...skipping 245 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
264 # compiler (r5-r7). This can be verified using | 267 # compiler (r5-r7). This can be verified using |
265 # webkit_unit_tests' WTF.Checked_int8_t test. | 268 # webkit_unit_tests' WTF.Checked_int8_t test. |
266 "-fno-tree-sra", | 269 "-fno-tree-sra", |
267 | 270 |
268 # The following option is disabled to improve binary | 271 # The following option is disabled to improve binary |
269 # size and performance in gcc 4.9. | 272 # size and performance in gcc 4.9. |
270 "-fno-caller-saves", | 273 "-fno-caller-saves", |
271 ] | 274 ] |
272 } | 275 } |
273 } | 276 } |
277 } else if (cpu_arch == "mipsel") { | |
278 # Don't set the compiler flags for the WebView build. These will come | |
279 # from the Android build system. | |
280 if (!is_android_webview_build) { | |
281 if (mips_arch_variant == "r6") { | |
282 cflags += [ | |
283 "-mips32r6", | |
284 "-Wa,-mips32r6", | |
285 ] | |
286 if (is_android) { | |
287 ldflags += [ | |
288 "-mips32r6", | |
289 "-Wl,-melf32ltsmip", | |
290 ] | |
291 } | |
292 } else if (mips_arch_variant == "r2") { | |
293 cflags += [ | |
294 "-mips32r2", | |
295 "-Wa,-mips32r2", | |
296 ] | |
297 } else if (mips_arch_variant == "r1") { | |
298 cflags += [ | |
299 "-mips32", | |
300 "-Wa,-mips32", | |
301 ] | |
302 } | |
303 } | |
304 } else if (cpu_arch == "mips64el") { | |
305 # Don't set the compiler flags for the WebView build. These will come | |
306 # from the Android build system. | |
307 if (!is_android_webview_build) { | |
308 if (mips_arch_variant == "r6") { | |
309 cflags += [ | |
310 "-mips64r6", | |
311 "-Wa,-mips64r6", | |
312 ] | |
313 ldflags += [ "-mips64r6" ] | |
314 } else if (mips_arch_variant == "r2") { | |
315 cflags += [ | |
316 "-mips64r2", | |
317 "-Wa,-mips64r2", | |
318 ] | |
319 ldflags += [ "-mips64r2" ] | |
320 } | |
321 } | |
274 } | 322 } |
275 | 323 |
276 defines += [ "_FILE_OFFSET_BITS=64" ] | 324 defines += [ "_FILE_OFFSET_BITS=64" ] |
277 | 325 |
278 # Omit unwind support in official builds to save space. We can use breakpad | 326 # Omit unwind support in official builds to save space. We can use breakpad |
279 # for these builds. | 327 # for these builds. |
280 if (is_chrome_branded && is_official_build) { | 328 if (is_chrome_branded && is_official_build) { |
281 cflags += [ | 329 cflags += [ |
282 "-fno-unwind-tables", | 330 "-fno-unwind-tables", |
283 "-fno-asynchronous-unwind-tables", | 331 "-fno-asynchronous-unwind-tables", |
(...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
987 cflags += [ "-gsplit-dwarf" ] | 1035 cflags += [ "-gsplit-dwarf" ] |
988 } | 1036 } |
989 } | 1037 } |
990 } | 1038 } |
991 | 1039 |
992 config("no_symbols") { | 1040 config("no_symbols") { |
993 if (!is_win) { | 1041 if (!is_win) { |
994 cflags = [ "-g0" ] | 1042 cflags = [ "-g0" ] |
995 } | 1043 } |
996 } | 1044 } |
OLD | NEW |