<div dir="auto">Thanks, Matthias. That is indeed a good suggestion.<div dir="auto"><br></div><div dir="auto">I've been favoring Xcode on macros simply because of the code cross-referencing and completion I get out of the box for llvm sources, shortening the time I spend for dev and digging into llvm internals. </div><div dir="auto"><br></div><div dir="auto">On Linux, I plow through with a less than seemless dev environment that is a combination of Eclipse (couldn't get it to work well with llvm sources), emacs, grep, find, [crt]tags etc :-(</div><div dir="auto"><br></div><div dir="auto">Happy to hear any suggestions on this slightly divergent topic. </div><div dir="auto"><br></div><div dir="auto">Thanks, </div><div dir="auto"> </div><div dir="auto">Bharadwaj </div><br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On Dec 15, 2017 2:49 PM, "Matthias Braun" <<a href="mailto:mbraun@apple.com">mbraun@apple.com</a>> wrote:<br type="attribution"><blockquote class="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"><div>I'm not saying there isn't a bug here.</div><div><br></div><div>But I think most llvm developers use</div><div>$ cmake -GNinja ...</div><div>$ ninja</div><div>even on macos. So unless you need an xcode project I would recomment that.</div><div><br></div><div>- Matthias<br><div><br><blockquote type="cite"><div class="elided-text"><div>On Dec 15, 2017, at 2:28 PM, S. Bharadwaj Yadavalli via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="m_39719039041483038Apple-interchange-newline"></div><div><div class="elided-text"><div dir="auto"><div>Thanks for your reply, Paul.<div dir="auto"><br></div><div dir="auto">That seems to be a plausible explanation. </div><div dir="auto"><br></div><div dir="auto">I ended up adding code in my project to massage the output of llvm-config to the right paths based of the values of CMAKE_GENERATOR and build-mode.</div><div dir="auto"><br></div><div dir="auto">Bharadwaj </div><br><div class="gmail_extra"><br><div class="gmail_quote">On Dec 15, 2017 9:46 AM, "Robinson, Paul" <<a href="mailto:paul.robinson@sony.com" target="_blank">paul.robinson@sony.com</a>> wrote:<br type="attribution"><blockquote class="m_39719039041483038quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div lang="EN-US" link="blue" vlink="purple">
<div class="m_39719039041483038m_3328336779660471160WordSection1"><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">It may be that llvm-config simply doesn't understand a multi-configuration build tree. Ninja and make use single-configuration trees, XCode and Visual Studio
use multi-configuration.<u></u><u></u></span></p><p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d">--paulr<u></u><u></u></span></p><p class="MsoNormal"><a name="m_39719039041483038_m_3328336779660471160__MailEndCompose"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1f497d"><u></u> <u></u></span></a></p>
<div style="border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt">
<div>
<div style="border:none;border-top:solid #b5c4df 1.0pt;padding:3.0pt 0in 0in 0in"><p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> llvm-dev [mailto:<a href="mailto:llvm-dev-bounces@lists.llvm.org" target="_blank">llvm-dev-bounces@lists<wbr>.llvm.org</a>]
<b>On Behalf Of </b>S. Bharadwaj Yadavalli via llvm-dev<br>
<b>Sent:</b> Thursday, December 14, 2017 10:24 PM<br>
<b>To:</b> llvm-dev<br>
<b>Subject:</b> [llvm-dev] llvm-config output on MacOS<u></u><u></u></span></p>
</div>
</div><div class="m_39719039041483038elided-text"><p class="MsoNormal"><u></u> <u></u></p>
<div><p class="MsoNormal">Hi,<u></u><u></u></p>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal">I configured and built LLVM as follows on Mac OS 10.13.2:<u></u><u></u></p>
</div>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><div style="margin:0in 0in 0.0001pt;font-stretch:normal;background-color:rgba(0,0,0,0.85098)">
<span class="m_39719039041483038m_3328336779660471160gmail-s1"><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4">$ pwd</span></span><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4"><u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-stretch:normal;background-color:rgba(0,0,0,0.85098)">
<span class="m_39719039041483038m_3328336779660471160gmail-s1"><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4"><llvm-build-dir></span></span><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4"><u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-stretch:normal;background-color:rgba(0,0,0,0.85098)">
<span class="m_39719039041483038m_3328336779660471160gmail-s1"><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4">$ cmake -G "Xcode" -DCMAKE_INSTALL_PREFIX=<llvm-i<wbr>nstall-dir> -DLLVM_ENABLE_PIC=0 <llvm-src-dir>/llvm</span></span><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4"><u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-stretch:normal;background-color:rgba(0,0,0,0.85098)">
<span class="m_39719039041483038m_3328336779660471160gmail-s1"><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4">$ xcodebuild -project LLVM.xcodeproj</span></span><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4"><u></u><u></u></span></div>
</div>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal"><span class="m_39719039041483038m_3328336779660471160gmail-s1">All binaries are in <llvm-build-dir>/Debug/bin. I am interested in using the output of llvm-config. Now, when I run </span><u></u><u></u></p>
</div>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><div style="margin:0in 0in 0.0001pt;font-variant-ligatures:normal;font-variant-caps:normal;font-stretch:normal;background-color:rgba(0,0,0,0.85098)">
<span class="m_39719039041483038m_3328336779660471160gmail-s1"><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4">$ <llvm-build-dir>/Debug/bin/llv<wbr>m-config --cmakedir</span></span><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4"><u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-variant-ligatures:normal;font-variant-caps:normal;font-stretch:normal;background-color:rgba(0,0,0,0.85098)">
<span class="m_39719039041483038m_3328336779660471160gmail-s1"><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4"><llvm-build-dir>/Debug/lib/cma<wbr>ke/llvm</span></span><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4"><u></u><u></u></span></div>
</div>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal">But, <u></u><u></u></p>
</div>
<div><div style="margin:0in 0in 0.0001pt;font-variant-ligatures:normal;font-variant-caps:normal;font-stretch:normal;background-color:rgba(0,0,0,0.85098)">
<span class="m_39719039041483038m_3328336779660471160gmail-s1"><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4">$ ls -d `<llvm-build-dir>/Debug/bin/ll<wbr>vm-config --cmakedir`</span></span><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4"><u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-variant-ligatures:normal;font-variant-caps:normal;font-stretch:normal;background-color:rgba(0,0,0,0.85098)">
<span class="m_39719039041483038m_3328336779660471160gmail-s1"><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4">ls: <llvm-build-dir>/Debug/lib/cma<wbr>ke/llvm: No such file or directory</span></span><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4"><u></u><u></u></span></div>
</div>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal">instead I have<u></u><u></u></p>
</div>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><div style="margin:0in 0in 0.0001pt;font-variant-ligatures:normal;font-variant-caps:normal;font-stretch:normal;background-color:rgba(0,0,0,0.85098)">
<span class="m_39719039041483038m_3328336779660471160gmail-s1"><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4">$ ls -d <llvm-build-dir>/lib/cmake</span></span><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4"><u></u><u></u></span></div><div style="margin:0in 0in 0.0001pt;font-variant-ligatures:normal;font-variant-caps:normal;font-stretch:normal;background-color:rgba(0,0,0,0.85098)">
<span class="m_39719039041483038m_3328336779660471160gmail-s1"><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4"><llvm-build-dir>/lib/cmake</span></span><span style="font-size:10.5pt;font-family:"Monaco","serif";color:#f4f4f4"><u></u><u></u></span></div>
</div>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal">As seen above, the output of llvm-config --cmakedir returns a non-existent directory. Took a quick look at the sources of llvm-config. Comment says the tool is designed to support being run from both dev tree and install path. Looks like
the test to identify if the tool is being run from within dev tree is not recognizing that the tool is indeed being run from dev tree.<u></u><u></u></p>
</div>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal">Would anyone know what I am missing?<u></u><u></u></p>
</div>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal">I do not see this behavior on Linux - probably since build binaries are placed in <llvm-build-dir>/bin on Linux as opposed to <llvm-build-dir>/<build-type>/<wbr>bin on MacOS.<u></u><u></u></p>
</div>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal">Thanks,<u></u><u></u></p>
</div>
<div><p class="MsoNormal"><u></u> <u></u></p>
</div>
<div><p class="MsoNormal">Bharadwaj<u></u><u></u></p>
</div>
</div>
</div></div>
</div>
</div>
</blockquote></div><br></div></div></div></div>
______________________________<wbr>_________________<br>LLVM Developers mailing list<br><a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a><br></div></blockquote></div><br></div></div></blockquote></div><br></div></div>