Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(681)

Unified Diff: third_party/libc++/BUILD.gn

Issue 1643613002: Only add -isystem for libc++ for C++ files, not C files. (Closed) Base URL: https://chromium.googlesource.com/chromium/buildtools.git@master
Patch Set: huh Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | third_party/libc++/libc++.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/libc++/BUILD.gn
diff --git a/third_party/libc++/BUILD.gn b/third_party/libc++/BUILD.gn
index e6d7074be3b2da5fa25d13abffee1d147812bb4c..48e18cb69fb8d74b4f9103f35b28aa97b34e8a9e 100644
--- a/third_party/libc++/BUILD.gn
+++ b/third_party/libc++/BUILD.gn
@@ -2,16 +2,19 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
+# Used by libc++ and libc++abi.
config("config") {
+ defines = [ "LIBCXX_BUILDING_LIBCXXABI" ]
cflags = [
- "-isystem" + rebase_path("trunk/include", root_build_dir),
- "-isystem" + rebase_path("../libc++abi/trunk/include", root_build_dir),
"-fPIC",
"-fstrict-aliasing",
- "-nostdinc++",
"-pthread",
+ ]
+ cflags_cc = [
+ "-nostdinc++",
+ "-isystem" + rebase_path("trunk/include", root_build_dir),
+ "-isystem" + rebase_path("../libc++abi/trunk/include", root_build_dir),
"-std=c++11",
- "-DLIBCXX_BUILDING_LIBCXXABI",
]
}
@@ -58,7 +61,6 @@ shared_library("libc++") {
"//build/config/sanitizers:sanitizer_options_link_helper",
]
- defines = [ "LIBCXX_BUILDING_LIBCXXABI" ]
ldflags = [ "-nodefaultlibs" ]
# TODO(GYP): Remove "-pthread" from ldflags.
@@ -88,6 +90,9 @@ group("libcxx_proxy") {
public_configs = [ ":link_helper" ]
}
+# This config is only used by binaries and shared library targets.
+# //build/config/sanitizers:default_sanitizer_flags sets the include paths for
+# everything else.
config("link_helper") {
ldflags = [
"-stdlib=libc++",
« no previous file with comments | « no previous file | third_party/libc++/libc++.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698