Description
The following program prints π and exits:
#include <cmath>
#include <cstdio>
int main( int argc, char** argv ) {
printf( "%f\n", acosf( 0.0f ) * 2 );
return 0;
}
Compiling the above single-module program with LLVM 19.1.0 through the clang-cl driver, targeting x86, with the fast math (/fp:fast) switch fails to link:
lld-link : error : undefined symbol: _acosf
Steps to reproduce:
- Obtained LLVM-19.1.0-win64.exe from the official Assests.
- Install on Windows 11 with Visual Studio 2022 17.11.4
- Must build a x86 target
- x64 targets link and run properly
- Must use the /fp:fast fast math mode compiler switch
This issue was introduced with LLVM 19.1.0, and is not a result of changes to Visual Studio. Prior versions, such as LLVM 18.1.8, link properly, using the aforementioned version Visual Studio.
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Done