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

Unified Diff: build/config/compiler/BUILD.gn

Issue 137493004: Hook up ARM architecture flags to GN build. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/arm.gni ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index ce0aae7afb72d0def54b1ec6b0713cd0c197d5bc..44bc05bcc1be7c8b2e26eb798b14ddaf723528e8 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -4,6 +4,9 @@
import("//build/config/android/config.gni")
import("//build/config/sysroot.gni")
+if (cpu_arch == "arm") {
+ import("//build/config/arm.gni")
+}
# compiler ---------------------------------------------------------------------
#
@@ -100,6 +103,25 @@ config("compiler") {
} else if (cpu_arch == "x86") {
cflags += "-m32"
ldflags += "-m32"
+ } else if (cpu_arch == "arm") {
+ # Don't set the compiler flags for the WebView build. These will come
+ # from the Android build system.
+ if (!is_android_webview_build) {
+ cflags += [
+ "-march=$arm_arch",
+ "-mfpu=$arm_fpu",
+ "-mfloat_abi=$arm_float_abi",
+ ]
+ if (arm_tune != "") {
+ cflags += "-mtune=$arm_tune"
scottmg 2014/01/13 23:47:20 [ ] around here like below?
brettw 2014/01/13 23:50:22 Thanks, I'm trying to be consistent about this. Do
scottmg 2014/01/13 23:56:55 Yes, I think that'd be a good idea. It sort of see
+ }
+ if (arm_use_thumb) {
+ cflags += [ "-mthumb" ]
+ if (is_android) {
+ cflags += [ "-mthumb_interwork" ]
+ }
+ }
+ }
}
defines += [ "_FILE_OFFSET_BITS=64" ]
« no previous file with comments | « build/config/arm.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698