Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Build result: pass - 60520 tests passed, 0 failed and 726 were skipped.
Log files: console-log.txt, CMakeCache.txt
Build result: FAILURE - Could not check out parent git hash "93bae253ee57aa94241382011f12488eff7d31e6". It was not found in the repository. Did you configure the "Parent Revision" in Phabricator properly? Trying to apply the patch to the master branch instead...
ERROR: arc patch failed with error code 1. Check build log for details.
Log files: console-log.txt, CMakeCache.txt
Build result: FAILURE - Could not check out parent git hash "93bae253ee57aa94241382011f12488eff7d31e6". It was not found in the repository. Did you configure the "Parent Revision" in Phabricator properly? Trying to apply the patch to the master branch instead...
ERROR: arc patch failed with error code 1. Check build log for details.
Log files: console-log.txt, CMakeCache.txt
I think the problem there is that on mac, libc++ headers are supposed to go with the compiler, and the stage1 clang in out/gn doesn't have libc++ headers installed next to it. The stage2_unix toolchain should depend on copying libc++ headers to the build output dir on macOS.
For now I'll disable this on mac, but every other stage2_unix target that uses C++ headers will have the same problem. So hopefully I'll find time to fix this right soon.
I looked a this some. It's easy to add a dep on libc++ [1]. However, scudo still fails to build with errors like ../../compiler-rt/lib/scudo/standalone/common.h:155:11: error: unknown type name 'MapPlatformData', and nothing seems to define that type on non-Linux. Is scudo supposed to build on mac in the cmake build?
1:
% git diff diff --git a/llvm/utils/gn/build/toolchain/BUILD.gn b/llvm/utils/gn/build/toolchain/BUILD.gn index b8e46034cca..9ebbe001d0b 100644 --- a/llvm/utils/gn/build/toolchain/BUILD.gn +++ b/llvm/utils/gn/build/toolchain/BUILD.gn @@ -183,7 +183,9 @@ template("stage2_unix_toolchain") { "//:clang($host_toolchain)", "//:lld($host_toolchain)", ] - if (current_os != "mac") { + if (current_os == "mac") { + deps += [ "//libcxx/include" ] + } else { deps += [ "//:llvm-ar($host_toolchain)" ] } } diff --git a/llvm/utils/gn/secondary/compiler-rt/lib/scudo/BUILD.gn b/llvm/utils/gn/secondary/compiler-rt/lib/scudo/BUILD.gn index a95613c5bcd..8c658837cd2 100644 --- a/llvm/utils/gn/secondary/compiler-rt/lib/scudo/BUILD.gn +++ b/llvm/utils/gn/secondary/compiler-rt/lib/scudo/BUILD.gn @@ -1,11 +1,7 @@ import("//llvm/utils/gn/build/toolchain/compiler.gni") supported_toolchains = [] -# FIXME: On macOS, stage2_unix currently doesn't copy libc++ headers to -# the out dir, but clang relies on them on mac to compile code that uses C++ -# standard library headers. scudo needs C++ standard library headers, so disable -# this on mac until stage2_unix correctly copies libc++ headers. -if (target_os != "win" && target_os != "mac") { +if (target_os != "win") { supported_toolchains += [ "//llvm/utils/gn/build/toolchain:stage2_unix" ] } if (android_ndk_path != "") {
Yes, looking through the code as well as the CMake [1], scudo only supports building on Linux, Android and Fuchsia. Most of the code in linux.cpp looks like it would work on non-Linux POSIX, except for the mutex implementation.
It looks like the non-standalone allocator had some level of support for Windows [2] but that wasn't carried over to the standalone allocator.
So we should probably change the blacklist in the supported platforms to a whitelist for now. I'll go ahead and do that.
[1] http://llvm-cs.pcc.me.uk/projects/compiler-rt/cmake/config-ix.cmake#695
[2] http://llvm-cs.pcc.me.uk/projects/compiler-rt/lib/scudo/scudo_allocator_secondary.h#110