<html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Thanks for your reply. Two questions:<div class="">1). Will ld64.lld be fixed in LLVM v11.0 and when is this likely to be?</div><div class="">2). You mention Apple’s linker, by which I assume you mean GNU’s ld.</div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Is it possible to get a binary version of ld (preferably that does not use other things from /usr/bin)?</div><div class=""><br class=""></div><div class="">Thanks</div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 7 May 2020, at 12:26, James Y Knight <<a href="mailto:jyknight@google.com" class="">jyknight@google.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><meta http-equiv="Content-Type" content="text/html; charset=utf-8" class=""><div dir="auto" class=""><div class="">The MachO port of lld (ld64.lld) doesn't work. There is recently some activity to start to fix this situation, but for now you need to use Apple's linker.<br class=""><br class=""><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, May 7, 2020, 5:36 AM Edmund Furse via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" class="">llvm-dev@lists.llvm.org</a>> wrote:<br class=""></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word;line-break:after-white-space" class=""><span style="font-size:13px" class="">Dear LLVM community I need some help please.</span><div class=""><br class=""></div><div class=""><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class="">I want to use LLVM's clang and lld within a MacOSX sandboxed app. This is because sandboxing does not allow calls to /usr/bin/clang.</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class="">The clang binary works fine to compile a file, but ld64.lld comes up with the error "cannot find framework".</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class="">However similar arguments using /usr/bin/ld instead of ld64.lld works fine.</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:14px" class=""><br class=""></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class="">Here are the details:</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:14px" class=""><br class=""></div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""><b class="">Here is the call using /usr/bin/ld</b><span style="font-stretch:normal;font-size:12px;line-height:normal" class="">:</span></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:14px" class=""><br class=""></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class="">/usr/bin/ld HelloObjC.o -o HelloObjC -v -sdk_version 10.14.0 -macosx_version_min 10.14.0 -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -framework Foundation -framework Cocoa -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/lib/darwin/libclang_rt.osx.a -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:14px" class=""><br class=""></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""><b class="">This works correctly</b>.</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:14px" class=""><br class=""></div><div style="margin:0px;font-stretch:normal;font-size:13px;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""><b class="">Here is the call using ld64.lld:</b></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:14px" class=""><br class=""></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class="">/Users/edmundfurse/Documents/NewClang/NewClangM21b/NewClangM21/Tools/bin/ld64.lld HelloObjC.o -o HelloObjC -v -sdk_version 10.14.0 -macosx_version_min 10.14.0 -demangle -lto_library /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/libLTO.dylib -dynamic -arch x86_64 -framework Foundation -framework Cocoa -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -L/usr/local/lib -lSystem /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/10.0.1/lib/darwin/libclang_rt.osx.a -F/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:14px" class=""><br class=""></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""><b class="">gives the error message:</b></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:14px" class=""><br class=""></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class="">Library search paths:</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/usr/lib</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class="">Framework search paths:</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class=""> /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk/System/Library/Frameworks</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class="">ld64.lld: error: Unable to find framework for -framework Foundation</div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255);min-height:14px" class=""><br class=""></div><div style="margin:0px;font-stretch:normal;line-height:normal;font-family:Menlo;background-color:rgb(255,255,255)" class="">Any suggestions welcome.</div><div class=""><br class=""></div><div class=""><br class=""></div></div></div>_______________________________________________<br class="">
LLVM Developers mailing list<br class="">
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank" rel="noreferrer" class="">llvm-dev@lists.llvm.org</a><br class="">
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer noreferrer" target="_blank" class="">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br class="">
</blockquote></div></div></div>
</div></blockquote></div><br class=""></div></body></html>