(Sorry for the amount of topics lately. I figured it’s better than asking on Discord since posting here at least gives everyone a chance to benefit from the discussions.)
When setting LIBCXX variables in a default build of libc++ (-S runtimes), they are used by CMake. However, the same is not true for bootstrapping builds (-S llvm), unless I’m doing something wrong:
$ cmake -DCMAKE_BUILD_TYPE=Release -DLIBCXX_ENABLE_SHARED=OFF -DLLVM_ENABLE_RUNTIMES=libcxx -LAH -B build -S llvm | grep LIBCXX_ENABLE_SHARED
# nothing
$ cmake -DCMAKE_BUILD_TYPE=Release -DLIBCXX_ENABLE_SHARED=OFF -DLLVM_ENABLE_RUNTIMES=libcxx -LAH -B build -S runtimes | grep LIBCXX_ENABLE_SHARED
LIBCXX_ENABLE_SHARED:BOOL=OFF
This is reflected when actually building: The default build disables the shared library, while the bootstrapping one does not.
Sorry I don’t have the solution but is this these open issues?
opened 07:42PM - 04 Mar 24 UTC
cmake
When I try to create a toolchain for an RISC-V via the bootstrap build, I get th… e following warning:
```
CMake Warning:
Manually-specified variables were not used by the project:
LIBCXXABI_USE_LLVM_UNWINDER
LIBCXX_ENABLE_FILESYSTEM
LIBCXX_ENABLE_SHARED
LIBCXX_ENABLE_STATIC_ABI_LIBRARY
LIBCXX_ENABLE_TIME_ZONE_DATABASE
```
The configure step also fails, because
```
CMake Error at .../libcxxabi/CMakeLists.txt:51 (message):
LIBCXXABI_USE_LLVM_UNWINDER is set to ON, but libunwind is not specified in
LLVM_ENABLE_RUNTIMES.
```
Used llvm: release/18.x()
Even I added the cmake variable to the build script:
```
cmake -S llvm -B build -G Ninja \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$TOOLCHAIN_DIR \
-DLLVM_ENABLE_PROJECTS="clang;lld" \
-DLLVM_TARGETS_TO_BUILD=RISCV \
-DLLVM_STATIC_LINK_CXX_STDLIB=ON \
-DLLVM_TARGET_ARCH="riscv32;riscv64" \
-DLLVM_DEFAULT_TARGET_TRIPLE=riscv32-unknown-unknown-elf \
-DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi" \
-DLLVM_RUNTIME_TARGETS="riscv32-unknown-unknown-elf;riscv64-unknown-unknown-elf" \
-DLLVM_BUILTIN_TARGETS="riscv32-unknown-unknown-elf;riscv64-unknown-unknown-elf" \
-DBUILD_SHARED_LIBS=OFF \
-DLLVM_BUILD_TESTS=False \
-DLLVM_ENABLE_RTTI=ON \
-DLLVM_ENABLE_TERMINFO=OFF \
-DLLVM_ENABLE_DUMP=ON \
-DLIBCXX_ENABLE_SHARED=OFF \
-DLIBCXX_ENABLE_FILESYSTEM=OFF \
-DLIBCXX_ENABLE_TIME_ZONE_DATABASE=OFF \
-DLIBCXXABI_USE_LLVM_UNWINDER=OFF \
-DLIBCXX_ENABLE_STATIC_ABI_LIBRARY=ON \
-DBUILTINS_riscv32-unknown-unknown-elf_CMAKE_SYSTEM_NAME=Generic \
-DBUILTINS_riscv64-unknown-unknown-elf_CMAKE_SYSTEM_NAME=Generic \
-DRUNTIMES_riscv32-unknown-unknown-elf_CMAKE_SYSTEM_NAME=Generic \
-DRUNTIMES_riscv64-unknown-unknown-elf_CMAKE_SYSTEM_NAME=Generic \
-DBUILTINS_riscv32-unknown-unknown-elf_COMPILER_RT_BAREMETAL_BUILD=ON \
-DRUNTIMES_riscv32-unknown-unknown-elf_COMPILER_RT_BUILD_LIBFUZZER=OFF \
-DRUNTIMES_riscv32-unknown-unknown-elf_COMPILER_RT_BUILD_MEMPROF=OFF \
-DRUNTIMES_riscv32-unknown-unknown-elf_COMPILER_RT_BUILD_PROFILE=OFF \
-DRUNTIMES_riscv32-unknown-unknown-elf_COMPILER_RT_BUILD_SANITIZERS=OFF \
-DRUNTIMES_riscv32-unknown-unknown-elf_COMPILER_RT_BUILD_XRAY=OFF \
-DBUILTINS_riscv64-unknown-unknown-elf_COMPILER_RT_BAREMETAL_BUILD=ON \
-DRUNTIMES_riscv64-unknown-unknown-elf_COMPILER_RT_BUILD_LIBFUZZER=OFF \
-DRUNTIMES_riscv64-unknown-unknown-elf_COMPILER_RT_BUILD_MEMPROF=OFF \
-DRUNTIMES_riscv64-unknown-unknown-elf_COMPILER_RT_BUILD_PROFILE=OFF \
-DRUNTIMES_riscv64-unknown-unknown-elf_COMPILER_RT_BUILD_SANITIZERS=OFF \
-DRUNTIMES_riscv64-unknown-unknown-elf_COMPILER_RT_BUILD_XRAY=OFF \
```
This is very unexpected, since this is neither documented nor neither should the main project fail to pass those variables.
If there is any cache or option variable in the subproject, which is defined in the super project, it should be passed.
opened 02:00AM - 03 Aug 25 UTC
libc++
Hi,
Following the instructions here https://releases.llvm.org/13.0.1/projects/l… ibcxx/docs/BuildingLibcxx.html#bootstrapping-build
I'm trying to do a bootstrapping build with the following invocation of cmake:
```
cmake -G Ninja -S llvm -B ~/coding/clang-build \
-DCMAKE_INSTALL_PREFIX=~/coding/clang-install/ \
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIBUNWIND_ENABLE_SHARED=OFF \
-DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
-DLLVM_OPTIMIZED_TABLEGEN=ON \
-DLLVM_RUNTIME_TARGETS="host" \
-DLLVM_HOST_TRIPLE="arm64-apple-darwin23.1.0" \
-DLLVM_TARGETS_TO_BUILD="host"
```
which yields:
<details>
<summary>
```
...
CMake Warning:
Manually-specified variables were not used by the project:
LIBUNWIND_ENABLE_SHARED
...
```
which then leads to:
```
CMake Error at $HOME/coding/main/libunwind/src/CMakeLists.txt:95 (message):
Compiler doesn't support generation of unwind tables if exception support
is disabled. Building libunwind DSO with runtime dependency on C++ ABI
library is not supported.
-- Configuring incomplete, errors occurred!
```
</summary>
```
❯ cmake -G Ninja -S llvm -B ~/coding/clang-build \
-DCMAKE_INSTALL_PREFIX=~/coding/clang-install/ \
-DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIBUNWIND_ENABLE_SHARED=OFF \
-DLLVM_ENABLE_PROJECTS="clang" -DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind" \
-DLLVM_OPTIMIZED_TABLEGEN=ON \
-DLLVM_RUNTIME_TARGETS="host" \
-DLLVM_HOST_TRIPLE="arm64-apple-darwin23.1.0" \
-DLLVM_TARGETS_TO_BUILD="host"
-- The C compiler identification is AppleClang 15.0.0.15000040
-- The CXX compiler identification is AppleClang 15.0.0.15000040
-- The ASM compiler identification is AppleClang
-- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- bolt project is disabled
-- clang project is enabled
-- clang-tools-extra project is disabled
-- compiler-rt project is disabled
-- cross-project-tests project is disabled
-- libclc project is disabled
-- lld project is disabled
-- lldb project is disabled
-- mlir project is disabled
-- openmp project is disabled
-- polly project is disabled
-- flang project is disabled
-- libc project is disabled
-- Found libtool - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool
-- Found Python3: $HOME/miniconda3/bin/python3.9 (found suitable version "3.9.16", minimum required is "3.8") found components: Interpreter
-- Looking for __GLIBC__
-- Looking for __GLIBC__ - not found
-- Looking for valgrind/valgrind.h
-- Looking for valgrind/valgrind.h - not found
-- Looking for FE_ALL_EXCEPT
-- Looking for FE_ALL_EXCEPT - found
-- Looking for FE_INEXACT
-- Looking for FE_INEXACT - found
-- Performing Test HAVE_BUILTIN_THREAD_POINTER
-- Performing Test HAVE_BUILTIN_THREAD_POINTER - Success
-- Looking for CrashReporterClient.h
-- Looking for CrashReporterClient.h - not found
-- Performing Test HAVE_CRASHREPORTER_INFO
-- Performing Test HAVE_CRASHREPORTER_INFO - Success
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for pthread_rwlock_init in pthread
-- Looking for pthread_rwlock_init in pthread - found
-- Looking for pthread_mutex_lock in pthread
-- Looking for pthread_mutex_lock in pthread - found
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- Looking for shm_open in rt
-- Looking for shm_open in rt - not found
-- Looking for pfm_initialize in pfm
-- Looking for pfm_initialize in pfm - not found
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/lib/libz.tbd (found version "1.2.12")
-- Looking for compress2
-- Looking for compress2 - found
-- Found LibXml2: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/lib/libxml2.tbd (found version "2.9.13")
-- Looking for xmlReadMemory
-- Looking for xmlReadMemory - found
-- Looking for histedit.h
-- Looking for histedit.h - found
-- Found LibEdit: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include (found version "2.11")
-- Looking for arc4random
-- Looking for arc4random - found
-- Looking for backtrace
-- Looking for backtrace - found
-- backtrace facility detected in default set of libraries
-- Found Backtrace: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/include
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW
-- Performing Test C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW - Success
-- Looking for __register_frame
-- Looking for __register_frame - found
-- Looking for __deregister_frame
-- Looking for __deregister_frame - found
-- Looking for __unw_add_dynamic_fde
-- Looking for __unw_add_dynamic_fde - found
-- Looking for _Unwind_Backtrace
-- Looking for _Unwind_Backtrace - found
-- Looking for getpagesize
-- Looking for getpagesize - found
-- Looking for sysconf
-- Looking for sysconf - found
-- Looking for getrusage
-- Looking for getrusage - found
-- Looking for isatty
-- Looking for isatty - found
-- Looking for futimens
-- Looking for futimens - found
-- Looking for futimes
-- Looking for futimes - found
-- Looking for getauxval
-- Looking for getauxval - not found
-- Looking for mallctl
-- Looking for mallctl - not found
-- Looking for mallinfo
-- Looking for mallinfo - not found
-- Looking for mallinfo2
-- Looking for mallinfo2 - not found
-- Looking for malloc_zone_statistics
-- Looking for malloc_zone_statistics - found
-- Looking for posix_spawn
-- Looking for posix_spawn - found
-- Looking for pread
-- Looking for pread - found
-- Looking for sbrk
-- Looking for sbrk - found
-- Looking for strerror_r
-- Looking for strerror_r - found
-- Looking for strerror_s
-- Looking for strerror_s - not found
-- Looking for setenv
-- Looking for setenv - found
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIMESPEC_TV_NSEC - Success
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC
-- Performing Test HAVE_STRUCT_STAT_ST_MTIM_TV_NSEC - Failed
-- Looking for pthread_getname_np
-- Looking for pthread_getname_np - found
-- Looking for pthread_setname_np
-- Looking for pthread_setname_np - found
-- Looking for pthread_get_name_np
-- Looking for pthread_get_name_np - not found
-- Looking for pthread_set_name_np
-- Looking for pthread_set_name_np - not found
-- Looking for dlopen
-- Looking for dlopen - found
-- Looking for proc_pid_rusage
-- Looking for proc_pid_rusage - found
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS_WITHOUT_LIB - Success
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB
-- Performing Test HAVE_CXX_ATOMICS64_WITHOUT_LIB - Success
-- Performing Test LLVM_HAS_ATOMICS
-- Performing Test LLVM_HAS_ATOMICS - Success
-- LLVM host triple: arm64-apple-darwin23.1.0
-- Native target architecture is AArch64
-- Threads enabled.
-- Doxygen disabled.
-- Ninja version: 1.12.1
-- Found ld64 - /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/ld-classic
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- Could NOT find OCaml (missing: OCAMLFIND OCAML_VERSION OCAML_STDLIB_PATH)
-- OCaml bindings disabled.
-- Found Python module pygments
-- Found Python module pygments.lexers.c_cpp
-- Could NOT find Python module yaml
-- LLVM default target triple: arm64-apple-darwin23.1.0
-- Performing Test C_SUPPORTS_FPIC
-- Performing Test C_SUPPORTS_FPIC - Success
-- Performing Test CXX_SUPPORTS_FPIC
-- Performing Test CXX_SUPPORTS_FPIC - Success
-- Building with -fPIC
-- Performing Test C_SUPPORTS_FNO_SEMANTIC_INTERPOSITION
-- Performing Test C_SUPPORTS_FNO_SEMANTIC_INTERPOSITION - Failed
-- Performing Test CXX_SUPPORTS_FNO_SEMANTIC_INTERPOSITION
-- Performing Test CXX_SUPPORTS_FNO_SEMANTIC_INTERPOSITION - Failed
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Success
-- Performing Test C_SUPPORTS_CXX98_COMPAT_EXTRA_SEMI_FLAG
-- Performing Test C_SUPPORTS_CXX98_COMPAT_EXTRA_SEMI_FLAG - Success
-- Performing Test CXX_SUPPORTS_CXX98_COMPAT_EXTRA_SEMI_FLAG
-- Performing Test CXX_SUPPORTS_CXX98_COMPAT_EXTRA_SEMI_FLAG - Success
-- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG
-- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG - Success
-- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL
-- Performing Test CXX_WSUGGEST_OVERRIDE_ALLOWS_ONLY_FINAL - Success
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Success
-- Performing Test C_SUPPORTS_MISLEADING_INDENTATION_FLAG
-- Performing Test C_SUPPORTS_MISLEADING_INDENTATION_FLAG - Success
-- Performing Test CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG
-- Performing Test CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG - Success
-- Performing Test C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG
-- Performing Test C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG - Success
-- Performing Test CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG
-- Performing Test CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG - Success
-- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS
-- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS - Failed
-- Looking for os_signpost_interval_begin
-- Looking for os_signpost_interval_begin - found
-- Performing Test macos_signposts_usable
-- Performing Test macos_signposts_usable - Success
-- Linker detection: Apple
-- Performing Test LLVM_LINKER_SUPPORTS_NO_EXPORTED_SYMBOLS
-- Performing Test LLVM_LINKER_SUPPORTS_NO_EXPORTED_SYMBOLS - Success
-- Performing Test LLVM_LINKER_SUPPORTS_NO_WARN_DUPLICATE_LIBRARIES
-- Performing Test LLVM_LINKER_SUPPORTS_NO_WARN_DUPLICATE_LIBRARIES - Success
-- Performing Test LLVM_LINKER_SUPPORTS_B_SYMBOLIC_FUNCTIONS
-- Performing Test LLVM_LINKER_SUPPORTS_B_SYMBOLIC_FUNCTIONS - Failed
-- Performing Test HAS_WERROR_GLOBAL_CTORS
-- Performing Test HAS_WERROR_GLOBAL_CTORS - Success
-- Performing Test LLVM_HAS_NOGLOBAL_CTOR_MUTEX
-- Performing Test LLVM_HAS_NOGLOBAL_CTOR_MUTEX - Failed
-- Looking for __x86_64__
-- Looking for __x86_64__ - not found
-- Found Git: /opt/homebrew/bin/git (found version "2.44.0")
-- Looking for logf128
-- Looking for logf128 - not found
-- Targeting AArch64
-- Looking for sys/resource.h
-- Looking for sys/resource.h - found
-- Looking for dlfcn.h
-- Looking for dlfcn.h - found
-- Looking for dladdr
-- Looking for dladdr - found
-- Clang version: 22.0.0git
-- Host linker version: 1015.7
-- Looking for include file CoreServices/CoreServices.h
-- Looking for include file CoreServices/CoreServices.h - found
-- Performing Test HAVE_LINKER_FLAG_LONG_PLT
-- Performing Test HAVE_LINKER_FLAG_LONG_PLT - Failed
-- Found Perl: /usr/bin/perl (found version "5.30.3")
-- Found Python3: $HOME/miniconda3/bin/python3.9 (found version "3.9.16") found components: Interpreter
-- Registering ExampleIRTransforms as a pass plugin (static build: OFF)
-- Registering Bye as a pass plugin (static build: OFF)
-- Google Benchmark version: v0.0.0, normalized to 0.0.0
-- Looking for shm_open in rt
-- Looking for shm_open in rt - not found
-- Performing Test HAVE_CXX_FLAG_WALL
-- Performing Test HAVE_CXX_FLAG_WALL - Success
-- Performing Test HAVE_CXX_FLAG_WEXTRA
-- Performing Test HAVE_CXX_FLAG_WEXTRA - Success
-- Performing Test HAVE_CXX_FLAG_WSHADOW
-- Performing Test HAVE_CXX_FLAG_WSHADOW - Success
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL
-- Performing Test HAVE_CXX_FLAG_WFLOAT_EQUAL - Success
-- Performing Test HAVE_CXX_FLAG_WOLD_STYLE_CAST
-- Performing Test HAVE_CXX_FLAG_WOLD_STYLE_CAST - Success
-- Performing Test HAVE_CXX_FLAG_WSUGGEST_OVERRIDE
-- Performing Test HAVE_CXX_FLAG_WSUGGEST_OVERRIDE - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC
-- Performing Test HAVE_CXX_FLAG_PEDANTIC - Success
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS
-- Performing Test HAVE_CXX_FLAG_PEDANTIC_ERRORS - Success
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32
-- Performing Test HAVE_CXX_FLAG_WSHORTEN_64_TO_32 - Success
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_FSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS
-- Performing Test HAVE_CXX_FLAG_WNO_DEPRECATED_DECLARATIONS - Success
-- Performing Test HAVE_CXX_FLAG_FNO_EXCEPTIONS
-- Performing Test HAVE_CXX_FLAG_FNO_EXCEPTIONS - Success
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING
-- Performing Test HAVE_CXX_FLAG_WSTRICT_ALIASING - Success
-- Performing Test HAVE_CXX_FLAG_WD654
-- Performing Test HAVE_CXX_FLAG_WD654 - Failed
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY
-- Performing Test HAVE_CXX_FLAG_WTHREAD_SAFETY - Success
-- Enabling additional flags: -DINCLUDE_DIRECTORIES=$HOME/coding/main/third-party/benchmark/include
-- Compiling and running to test HAVE_THREAD_SAFETY_ATTRIBUTES
-- Performing Test HAVE_THREAD_SAFETY_ATTRIBUTES -- success
-- Performing Test HAVE_CXX_FLAG_COVERAGE
-- Performing Test HAVE_CXX_FLAG_COVERAGE - Success
-- Compiling and running to test HAVE_GNU_POSIX_REGEX
-- Performing Test HAVE_GNU_POSIX_REGEX -- failed to compile
-- Compiling and running to test HAVE_POSIX_REGEX
-- Performing Test HAVE_POSIX_REGEX -- success
-- Compiling and running to test HAVE_STEADY_CLOCK
-- Performing Test HAVE_STEADY_CLOCK -- success
-- Compiling and running to test HAVE_PTHREAD_AFFINITY
-- Performing Test HAVE_PTHREAD_AFFINITY -- failed to compile
-- Configuring done (16.0s)
-- Generating done (2.7s)
CMake Warning:
Manually-specified variables were not used by the project:
LIBUNWIND_ENABLE_SHARED
-- Build files have been written to: $HOME/coding/clang-build
❯ ninja -C ~/coding/clang-build runtimes
ninja: Entering directory `$HOME/coding/clang-build'
[3242/3408] Linking CXX static library lib/libclangCodeGen.a
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: warning renaming duplicate member name 'AMDGPU.cpp.o' from 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/TargetBuiltins/AMDGPU.cpp.o(AMDGPU.cpp.o)' and 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/AMDGPU.cpp.o(AMDGPU.cpp.o)'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: warning renaming duplicate member name 'ARM.cpp.o' from 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/TargetBuiltins/ARM.cpp.o(ARM.cpp.o)' and 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/ARM.cpp.o(ARM.cpp.o)'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: warning renaming duplicate member name 'DirectX.cpp.o' from 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/TargetBuiltins/DirectX.cpp.o(DirectX.cpp.o)' and 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/DirectX.cpp.o(DirectX.cpp.o)'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: warning renaming duplicate member name 'Hexagon.cpp.o' from 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/Hexagon.cpp.o(Hexagon.cpp.o)' and 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/TargetBuiltins/Hexagon.cpp.o(Hexagon.cpp.o)'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: warning renaming duplicate member name 'NVPTX.cpp.o' from 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/TargetBuiltins/NVPTX.cpp.o(NVPTX.cpp.o)' and 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/NVPTX.cpp.o(NVPTX.cpp.o)'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: warning renaming duplicate member name 'PPC.cpp.o' from 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/TargetBuiltins/PPC.cpp.o(PPC.cpp.o)' and 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/PPC.cpp.o(PPC.cpp.o)'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: warning renaming duplicate member name 'RISCV.cpp.o' from 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/RISCV.cpp.o(RISCV.cpp.o)' and 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/TargetBuiltins/RISCV.cpp.o(RISCV.cpp.o)'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: warning renaming duplicate member name 'SPIR.cpp.o' from 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/SPIR.cpp.o(SPIR.cpp.o)' and 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/TargetBuiltins/SPIR.cpp.o(SPIR.cpp.o)'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: warning renaming duplicate member name 'SystemZ.cpp.o' from 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/SystemZ.cpp.o(SystemZ.cpp.o)' and 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/TargetBuiltins/SystemZ.cpp.o(SystemZ.cpp.o)'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: warning renaming duplicate member name 'WebAssembly.cpp.o' from 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/TargetBuiltins/WebAssembly.cpp.o(WebAssembly.cpp.o)' and 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/WebAssembly.cpp.o(WebAssembly.cpp.o)'
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: warning renaming duplicate member name 'X86.cpp.o' from 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/Targets/X86.cpp.o(X86.cpp.o)' and 'tools/clang/lib/CodeGen/CMakeFiles/obj.clangCodeGen.dir/TargetBuiltins/X86.cpp.o(X86.cpp.o)'
[3404/3408] Performing configure step for 'runtimes-host'
Not searching for unused variables given on the command line.
loading initial cache file $HOME/coding/clang-build/projects/runtimes-host/tmp/runtimes-host-cache-RelWithDebInfo.cmake
-- Performing bootstrapping runtimes build.
-- The C compiler identification is Clang 22.0.0
-- The CXX compiler identification is Clang 22.0.0
-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: $HOME/coding/clang-build/bin/clang
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for histedit.h
-- Looking for histedit.h - not found
-- Could NOT find LibEdit (missing: LibEdit_INCLUDE_DIRS LibEdit_LIBRARIES)
-- Found ZLIB: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/lib/libz.tbd (found version "1.2.12")
-- Found zstd: /opt/homebrew/lib/libzstd.dylib
-- Found LibXml2: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX14.0.sdk/usr/lib/libxml2.tbd (found version "2.9.13")
-- Could NOT find LibEdit (missing: LibEdit_INCLUDE_DIRS LibEdit_LIBRARIES)
-- Performing Test CXX_SUPPORTS_UNWINDLIB_EQ_NONE_FLAG
-- Performing Test CXX_SUPPORTS_UNWINDLIB_EQ_NONE_FLAG - Failed
-- Performing Test CXX_SUPPORTS_NOSTDLIBXX_FLAG
-- Performing Test CXX_SUPPORTS_NOSTDLIBXX_FLAG - Failed
-- Performing Test CXX_SUPPORTS_NOSTDINCXX_FLAG
-- Performing Test CXX_SUPPORTS_NOSTDINCXX_FLAG - Failed
CMake Warning (dev) at /opt/homebrew/share/cmake/Modules/GNUInstallDirs.cmake:253 (message):
Unable to determine default CMAKE_INSTALL_LIBDIR directory because no
target architecture is known. Please enable at least one language before
including GNUInstallDirs.
Call Stack (most recent call first):
$HOME/coding/main/llvm/cmake/modules/AddLLVM.cmake:1 (include)
CMakeLists.txt:182 (include)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Linker detection: Apple
-- Performing Test LLVM_LINKER_SUPPORTS_NO_EXPORTED_SYMBOLS
-- Performing Test LLVM_LINKER_SUPPORTS_NO_EXPORTED_SYMBOLS - Failed
-- Performing Test LLVM_LINKER_SUPPORTS_NO_WARN_DUPLICATE_LIBRARIES
-- Performing Test LLVM_LINKER_SUPPORTS_NO_WARN_DUPLICATE_LIBRARIES - Failed
-- Performing Test C_SUPPORTS_FPIC
-- Performing Test C_SUPPORTS_FPIC - Failed
-- Performing Test CXX_SUPPORTS_FPIC
-- Performing Test CXX_SUPPORTS_FPIC - Failed
CMake Warning at $HOME/coding/main/llvm/cmake/modules/HandleLLVMOptions.cmake:377 (message):
-fPIC is not supported.
Call Stack (most recent call first):
$HOME/coding/main/llvm/cmake/modules/HandleLLVMOptions.cmake:437 (add_flag_or_print_warning)
CMakeLists.txt:183 (include)
-- Performing Test C_SUPPORTS_FNO_SEMANTIC_INTERPOSITION
-- Performing Test C_SUPPORTS_FNO_SEMANTIC_INTERPOSITION - Failed
-- Performing Test CXX_SUPPORTS_FNO_SEMANTIC_INTERPOSITION
-- Performing Test CXX_SUPPORTS_FNO_SEMANTIC_INTERPOSITION - Failed
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test SUPPORTS_FVISIBILITY_INLINES_HIDDEN_FLAG - Failed
-- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG
-- Performing Test CXX_SUPPORTS_SUGGEST_OVERRIDE_FLAG - Failed
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP
-- Performing Test C_WCOMMENT_ALLOWS_LINE_WRAP - Failed
-- Performing Test C_SUPPORTS_MISLEADING_INDENTATION_FLAG
-- Performing Test C_SUPPORTS_MISLEADING_INDENTATION_FLAG - Failed
-- Performing Test CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG
-- Performing Test CXX_SUPPORTS_MISLEADING_INDENTATION_FLAG - Failed
-- Performing Test C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG
-- Performing Test C_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG - Failed
-- Performing Test CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG
-- Performing Test CXX_SUPPORTS_CTAD_MAYBE_UNSPPORTED_FLAG - Failed
-- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS
-- Performing Test LINKER_SUPPORTS_COLOR_DIAGNOSTICS - Failed
-- Looking for os_signpost_interval_begin
-- Looking for os_signpost_interval_begin - not found
-- Found Python3: $HOME/miniconda3/bin/python3.9 (found version "3.9.16") found components: Interpreter
-- LLVM host triple: arm64-apple-darwin23.1.0
-- LLVM default target triple: host
-- Found libtool - $HOME/coding/clang-build/bin/llvm-libtool-darwin
-- Using libunwind testing configuration: $HOME/coding/main/libunwind/test/configs/llvm-libunwind-shared.cfg.in
-- Looking for __mips_hard_float
-- Looking for __mips_hard_float - not found
-- Looking for _ABIO32
-- Looking for _ABIO32 - not found
-- Looking for fopen in c
-- Looking for fopen in c - not found
-- Looking for __gcc_personality_v0 in gcc_s
-- Looking for __gcc_personality_v0 in gcc_s - not found
-- Looking for __absvdi2 in gcc
-- Looking for __absvdi2 in gcc - not found
-- Performing Test C_SUPPORTS_COMMENT_LIB_PRAGMA
-- Performing Test C_SUPPORTS_COMMENT_LIB_PRAGMA - Failed
-- Looking for __arm__
-- Looking for __arm__ - not found
-- Looking for __USING_SJLJ_EXCEPTIONS__
-- Looking for __USING_SJLJ_EXCEPTIONS__ - not found
-- Looking for __ARM_DWARF_EH__
-- Looking for __ARM_DWARF_EH__ - not found
-- Looking for dladdr in dl
-- Looking for dladdr in dl - not found
-- Looking for pthread_once in pthread
-- Looking for pthread_once in pthread - not found
-- Performing Test CXX_SUPPORTS_WERROR_EQ_RETURN_TYPE_FLAG
-- Performing Test CXX_SUPPORTS_WERROR_EQ_RETURN_TYPE_FLAG - Failed
-- Performing Test CXX_SUPPORTS_FSTRICT_ALIASING_FLAG
-- Performing Test CXX_SUPPORTS_FSTRICT_ALIASING_FLAG - Failed
-- Performing Test CXX_SUPPORTS_EHSC_FLAG
-- Performing Test CXX_SUPPORTS_EHSC_FLAG - Failed
-- Performing Test CXX_SUPPORTS_FUNWIND_TABLES_FLAG
-- Performing Test CXX_SUPPORTS_FUNWIND_TABLES_FLAG - Failed
-- Performing Test CXX_SUPPORTS_FNO_EXCEPTIONS_FLAG
-- Performing Test CXX_SUPPORTS_FNO_EXCEPTIONS_FLAG - Failed
-- Performing Test CXX_SUPPORTS_FNO_RTTI_FLAG
-- Performing Test CXX_SUPPORTS_FNO_RTTI_FLAG - Failed
CMake Error at $HOME/coding/main/libunwind/src/CMakeLists.txt:95 (message):
Compiler doesn't support generation of unwind tables if exception support
is disabled. Building libunwind DSO with runtime dependency on C++ ABI
library is not supported.
-- Configuring incomplete, errors occurred!
FAILED: runtimes/runtimes-host-stamps/runtimes-host-configure $HOME/coding/clang-build/runtimes/runtimes-host-stamps/runtimes-host-configure
cd $HOME/coding/clang-build/runtimes/runtimes-host-bins && /opt/homebrew/bin/cmake --no-warn-unused-cli -DCMAKE_C_COMPILER=$HOME/coding/clang-build/./bin/clang -DCMAKE_CXX_COMPILER=$HOME/coding/clang-build/./bin/clang++ -DCMAKE_ASM_COMPILER=$HOME/coding/clang-build/./bin/clang -DCMAKE_AR=$HOME/coding/clang-build/./bin/llvm-ar -DCMAKE_LIBTOOL=$HOME/coding/clang-build/./bin/llvm-libtool-darwin -DCMAKE_LIPO=$HOME/coding/clang-build/./bin/llvm-lipo -DCMAKE_RANLIB=$HOME/coding/clang-build/./bin/llvm-ranlib -DCMAKE_NM=$HOME/coding/clang-build/./bin/llvm-nm -DCMAKE_OBJDUMP=$HOME/coding/clang-build/./bin/llvm-objdump -DCMAKE_C_COMPILER_TARGET=host -DCMAKE_CXX_COMPILER_TARGET=host -DCMAKE_Fortran_COMPILER_TARGET=host -DCMAKE_ASM_COMPILER_TARGET=host -DCMAKE_INSTALL_PREFIX=$HOME/coding/clang-install -DLLVM_BINARY_DIR=$HOME/coding/clang-build -DLLVM_CONFIG_PATH=$HOME/coding/clang-build/bin/llvm-config -DLLVM_ENABLE_WERROR=OFF -DLLVM_HOST_TRIPLE=arm64-apple-darwin23.1.0 -DLLVM_HAVE_LINK_VERSION_SCRIPT=0 -DLLVM_USE_RELATIVE_PATHS_IN_DEBUG_INFO=OFF -DLLVM_USE_RELATIVE_PATHS_IN_FILES=OFF -DLLVM_LIT_ARGS=-sv -DLLVM_SOURCE_PREFIX= -DPACKAGE_VERSION=22.0.0git -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_MAKE_PROGRAM=/opt/homebrew/bin/ninja -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DCOMPILER_RT_BUILD_BUILTINS=OFF -DLLVM_INCLUDE_TESTS=ON -DLLVM_ENABLE_PROJECTS_USED=ON -DLLVM_ENABLE_PER_TARGET_RUNTIME_DIR=OFF -DCMAKE_C_COMPILER_WORKS=ON -DCMAKE_CXX_COMPILER_WORKS=ON -DCMAKE_Fortran_COMPILER_WORKS=ON -DCMAKE_ASM_COMPILER_WORKS=ON -DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON -DLLVM_RUNTIMES_TARGET=host -DHAVE_LLVM_LIT=ON -DCLANG_RESOURCE_DIR= -DLLVM_DEFAULT_TARGET_TRIPLE=host "-DLLVM_ENABLE_RUNTIMES=libcxx;libcxxabi;libunwind" -DLLVM_USE_LINKER= -GNinja -C$HOME/coding/clang-build/projects/runtimes-host/tmp/runtimes-host-cache-RelWithDebInfo.cmake -S $HOME/coding/main/llvm/runtimes/../../runtimes -B $HOME/coding/clang-build/runtimes/runtimes-host-bins && /opt/homebrew/bin/cmake -E touch $HOME/coding/clang-build/runtimes/runtimes-host-stamps/runtimes-host-configure
ninja: build stopped: subcommand failed.
```
</details>
This is as of:
7598c25b5a2a
1 Like
Yeah, that sounds like it. We’ll need to wait for the developers to see it then. Thanks!
cmake variables are not propagated as is into the runtimes build by design.
You are supposed to prefix them with RUNTIMES_<target-triple>_ if you want to forward them.
For example, -DRUNTIMES_<target-triple>_LIBCXX_ENABLE_SHARED=OFF should work.
3 Likes