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 if (cpu_arch == "arm") { | 6 if (cpu_arch == "arm") { |
7 import("//build/config/arm.gni") | 7 import("//build/config/arm.gni") |
8 } | 8 } |
9 if (is_posix) { | 9 if (is_posix) { |
10 import("//build/config/gcc/gcc_version.gni") | 10 import("//build/config/gcc/gcc_version.gni") |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 ldflags += [ "-m64" ] | 127 ldflags += [ "-m64" ] |
128 } else if (cpu_arch == "x86") { | 128 } else if (cpu_arch == "x86") { |
129 cflags += [ "-m32" ] | 129 cflags += [ "-m32" ] |
130 ldflags += [ "-m32" ] | 130 ldflags += [ "-m32" ] |
131 } else if (cpu_arch == "arm") { | 131 } else if (cpu_arch == "arm") { |
132 # Don't set the compiler flags for the WebView build. These will come | 132 # Don't set the compiler flags for the WebView build. These will come |
133 # from the Android build system. | 133 # from the Android build system. |
134 if (!is_android_webview_build) { | 134 if (!is_android_webview_build) { |
135 cflags += [ | 135 cflags += [ |
136 "-march=$arm_arch", | 136 "-march=$arm_arch", |
137 "-mfpu=$arm_fpu", | |
138 "-mfloat-abi=$arm_float_abi", | 137 "-mfloat-abi=$arm_float_abi", |
139 ] | 138 ] |
140 if (arm_tune != "") { | 139 if (arm_tune != "") { |
141 cflags += [ "-mtune=$arm_tune" ] | 140 cflags += [ "-mtune=$arm_tune" ] |
142 } | 141 } |
143 if (arm_use_thumb) { | 142 if (arm_use_thumb) { |
144 cflags += [ "-mthumb" ] | 143 cflags += [ "-mthumb" ] |
145 if (is_android && !is_clang) { # Clang doesn't support this option. | 144 if (is_android && !is_clang) { # Clang doesn't support this option. |
146 cflags += [ "-mthumb-interwork" ] | 145 cflags += [ "-mthumb-interwork" ] |
147 } | 146 } |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
307 ] | 306 ] |
308 ldflags += [ "-target arm-linux-androideabi" ] | 307 ldflags += [ "-target arm-linux-androideabi" ] |
309 } else if (cpu_arch == "x86") { | 308 } else if (cpu_arch == "x86") { |
310 cflags += [ "-target x86-linux-androideabi" ] | 309 cflags += [ "-target x86-linux-androideabi" ] |
311 ldflags += [ "-target x86-linux-androideabi" ] | 310 ldflags += [ "-target x86-linux-androideabi" ] |
312 } | 311 } |
313 } | 312 } |
314 } | 313 } |
315 } | 314 } |
316 | 315 |
| 316 config("compiler_arm_fpu") { |
| 317 if (cpu_arch == "arm" && !is_android_webview_build) { |
| 318 cflags = [ |
| 319 "-mfpu=$arm_fpu", |
| 320 ] |
| 321 } |
| 322 } |
| 323 |
317 # runtime_library ------------------------------------------------------------- | 324 # runtime_library ------------------------------------------------------------- |
318 # | 325 # |
319 # Sets the runtime library and associated options. | 326 # Sets the runtime library and associated options. |
320 # | 327 # |
321 # How do you determine what should go in here vs. "compiler" above? Consider if | 328 # How do you determine what should go in here vs. "compiler" above? Consider if |
322 # a target might choose to use a different runtime library (ignore for a moment | 329 # a target might choose to use a different runtime library (ignore for a moment |
323 # if this is possible or reasonable on your system). If such a target would want | 330 # if this is possible or reasonable on your system). If such a target would want |
324 # to change or remove your option, put it in the runtime_library config. If a | 331 # to change or remove your option, put it in the runtime_library config. If a |
325 # target wants the option regardless, put it in the compiler config. | 332 # target wants the option regardless, put it in the compiler config. |
326 | 333 |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 } else { | 890 } else { |
884 cflags = [ "-g1" ] | 891 cflags = [ "-g1" ] |
885 } | 892 } |
886 } | 893 } |
887 | 894 |
888 config("no_symbols") { | 895 config("no_symbols") { |
889 if (!is_win) { | 896 if (!is_win) { |
890 cflags = [ "-g0" ] | 897 cflags = [ "-g0" ] |
891 } | 898 } |
892 } | 899 } |
OLD | NEW |