Skip to content

Commit

Permalink
[gn build] try to fix clang build after 37c030f
Browse files Browse the repository at this point in the history
37c030f 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.
  • Loading branch information
nico committed Oct 21, 2020
1 parent 958abe0 commit b3ca53e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion llvm/utils/gn/secondary/clang/tools/driver/BUILD.gn
Expand Up @@ -86,7 +86,7 @@ executable("clang") {
# clang. This is different 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",
Expand Down
3 changes: 1 addition & 2 deletions llvm/utils/gn/secondary/libcxx/include/BUILD.gn
Expand Up @@ -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
Expand Down Expand Up @@ -264,7 +264,6 @@ config("include_config") {
group("include") {
deps = [
":copy_headers($default_toolchain)",
":write_config_site($default_toolchain)",
]
public_configs = [ ":include_config" ]
}

0 comments on commit b3ca53e

Please sign in to comment.