[cfe-dev] Link error with -flto

Robert Purves listrp at gmail.com
Thu Sep 15 04:06:10 PDT 2011


cat test.c
int main( void ) { return 0; }
clang test.c
clang test.c -flto
ld: in /var/folders/52/jjd304908xjcn40059bbtdr80000gq/T/test-uMP2UG.o, could not parse object file /var/folders/52/jjd304908xjcn40059bbtdr80000gq/T/test-uMP2UG.o: Invalid MODULE_CODE_FUNCTION record for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

This is with clang TOT (139788), in OS X 10.7.1.

Robert P.






More information about the cfe-dev mailing list