Pointing clang to a C++ library

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Pointing clang to a C++ library

Yvan Roux via cfe-dev
I've got clang built to a point where it can find the gcc toolchain it
was built with and use that gcc toolchain's C++ library.

But I want it to point to a different C++ library.  That library will be
installed relative to where clang will be installed.  Pointing clang to
an absolute path isn't going to work because the package may be
installed in lots of different places.

What's the best way to do this?

Thanks!

                            -David
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Pointing clang to a C++ library

Yvan Roux via cfe-dev
On 9/25/2018 1:10 PM, David Greene via cfe-dev wrote:
> I've got clang built to a point where it can find the gcc toolchain it
> was built with and use that gcc toolchain's C++ library.
>
> But I want it to point to a different C++ library.  That library will be
> installed relative to where clang will be installed.  Pointing clang to
> an absolute path isn't going to work because the package may be
> installed in lots of different places.
>
> What's the best way to do this?

clang will automatically find libc++ installed relative to itself
($INSTALL_PREFIX/include/c++/v1).  So if the user specifies
-stdlib=libc++, or CLANG_DEFAULT_CXX_STDLIB is configured appropriately,
you shouldn't need to do anything else.

If you're not using libc++, you might need to modify the way clang
computes the header search paths.

-Eli

--
Employee of Qualcomm Innovation Center, Inc.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a Linux Foundation Collaborative Project

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Pointing clang to a C++ library

Yvan Roux via cfe-dev
"Friedman, Eli" <[hidden email]> writes:

> If you're not using libc++, you might need to modify the way clang
> computes the header search paths.

Ah, I was afraid of that.  Ok, thanks, at least I know what I have to
do.  :)

                           -David
_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev