[cfe-users] I/L paths Versus default paths
Christiano SA via cfe-users
cfe-users at lists.llvm.org
Sat Apr 7 19:51:12 PDT 2018
I want to know if my following thought is correct: The default include paths have priority over the -I<path>. On the other hand, -L<path> has priority over default lib paths. Am I right?
I'm asking this because I read the following doc:
https://libcxx.llvm.org/docs/UsingLibcxx.html
which has the following advice:
-------------------- Pasting -------------------------------------------------------------
If you want to select an alternate installation of libc++ you can use the following options.
$ clang++ -std=c++11 -stdlib=libc++ -nostdinc++ \
-I<libcxx-install-prefix>/include/c++/v1 \
-L<libcxx-install-prefix>/lib \
-Wl,-rpath,<libcxx-install-prefix>/lib \
test.cpp
--------------------------------------------------------------------------------------------
As you can see he puts the option: -nostdinc++ because (I think) the "default include path" has priority over the I<path>.
At same time, there is not a similar option there to remove "default lib path"s so that make me think that the L<path> has priority over "default lib path".
More information about the cfe-users
mailing list