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 1262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1273 # Specifically tell the linker to perform optimizations. | 1273 # Specifically tell the linker to perform optimizations. |
1274 # See http://lwn.net/Articles/192624/ . | 1274 # See http://lwn.net/Articles/192624/ . |
1275 "-Wl,-O1", | 1275 "-Wl,-O1", |
1276 "-Wl,--gc-sections", | 1276 "-Wl,--gc-sections", |
1277 ] | 1277 ] |
1278 | 1278 |
1279 if (!using_sanitizer) { | 1279 if (!using_sanitizer) { |
1280 # Functions interposed by the sanitizers can make ld think | 1280 # Functions interposed by the sanitizers can make ld think |
1281 # that some libraries aren't needed when they actually are, | 1281 # that some libraries aren't needed when they actually are, |
1282 # http://crbug.com/234010. As workaround, disable --as-needed. | 1282 # http://crbug.com/234010. As workaround, disable --as-needed. |
1283 if (!is_nacl && !is_android) { | |
Nico
2016/06/28 21:56:23
what about chromeos? should this only happen if is
pcc1
2016/06/28 22:19:34
This should probably be testing for whether the st
| |
1284 # TODO(pcc): Fix linker bug which requires us to link pthread | |
1285 # unconditionally here (crbug.com/623236). | |
1286 common_optimize_on_ldflags += [ | |
1287 "-Wl,--no-as-needed", | |
1288 "-lpthread", | |
1289 ] | |
1290 } | |
1283 common_optimize_on_ldflags += [ "-Wl,--as-needed" ] | 1291 common_optimize_on_ldflags += [ "-Wl,--as-needed" ] |
1284 } | 1292 } |
1285 } | 1293 } |
1286 } | 1294 } |
1287 | 1295 |
1288 # Default "optimization on" config. | 1296 # Default "optimization on" config. |
1289 config("optimize") { | 1297 config("optimize") { |
1290 if (is_win) { | 1298 if (is_win) { |
1291 # TODO(thakis): Remove is_clang here, https://crbug.com/598772 | 1299 # TODO(thakis): Remove is_clang here, https://crbug.com/598772 |
1292 if (is_official_build && full_wpo_on_official && !is_clang) { | 1300 if (is_official_build && full_wpo_on_official && !is_clang) { |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1544 | 1552 |
1545 if (is_ios || is_mac) { | 1553 if (is_ios || is_mac) { |
1546 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1554 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
1547 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1555 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
1548 config("enable_arc") { | 1556 config("enable_arc") { |
1549 common_flags = [ "-fobjc-arc" ] | 1557 common_flags = [ "-fobjc-arc" ] |
1550 cflags_objc = common_flags | 1558 cflags_objc = common_flags |
1551 cflags_objcc = common_flags | 1559 cflags_objcc = common_flags |
1552 } | 1560 } |
1553 } | 1561 } |
OLD | NEW |