[llvm-dev] llvm-config output on MacOS
S. Bharadwaj Yadavalli via llvm-dev
llvm-dev at lists.llvm.org
Thu Dec 14 22:24:03 PST 2017
Hi,
I configured and built LLVM as follows on Mac OS 10.13.2:
$ pwd
<llvm-build-dir>
$ cmake -G "Xcode" -DCMAKE_INSTALL_PREFIX=<llvm-install-dir>
-DLLVM_ENABLE_PIC=0 <llvm-src-dir>/llvm
$ xcodebuild -project LLVM.xcodeproj
All binaries are in <llvm-build-dir>/Debug/bin. I am interested in using
the output of llvm-config. Now, when I run
$ <llvm-build-dir>/Debug/bin/llvm-config --cmakedir
<llvm-build-dir>/Debug/lib/cmake/llvm
But,
$ ls -d `<llvm-build-dir>/Debug/bin/llvm-config --cmakedir`
ls: <llvm-build-dir>/Debug/lib/cmake/llvm: No such file or directory
instead I have
$ ls -d <llvm-build-dir>/lib/cmake
<llvm-build-dir>/lib/cmake
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.
Would anyone know what I am missing?
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.
Thanks,
Bharadwaj
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171214/ec9771bc/attachment.html>
More information about the llvm-dev
mailing list