This is an archive of the discontinued LLVM Phabricator instance.

Do not link the dyndd runtime library against libdl on FreeBSD
ClosedPublic

Authored by kutuzov.viktor.84 on Sep 5 2014, 3:55 AM.

Diff Detail

Event Timeline

kutuzov.viktor.84 retitled this revision from to Do not link the dyndd runtime library against libdl on FreeBSD.
kutuzov.viktor.84 updated this object.
kutuzov.viktor.84 edited the test plan for this revision. (Show Details)
kutuzov.viktor.84 added reviewers: kcc, samsonov.
kutuzov.viktor.84 added subscribers: Unknown Object (MLST), emaste.
emaste added inline comments.Sep 5 2014, 7:28 AM
lib/tsan/dd/CMakeLists.txt
27

There are a couple of examples of optionally adding -ldl without relying on the system name, in other llvm projects:

lib/Support/CMakeLists.txt:

if( HAVE_LIBDL )
  set(system_libs ${system_libs} ${CMAKE_DL_LIBS})

projects/libcxxabi/src/Unwind/CMakeLists.txt:

append_if(libraries LIBCXXABI_HAS_DL_LIB dl)
samsonov added inline comments.Sep 5 2014, 1:25 PM
lib/tsan/dd/CMakeLists.txt
27

Yeah, you should use

append_if(COMPILER_RT_HAS_LIBDL dl DD_LINKLIBS)

we already have COMPILER_RT_HAS_LIBDL defined. Also, while you're here, use COMPILER_RT_HAS_LIBPTHREAD for pthread as well.

samsonov accepted this revision.Sep 8 2014, 10:49 AM
samsonov edited edge metadata.

LGTM

This revision is now accepted and ready to land.Sep 8 2014, 10:49 AM
Diffusion closed this revision.Sep 17 2014, 1:04 AM
Diffusion updated this revision to Diff 13773.

Closed by commit rL217944 (authored by vkutuzov).