-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Open
Milestone
Description
Here is the cmake flags:
-DCLANG_CONFIG_FILE_SYSTEM_DIR="C:/Program Files/clang+llvm-%SOURCE_VERSION_MAJOR%/cfg/" ^
-DCMAKE_BUILD_TYPE=Release ^
-DLLVM_ENABLE_ASSERTIONS=OFF ^
-DLLVM_ENABLE_PROJECTS="llvm;clang;clang-tools-extra;openmp;bolt;lld;lldb;polly;mlir;flang" ^
-DLLVM_ENABLE_RPMALLOC=ON ^
-DLLVM_ENABLE_RUNTIMES="compiler-rt;libc;libcxx;pstl;offload" ^
-DLLVM_INSTALL_TOOLCHAIN_ONLY=ON ^
-DLLVM_PARALLEL_LINK_JOBS=2 ^
-DLLVM_TARGETS_TO_BUILD="AArch64;AMDGPU;ARM;BPF;LoongArch;Mips;NVPTX;PowerPC;RISCV;SystemZ;WebAssembly;X86" ^
-DCMAKE_C_COMPILER=%llvm_build_dir%\build64_stage0\bin\clang-cl.exe ^
-DCMAKE_CXX_COMPILER=%llvm_build_dir%\build64_stage0\bin\clang-cl.exe ^
-DCMAKE_LINKER=%llvm_build_dir%\build64_stage0\bin\lld-link.exe ^
-DCMAKE_AR=%llvm_build_dir%\build64_stage0\bin\llvm-lib.exe ^
-DCMAKE_RC=%llvm_build_dir%\build64_stage0\bin\llvm-windres.exe ^ninja install success, but ninja check-all failed:
[0/10] Performing build step for 'builtins'
ninja: no work to do.
[1/10] No install step for 'builtins'
[3/10] Completed 'builtins'
[3/10] Performing configure step for 'runtimes'
Not searching for unused variables given on the command line.
loading initial cache file E:/var/vcs/llvm-project-build_20.1.0-20250226-ga69568efe/build64/projects/runtimes/tmp/runtimes-cache-Release.cmake
-- Performing bootstrapping runtimes build.
-- LLVM host triple: x86_64-pc-windows-msvc
-- LLVM default target triple: x86_64-pc-windows-msvc
-- Setting LIBC_NAMESPACE namespace to '__llvm_libc_20_1_0_'
-- Set COMPILER_RESOURCE_DIR to E:\var\vcs\llvm-project-build_20.1.0-20250226-ga69568efe\build64\lib\clang\20 using --print-resource-dir
-- LIBC_CONF_ENABLE_STRONG_STACK_PROTECTOR: ON
-- LIBC_CONF_KEEP_FRAME_POINTER: ON
-- LIBC_CONF_ERRNO_MODE: LIBC_ERRNO_MODE_DEFAULT
-- LIBC_ADD_NULL_CHECKS: ON
-- LIBC_CONF_FREXP_INF_NAN_EXPONENT:
-- LIBC_CONF_MATH_OPTIMIZATIONS: 0
-- LIBC_CONF_PRINTF_DISABLE_FIXED_POINT: OFF
-- LIBC_CONF_PRINTF_DISABLE_FLOAT: OFF
-- LIBC_CONF_PRINTF_DISABLE_INDEX_MODE: OFF
-- LIBC_CONF_PRINTF_DISABLE_STRERROR: OFF
-- LIBC_CONF_PRINTF_DISABLE_WRITE_INT: OFF
-- LIBC_CONF_PRINTF_FLOAT_TO_STR_NO_SPECIALIZE_LD: OFF
-- LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_DYADIC_FLOAT: OFF
-- LIBC_CONF_PRINTF_FLOAT_TO_STR_USE_MEGA_LONG_DOUBLE_TABLE: OFF
-- LIBC_CONF_RAW_MUTEX_DEFAULT_SPIN_COUNT: 100
-- LIBC_CONF_RWLOCK_DEFAULT_SPIN_COUNT: 100
-- LIBC_CONF_TIMEOUT_ENSURE_MONOTONICITY: ON
-- LIBC_CONF_QSORT_IMPL: LIBC_QSORT_QUICK_SORT
-- LIBC_CONF_SCANF_DISABLE_FLOAT: OFF
-- LIBC_CONF_SCANF_DISABLE_INDEX_MODE: OFF
-- LIBC_CONF_SETJMP_AARCH64_RESTORE_PLATFORM_REGISTER: ON
-- LIBC_CONF_MEMSET_X86_USE_SOFTWARE_PREFETCHING: OFF
-- LIBC_CONF_STRING_UNSAFE_WIDE_READ: OFF
-- LIBC_CONF_TIME_64BIT: OFF
-- Writing config doc to E:/var/vcs/llvm-project/libc/docs/configure.rst
-- Set CPU features:
-- Compiler features available:
-- Parallel STL uses the serial backend
-- Configuring for clang-cl
-- Configuring for MSVC
-- Using libc++ testing configuration: E:/var/vcs/llvm-project/libcxx/test/configs/llvm-libc++-shared-clangcl.cfg.in
-- Found system-installed LLVM 20.1.0-20250226-ga69568efe with headers in E:/var/vcs/llvm-project/llvm/include;E:/var/vcs/llvm-project-build_20.1.0-20250226-ga69568efe/build64/include
-- Clang-tidy tests are disabled since the clang-tidy headers are not present.
-- ABI list file not generated for configuration x86_64-pc-windows-msvc.vcruntime.v1.stable.exceptions.nonew, `check-cxx-abilist` will not be available.
-- Compiler-RT supported architectures: x86_64
-- Generated Sanitizer SUPPORTED_TOOLS list on "Windows" is "asan;ubsan"
-- sanitizer_common tests on "Windows" will run against "asan;ubsan"
-- check-shadowcallstack does nothing.
-- Configuring done (7.7s)
-- Generating done (3.9s)
-- Build files have been written to: E:/var/vcs/llvm-project-build_20.1.0-20250226-ga69568efe/build64/runtimes/runtimes-bins
[4/10] Performing build step for 'runtimes'
[1/3] Building CXX object compiler-rt/lib/asan/CMakeFiles/RTAsan_dynamic_version_script_dummy.x86_64.dir/dummy.cpp.obj
clang-cl: warning: argument unused during compilation: '/experimental:external' [-Wunused-command-line-argument]
clang-cl: warning: argument unused during compilation: '/external:anglebrackets' [-Wunused-command-line-argument]
[2/3] Linking CXX shared library E:\var\vcs\llvm-project-build_20.1.0-20250226-ga69568efe\build64\lib\clang\20\lib\windows\clang_rt.asan_dynamic-x86_64.dll
[3/3] Generating E:/var/vcs/llvm-project-build_20.1.0-20250226-ga69568efe/build64/compile_commands.json
[5/10] C:\Windows\system32\cmd.exe /C "cd /D E:\var\vcs\llvm-project-build_20.1.0-20250226-ga69568efe\build64\runtimes\runtimes-bins && E:\opt\cmake-3\bin\cmake.exe --build E:/var/vcs/llvm-project-build_20.1.0-20250226-ga69568efe/build64/runtimes/runtimes-bins/ --target runtimes-test-depends --config Release"
[1/5] Generating X86_64WindowsDynamicConfig/Asan-x86_64-inline-Dynamic-Test.exe
FAILED: compiler-rt/lib/asan/tests/X86_64WindowsDynamicConfig/Asan-x86_64-inline-Dynamic-Test.exe E:/var/vcs/llvm-project-build_20.1.0-20250226-ga69568efe/build64/runtimes/runtimes-bins/compiler-rt/lib/asan/tests/X86_64WindowsDynamicConfig/Asan-x86_64-inline-Dynamic-Test.exe
C:\Windows\system32\cmd.exe /C "cd /D E:\var\vcs\llvm-project-build_20.1.0-20250226-ga69568efe\build64\runtimes\runtimes-bins\compiler-rt\lib\asan\tests && E:\var\vcs\llvm-project-build_20.1.0-20250226-ga69568efe\build64\.\bin\clang++.exe ASAN_DYNAMIC_TEST_OBJECTS.gtest-all.cc.x86_64-inline.o ASAN_DYNAMIC_TEST_OBJECTS.asan_globals_test.cpp.x86_64-inline.o ASAN_DYNAMIC_TEST_OBJECTS.asan_interface_test.cpp.x86_64-inline.o ASAN_DYNAMIC_TEST_OBJECTS.asan_internal_interface_test.cpp.x86_64-inline.o ASAN_DYNAMIC_TEST_OBJECTS.asan_test.cpp.x86_64-inline.o ASAN_DYNAMIC_TEST_OBJECTS.asan_oob_test.cpp.x86_64-inline.o ASAN_DYNAMIC_TEST_OBJECTS.asan_mem_test.cpp.x86_64-inline.o ASAN_DYNAMIC_TEST_OBJECTS.asan_str_test.cpp.x86_64-inline.o ASAN_DYNAMIC_TEST_OBJECTS.asan_test_main.cpp.x86_64-inline.o -o E:/var/vcs/llvm-project-build_20.1.0-20250226-ga69568efe/build64/runtimes/runtimes-bins/compiler-rt/lib/asan/tests/X86_64WindowsDynamicConfig/./Asan-x86_64-inline-Dynamic-Test.exe -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -resource-dir=E:/var/vcs/llvm-project-build_20.1.0-20250226-ga69568efe/build64/./lib/../lib/clang/20 -g -fsanitize=address -shared-libasan -D_MT -D_DLL -Wl,-nodefaultlib:libcmt,-defaultlib:msvcrt,-defaultlib:oldnames"
LINK : fatal error LNK1104: cannot open file 'stl_asan.lib'
clang++: error: linker command failed with exit code 1104 (use -v to see invocation)
[2/5] Generating X86_64WindowsDynamicConfig/Asan-x86_64-calls-Dynamic-Test.exe
FAILED: compiler-rt/lib/asan/tests/X86_64WindowsDynamicConfig/Asan-x86_64-calls-Dynamic-Test.exe E:/var/vcs/llvm-project-build_20.1.0-20250226-ga69568efe/build64/runtimes/runtimes-bins/compiler-rt/lib/asan/tests/X86_64WindowsDynamicConfig/Asan-x86_64-calls-Dynamic-Test.exe
C:\Windows\system32\cmd.exe /C "cd /D E:\var\vcs\llvm-project-build_20.1.0-20250226-ga69568efe\build64\runtimes\runtimes-bins\compiler-rt\lib\asan\tests && E:\var\vcs\llvm-project-build_20.1.0-20250226-ga69568efe\build64\.\bin\clang++.exe ASAN_DYNAMIC_TEST_OBJECTS.gtest-all.cc.x86_64-calls.o ASAN_DYNAMIC_TEST_OBJECTS.asan_globals_test.cpp.x86_64-calls.o ASAN_DYNAMIC_TEST_OBJECTS.asan_interface_test.cpp.x86_64-calls.o ASAN_DYNAMIC_TEST_OBJECTS.asan_internal_interface_test.cpp.x86_64-calls.o ASAN_DYNAMIC_TEST_OBJECTS.asan_test.cpp.x86_64-calls.o ASAN_DYNAMIC_TEST_OBJECTS.asan_oob_test.cpp.x86_64-calls.o ASAN_DYNAMIC_TEST_OBJECTS.asan_mem_test.cpp.x86_64-calls.o ASAN_DYNAMIC_TEST_OBJECTS.asan_str_test.cpp.x86_64-calls.o ASAN_DYNAMIC_TEST_OBJECTS.asan_test_main.cpp.x86_64-calls.o -o E:/var/vcs/llvm-project-build_20.1.0-20250226-ga69568efe/build64/runtimes/runtimes-bins/compiler-rt/lib/asan/tests/X86_64WindowsDynamicConfig/./Asan-x86_64-calls-Dynamic-Test.exe -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -resource-dir=E:/var/vcs/llvm-project-build_20.1.0-20250226-ga69568efe/build64/./lib/../lib/clang/20 -g -fsanitize=address -shared-libasan -D_MT -D_DLL -Wl,-nodefaultlib:libcmt,-defaultlib:msvcrt,-defaultlib:oldnames"
LINK : fatal error LNK1104: cannot open file 'stl_asan.lib'
clang++: error: linker command failed with exit code 1104 (use -v to see invocation)
[3/5] Generating X86_64WindowsConfig/Asan-x86_64-inline-Test.exe
FAILED: compiler-rt/lib/asan/tests/X86_64WindowsConfig/Asan-x86_64-inline-Test.exe E:/var/vcs/llvm-project-build_20.1.0-20250226-ga69568efe/build64/runtimes/runtimes-bins/compiler-rt/lib/asan/tests/X86_64WindowsConfig/Asan-x86_64-inline-Test.exe
C:\Windows\system32\cmd.exe /C "cd /D E:\var\vcs\llvm-project-build_20.1.0-20250226-ga69568efe\build64\runtimes\runtimes-bins\compiler-rt\lib\asan\tests && E:\var\vcs\llvm-project-build_20.1.0-20250226-ga69568efe\build64\.\bin\clang++.exe ASAN_INST_TEST_OBJECTS.gtest-all.cc.x86_64-inline.o ASAN_INST_TEST_OBJECTS.asan_globals_test.cpp.x86_64-inline.o ASAN_INST_TEST_OBJECTS.asan_interface_test.cpp.x86_64-inline.o ASAN_INST_TEST_OBJECTS.asan_internal_interface_test.cpp.x86_64-inline.o ASAN_INST_TEST_OBJECTS.asan_test.cpp.x86_64-inline.o ASAN_INST_TEST_OBJECTS.asan_oob_test.cpp.x86_64-inline.o ASAN_INST_TEST_OBJECTS.asan_mem_test.cpp.x86_64-inline.o ASAN_INST_TEST_OBJECTS.asan_str_test.cpp.x86_64-inline.o ASAN_INST_TEST_OBJECTS.asan_test_main.cpp.x86_64-inline.o -o E:/var/vcs/llvm-project-build_20.1.0-20250226-ga69568efe/build64/runtimes/runtimes-bins/compiler-rt/lib/asan/tests/X86_64WindowsConfig/./Asan-x86_64-inline-Test.exe -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -resource-dir=E:/var/vcs/llvm-project-build_20.1.0-20250226-ga69568efe/build64/./lib/../lib/clang/20 -g -fsanitize=address"
LINK : fatal error LNK1104: cannot open file 'stl_asan.lib'
clang++: error: linker command failed with exit code 1104 (use -v to see invocation)
[4/5] Generating X86_64WindowsConfig/Asan-x86_64-calls-Test.exe
FAILED: compiler-rt/lib/asan/tests/X86_64WindowsConfig/Asan-x86_64-calls-Test.exe E:/var/vcs/llvm-project-build_20.1.0-20250226-ga69568efe/build64/runtimes/runtimes-bins/compiler-rt/lib/asan/tests/X86_64WindowsConfig/Asan-x86_64-calls-Test.exe
C:\Windows\system32\cmd.exe /C "cd /D E:\var\vcs\llvm-project-build_20.1.0-20250226-ga69568efe\build64\runtimes\runtimes-bins\compiler-rt\lib\asan\tests && E:\var\vcs\llvm-project-build_20.1.0-20250226-ga69568efe\build64\.\bin\clang++.exe ASAN_INST_TEST_OBJECTS.gtest-all.cc.x86_64-calls.o ASAN_INST_TEST_OBJECTS.asan_globals_test.cpp.x86_64-calls.o ASAN_INST_TEST_OBJECTS.asan_interface_test.cpp.x86_64-calls.o ASAN_INST_TEST_OBJECTS.asan_internal_interface_test.cpp.x86_64-calls.o ASAN_INST_TEST_OBJECTS.asan_test.cpp.x86_64-calls.o ASAN_INST_TEST_OBJECTS.asan_oob_test.cpp.x86_64-calls.o ASAN_INST_TEST_OBJECTS.asan_mem_test.cpp.x86_64-calls.o ASAN_INST_TEST_OBJECTS.asan_str_test.cpp.x86_64-calls.o ASAN_INST_TEST_OBJECTS.asan_test_main.cpp.x86_64-calls.o -o E:/var/vcs/llvm-project-build_20.1.0-20250226-ga69568efe/build64/runtimes/runtimes-bins/compiler-rt/lib/asan/tests/X86_64WindowsConfig/./Asan-x86_64-calls-Test.exe -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -resource-dir=E:/var/vcs/llvm-project-build_20.1.0-20250226-ga69568efe/build64/./lib/../lib/clang/20 -g -fsanitize=address"
LINK : fatal error LNK1104: cannot open file 'stl_asan.lib'
clang++: error: linker command failed with exit code 1104 (use -v to see invocation)
...issueI remember RC2 and RC1 didn't have this issue.
Metadata
Metadata
Assignees
Type
Projects
Status
Needs Fix
Relationships
Development
Select code repository
Activity
zufuliu commentedon Feb 27, 2025
Use Visual Studio installer to install "C++ AddressSanitizer" or define
_DISABLE_STL_ANNOTATIONcould fix the error.See https://learn.microsoft.com/en-us/cpp/sanitizers/asan?view=msvc-170
and https://github.com/microsoft/STL/blob/main/stl/inc/__msvc_sanitizer_annotate_container.hpp
songdongsheng commentedon Feb 28, 2025
If this is the case, then we should check for the existence of the AddressSanitizer feature before using it, and report an error if it does not exist or not use it.
songdongsheng commentedon Mar 1, 2025
After install
C++ AddressSanitizerand upgrade toVisual Studio 2022 17.13.2, the unit tests can be finished:LLVM_ENABLE_RUNTIMES="compiler-rt;libc;libcxx;pstl;offload"LLVM_ENABLE_PROJECTS="llvm;clang;clang-tools-extra;openmp;bolt;lld;lldb;polly;mlir;flang"LLVM_TARGETS_TO_BUILD="AArch64;AMDGPU;ARM;BPF;LoongArch;Mips;NVPTX;PowerPC;RISCV;SystemZ;WebAssembly;X86"