All binaries are in /Debug/bin. I am interested in using the output of llvm-config. Now, when I run
$ /Debug/bin/llvm-config --cmakedir
/Debug/lib/cmake/llvm
But,
$ ls -d <llvm-build-dir>/Debug/bin/llvm-config --cmakedir
ls: /Debug/lib/cmake/llvm: No such file or directory
instead I have
$ ls -d /lib/cmake
/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 /bin on Linux as opposed to //bin on MacOS.
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.
Thanks, Matthias. That is indeed a good suggestion.
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.
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
Happy to hear any suggestions on this slightly divergent topic.