[libcxx] r323453 - [cmake] [libcxx] Call llvm_setup_rpath() when adding shared libraries.

Don Hinton via cfe-commits cfe-commits at lists.llvm.org
Thu Jan 25 12:51:58 PST 2018


On Thu, Jan 25, 2018 at 12:29 PM, Duncan P. N. Exon Smith <
dexonsmith at apple.com> wrote:

> I don't really understand why, but our bots seemed to survive this:
> http://lab.llvm.org:8080/green/view/Libcxx/job/libcxx_master_cmake/2137/
>
> Console output is here:
> http://lab.llvm.org:8080/green/view/Libcxx/job/libcxx_
> master_cmake/2137/consoleFull
>
> That doesn't necessarily mean it's safe.  Does anyone know why this might
> have "worked"?
>

I'm not an expert, but llvm installs all of these cmake modules along side
llvm-config, so if you find llvm-config, you find these modules.

So, unless I'm missing something, it looks like AddLLVM.cmake is always
available.


>
> On Jan 25, 2018, at 11:02, Shoaib Meenai <smeenai at fb.com> wrote:
>
> This is going to break building libc++ standalone (i.e. without any LLVM
> repository or even its CMake modules), right? Some upstream users care a
> lot about that use case (CC beanz and Duncan).
>
> *From: *cfe-commits <cfe-commits-bounces at lists.llvm.org> on behalf of Don
> Hinton via cfe-commits <cfe-commits at lists.llvm.org>
> *Reply-To: *Don Hinton <hintonda at gmail.com>
> *Date: *Thursday, January 25, 2018 at 10:15 AM
> *To: *"cfe-commits at lists.llvm.org" <cfe-commits at lists.llvm.org>
> *Subject: *[libcxx] r323453 - [cmake] [libcxx] Call llvm_setup_rpath()
> when adding shared libraries.
>
> Author: dhinton
> Date: Thu Jan 25 10:13:26 2018
> New Revision: 323453
>
> URL: https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__llvm.org_viewvc_llvm-2Dproject-3Frev-3D323453-26view-3Drev&d=DwIGaQ&c=
> 5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=
> zwvSmk9ZIfMARYg3JvYvNuA0Iz-PEq3H2i_ICF6vsR8&s=
> LDCu89byjNdZWoCIYHGHaPr3IamIdHLF0JwbnYE92vM&e=
> Log:
> [cmake] [libcxx] Call llvm_setup_rpath() when adding shared libraries.
>
> Clang and llvm already use llvm_setup_rpath(), so this change will
> help standarize rpath usage across all projects.
>
> Differential Revision: https://urldefense.proofpoint.com/v2/url?u=https-
> 3A__reviews.llvm.org_D42459&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=
> o3kDXzdBUE3ljQXKeTWOMw&m=zwvSmk9ZIfMARYg3JvYvNuA0Iz-
> PEq3H2i_ICF6vsR8&s=YCR-YJBua5p-4IK05GjHoZUU7aN8UJAFzL2xaz7byyw&e=
>
> Modified:
>     libcxx/trunk/lib/CMakeLists.txt
>
> Modified: libcxx/trunk/lib/CMakeLists.txt
> URL: https://urldefense.proofpoint.com/v2/url?u=http-
> 3A__llvm.org_viewvc_llvm-2Dproject_libcxx_trunk_lib_
> CMakeLists.txt-3Frev-3D323453-26r1-3D323452-26r2-3D323453-
> 26view-3Ddiff&d=DwIGaQ&c=5VD0RTtNlTh3ycd41b3MUw&r=
> o3kDXzdBUE3ljQXKeTWOMw&m=zwvSmk9ZIfMARYg3JvYvNuA0Iz-PEq3H2i_ICF6vsR8&s=
> Rd7xc2GWS8oyDcm0QshNPTqM3BglPY5_aHMIuCRUt1s&e=
> ============================================================
> ==================
> --- libcxx/trunk/lib/CMakeLists.txt (original)
> +++ libcxx/trunk/lib/CMakeLists.txt Thu Jan 25 10:13:26 2018
> @@ -222,6 +222,7 @@ set(LIBCXX_TARGETS)
> # Build the shared library.
> if (LIBCXX_ENABLE_SHARED)
>    add_library(cxx_shared SHARED $<TARGET_OBJECTS:cxx_objects>)
> +  llvm_setup_rpath(cxx_shared)
>    target_link_libraries(cxx_shared ${LIBCXX_LIBRARIES})
>    set_target_properties(cxx_shared
>      PROPERTIES
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.
> llvm.org_cgi-2Dbin_mailman_listinfo_cfe-2Dcommits&d=DwIGaQ&c=
> 5VD0RTtNlTh3ycd41b3MUw&r=o3kDXzdBUE3ljQXKeTWOMw&m=
> zwvSmk9ZIfMARYg3JvYvNuA0Iz-PEq3H2i_ICF6vsR8&s=
> TPt8bk99XfmUCdi7MBxyguYV6hJg3PsXFCTXyDfGms8&e=
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20180125/2de1f9e9/attachment-0001.html>


More information about the cfe-commits mailing list