<div dir="ltr">Hi,<div><br></div><div>I configured and built LLVM as follows on Mac OS 10.13.2:</div><div><br></div><div><p class="gmail-p1" style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.85)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">$ pwd</span></p><p class="gmail-p1" style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.85)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><llvm-build-dir></span></p><p class="gmail-p1" style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.85)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">$ cmake -G "Xcode" -DCMAKE_INSTALL_PREFIX=<llvm-install-dir> -DLLVM_ENABLE_PIC=0 <llvm-src-dir>/llvm</span></p><p class="gmail-p1" style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.85)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"></span></p><p class="gmail-p1" style="margin:0px;font-stretch:normal;font-size:14px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.85)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">$ xcodebuild -project LLVM.xcodeproj</span></p></div><div><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">All binaries are in <llvm-build-dir>/Debug/bin. I am interested in using the output of llvm-config. Now, when I run </span></div><div><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></div><div><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">







<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.85)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">$ <llvm-build-dir>/Debug/bin/llvm-config --cmakedir</span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.85)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><llvm-build-dir>/Debug/lib/cmake/llvm</span></p></span></div><div><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><br></span></div><div>But, </div><div>







<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.85)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">$ ls -d `<llvm-build-dir>/Debug/bin/llvm-config --cmakedir`</span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.85)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">ls: <llvm-build-dir>/Debug/lib/cmake/llvm: No such file or directory</span></p></div><div><br></div><div><span style="font-variant-ligatures:no-common-ligatures">instead I have</span></div><div><span style="font-variant-ligatures:no-common-ligatures"><br></span></div><div>







<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.85)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures">$ ls -d <llvm-build-dir>/lib/cmake</span></p>
<p class="gmail-p1" style="margin:0px;font-style:normal;font-variant-ligatures:normal;font-variant-caps:normal;font-weight:normal;font-stretch:normal;font-size:14px;line-height:normal;font-family:Monaco;color:rgb(244,244,244);background-color:rgba(0,0,0,0.85)"><span class="gmail-s1" style="font-variant-ligatures:no-common-ligatures"><llvm-build-dir>/lib/cmake</span></p></div><div><br></div><div>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.</div><div><br></div><div>Would anyone know what I am missing?</div><div><br></div><div>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>/bin on MacOS.</div><div><br></div><div>Thanks,</div><div><br></div><div>Bharadwaj</div></div>