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

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

Issue 130923002: Make GN pass -target flags only on Android Clang (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 | « 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/sysroot.gni") 6 import("//build/config/sysroot.gni")
7 7
8 # compiler --------------------------------------------------------------------- 8 # compiler ---------------------------------------------------------------------
9 # 9 #
10 # Base compiler configuration. 10 # Base compiler configuration.
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 # Don't export symbols from statically linked libraries. 204 # Don't export symbols from statically linked libraries.
205 "-Wl,--exclude-libs=ALL", 205 "-Wl,--exclude-libs=ALL",
206 ] 206 ]
207 if (cpu_arch == "arm") { 207 if (cpu_arch == "arm") {
208 ldflags += [ 208 ldflags += [
209 # Enable identical code folding to reduce size. 209 # Enable identical code folding to reduce size.
210 "-Wl,--icf=safe", 210 "-Wl,--icf=safe",
211 ] 211 ]
212 } 212 }
213 213
214 if (cpu_arch == "arm") { 214 if (is_clang) {
215 cflags += [ 215 if (cpu_arch == "arm") {
216 "-target arm-linux-androideabi", 216 cflags += [
217 "-mllvm -arm-enable-ehabi", 217 "-target arm-linux-androideabi",
218 ] 218 "-mllvm -arm-enable-ehabi",
219 ldflags += [ "-target arm-linux-androideabi" ] 219 ]
220 } else if (cpu_arch == "x86") { 220 ldflags += [ "-target arm-linux-androideabi" ]
221 cflags += [ "-target x86-linux-androideabi" ] 221 } else if (cpu_arch == "x86") {
222 ldflags += [ "-target x86-linux-androideabi" ] 222 cflags += [ "-target x86-linux-androideabi" ]
223 ldflags += [ "-target x86-linux-androideabi" ]
224 }
223 } 225 }
224 } 226 }
225 } 227 }
226 228
227 # runtime_library ------------------------------------------------------------- 229 # runtime_library -------------------------------------------------------------
228 # 230 #
229 # Sets the runtime library and associated options. 231 # Sets the runtime library and associated options.
230 # 232 #
231 # How do you determine what should go in here vs. "compiler" above? Consider if 233 # How do you determine what should go in here vs. "compiler" above? Consider if
232 # a target might choose to use a different runtime library (ignore for a moment 234 # a target might choose to use a different runtime library (ignore for a moment
(...skipping 358 matching lines...) Expand 10 before | Expand all | Expand 10 after
591 } else { 593 } else {
592 cflags = [ "-g1" ] 594 cflags = [ "-g1" ]
593 } 595 }
594 } 596 }
595 597
596 config("no_symbols") { 598 config("no_symbols") {
597 if (!is_win) { 599 if (!is_win) {
598 cflags = [ "-g0" ] 600 cflags = [ "-g0" ]
599 } 601 }
600 } 602 }
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