Chromium Code Reviews| 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/chrome_build.gni") | 6 import("//build/config/chrome_build.gni") |
| 7 import("//build/config/compiler/compiler.gni") | 7 import("//build/config/compiler/compiler.gni") |
| 8 import("//build/config/nacl/config.gni") | 8 import("//build/config/nacl/config.gni") |
| 9 import("//build/toolchain/cc_wrapper.gni") | 9 import("//build/toolchain/cc_wrapper.gni") |
| 10 | 10 |
| 11 if (current_cpu == "arm") { | 11 if (current_cpu == "arm" || current_cpu == "arm64") { |
| 12 import("//build/config/arm.gni") | 12 import("//build/config/arm.gni") |
| 13 } | 13 } |
| 14 if (current_cpu == "mipsel" || current_cpu == "mips64el") { | 14 if (current_cpu == "mipsel" || current_cpu == "mips64el") { |
| 15 import("//build/config/mips.gni") | 15 import("//build/config/mips.gni") |
| 16 } | 16 } |
| 17 if (is_win) { | 17 if (is_win) { |
| 18 import("//build/config/win/visual_studio_version.gni") | 18 import("//build/config/win/visual_studio_version.gni") |
| 19 } | 19 } |
| 20 | 20 |
| 21 declare_args() { | 21 declare_args() { |
| (...skipping 604 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 626 "-mstack-alignment=16", | 626 "-mstack-alignment=16", |
| 627 "-mstackrealign", | 627 "-mstackrealign", |
| 628 ] | 628 ] |
| 629 } | 629 } |
| 630 } | 630 } |
| 631 | 631 |
| 632 config("compiler_arm_fpu") { | 632 config("compiler_arm_fpu") { |
| 633 if (current_cpu == "arm" && !is_ios && !is_nacl) { | 633 if (current_cpu == "arm" && !is_ios && !is_nacl) { |
| 634 cflags = [ "-mfpu=$arm_fpu" ] | 634 cflags = [ "-mfpu=$arm_fpu" ] |
| 635 asmflags = cflags | 635 asmflags = cflags |
| 636 } else if (current_cpu == "arm64" && !is_ios && !is_nacl) { | |
| 637 cflags = [ "-mcpu=$arm_fpu" ] | |
| 638 asmflags = cflags | |
| 636 } | 639 } |
| 637 } | 640 } |
| 638 | 641 |
| 639 # runtime_library ------------------------------------------------------------- | 642 # runtime_library ------------------------------------------------------------- |
| 640 # | 643 # |
| 641 # Sets the runtime library and associated options. | 644 # Sets the runtime library and associated options. |
| 642 # | 645 # |
| 643 # How do you determine what should go in here vs. "compiler" above? Consider if | 646 # How do you determine what should go in here vs. "compiler" above? Consider if |
| 644 # a target might choose to use a different runtime library (ignore for a moment | 647 # a target might choose to use a different runtime library (ignore for a moment |
| 645 # if this is possible or reasonable on your system). If such a target would want | 648 # if this is possible or reasonable on your system). If such a target would want |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 908 if (is_win) { | 911 if (is_win) { |
| 909 cflags = [ "/W4" ] # Warning level 4. | 912 cflags = [ "/W4" ] # Warning level 4. |
| 910 } else { | 913 } else { |
| 911 cflags = [ "-Wall" ] | 914 cflags = [ "-Wall" ] |
| 912 if (treat_warnings_as_errors) { | 915 if (treat_warnings_as_errors) { |
| 913 cflags += [ "-Werror" ] | 916 cflags += [ "-Werror" ] |
| 914 } | 917 } |
| 915 if (is_clang) { | 918 if (is_clang) { |
| 916 # Enable -Wextra for chromium_code when we control the compiler. | 919 # Enable -Wextra for chromium_code when we control the compiler. |
| 917 cflags += [ "-Wextra" ] | 920 cflags += [ "-Wextra" ] |
| 921 cflags += [ "-Wno-error=implicit-exception-spec-mismatch" ] | |
|
Nico
2016/05/12 14:09:04
This is still no good. We don't want warnings. See
| |
| 918 } | 922 } |
| 919 | 923 |
| 920 # In Chromium code, we define __STDC_foo_MACROS in order to get the | 924 # In Chromium code, we define __STDC_foo_MACROS in order to get the |
| 921 # C99 macros on Mac and Linux. | 925 # C99 macros on Mac and Linux. |
| 922 defines = [ | 926 defines = [ |
| 923 "__STDC_CONSTANT_MACROS", | 927 "__STDC_CONSTANT_MACROS", |
| 924 "__STDC_FORMAT_MACROS", | 928 "__STDC_FORMAT_MACROS", |
| 925 ] | 929 ] |
| 926 | 930 |
| 927 if (!is_debug && !using_sanitizer && | 931 if (!is_debug && !using_sanitizer && |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 968 # https://codereview.webrtc.org/1552863002/ made its way into chromium. | 972 # https://codereview.webrtc.org/1552863002/ made its way into chromium. |
| 969 cflags += [ "-Wall" ] | 973 cflags += [ "-Wall" ] |
| 970 } | 974 } |
| 971 } | 975 } |
| 972 | 976 |
| 973 if (is_clang) { | 977 if (is_clang) { |
| 974 cflags += [ | 978 cflags += [ |
| 975 # Lots of third-party libraries have unused variables. Instead of | 979 # Lots of third-party libraries have unused variables. Instead of |
| 976 # suppressing them individually, we just blanket suppress them here. | 980 # suppressing them individually, we just blanket suppress them here. |
| 977 "-Wno-unused-variable", | 981 "-Wno-unused-variable", |
| 982 "-Wno-asm-operand-widths", | |
| 978 ] | 983 ] |
| 979 } | 984 } |
| 980 | 985 |
| 981 if (is_linux || is_android) { | 986 if (is_linux || is_android) { |
| 982 cflags_cc += [ | 987 cflags_cc += [ |
| 983 # Don't warn about hash_map in third-party code. | 988 # Don't warn about hash_map in third-party code. |
| 984 "-Wno-deprecated", | 989 "-Wno-deprecated", |
| 985 ] | 990 ] |
| 986 } | 991 } |
| 987 | 992 |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1338 | 1343 |
| 1339 if (is_ios || is_mac) { | 1344 if (is_ios || is_mac) { |
| 1340 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1345 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
| 1341 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1346 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
| 1342 config("enable_arc") { | 1347 config("enable_arc") { |
| 1343 common_flags = [ "-fobjc-arc" ] | 1348 common_flags = [ "-fobjc-arc" ] |
| 1344 cflags_objc = common_flags | 1349 cflags_objc = common_flags |
| 1345 cflags_objcc = common_flags | 1350 cflags_objcc = common_flags |
| 1346 } | 1351 } |
| 1347 } | 1352 } |
| OLD | NEW |