[libcxx] r289963 - [CMake] Put headers relative to clang

Evgenii Stepanov via cfe-commits cfe-commits at lists.llvm.org
Fri Dec 16 17:58:06 PST 2016


FTR,

buildbot logs:

http://lab.llvm.org:8011/builders/sanitizer-x86_64-linux-autoconf/builds/2585/steps/test%20tsan%20in%20debug%20compiler-rt%20build/logs/stdio

External project cmake error log:

CMake Error at include/CMakeLists.txt:15 (file):
  file COPY cannot make directory "/include/c++/v1/.": No such file or
  directory


On Fri, Dec 16, 2016 at 5:56 PM, Evgenii Stepanov
<eugeni.stepanov at gmail.com> wrote:
> Hi,
>
> this is using LLVM_BINARY_DIR when NOT LIBCXX_USING_INSTALLED_LLVM.
>
> HandleOutOfTreeLLVM.cmake defines LLVM_BINARY_DIR only when
> LIBCXX_USING_INSTALLED_LLVM. Is it supposed to come from the user
> cmake arguments?
>
> This broke sanitizer tests on Linux (check-tsan, check-msan). See
> add_custom_libcxx() in compiler-rt cmake scripts.
>
> On Fri, Dec 16, 2016 at 9:30 AM, Chris Bieneman via cfe-commits
> <cfe-commits at lists.llvm.org> wrote:
>> Author: cbieneman
>> Date: Fri Dec 16 11:30:51 2016
>> New Revision: 289963
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=289963&view=rev
>> Log:
>> [CMake] Put headers relative to clang
>>
>> When libcxx isn't building with an installed LLVM we copy the libcxx headers into the LLVM build directory so that a clang in that build tree can find the headers relative to itself.
>>
>> This is only important in situations where you don't have headers installed under /, which is common these days on Darwin.
>>
>> Modified:
>>     libcxx/trunk/include/CMakeLists.txt
>>
>> Modified: libcxx/trunk/include/CMakeLists.txt
>> URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/CMakeLists.txt?rev=289963&r1=289962&r2=289963&view=diff
>> ==============================================================================
>> --- libcxx/trunk/include/CMakeLists.txt (original)
>> +++ libcxx/trunk/include/CMakeLists.txt Fri Dec 16 11:30:51 2016
>> @@ -10,18 +10,14 @@ set(LIBCXX_HEADER_PATTERN
>>    ${LIBCXX_SUPPORT_HEADER_PATTERN}
>>    )
>>
>> -if (LIBCXX_STANDALONE_BUILD)
>> -  set(LIBCXX_BUILD_ROOT "${LIBCXX_BINARY_DIR}")
>> -else()
>> -  set(LIBCXX_BUILD_ROOT "${LLVM_BINARY_DIR}")
>> +if(NOT LIBCXX_USING_INSTALLED_LLVM)
>> +  file(COPY .
>> +    DESTINATION "${LLVM_BINARY_DIR}/include/c++/v1"
>> +    FILES_MATCHING
>> +    ${LIBCXX_HEADER_PATTERN}
>> +    )
>>  endif()
>>
>> -file(COPY .
>> -  DESTINATION "${LIBCXX_BUILD_ROOT}/include/c++/v1"
>> -  FILES_MATCHING
>> -  ${LIBCXX_HEADER_PATTERN}
>> -)
>> -
>>  if (LIBCXX_INSTALL_HEADERS)
>>    install(DIRECTORY .
>>      DESTINATION include/c++/v1
>>
>>
>> _______________________________________________
>> cfe-commits mailing list
>> cfe-commits at lists.llvm.org
>> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


More information about the cfe-commits mailing list