OLD | NEW |
---|---|
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") { | |
8 import("//build/config/arm.gni") | |
9 } | |
7 | 10 |
8 # compiler --------------------------------------------------------------------- | 11 # compiler --------------------------------------------------------------------- |
9 # | 12 # |
10 # Base compiler configuration. | 13 # Base compiler configuration. |
11 # | 14 # |
12 # 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 |
13 # 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. |
14 | 17 |
15 config("compiler") { | 18 config("compiler") { |
16 cflags = [] | 19 cflags = [] |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
93 # ----------------------------------- | 96 # ----------------------------------- |
94 | 97 |
95 # CPU architecture. We may or may not be doing a cross compile now, so for | 98 # CPU architecture. We may or may not be doing a cross compile now, so for |
96 # simplicity we always explicitly set the architecture. | 99 # simplicity we always explicitly set the architecture. |
97 if (cpu_arch == "x64") { | 100 if (cpu_arch == "x64") { |
98 cflags += "-m64" | 101 cflags += "-m64" |
99 ldflags += "-m64" | 102 ldflags += "-m64" |
100 } else if (cpu_arch == "x86") { | 103 } else if (cpu_arch == "x86") { |
101 cflags += "-m32" | 104 cflags += "-m32" |
102 ldflags += "-m32" | 105 ldflags += "-m32" |
106 } else if (cpu_arch == "arm") { | |
107 # Don't set the compiler flags for the WebView build. These will come | |
108 # from the Android build system. | |
109 if (!is_android_webview_build) { | |
110 cflags += [ | |
111 "-march=$arm_arch", | |
112 "-mfpu=$arm_fpu", | |
113 "-mfloat_abi=$arm_float_abi", | |
114 ] | |
115 if (arm_tune != "") { | |
116 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
| |
117 } | |
118 if (arm_use_thumb) { | |
119 cflags += [ "-mthumb" ] | |
120 if (is_android) { | |
121 cflags += [ "-mthumb_interwork" ] | |
122 } | |
123 } | |
124 } | |
103 } | 125 } |
104 | 126 |
105 defines += [ "_FILE_OFFSET_BITS=64" ] | 127 defines += [ "_FILE_OFFSET_BITS=64" ] |
106 | 128 |
107 # Omit unwind support in official builds to save space. We can use breakpad | 129 # Omit unwind support in official builds to save space. We can use breakpad |
108 # for these builds. | 130 # for these builds. |
109 if (is_chrome_branded && is_official_build) { | 131 if (is_chrome_branded && is_official_build) { |
110 cflags += [ | 132 cflags += [ |
111 "-fno-unwind-tables", | 133 "-fno-unwind-tables", |
112 "-fno-asynchronous-unwind-tables", | 134 "-fno-asynchronous-unwind-tables", |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
617 } else { | 639 } else { |
618 cflags = [ "-g1" ] | 640 cflags = [ "-g1" ] |
619 } | 641 } |
620 } | 642 } |
621 | 643 |
622 config("no_symbols") { | 644 config("no_symbols") { |
623 if (!is_win) { | 645 if (!is_win) { |
624 cflags = [ "-g0" ] | 646 cflags = [ "-g0" ] |
625 } | 647 } |
626 } | 648 } |
OLD | NEW |