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

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

Issue 1130153009: Update build configuration to support iOS targets (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/arm.gni ('k') | build/config/ios/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/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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
118 if (is_mac) { 118 if (is_mac) {
119 cflags += [ "-fstack-protector-all" ] 119 cflags += [ "-fstack-protector-all" ]
120 } else if (is_linux) { 120 } else if (is_linux) {
121 cflags += [ 121 cflags += [
122 "-fstack-protector", 122 "-fstack-protector",
123 "--param=ssp-buffer-size=4", 123 "--param=ssp-buffer-size=4",
124 ] 124 ]
125 } 125 }
126 126
127 # Linker warnings. 127 # Linker warnings.
128 if (!(is_chromeos && current_cpu == "arm") && !is_mac) { 128 if (!(is_chromeos && current_cpu == "arm") && !is_mac && !is_ios) {
129 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 129 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580
130 ldflags += [ "-Wl,--fatal-warnings" ] 130 ldflags += [ "-Wl,--fatal-warnings" ]
131 } 131 }
132 132
133 # Common options for AddressSanitizer, LeakSanitizer, ThreadSanitizer and 133 # Common options for AddressSanitizer, LeakSanitizer, ThreadSanitizer and
134 # MemorySanitizer 134 # MemorySanitizer
135 if (using_sanitizer) { 135 if (using_sanitizer) {
136 cflags += [ 136 cflags += [
137 "-fno-omit-frame-pointer", 137 "-fno-omit-frame-pointer",
138 "-gline-tables-only", 138 "-gline-tables-only",
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
179 if (current_cpu == "x64") { 179 if (current_cpu == "x64") {
180 common_mac_flags += [ 180 common_mac_flags += [
181 "-arch", 181 "-arch",
182 "x86_64", 182 "x86_64",
183 ] 183 ]
184 } else if (current_cpu == "x86") { 184 } else if (current_cpu == "x86") {
185 common_mac_flags += [ 185 common_mac_flags += [
186 "-arch", 186 "-arch",
187 "i386", 187 "i386",
188 ] 188 ]
189 } else if (current_cpu == "arm") {
190 common_mac_flags += [
191 "-arch",
192 "armv7",
193 ]
189 } 194 }
190 195
191 cflags += common_mac_flags 196 cflags += common_mac_flags
192 197
193 # Without this, the constructors and destructors of a C++ object inside 198 # Without this, the constructors and destructors of a C++ object inside
194 # an Objective C struct won't be called, which is very bad. 199 # an Objective C struct won't be called, which is very bad.
195 cflags_objcc = [ "-fobjc-call-cxx-cdtors" ] 200 cflags_objcc = [ "-fobjc-call-cxx-cdtors" ]
196 201
197 cflags_c += [ "-std=c99" ] 202 cflags_c += [ "-std=c99" ]
198 203
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 ldflags += [ "-target arm-linux-androideabi" ] 491 ldflags += [ "-target arm-linux-androideabi" ]
487 } else if (current_cpu == "x86") { 492 } else if (current_cpu == "x86") {
488 cflags += [ "-target x86-linux-androideabi" ] 493 cflags += [ "-target x86-linux-androideabi" ]
489 ldflags += [ "-target x86-linux-androideabi" ] 494 ldflags += [ "-target x86-linux-androideabi" ]
490 } 495 }
491 } 496 }
492 } 497 }
493 } 498 }
494 499
495 config("compiler_arm_fpu") { 500 config("compiler_arm_fpu") {
496 if (current_cpu == "arm") { 501 if (current_cpu == "arm" && !is_ios) {
497 cflags = [ "-mfpu=$arm_fpu" ] 502 cflags = [ "-mfpu=$arm_fpu" ]
498 } 503 }
499 } 504 }
500 505
501 # runtime_library ------------------------------------------------------------- 506 # runtime_library -------------------------------------------------------------
502 # 507 #
503 # Sets the runtime library and associated options. 508 # Sets the runtime library and associated options.
504 # 509 #
505 # How do you determine what should go in here vs. "compiler" above? Consider if 510 # How do you determine what should go in here vs. "compiler" above? Consider if
506 # a target might choose to use a different runtime library (ignore for a moment 511 # a target might choose to use a different runtime library (ignore for a moment
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
1100 cflags += [ "-gsplit-dwarf" ] 1105 cflags += [ "-gsplit-dwarf" ]
1101 } 1106 }
1102 } 1107 }
1103 } 1108 }
1104 1109
1105 config("no_symbols") { 1110 config("no_symbols") {
1106 if (!is_win) { 1111 if (!is_win) {
1107 cflags = [ "-g0" ] 1112 cflags = [ "-g0" ]
1108 } 1113 }
1109 } 1114 }
OLDNEW
« no previous file with comments | « build/config/arm.gni ('k') | build/config/ios/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698