-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[lld-link] linker option error: -arm64xsameaddress:__dyn_tls_dtor is not allowed in .drectve (msvcrt.lib(tlsdtor.obj)) #131712
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-lld-coff Author: coneco (co-neco)
Environment:
- VS 2022 with latest MSVC toolset(v14314.43.34808), and Windows SDK version(10.0.22621.0).
- Arm64 Windows PC.
I want to build ARM64EC version of V8 engine, but failed with following error: > Studio/2022/Professional/VC/Tools/MSVC/14.43.34808/lib/ARM64" "-libpath:../../../../../../../../Program Files (x86)/Windows Kits/10/lib/10.0.22621.0/ucrt/arm64" "-libpath:../../../../../../../../Program Files (x86)/Windows Kits/10/lib/10.0.22621.0/um/arm64" /MACHINE:ARM64EC "/IMPLIB:./third_party_abseil-cpp_absl.dll.lib" /DLL "/PDB:./third_party_abseil-cpp_absl.dll.pdb" "@./third_party_abseil-cpp_absl.dll.rsp" In tlsdtor.cpp, there is a linker option: After that, I tested a minimal program hello.cpp with following content:
If I use MSVC cl.exe and link.exe, it was successful: But If I use clang-cl and lld-link, it complained with following error: Another question: But If I use clang-cl from VS 2022 installed version, compile any .cpp file would complain as follow: > clang-cl.exe /c /WX- /Od /D _DEBUG /D _CONSOLE /D _UNICODE /D UNICODE /EHsc /MDd /GS /fp:precise /arm64EC hello.cpp This might be the same problem as the linker option error. |
CC @cjacek - we'd need to implement this option.
No, this is simply the fact that LLD 19 didn't support much about arm64ec/arm64x at all. The 20 release is much more complete, but apparently there's still some directives that need to be handled. |
Thanks for your reply. Hope the support will come soon. |
Here’s an initial implementation: cjacek@6b4298e. It should fix the error and is likely good enough for the most part. However, it's not yet complete. On pure ARM64EC (not ARM64X), it seems the native symbol should be pulled in too, even though it isn’t used (the EC symbol is used instead). lld-link doesn’t support this yet, so that needs to be addressed first. |
Make it a no-op for now, which is sufficient for non-hybrid images. Fixes llvm#131712.
Make it a no-op for now, which is sufficient for non-hybrid images. Fixes llvm#131712. (cherry picked from commit d5da557)
Make it a no-op for now, which is sufficient for non-hybrid images. Fixes llvm#131712.
Uh oh!
There was an error while loading. Please reload this page.
Environment:
I want to build ARM64EC version of V8 engine, but failed with following error:
In tlsdtor.cpp, there is a linker option:
#ifdef _M_ARM64EC #pragma comment (linker, "-arm64xsameaddress:__dyn_tls_dtor") #endif
It seems that Microsoft VS added arm64xsameaddress option to support some arm64EC compatibility, but lld-link did not notice the fact.
After that, I tested a minimal program hello.cpp with following content:
If I use MSVC cl.exe and link.exe, it was successful:
But If I use clang-cl and lld-link, it complained with following error:
Another question:
Here, I used clang-cl from LLVM github latest release version:
But If I use clang-cl from VS 2022 installed version, compile any .cpp file would complain as follow:
This might be the same problem as the linker option error.
The text was updated successfully, but these errors were encountered: