Commit 975bcf64 authored by Peter Collingbourne's avatar Peter Collingbourne Committed by Commit Bot

android: Pass -nostdinc++ when using the NDK libc++.

This prevents the compiler from adding the copy of libc++ installed
alongside clang to the include path, which can result in very confusing
error messages because both copies of libc++ have a stddef.h which
will try to #include_next the system one, resulting in no stddef.h
being included at all due to a header guard clash.

Normally there will not be a copy of libc++ installed alongside clang
because it's not included in the clang package on Linux, but folks
with a custom clang_base_path may end up with one.

Change-Id: I6734c0335db486b30ee7ec849687fb8064a358b1
Reviewed-on: https://chromium-review.googlesource.com/c/1343532Reviewed-by: default avataragrieve <agrieve@chromium.org>
Commit-Queue: Peter Collingbourne <pcc@chromium.org>
Cr-Commit-Position: refs/heads/master@{#609594}
parent 9d5a1f3b
...@@ -125,6 +125,7 @@ config("runtime_library") { ...@@ -125,6 +125,7 @@ config("runtime_library") {
root_build_dir) root_build_dir)
} }
cflags_cc += [ cflags_cc += [
"-nostdinc++",
"-isystem" + libcxx_include_path, "-isystem" + libcxx_include_path,
"-isystem" + libcxxabi_include_path, "-isystem" + libcxxabi_include_path,
] ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment