llvm / llvm-project

The LLVM Project is a collection of modular and reusable compiler and toolchain technologies.
http://llvm.org
Other
28.62k stars 11.83k forks source link

[ubsan] cannot open file 'clang_rt.ubsan_standalone-aarch64.lib' #60728

Open fsb4000 opened 1 year ago

fsb4000 commented 1 year ago

No UBSan on Windows ARM 64 target. It works fine on X64 and X86 targets.

Command: "C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\Llvm\x64\bin\clang-cl.EXE" "D:\a\_work\1\s\tests\std\tests\Dev11_0835323_to_string\test.cpp" "-ID:\build\out\inc" "-ID:\a\_work\1\s\llvm-project\libcxx\test\support" "-ID:\a\_work\1\s\tests\std\include" "/nologo" "/Od" "/W4" "/w14061" "/w14242" "/w14265" "/w14582" "/w14583" "/w14587" "/w14588" "/w14749" "/w14841" "/w14842" "/w15038" "/w15214" "/w15215" "/w15216" "/w15217" "/w15262" "/sdl" "/WX" "/Zc:strictStrings" "/D_ENABLE_STL_INTERNAL_CHECK" "/bigobj" "/FIforce_include.hpp" "/w14365" "/D_ENFORCE_FACET_SPECIALIZATIONS=1" "/D_STL_CALL_ABORT_INSTEAD_OF_INVALID_PARAMETER" "-fno-ms-compatibility" "-fno-delayed-template-parsing" "-Wno-unqualified-std-cast-call" "/EHsc" "/MT" "/std:c++latest" "/permissive-" "/fp:strict" "/w14640" "/Zc:threadSafeInit-" "-fsanitize=undefined" "-fno-sanitize-recover=undefined" "--target=arm64-pc-windows-msvc" "-FeD:\build\tests\std\tests\Dev11_0835323_to_string\Output\28\Dev11_0835323_to_string.exe" "-link" "-LIBPATH:D:\build\out\lib\arm64" "-LIBPATH:C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\MSVC\14.35.32213\lib\arm64" "/MANIFEST:EMBED" Exit Code: 1104 Standard Output: -- LINK : fatal error LNK1104: cannot open file 'clang_rt.ubsan_standalone-aarch64.lib' -- Standard Error: -- clang-cl: error: linker command failed with exit code 1104 
error LNK1104: cannot open file 'clang_rt.ubsan_standalone-aarch64.lib'

I use clang-cl bundled with Visual Studio 2022 17.5 Preview 3

$ clang-cl -v
clang version 15.0.1
Target: i686-pc-windows-msvc
Thread model: posix
InstalledDir: C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Tools\Llvm\bin
alvinhochun commented 1 year ago

Last time I heard about that, ASan/UBSan does not yet support Windows on ARM.

fsb4000 commented 1 year ago

Yes, here are the contents of the folders: изображение изображение

I just didn't know there was some kind of error while creating the LLVM installer or it was by design.