<div dir="ltr"><div dir="ltr">Hi,<div><br></div><div>I'm building LLVM 7.0.1 manually (well, following the MacPorts port file, but doing it manually), and I'm aiming for getting a clang/clang++ that by default looks for libs in the LLVMHOME/lib directory (where LLVMHOME is the installation prefix used when building LLVM) before looking at /usr/lib and at /usr/local/lib</div><div><br></div><div>The main purpose is that I want that the LLVM libc++ is always used by default, instead of the MacOS one.</div><div><br></div><div>Of course I know I can add LLVMHOME/lib as a -L option passed to clang++, but I want it to be a default rather than a -L option, because some packages come with broken Makefiles that overwrite any tuning that you wish to perform through environment variables such as LDFLAGS or CXXFLAGS.</div><div><br></div><div>How can I build LLVM with this behavior?</div><div><br></div><div>Thanks a lot!</div><div><br></div><div>César</div></div></div>