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

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

Issue 164193009: Set -fobjc-call-cxx-cdtors in .m[m] files in the GN build. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« 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 if (cpu_arch == "arm") { 6 if (cpu_arch == "arm") {
7 import("//build/config/arm.gni") 7 import("//build/config/arm.gni")
8 } 8 }
9 9
10 # compiler --------------------------------------------------------------------- 10 # compiler ---------------------------------------------------------------------
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 # These flags are shared between the C compiler and linker. 64 # These flags are shared between the C compiler and linker.
65 common_mac_flags = [] 65 common_mac_flags = []
66 66
67 # CPU architecture. 67 # CPU architecture.
68 if (cpu_arch == "x64") { 68 if (cpu_arch == "x64") {
69 common_mac_flags += [ "-arch x86_64" ] 69 common_mac_flags += [ "-arch x86_64" ]
70 } else if (cpu_arch == "x86") { 70 } else if (cpu_arch == "x86") {
71 common_mac_flags += [ "-arch i386" ] 71 common_mac_flags += [ "-arch i386" ]
72 } 72 }
73 73
74 cflags += common_mac_flags + [ 74 cflags += common_mac_flags
75 # Without this, the constructors and destructors of a C++ object inside 75
76 # an Objective C struct won't be called, which is very bad. 76 # Without this, the constructors and destructors of a C++ object inside
77 "-fobjc-call-cxx-cdtors", 77 # an Objective C struct won't be called, which is very bad.
78 ] 78 cflags_objcc = [ "-fobjc-call-cxx-cdtors", ]
79 79
80 cflags_c += [ "-std=c99" ] 80 cflags_c += [ "-std=c99" ]
81 cflags_cc += [ "-std=gnu++11" ] 81 cflags_cc += [ "-std=gnu++11" ]
82 82
83 ldflags += common_mac_flags + [ 83 ldflags += common_mac_flags + [
84 "-L.", 84 "-L.",
85 85
86 # TODO(brettW) I don't understand these options. 86 # TODO(brettW) I don't understand these options.
87 "-Wl,-rpath,@loader_path/.", 87 "-Wl,-rpath,@loader_path/.",
88 "-Wl,-rpath,@loader_path/../../..", 88 "-Wl,-rpath,@loader_path/../../..",
(...skipping 564 matching lines...) Expand 10 before | Expand all | Expand 10 after
653 cflags = [ "-g1" ] 653 cflags = [ "-g1" ]
654 } 654 }
655 } 655 }
656 656
657 config("no_symbols") { 657 config("no_symbols") {
658 if (!is_win) { 658 if (!is_win) {
659 cflags = [ "-g0" ] 659 cflags = [ "-g0" ]
660 } 660 }
661 } 661 }
662 662
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