[llvm] b3ca53e - [gn build] try to fix clang build after 37c030f81a9fdd
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 21 11:13:41 PDT 2020
Author: Nico Weber
Date: 2020-10-21T14:11:18-04:00
New Revision: b3ca53e14274642274be8fe7db8b43dc3c146366
URL: https://github.com/llvm/llvm-project/commit/b3ca53e14274642274be8fe7db8b43dc3c146366
DIFF: https://github.com/llvm/llvm-project/commit/b3ca53e14274642274be8fe7db8b43dc3c146366.diff
LOG: [gn build] try to fix clang build after 37c030f81a9fdd
37c030f81a9fdd made it so that depending on //libcxx/include
automatically added the copied header dir to the include search path.
For some reason, clang can't build against the copied libcxx headers
(it complains about ldiv_t not being a type). I don't have a mac
to debug right now, but for the clang target this change was
unintentional anyways -- only depend on the copies target, instead
of on the target that also adjusts the include path.
Added:
Modified:
llvm/utils/gn/secondary/clang/tools/driver/BUILD.gn
llvm/utils/gn/secondary/libcxx/include/BUILD.gn
Removed:
################################################################################
diff --git a/llvm/utils/gn/secondary/clang/tools/driver/BUILD.gn b/llvm/utils/gn/secondary/clang/tools/driver/BUILD.gn
index a91ee25224d8..24a95e1968be 100644
--- a/llvm/utils/gn/secondary/clang/tools/driver/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang/tools/driver/BUILD.gn
@@ -86,7 +86,7 @@ executable("clang") {
# clang. This is
diff erent from the CMake build, which requires devs to
# explicitly build the "libcxx" target (which also needlessly compiles the
# libcxx sources) to get a working compiler.
- deps += [ "//libcxx/include" ]
+ deps += [ "//libcxx/include:copy_headers" ]
}
sources = [
"cc1_main.cpp",
diff --git a/llvm/utils/gn/secondary/libcxx/include/BUILD.gn b/llvm/utils/gn/secondary/libcxx/include/BUILD.gn
index 2695a58dff54..1a59c562c79f 100644
--- a/llvm/utils/gn/secondary/libcxx/include/BUILD.gn
+++ b/llvm/utils/gn/secondary/libcxx/include/BUILD.gn
@@ -217,7 +217,7 @@ if (current_toolchain == default_toolchain) {
"wchar.h",
"wctype.h",
]
- deps = []
+ deps = [ ":write_config_site" ]
if (target_os != "mac" && target_os != "win") {
# libcxx/cmake/Modules/HandleLibCXXABI.cmake sets
# LIBCXX_CXX_ABI_HEADER_TARGET if the libcxx abi library either of
@@ -264,7 +264,6 @@ config("include_config") {
group("include") {
deps = [
":copy_headers($default_toolchain)",
- ":write_config_site($default_toolchain)",
]
public_configs = [ ":include_config" ]
}
More information about the llvm-commits
mailing list