[llvm-dev] Fwd: LLD (macOS) usage?

Julio César Rocha via llvm-dev llvm-dev at lists.llvm.org
Thu Jan 4 01:14:29 PST 2018


Hi. I'm using LLVM 5.0.1 on macOS 10.12.

I have a very simple program (program.c):
int main() {}

When attempting to compile with LLD, I get this output:
$ clang -fuse-ld=lld program.c
/opt/llvm/5.0.1/bin/ld.lld: error: unknown argument: -no_deduplicate
/opt/llvm/5.0.1/bin/ld.lld: error: unknown argument: -dynamic
/opt/llvm/5.0.1/bin/ld.lld: error: unknown argument: -arch
/opt/llvm/5.0.1/bin/ld.lld: error: unknown emulation: acosx_version_min
/opt/llvm/5.0.1/bin/ld.lld: error: unable to find library -lto_library
/opt/llvm/5.0.1/bin/ld.lld: error: /opt/llvm/5.0.1/lib/libLTO.dylib:
invalid data encoding
clang-5.0: error: linker command failed with exit code 1 (use -v to see
invocation)

Looks like the flags passed to the linker are just wrong, but can't find
any relevant documentation at llvm.org/docs.

Please help?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180104/c6079b25/attachment-0001.html>


More information about the llvm-dev mailing list