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

Side by Side Diff: build/config/compiler/BUILD.gn

Issue 2664743002: Make __DATE__, __TIME__ and __TIMESTAMP__ to evaluate to an empty string. (Closed)
Patch Set: windows clang use the same rule with posix Created 3 years, 10 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
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
212 # Linker warnings. 212 # Linker warnings.
213 if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") && 213 if (fatal_linker_warnings && !(is_chromeos && current_cpu == "arm") &&
214 !(is_android && use_order_profiling) && !is_mac && !is_ios) { 214 !(is_android && use_order_profiling) && !is_mac && !is_ios) {
215 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 215 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
216 # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1 216 # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1
217 # crbug.com/485542 217 # crbug.com/485542
218 ldflags += [ "-Wl,--fatal-warnings" ] 218 ldflags += [ "-Wl,--fatal-warnings" ]
219 } 219 }
220 } 220 }
221 221
222 # Eliminate build metadata (__DATE__, __TIME__ and __TIMESTAMP__) for
223 # deterministic build. See https://crbug.com/314403
224 if (!is_official_build) {
225 if (is_win && !is_clang) {
226 cflags += [
227 "/wd4117", # Trying to define or undefine a predefined macro.
228 "/D__DATE__=",
229 "/D__TIME__=",
230 "/D__TIMESTAMP__=",
231 ]
232 } else {
233 cflags += [
234 "-Wno-builtin-macro-redefined",
235 "-D__DATE__=",
236 "-D__TIME__=",
237 "-D__TIMESTAMP__=",
238 ]
239 }
240 }
241
222 if (is_clang && is_debug) { 242 if (is_clang && is_debug) {
223 # Allow comparing the address of references and 'this' against 0 243 # Allow comparing the address of references and 'this' against 0
224 # in debug builds. Technically, these can never be null in 244 # in debug builds. Technically, these can never be null in
225 # well-defined C/C++ and Clang can optimize such checks away in 245 # well-defined C/C++ and Clang can optimize such checks away in
226 # release builds, but they may be used in asserts in debug builds. 246 # release builds, but they may be used in asserts in debug builds.
227 cflags_cc += [ 247 cflags_cc += [
228 "-Wno-undefined-bool-conversion", 248 "-Wno-undefined-bool-conversion",
229 "-Wno-tautological-undefined-compare", 249 "-Wno-tautological-undefined-compare",
230 ] 250 ]
231 } 251 }
(...skipping 1443 matching lines...) Expand 10 before | Expand all | Expand 10 after
1675 1695
1676 if (is_ios || is_mac) { 1696 if (is_ios || is_mac) {
1677 # On Mac and iOS, this enables support for ARC (automatic ref-counting). 1697 # On Mac and iOS, this enables support for ARC (automatic ref-counting).
1678 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. 1698 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html.
1679 config("enable_arc") { 1699 config("enable_arc") {
1680 common_flags = [ "-fobjc-arc" ] 1700 common_flags = [ "-fobjc-arc" ]
1681 cflags_objc = common_flags 1701 cflags_objc = common_flags
1682 cflags_objcc = common_flags 1702 cflags_objcc = common_flags
1683 } 1703 }
1684 } 1704 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698