| 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 432 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 443 cflags_cc += [ "-std=gnu++11" ] | 443 cflags_cc += [ "-std=gnu++11" ] |
| 444 } else if (!is_win && !is_nacl) { | 444 } else if (!is_win && !is_nacl) { |
| 445 # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either gnu++11 | 445 # TODO(mcgrathr) - the NaCl GCC toolchain doesn't support either gnu++11 |
| 446 # or c++11; we technically don't need this toolchain any more, but there | 446 # or c++11; we technically don't need this toolchain any more, but there |
| 447 # are still a few buildbots using it, so until those are turned off | 447 # are still a few buildbots using it, so until those are turned off |
| 448 # we need the !is_nacl clause and the (is_nacl && is_clang) clause, above. | 448 # we need the !is_nacl clause and the (is_nacl && is_clang) clause, above. |
| 449 cflags_cc += [ "-std=c++11" ] | 449 cflags_cc += [ "-std=c++11" ] |
| 450 } | 450 } |
| 451 | 451 |
| 452 if (is_mac) { | 452 if (is_mac) { |
| 453 cflags_cc += [ "-stdlib=libc++" ] | 453 if (true) { |
| 454 ldflags += [ "-stdlib=libc++" ] | 454 cflags_cc += [ |
| 455 "-nostdinc++", |
| 456 "-isystem" + rebase_path("//buildtools/third_party/libc++/trunk/include"
, root_build_dir), |
| 457 "-isystem" + rebase_path("//buildtools/third_party/libc++abi/trunk/inclu
de", root_build_dir), |
| 458 ] |
| 459 } else { |
| 460 cflags_cc += [ "-stdlib=libc++" ] |
| 461 ldflags += [ "-stdlib=libc++" ] |
| 462 } |
| 455 } | 463 } |
| 456 | 464 |
| 457 # Add flags for link-time optimization. These flags enable | 465 # Add flags for link-time optimization. These flags enable |
| 458 # optimizations/transformations that require whole-program visibility at link | 466 # optimizations/transformations that require whole-program visibility at link |
| 459 # time, so they need to be applied to all translation units, and we may end up | 467 # time, so they need to be applied to all translation units, and we may end up |
| 460 # with miscompiles if only part of the program is compiled with LTO flags. For | 468 # with miscompiles if only part of the program is compiled with LTO flags. For |
| 461 # that reason, we cannot allow targets to enable or disable these flags, for | 469 # that reason, we cannot allow targets to enable or disable these flags, for |
| 462 # example by disabling the optimize configuration. | 470 # example by disabling the optimize configuration. |
| 463 # TODO(pcc): Make this conditional on is_official_build rather than on gn | 471 # TODO(pcc): Make this conditional on is_official_build rather than on gn |
| 464 # flags for specific features. | 472 # flags for specific features. |
| (...skipping 1238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1703 | 1711 |
| 1704 if (is_ios || is_mac) { | 1712 if (is_ios || is_mac) { |
| 1705 # On Mac and iOS, this enables support for ARC (automatic ref-counting). | 1713 # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
| 1706 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. | 1714 # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
| 1707 config("enable_arc") { | 1715 config("enable_arc") { |
| 1708 common_flags = [ "-fobjc-arc" ] | 1716 common_flags = [ "-fobjc-arc" ] |
| 1709 cflags_objc = common_flags | 1717 cflags_objc = common_flags |
| 1710 cflags_objcc = common_flags | 1718 cflags_objcc = common_flags |
| 1711 } | 1719 } |
| 1712 } | 1720 } |
| OLD | NEW |