[all-commits] [llvm/llvm-project] 69c208: [libc++] Fix compiler-rt build by copying libc++ h...

Louis Dionne via All-commits all-commits at lists.llvm.org
Wed Oct 21 13:58:59 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 69c2087283cf7b17ca75f69daebf4ffc158b754a
      https://github.com/llvm/llvm-project/commit/69c2087283cf7b17ca75f69daebf4ffc158b754a
  Author: Louis Dionne <ldionne at apple.com>
  Date:   2020-10-21 (Wed, 21 Oct 2020)

  Changed paths:
    M libcxx/CMakeLists.txt
    M libcxx/cmake/Modules/HandleLibCXXABI.cmake
    M libcxx/include/CMakeLists.txt
    M libcxxabi/test/libcxxabi/test/config.py

  Log Message:
  -----------
  [libc++] Fix compiler-rt build by copying libc++ headers to <build>/include

This commit should really be named "Workaround external projects depending
on libc++ build system implementation details". It seems that the compiler-rt
build (and perhaps other projects) is relying on the fact that we copy libc++
and libc++abi headers to `<build-root>/include/c++/v1`. This was changed
by 5d796645, which moved the headers to `<build-root>/projects/libcxx/include/c++/v1`
and broke the compiler-rt build.

I'm committing this workaround to fix the compiler-rt build, but we should
remove reliance on implementation details like that. The correct way to
setup the compiler-rt build would be to "link" against the `cxx-headers`
target in CMake, or to run `install-cxx-headers` using an appropriate
installation prefix, and then manually add a `-I` path to that location.




More information about the All-commits mailing list