Chromium Code Reviews| 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 (is_posix) { | 9 if (is_posix) { |
| 10 import("//build/config/gcc/gcc_version.gni") | 10 import("//build/config/gcc/gcc_version.gni") |
| (...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 264 # compiler (r5-r7). This can be verified using | 264 # compiler (r5-r7). This can be verified using |
| 265 # webkit_unit_tests' WTF.Checked_int8_t test. | 265 # webkit_unit_tests' WTF.Checked_int8_t test. |
| 266 "-fno-tree-sra", | 266 "-fno-tree-sra", |
| 267 | 267 |
| 268 # The following option is disabled to improve binary | 268 # The following option is disabled to improve binary |
| 269 # size and performance in gcc 4.9. | 269 # size and performance in gcc 4.9. |
| 270 "-fno-caller-saves", | 270 "-fno-caller-saves", |
| 271 ] | 271 ] |
| 272 } | 272 } |
| 273 } | 273 } |
| 274 } else if (cpu_arch == "mipsel") { | |
| 275 # Don't set the compiler flags for the WebView build. These will come | |
| 276 # from the Android build system. | |
|
wtc
2015/01/07 21:40:00
I copied this comment from the cpu_arch == "arm" c
| |
| 277 if (!is_android_webview_build) { | |
| 278 # TODO(wtc): check mips_arch_variant (possible values are "r1", "r2", | |
|
Ben Chan
2015/01/07 21:48:40
should it be done in the same CL?
wtc
2015/01/07 23:00:22
Done.
| |
| 279 # "r6") and use -mips32, -mips32r2 or -mips32r6 in cflags accordingly. | |
| 280 cflags += [ | |
| 281 "-mips32", | |
| 282 "-Wa,-mips32", | |
| 283 ] | |
| 284 } | |
| 285 ldflags += [ "-Wl,--no-keep-memory" ] | |
| 286 cflags_cc += [ "-Wno-uninitialized" ] | |
|
Ben Chan
2015/01/07 21:48:40
are these ldflags and cflags_cc really needed?
wtc
2015/01/07 23:00:22
I ported the GYP code faithfully without thinking.
| |
| 287 } else if (cpu_arch == "mips64el") { | |
| 288 # Don't set the compiler flags for the WebView build. These will come | |
| 289 # from the Android build system. | |
| 290 if (!is_android_webview_build) { | |
| 291 # TODO(wtc): check mips_arch_variant (possible values are "r2", "r6") | |
| 292 # and use -mips32r2 or -mips32r6 in cflags and ldflags accordingly. | |
| 293 cflags += [ | |
| 294 "-mips64r2", | |
| 295 "-Wa,-mips64r2", | |
| 296 ] | |
| 297 ldflags += [ "-mips64r2" ] | |
| 298 } | |
| 299 cflags_cc += [ "-Wno-uninitialized" ] | |
| 274 } | 300 } |
| 275 | 301 |
| 276 defines += [ "_FILE_OFFSET_BITS=64" ] | 302 defines += [ "_FILE_OFFSET_BITS=64" ] |
| 277 | 303 |
| 278 # Omit unwind support in official builds to save space. We can use breakpad | 304 # Omit unwind support in official builds to save space. We can use breakpad |
| 279 # for these builds. | 305 # for these builds. |
| 280 if (is_chrome_branded && is_official_build) { | 306 if (is_chrome_branded && is_official_build) { |
| 281 cflags += [ | 307 cflags += [ |
| 282 "-fno-unwind-tables", | 308 "-fno-unwind-tables", |
| 283 "-fno-asynchronous-unwind-tables", | 309 "-fno-asynchronous-unwind-tables", |
| (...skipping 703 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 987 cflags += [ "-gsplit-dwarf" ] | 1013 cflags += [ "-gsplit-dwarf" ] |
| 988 } | 1014 } |
| 989 } | 1015 } |
| 990 } | 1016 } |
| 991 | 1017 |
| 992 config("no_symbols") { | 1018 config("no_symbols") { |
| 993 if (!is_win) { | 1019 if (!is_win) { |
| 994 cflags = [ "-g0" ] | 1020 cflags = [ "-g0" ] |
| 995 } | 1021 } |
| 996 } | 1022 } |
| OLD | NEW |