[llvm-dev] Clang for macOS requires -lto_library

Sumonto Ghosh via llvm-dev llvm-dev at lists.llvm.org
Fri Aug 3 13:38:35 PDT 2018

I downloaded
Clang for macOS

However if I use -fuse-ld=lld it complains
"Unable to find library for -lto_library"

CLANG       = clang
CLANG_PATH  = ~/Downloads/clang+llvm-6.0.0-x86_64-apple-darwin/bin
CFLAGS      =
RM          = rm -f
TARGET      = x86_64-apple-darwin17.4.0
EXE         = Test.exe

default: clean all

all: $(EXE)

$(EXE): test.c
    $(CLANG_PATH)/$(CLANG)  -v      \
    -fuse-ld=lld                    \
    -target $(TARGET)               \
    -o $@ $< $(CFLAGS)

    $(RM) $(EXE)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180803/ff2b005b/attachment.html>

More information about the llvm-dev mailing list