build-llvm: Don't hardcode default choices of linker/stdlib on Windows

This should help with using clangd for other mingw toolchain
installs.
This commit is contained in:
Martin Storsjö committed 2024-10-02 16:06:06 +03:00
1 parent 9f1f0104f1
commit 49db4a3a15
1 file changed
-11
-11
View File
@@ -242,17 +242,6 @@ if [ -n "$COMPILER_LAUNCHER" ]; then
CMAKEFLAGS="$CMAKEFLAGS -DCMAKE_CXX_COMPILER_LAUNCHER=$COMPILER_LAUNCHER"
fi
if [ -n "$TARGET_WINDOWS" ]; then
# Custom, llvm-mingw specific defaults. We normally set these in
# the frontend wrappers, but this makes sure they are enabled by
# default if that wrapper is bypassed as well.
CMAKEFLAGS="$CMAKEFLAGS -DCLANG_DEFAULT_RTLIB=compiler-rt"
CMAKEFLAGS="$CMAKEFLAGS -DCLANG_DEFAULT_UNWINDLIB=libunwind"
CMAKEFLAGS="$CMAKEFLAGS -DCLANG_DEFAULT_CXX_STDLIB=libc++"
CMAKEFLAGS="$CMAKEFLAGS -DCLANG_DEFAULT_LINKER=lld"
CMAKEFLAGS="$CMAKEFLAGS -DLLD_DEFAULT_LD_LLD_IS_MINGW=ON"
fi
if [ -n "$LTO" ]; then
CMAKEFLAGS="$CMAKEFLAGS -DLLVM_ENABLE_LTO=$LTO"
fi