| 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 (current_cpu == "arm") { | 6 if (current_cpu == "arm") { |
| 7 import("//build/config/arm.gni") | 7 import("//build/config/arm.gni") |
| 8 } | 8 } |
| 9 if (current_cpu == "mipsel" || current_cpu == "mips64el") { | 9 if (current_cpu == "mipsel" || current_cpu == "mips64el") { |
| 10 import("//build/config/mips.gni") | 10 import("//build/config/mips.gni") |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 46 } | 46 } |
| 47 | 47 |
| 48 # compiler --------------------------------------------------------------------- | 48 # compiler --------------------------------------------------------------------- |
| 49 # | 49 # |
| 50 # Base compiler configuration. | 50 # Base compiler configuration. |
| 51 # | 51 # |
| 52 # See also "runtime_library" below for related stuff and a discussion about | 52 # See also "runtime_library" below for related stuff and a discussion about |
| 53 # where stuff should go. Put warning related stuff in the "warnings" config. | 53 # where stuff should go. Put warning related stuff in the "warnings" config. |
| 54 | 54 |
| 55 config("compiler") { | 55 config("compiler") { |
| 56 asmflags = [] |
| 56 cflags = [] | 57 cflags = [] |
| 57 cflags_c = [] | 58 cflags_c = [] |
| 58 cflags_cc = [] | 59 cflags_cc = [] |
| 59 cflags_objcc = [] | 60 cflags_objcc = [] |
| 60 ldflags = [] | 61 ldflags = [] |
| 61 defines = [] | 62 defines = [] |
| 62 | 63 |
| 63 # In general, Windows is totally different, but all the other builds share | 64 # In general, Windows is totally different, but all the other builds share |
| 64 # some common GCC configuration. This section sets up Windows and the common | 65 # some common GCC configuration. This section sets up Windows and the common |
| 65 # GCC flags, and then we handle the other non-Windows platforms specifically | 66 # GCC flags, and then we handle the other non-Windows platforms specifically |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 440 if (is_clang) { | 441 if (is_clang) { |
| 441 if (current_cpu == "arm") { | 442 if (current_cpu == "arm") { |
| 442 cflags += [ "--target=arm-linux-androideabi" ] | 443 cflags += [ "--target=arm-linux-androideabi" ] |
| 443 ldflags += [ "--target=arm-linux-androideabi" ] | 444 ldflags += [ "--target=arm-linux-androideabi" ] |
| 444 } else if (current_cpu == "x86") { | 445 } else if (current_cpu == "x86") { |
| 445 cflags += [ "--target=x86-linux-androideabi" ] | 446 cflags += [ "--target=x86-linux-androideabi" ] |
| 446 ldflags += [ "--target=x86-linux-androideabi" ] | 447 ldflags += [ "--target=x86-linux-androideabi" ] |
| 447 } | 448 } |
| 448 } | 449 } |
| 449 } | 450 } |
| 451 |
| 452 # Assign any flags set for the C compiler to asmflags so that they are sent |
| 453 # to the assembler. The Windows assembler takes different types of flags |
| 454 # so only do so for posix platforms. |
| 455 if (is_posix) { |
| 456 asmflags += cflags |
| 457 asmflags += cflags_c |
| 458 } |
| 450 } | 459 } |
| 451 | 460 |
| 452 config("compiler_arm_fpu") { | 461 config("compiler_arm_fpu") { |
| 453 if (current_cpu == "arm") { | 462 if (current_cpu == "arm") { |
| 454 cflags = [ "-mfpu=$arm_fpu" ] | 463 cflags = [ "-mfpu=$arm_fpu" ] |
| 455 } | 464 } |
| 456 } | 465 } |
| 457 | 466 |
| 458 # runtime_library ------------------------------------------------------------- | 467 # runtime_library ------------------------------------------------------------- |
| 459 # | 468 # |
| (...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 934 cflags = [ "/Zi" ] # Produce PDB file, no edit and continue. | 943 cflags = [ "/Zi" ] # Produce PDB file, no edit and continue. |
| 935 } | 944 } |
| 936 ldflags = [ "/DEBUG" ] | 945 ldflags = [ "/DEBUG" ] |
| 937 } else { | 946 } else { |
| 938 cflags = [ | 947 cflags = [ |
| 939 "-g3", | 948 "-g3", |
| 940 "-ggdb3", | 949 "-ggdb3", |
| 941 ] | 950 ] |
| 942 } | 951 } |
| 943 } | 952 } |
| OLD | NEW |