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") { | 9 if (cpu_arch == "mipsel" || cpu_arch == "mips64el") { |
10 import("//build/config/mips.gni") | 10 import("//build/config/mips.gni") |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
64 | 64 |
65 # TODO(GYP): is_ubsan, is_ubsan_vptr | 65 # TODO(GYP): is_ubsan, is_ubsan_vptr |
66 if (!is_win) { | 66 if (!is_win) { |
67 using_sanitizer = is_asan || is_lsan || is_tsan || is_msan | 67 using_sanitizer = is_asan || is_lsan || is_tsan || is_msan |
68 } | 68 } |
69 | 69 |
70 # compiler --------------------------------------------------------------------- | 70 # compiler --------------------------------------------------------------------- |
71 # | 71 # |
72 # Base compiler configuration. | 72 # Base compiler configuration. |
73 # | 73 # |
74 # See also "runtime_library" below for related stuff and a discusison about | 74 # See also "runtime_library" below for related stuff and a discussion about |
75 # where stuff should go. Put warning related stuff in the "warnings" config. | 75 # where stuff should go. Put warning related stuff in the "warnings" config. |
76 | 76 |
77 config("compiler") { | 77 config("compiler") { |
78 cflags = [] | 78 cflags = [] |
79 cflags_c = [] | 79 cflags_c = [] |
80 cflags_cc = [] | 80 cflags_cc = [] |
81 ldflags = [] | 81 ldflags = [] |
82 defines = [] | 82 defines = [] |
83 | 83 |
84 # In general, Windows is totally different, but all the other builds share | 84 # In general, Windows is totally different, but all the other builds share |
(...skipping 293 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
378 # Experimentation found that using four linking threads | 378 # Experimentation found that using four linking threads |
379 # saved ~20% of link time. | 379 # saved ~20% of link time. |
380 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_threa
d/thread/281527606915bb36 | 380 # https://groups.google.com/a/chromium.org/group/chromium-dev/browse_threa
d/thread/281527606915bb36 |
381 # Only apply this to the target linker, since the host | 381 # Only apply this to the target linker, since the host |
382 # linker might not be gold, but isn't used much anyway. | 382 # linker might not be gold, but isn't used much anyway. |
383 # TODO(raymes): Disable threading because gold is frequently | 383 # TODO(raymes): Disable threading because gold is frequently |
384 # crashing on the bots: crbug.com/161942. | 384 # crashing on the bots: crbug.com/161942. |
385 #"-Wl,--threads", | 385 #"-Wl,--threads", |
386 #"-Wl,--thread-count=4", | 386 #"-Wl,--thread-count=4", |
387 ] | 387 ] |
| 388 |
| 389 # TODO(thestig): Make this flag work with GN. |
| 390 #if (!is_chromeos && !(is_asan || is_lsan || is_tsan || is_msan)) { |
| 391 # ldflags += [ |
| 392 # "-Wl,--detect-odr-violations", |
| 393 # ] |
| 394 #} |
388 } | 395 } |
389 | 396 |
390 if (linux_use_bundled_binutils) { | 397 if (linux_use_bundled_binutils) { |
391 binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", | 398 binutils_path = rebase_path("//third_party/binutils/Linux_x64/Release/bin", |
392 root_build_dir) | 399 root_build_dir) |
393 cflags += [ "-B$binutils_path" ] | 400 cflags += [ "-B$binutils_path" ] |
394 } | 401 } |
395 | 402 |
396 # Clang-specific compiler flags setup. | 403 # Clang-specific compiler flags setup. |
397 # ------------------------------------ | 404 # ------------------------------------ |
(...skipping 655 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1053 cflags += [ "-gsplit-dwarf" ] | 1060 cflags += [ "-gsplit-dwarf" ] |
1054 } | 1061 } |
1055 } | 1062 } |
1056 } | 1063 } |
1057 | 1064 |
1058 config("no_symbols") { | 1065 config("no_symbols") { |
1059 if (!is_win) { | 1066 if (!is_win) { |
1060 cflags = [ "-g0" ] | 1067 cflags = [ "-g0" ] |
1061 } | 1068 } |
1062 } | 1069 } |
OLD | NEW |