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 import("//build/config/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
7 import("//build/config/compiler/compiler.gni") | 7 import("//build/config/compiler/compiler.gni") |
8 import("//build/config/nacl/config.gni") | 8 import("//build/config/nacl/config.gni") |
9 import("//build/toolchain/cc_wrapper.gni") | 9 import("//build/toolchain/cc_wrapper.gni") |
10 import("//build/toolchain/toolchain.gni") | 10 import("//build/toolchain/toolchain.gni") |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
71 # If true, optimize for size. Does not affect windows builds. | 71 # If true, optimize for size. Does not affect windows builds. |
72 # Linux & Mac favor speed over size. | 72 # Linux & Mac favor speed over size. |
73 # TODO(brettw) it's weird that Mac and desktop Linux are different. We should | 73 # TODO(brettw) it's weird that Mac and desktop Linux are different. We should |
74 # explore favoring size over speed in this case as well. | 74 # explore favoring size over speed in this case as well. |
75 optimize_for_size = is_android || is_ios | 75 optimize_for_size = is_android || is_ios |
76 | 76 |
77 # Enable fatal linker warnings. Building Chromium with certain versions | 77 # Enable fatal linker warnings. Building Chromium with certain versions |
78 # of binutils can cause linker warning. | 78 # of binutils can cause linker warning. |
79 # See: https://bugs.chromium.org/p/chromium/issues/detail?id=457359 | 79 # See: https://bugs.chromium.org/p/chromium/issues/detail?id=457359 |
80 fatal_linker_warnings = true | 80 fatal_linker_warnings = true |
81 | |
82 # Keep build metadata (__DATE__ and __TIME_) available. | |
83 # For the deterministic build, these parameters should be eliminated. | |
84 # See: https://bugs.chromium.org/p/chromium/issues/detail?id=314403 | |
85 enable_date_time_builtin_macro = false | |
Dirk Pranke
2016/08/22 17:31:45
Does this even need to be easily toggleable? Why n
M-A Ruel
2016/08/22 19:16:53
That's my opinion too, no need for a flag. Less fl
Yoshisato Yanagisawa
2016/08/23 01:37:54
I do not have strong opinions on whether to make i
| |
81 } | 86 } |
82 | 87 |
83 if (is_clang && !is_nacl) { | 88 if (is_clang && !is_nacl) { |
84 update_args = [ "--print-revision" ] | 89 update_args = [ "--print-revision" ] |
85 if (llvm_force_head_revision) { | 90 if (llvm_force_head_revision) { |
86 update_args += [ "--llvm-force-head-revision" ] | 91 update_args += [ "--llvm-force-head-revision" ] |
87 } | 92 } |
88 clang_revision = | 93 clang_revision = |
89 exec_script("//tools/clang/scripts/update.py", update_args, "trim string") | 94 exec_script("//tools/clang/scripts/update.py", update_args, "trim string") |
90 } | 95 } |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
200 } | 205 } |
201 | 206 |
202 # Linker warnings. | 207 # Linker warnings. |
203 if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") && | 208 if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") && |
204 !(is_android && use_order_profiling) && !is_mac && !is_ios) { | 209 !(is_android && use_order_profiling) && !is_mac && !is_ios) { |
205 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 | 210 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 |
206 # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1 | 211 # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1 |
207 # crbug.com/485542 | 212 # crbug.com/485542 |
208 ldflags += [ "-Wl,--fatal-warnings" ] | 213 ldflags += [ "-Wl,--fatal-warnings" ] |
209 } | 214 } |
215 | |
216 if (!enable_date_time_builtin_macro) { | |
217 cflags += [ | |
218 "-Wno-builtin-macro-redefined", | |
219 "-D__DATE__=", | |
220 "-D__TIME__=", | |
221 ] | |
222 } | |
210 } | 223 } |
211 | 224 |
212 if (is_clang && is_debug) { | 225 if (is_clang && is_debug) { |
213 # Allow comparing the address of references and 'this' against 0 | 226 # Allow comparing the address of references and 'this' against 0 |
214 # in debug builds. Technically, these can never be null in | 227 # in debug builds. Technically, these can never be null in |
215 # well-defined C/C++ and Clang can optimize such checks away in | 228 # well-defined C/C++ and Clang can optimize such checks away in |
216 # release builds, but they may be used in asserts in debug builds. | 229 # release builds, but they may be used in asserts in debug builds. |
217 cflags_cc += [ | 230 cflags_cc += [ |
218 "-Wno-undefined-bool-conversion", | 231 "-Wno-undefined-bool-conversion", |
219 "-Wno-tautological-undefined-compare", | 232 "-Wno-tautological-undefined-compare", |
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1568 | 1581 |
1569 if (is_ios || is_mac) { | 1582 if (is_ios || is_mac) { |
1570 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1583 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1571 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1584 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1572 config("enable_arc") { | 1585 config("enable_arc") { |
1573 common_flags = [ "-fobjc-arc" ] | 1586 common_flags = [ "-fobjc-arc" ] |
1574 cflags_objc = common_flags | 1587 cflags_objc = common_flags |
1575 cflags_objcc = common_flags | 1588 cflags_objcc = common_flags |
1576 } | 1589 } |
1577 } | 1590 } |
OLD | NEW |