Reputation: 89
I have source code of a project. I can create Makefile by running the command ./configure. Now if I want to change the compiler from gcc to clang, I can do this by CC=clang ./configure. Similarly if I want to use llvm-link as a linker, is there anything similar to this ? Otherwise what changes should I do in the makefile?
Upvotes: 1
Views: 976
Reputation: 1727
llvm-link
is a bitcode linker and not a full linker. For that you want lld. At that point you can pass -fuse-ld=lld
to pick up lld as your linker in your link step. You can use LDFLAGS for this.
See lld's documentation for more information.
Upvotes: 2