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

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

Issue 843563002: Add compiler and linker flags for MIPS. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use else if Created 5 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
« no previous file with comments | « no previous file | build/config/mips.gni » ('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 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 (cpu_arch == "mipsel" || cpu_arch == "mips64el") {
10 import("//build/config/mips.gni")
11 }
9 if (is_posix) { 12 if (is_posix) {
10 import("//build/config/gcc/gcc_version.gni") 13 import("//build/config/gcc/gcc_version.gni")
11 } 14 }
12 15
13 import("//build/toolchain/ccache.gni") 16 import("//build/toolchain/ccache.gni")
14 17
15 declare_args() { 18 declare_args() {
16 # Normally, Android builds are lightly optimized, even for debug builds, to 19 # Normally, Android builds are lightly optimized, even for debug builds, to
17 # keep binary size down. Setting this flag to true disables such optimization 20 # keep binary size down. Setting this flag to true disables such optimization
18 android_full_debug = false 21 android_full_debug = false
(...skipping 246 matching lines...) Expand 10 before | Expand all | Expand 10 after
265 # compiler (r5-r7). This can be verified using 268 # compiler (r5-r7). This can be verified using
266 # webkit_unit_tests' WTF.Checked_int8_t test. 269 # webkit_unit_tests' WTF.Checked_int8_t test.
267 "-fno-tree-sra", 270 "-fno-tree-sra",
268 271
269 # The following option is disabled to improve binary 272 # The following option is disabled to improve binary
270 # size and performance in gcc 4.9. 273 # size and performance in gcc 4.9.
271 "-fno-caller-saves", 274 "-fno-caller-saves",
272 ] 275 ]
273 } 276 }
274 } 277 }
278 } else if (cpu_arch == "mipsel") {
279 # Don't set the compiler flags for the WebView build. These will come
280 # from the Android build system.
281 if (!is_android_webview_build) {
282 if (mips_arch_variant == "r6") {
283 cflags += [
284 "-mips32r6",
285 "-Wa,-mips32r6",
286 ]
287 if (is_android) {
288 ldflags += [
289 "-mips32r6",
290 "-Wl,-melf32ltsmip",
291 ]
292 }
293 } else if (mips_arch_variant == "r2") {
294 cflags += [
295 "-mips32r2",
296 "-Wa,-mips32r2",
297 ]
298 } else if (mips_arch_variant == "r1") {
299 cflags += [
300 "-mips32",
301 "-Wa,-mips32",
302 ]
303 }
304 }
305 } else if (cpu_arch == "mips64el") {
306 # Don't set the compiler flags for the WebView build. These will come
307 # from the Android build system.
308 if (!is_android_webview_build) {
309 if (mips_arch_variant == "r6") {
310 cflags += [
311 "-mips64r6",
312 "-Wa,-mips64r6",
313 ]
314 ldflags += [ "-mips64r6" ]
315 } else if (mips_arch_variant == "r2") {
316 cflags += [
317 "-mips64r2",
318 "-Wa,-mips64r2",
319 ]
320 ldflags += [ "-mips64r2" ]
321 }
322 }
275 } 323 }
276 324
277 defines += [ "_FILE_OFFSET_BITS=64" ] 325 defines += [ "_FILE_OFFSET_BITS=64" ]
278 326
279 # Omit unwind support in official builds to save space. We can use breakpad 327 # Omit unwind support in official builds to save space. We can use breakpad
280 # for these builds. 328 # for these builds.
281 if (is_chrome_branded && is_official_build) { 329 if (is_chrome_branded && is_official_build) {
282 cflags += [ 330 cflags += [
283 "-fno-unwind-tables", 331 "-fno-unwind-tables",
284 "-fno-asynchronous-unwind-tables", 332 "-fno-asynchronous-unwind-tables",
(...skipping 701 matching lines...) Expand 10 before | Expand all | Expand 10 after
986 cflags += [ "-gsplit-dwarf" ] 1034 cflags += [ "-gsplit-dwarf" ]
987 } 1035 }
988 } 1036 }
989 } 1037 }
990 1038
991 config("no_symbols") { 1039 config("no_symbols") {
992 if (!is_win) { 1040 if (!is_win) {
993 cflags = [ "-g0" ] 1041 cflags = [ "-g0" ]
994 } 1042 }
995 } 1043 }
OLDNEW
« no previous file with comments | « no previous file | build/config/mips.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698