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 import("//build/toolchain/toolchain.gni") | 10 import("//build/toolchain/toolchain.gni") |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
74 # explore favoring size over speed in this case as well. | 74 # explore favoring size over speed in this case as well. |
75 optimize_for_size = is_android || is_ios | 75 optimize_for_size = is_android || is_ios |
76 | 76 |
77 # If this is set to true, or if LLVM_FORCE_HEAD_REVISION is set to 1 | 77 # If this is set to true, or if LLVM_FORCE_HEAD_REVISION is set to 1 |
78 # in the environment, we use the revision in the llvm repo to determine | 78 # in the environment, we use the revision in the llvm repo to determine |
79 # the CLANG_REVISION to use, instead of the version hard-coded into | 79 # the CLANG_REVISION to use, instead of the version hard-coded into |
80 # //tools/clang/scripts/update.py. This should only be used in | 80 # //tools/clang/scripts/update.py. This should only be used in |
81 # conjunction with setting LLVM_FORCE_HEAD_REVISION in the | 81 # conjunction with setting LLVM_FORCE_HEAD_REVISION in the |
82 # environment when `gclient runhooks` is run as well. | 82 # environment when `gclient runhooks` is run as well. |
83 llvm_force_head_revision = false | 83 llvm_force_head_revision = false |
84 | |
85 # Enable fatal linker warnings. Building Chromium with certain versions | |
86 # of binutils can cause linker warning. | |
87 # See: https://bugs.chromium.org/p/chromium/issues/detail?id=457359 | |
88 fatal_linker_warnings = true | |
Dirk Pranke
2016/06/30 20:00:41
We don't support building Chromium on 32-bit linux
| |
84 } | 89 } |
85 | 90 |
86 if (is_clang && !is_nacl) { | 91 if (is_clang && !is_nacl) { |
87 update_args = [ "--print-revision" ] | 92 update_args = [ "--print-revision" ] |
88 if (llvm_force_head_revision) { | 93 if (llvm_force_head_revision) { |
89 update_args += [ "--llvm-force-head-revision" ] | 94 update_args += [ "--llvm-force-head-revision" ] |
90 } | 95 } |
91 clang_revision = | 96 clang_revision = |
92 exec_script("//tools/clang/scripts/update.py", update_args, "trim string") | 97 exec_script("//tools/clang/scripts/update.py", update_args, "trim string") |
93 } | 98 } |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
196 | 201 |
197 # The x86 toolchain currently has problems with stack-protector. | 202 # The x86 toolchain currently has problems with stack-protector. |
198 if (is_android && current_cpu == "x86") { | 203 if (is_android && current_cpu == "x86") { |
199 cflags += [ "-fno-stack-protector" ] | 204 cflags += [ "-fno-stack-protector" ] |
200 } else { | 205 } else { |
201 cflags += [ "-fstack-protector" ] | 206 cflags += [ "-fstack-protector" ] |
202 } | 207 } |
203 } | 208 } |
204 | 209 |
205 # Linker warnings. | 210 # Linker warnings. |
206 if (!(is_chromeos && current_cpu == "arm") && | 211 if ( fatal_linker_warnings && |
212 !(is_chromeos && current_cpu == "arm") && | |
207 !(is_android && use_order_profiling) && !is_mac && !is_ios) { | 213 !(is_android && use_order_profiling) && !is_mac && !is_ios) { |
208 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 | 214 # TODO(jochen): Enable this on chromeos on arm. http://crbug.com/356580 |
209 # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1 | 215 # TODO(lizeb,pasko): Fix link errors when linking with order_profiling=1 |
210 # crbug.com/485542 | 216 # crbug.com/485542 |
211 ldflags += [ "-Wl,--fatal-warnings" ] | 217 ldflags += [ "-Wl,--fatal-warnings" ] |
212 } | 218 } |
213 } | 219 } |
214 | 220 |
215 if (is_clang && is_debug) { | 221 if (is_clang && is_debug) { |
216 # Allow comparing the address of references and 'this' against 0 | 222 # Allow comparing the address of references and 'this' against 0 |
(...skipping 1346 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1563 | 1569 |
1564 if (is_ios || is_mac) { | 1570 if (is_ios || is_mac) { |
1565 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1571 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1566 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1572 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1567 config("enable_arc") { | 1573 config("enable_arc") { |
1568 common_flags = [ "-fobjc-arc" ] | 1574 common_flags = [ "-fobjc-arc" ] |
1569 cflags_objc = common_flags | 1575 cflags_objc = common_flags |
1570 cflags_objcc = common_flags | 1576 cflags_objcc = common_flags |
1571 } | 1577 } |
1572 } | 1578 } |
OLD | NEW |