[llvm] r361513 - [CMake] Copy C++ headers before configuring runtimes build
Mikael Holmén via llvm-commits
llvm-commits at lists.llvm.org
Fri May 24 01:14:10 PDT 2019
Hi,
When I'm having runtimes/compiler-rt present I get the following with
this patch (even when including the fix in r361535):
CMake Error at
/usr/local/share/cmake-3.4/Modules/ExternalProject.cmake:2097
(get_property):
get_property could not find TARGET runtime-libcxx-headers. Perhaps
it has
not yet been created.
Call Stack (most recent call first):
/usr/local/share/cmake-3.4/Modules/ExternalProject.cmake:2433
(_ep_add_configure_command)
cmake/modules/LLVMExternalProjectUtils.cmake:217 (ExternalProject_Add)
runtimes/CMakeLists.txt:412 (llvm_ExternalProject_Add)
runtimes/CMakeLists.txt:535 (runtime_default_target)
CMake Error at
/usr/local/share/cmake-3.4/Modules/ExternalProject.cmake:2099
(get_property):
get_property could not find TARGET runtime-libcxx-headers. Perhaps
it has
not yet been created.
Call Stack (most recent call first):
/usr/local/share/cmake-3.4/Modules/ExternalProject.cmake:2433
(_ep_add_configure_command)
cmake/modules/LLVMExternalProjectUtils.cmake:217 (ExternalProject_Add)
runtimes/CMakeLists.txt:412 (llvm_ExternalProject_Add)
runtimes/CMakeLists.txt:535 (runtime_default_target)
CMake Error at
/usr/local/share/cmake-3.4/Modules/ExternalProject.cmake:1169
(get_property):
get_property could not find TARGET runtime-libcxx-headers. Perhaps
it has
not yet been created.
Call Stack (most recent call first):
/usr/local/share/cmake-3.4/Modules/ExternalProject.cmake:1388
(ExternalProject_Get_Property)
/usr/local/share/cmake-3.4/Modules/ExternalProject.cmake:2101
(_ep_get_step_stampfile)
/usr/local/share/cmake-3.4/Modules/ExternalProject.cmake:2433
(_ep_add_configure_command)
cmake/modules/LLVMExternalProjectUtils.cmake:217 (ExternalProject_Add)
runtimes/CMakeLists.txt:412 (llvm_ExternalProject_Add)
runtimes/CMakeLists.txt:535 (runtime_default_target)
CMake Error at
/usr/local/share/cmake-3.4/Modules/ExternalProject.cmake:1171 (message):
External project "runtime-libcxx-headers" has no stamp_dir
Call Stack (most recent call first):
/usr/local/share/cmake-3.4/Modules/ExternalProject.cmake:1388
(ExternalProject_Get_Property)
/usr/local/share/cmake-3.4/Modules/ExternalProject.cmake:2101
(_ep_get_step_stampfile)
/usr/local/share/cmake-3.4/Modules/ExternalProject.cmake:2433
(_ep_add_configure_command)
cmake/modules/LLVMExternalProjectUtils.cmake:217 (ExternalProject_Add)
runtimes/CMakeLists.txt:412 (llvm_ExternalProject_Add)
runtimes/CMakeLists.txt:535 (runtime_default_target)
-- Configuring incomplete, errors occurred!
See also
"/data/repo/dev-master/build-all-builtins/CMakeFiles/CMakeOutput.log".
See also
"/data/repo/dev-master/build-all-builtins/CMakeFiles/CMakeError.log".
FAILED: build.ninja
/usr/local/bin/cmake -H/data/repo/dev-master
-B/data/repo/dev-master/build-all-builtins
ninja: error: rebuilding 'build.ninja': subcommand failed
-----------
I can't see that LLVM_EXTERNAL_LIBCXX_SOURCE_DIR is set anywhere, so
does that mean runtime-libcxx-headers isn't set either, so that's why it
fails since there is a dependency towards runtime-libcxx-headers anyway?
If I remove runtime-libcxx-headers from
llvm_ExternalProject_Add(runtimes
${CMAKE_CURRENT_SOURCE_DIR}
DEPENDS ${ARG_DEPENDS} runtime-libcxx-headers
then it compiles.
Any idea?
Regards,
Mikael
On 5/23/19 7:06 PM, Chris Bieneman via llvm-commits wrote:
> Author: cbieneman
> Date: Thu May 23 10:06:46 2019
> New Revision: 361513
>
> URL: http://llvm.org/viewvc/llvm-project?rev=361513&view=rev
> Log:
> [CMake] Copy C++ headers before configuring runtimes build
>
> Summary: On some platforms C++ headers are packaged with the compiler not the sysroot. If you don't copy C++ headers into the build include directory during configuraiton of the outer build the C++ check during the runtime configuration may get inaccurate results.
>
> Reviewers: phosek, compnerd, smeenai, EricWF
>
> Reviewed By: compnerd
>
> Subscribers: EricWF, christof, libcxx-commits, mgorny, llvm-commits
>
> Tags: #llvm, #libc
>
> Differential Revision: https://reviews.llvm.org/D62155
>
> Modified:
> llvm/trunk/runtimes/CMakeLists.txt
>
> Modified: llvm/trunk/runtimes/CMakeLists.txt
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/runtimes/CMakeLists.txt?rev=361513&r1=361512&r2=361513&view=diff
> ==============================================================================
> --- llvm/trunk/runtimes/CMakeLists.txt (original)
> +++ llvm/trunk/runtimes/CMakeLists.txt Thu May 23 10:06:46 2019
> @@ -4,8 +4,12 @@
> # should be built with the LLVM toolchain from the build directory. This file is
> # a first step to formalizing runtime build interfaces.
>
> -# In the current state this file only works with compiler-rt, other runtimes
> -# will work as the runtime build interface standardizes.
> +# Setting CMake minimum required version should be at the very top of the file
> +# if this is the entry point.
> +if(CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
> + cmake_minimum_required(VERSION 3.4.3)
> + project(Runtimes C CXX ASM)
> +endif()
>
> # Find all subdirectories containing CMake projects
> file(GLOB entries *)
> @@ -205,6 +209,11 @@ if(${CMAKE_SOURCE_DIR} STREQUAL ${CMAKE_
>
> else() # if this is included from LLVM's CMake
> include(LLVMExternalProjectUtils)
> + if (LLVM_EXTERNAL_LIBCXX_SOURCE_DIR)
> + set(LIBCXX_HEADER_DIR ${LLVM_INCLUDE_DIR}/c++/v1/)
> + set(CXX_HEADER_TARGET runtime-libcxx-headers)
> + add_subdirectory(${LLVM_EXTERNAL_LIBCXX_SOURCE_DIR}/include ${CXX_HEADER_TARGET})
> + endif()
>
> if(NOT LLVM_BUILD_RUNTIMES)
> set(EXTRA_ARGS EXCLUDE_FROM_ALL)
> @@ -354,7 +363,7 @@ else() # if this is included from LLVM's
>
> llvm_ExternalProject_Add(runtimes
> ${CMAKE_CURRENT_SOURCE_DIR}
> - DEPENDS ${ARG_DEPENDS}
> + DEPENDS ${ARG_DEPENDS} runtime-libcxx-headers
> # Builtins were built separately above
> CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off
> -DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
> @@ -445,7 +454,7 @@ else() # if this is included from LLVM's
>
> llvm_ExternalProject_Add(runtimes-${name}
> ${CMAKE_CURRENT_SOURCE_DIR}
> - DEPENDS ${${name}_deps}
> + DEPENDS ${${name}_deps} runtime-libcxx-headers
> # Builtins were built separately above
> CMAKE_ARGS -DCOMPILER_RT_BUILD_BUILTINS=Off
> -DLLVM_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS}
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
More information about the llvm-commits
mailing list