OLD | NEW |
1 # Copyright 2017 The Chromium Authors. All rights reserved. | 1 # Copyright 2017 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/c++/c++.gni") | 5 import("//build/config/c++/c++.gni") |
6 | 6 |
7 config("c++flags") { | 7 config("c++flags") { |
8 if (use_custom_libcxx) { | 8 if (use_custom_libcxx) { |
9 prefix = "//buildtools/third_party" | 9 prefix = "//buildtools/third_party" |
10 include = "trunk/include" | 10 include = "trunk/include" |
| 11 if (!is_clang) { |
| 12 # Gcc has a built-in abs() definition with default visibility. |
| 13 # If it was not disabled, it would conflict with libc++'s abs() |
| 14 # with hidden visibility. |
| 15 cflags = [ "-fno-builtin-abs" ] |
| 16 } |
11 cflags_cc = [ | 17 cflags_cc = [ |
12 "-nostdinc++", | 18 "-nostdinc++", |
13 "-isystem" + rebase_path("$prefix/libc++/$include", root_build_dir), | 19 "-isystem" + rebase_path("$prefix/libc++/$include", root_build_dir), |
14 "-isystem" + rebase_path("$prefix/libc++abi/$include", root_build_dir), | 20 "-isystem" + rebase_path("$prefix/libc++abi/$include", root_build_dir), |
15 ] | 21 ] |
16 } | 22 } |
17 } | 23 } |
OLD | NEW |