[ARM64EC] LTO fails with a simple C++ testcase
Open
LTO
platform:windows
- Dominant language
- LLVM
- Stars
- 40.5k
- Forks
- 18.7k
- PR merge metrics
- PR metrics pending
Description
Consider the following:
```
int main() { return (long long)new int[11]; }
```
Building in a VS2022 developer command prompt:
```
> clang-cl newtest.cpp /O2 /arm64EC -flto -fuse-ld=lld
lld-link: error: undefined symbol: void * __cdecl operator new[](unsigned __int64) (EC symbol)
>>> referenced by newtest.cpp
>>> [...]\newtest-bfd17a.obj
clang-cl: error: linker command failed with exit code 1 (use -v to see invocation)
```
Works fine without -flto.
I suspect this is an issue with the symbol table of the bitcode file. But I haven't spent time trying to figure out the current state of LTO with Arm64EC, in general.
CC @cjacek
Contributor guide
Assessment
This issue has not been assessed yet.