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

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

Issue 1129293003: Sync defines with the GYP build. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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 | « build/config/BUILD.gn ('k') | build/config/features.gni » ('j') | 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 if (current_cpu == "arm") { 7 if (current_cpu == "arm") {
8 import("//build/config/arm.gni") 8 import("//build/config/arm.gni")
9 } 9 }
10 if (current_cpu == "mipsel" || current_cpu == "mips64el") { 10 if (current_cpu == "mipsel" || current_cpu == "mips64el") {
(...skipping 318 matching lines...) Expand 10 before | Expand all | Expand 10 after
329 ] 329 ]
330 } 330 }
331 331
332 # Omit unwind support in official builds to save space. We can use breakpad 332 # Omit unwind support in official builds to save space. We can use breakpad
333 # for these builds. 333 # for these builds.
334 if (is_chrome_branded && is_official_build) { 334 if (is_chrome_branded && is_official_build) {
335 cflags += [ 335 cflags += [
336 "-fno-unwind-tables", 336 "-fno-unwind-tables",
337 "-fno-asynchronous-unwind-tables", 337 "-fno-asynchronous-unwind-tables",
338 ] 338 ]
339 defines += [ "NO_UNWIND_TABLES" ]
339 } else { 340 } else {
340 cflags += [ "-funwind-tables" ] 341 cflags += [ "-funwind-tables" ]
341 } 342 }
342 } 343 }
343 344
344 # Linux/Android common flags setup. 345 # Linux/Android common flags setup.
345 # --------------------------------- 346 # ---------------------------------
346 if (is_linux || is_android) { 347 if (is_linux || is_android) {
347 cflags += [ 348 cflags += [
348 "-fPIC", 349 "-fPIC",
(...skipping 280 matching lines...) Expand 10 before | Expand all | Expand 10 after
629 # http://code.google.com/p/chromium/issues/detail?id=90453 630 # http://code.google.com/p/chromium/issues/detail?id=90453
630 "-Wsign-compare", 631 "-Wsign-compare",
631 ] 632 ]
632 633
633 # In Chromium code, we define __STDC_foo_MACROS in order to get the 634 # In Chromium code, we define __STDC_foo_MACROS in order to get the
634 # C99 macros on Mac and Linux. 635 # C99 macros on Mac and Linux.
635 defines = [ 636 defines = [
636 "__STDC_CONSTANT_MACROS", 637 "__STDC_CONSTANT_MACROS",
637 "__STDC_FORMAT_MACROS", 638 "__STDC_FORMAT_MACROS",
638 ] 639 ]
640
641 if (using_sanitizer) {
642 # _FORTIFY_SOURCE isn't really supported by Clang now, see
643 # http://llvm.org/bugs/show_bug.cgi?id=16821.
644 # It seems to work fine with Ubuntu 12 headers though, so use it in
645 # official builds.
646 #
647 # Non-chromium code is not guaranteed to compile cleanly with
648 # _FORTIFY_SOURCE. Also, fortified build may fail when optimizations are
649 # disabled, so only do that for Release build.
650 defines += [ "_FORTIFY_SOURCE=2" ]
651 }
639 } 652 }
640 } 653 }
641 config("no_chromium_code") { 654 config("no_chromium_code") {
642 cflags = [] 655 cflags = []
643 cflags_cc = [] 656 cflags_cc = []
644 defines = [] 657 defines = []
645 658
646 if (is_win) { 659 if (is_win) {
647 cflags += [ 660 cflags += [
648 "/W3", # Warning level 3. 661 "/W3", # Warning level 3.
(...skipping 438 matching lines...) Expand 10 before | Expand all | Expand 10 after
1087 cflags += [ "-gsplit-dwarf" ] 1100 cflags += [ "-gsplit-dwarf" ]
1088 } 1101 }
1089 } 1102 }
1090 } 1103 }
1091 1104
1092 config("no_symbols") { 1105 config("no_symbols") {
1093 if (!is_win) { 1106 if (!is_win) {
1094 cflags = [ "-g0" ] 1107 cflags = [ "-g0" ]
1095 } 1108 }
1096 } 1109 }
OLDNEW
« no previous file with comments | « build/config/BUILD.gn ('k') | build/config/features.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698