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

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

Issue 135733006: GN: Add wexit_time_destructors config. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Put new config in a more logical place. Created 6 years, 11 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 | Annotate | Revision Log
« no previous file with comments | « base/BUILD.gn ('k') | tools/gn/secondary/net/BUILD.gn » ('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/sysroot.gni") 6 import("//build/config/sysroot.gni")
7 if (cpu_arch == "arm") { 7 if (cpu_arch == "arm") {
8 import("//build/config/arm.gni") 8 import("//build/config/arm.gni")
9 } 9 }
10 10
11 # compiler --------------------------------------------------------------------- 11 # compiler ---------------------------------------------------------------------
12 # 12 #
13 # Base compiler configuration. 13 # Base compiler configuration.
14 # 14 #
15 # See also "runtime_library" below for related stuff and a discusison about 15 # See also "runtime_library" below for related stuff and a discusison about
16 # where stuff should go. Put warning related stuff in the "warnings" config. 16 # where stuff should go. Put warning related stuff in the "warnings" config.
17 17
18 config("compiler") { 18 config("compiler") {
19 cflags = [] 19 cflags = []
20 cflags_c = [] 20 cflags_c = []
21 cflags_cc = [] 21 cflags_cc = []
22 ldflags = [] 22 ldflags = []
23 defines = [] 23 defines = []
24 include_dirs = [] 24 include_dirs = []
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after
462 if (is_win) { 462 if (is_win) {
463 cflags_cc = [ "/GR-" ] 463 cflags_cc = [ "/GR-" ]
464 } else { 464 } else {
465 cflags_cc = [ "-fno-rtti" ] 465 cflags_cc = [ "-fno-rtti" ]
466 } 466 }
467 } 467 }
468 468
469 # Warnings --------------------------------------------------------------------- 469 # Warnings ---------------------------------------------------------------------
470 # 470 #
471 # This is where we disable various warnings that we've decided aren't 471 # This is where we disable various warnings that we've decided aren't
472 # worthwhile. 472 # worthwhile, and enable special warnings.
473 473
474 config("default_warnings") { 474 config("default_warnings") {
475 if (is_win) { 475 if (is_win) {
476 # Please keep ordered and add names if you add more. 476 # Please keep ordered and add names if you add more.
477 cflags = [ 477 cflags = [
478 "/wd4018", # Comparing signed and unsigned values. 478 "/wd4018", # Comparing signed and unsigned values.
479 "/wd4100", # Unreferenced formal function parameter. 479 "/wd4100", # Unreferenced formal function parameter.
480 "/wd4121", # Alignment of a member was sensitive to packing. 480 "/wd4121", # Alignment of a member was sensitive to packing.
481 "/wd4125", # Decimal digit terminates octal escape sequence. 481 "/wd4125", # Decimal digit terminates octal escape sequence.
482 "/wd4127", # Conditional expression is constant. 482 "/wd4127", # Conditional expression is constant.
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
573 # TODO(torne): Fix this in WebKit. 573 # TODO(torne): Fix this in WebKit.
574 "-Wno-error=c++0x-compat", 574 "-Wno-error=c++0x-compat",
575 # Other things unrelated to -Wextra: 575 # Other things unrelated to -Wextra:
576 "-Wno-non-virtual-dtor", 576 "-Wno-non-virtual-dtor",
577 "-Wno-sign-promo", 577 "-Wno-sign-promo",
578 ] 578 ]
579 } 579 }
580 } 580 }
581 } 581 }
582 582
583 # This will generate warnings when using Clang if code generates exit-time
584 # destructors, which will slow down closing the program."
brettw 2014/01/15 05:00:16 Extra "
bbudge 2014/01/15 13:16:49 Done.
585 # TODO(thakis): Make this a blacklist instead, http://crbug.com/101600
586 config("wexit_time_destructors") {
587 if (is_clang) {
588 cflags = [ "-Wexit-time-destructors" ]
589 #'xcode_settings': {
brettw 2014/01/15 05:00:16 You don't need this.
bbudge 2014/01/15 13:16:49 Done.
590 # 'WARNING_CFLAGS': [
591 # '-Wexit-time-destructors',
592 # ],
593 #},
594 }
595 }
596
583 # Optimization ----------------------------------------------------------------- 597 # Optimization -----------------------------------------------------------------
584 598
585 config("optimize") { 599 config("optimize") {
586 if (is_win) { 600 if (is_win) {
587 cflags = [ 601 cflags = [
588 "/O2", 602 "/O2",
589 "/Ob2", # Both explicit and auto inlining. 603 "/Ob2", # Both explicit and auto inlining.
590 "/Oy-", # Disable omitting frame pointers, must be after /O2. 604 "/Oy-", # Disable omitting frame pointers, must be after /O2.
591 ] 605 ]
592 } else { 606 } else {
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 } else { 648 } else {
635 cflags = [ "-g1" ] 649 cflags = [ "-g1" ]
636 } 650 }
637 } 651 }
638 652
639 config("no_symbols") { 653 config("no_symbols") {
640 if (!is_win) { 654 if (!is_win) {
641 cflags = [ "-g0" ] 655 cflags = [ "-g0" ]
642 } 656 }
643 } 657 }
658
OLDNEW
« no previous file with comments | « base/BUILD.gn ('k') | tools/gn/secondary/net/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698