This is an archive of the discontinued LLVM Phabricator instance.

[CMake] Link to compiler-rt if LIBUNWIND_USE_COMPILER_RT is ON.
ClosedPublic

Authored by cdavis5x on Sep 4 2018, 2:06 PM.

Details

Summary

If -nodefaultlibs is given, we weren't actually linking to it. This
was true irrespective of passing -rtlib=compiler-rt (see previous
patch). Now we explicitly link it to handle that case.

I wonder if we should be linking these libraries only if we're using
-nodefaultlibs...

Diff Detail

Repository
rL LLVM

Event Timeline

cdavis5x created this revision.Sep 4 2018, 2:06 PM
rnk accepted this revision.Sep 24 2018, 1:34 PM

Looks good, sorry for the delay.

This revision is now accepted and ready to land.Sep 24 2018, 1:34 PM
mstorsjo added inline comments.Sep 24 2018, 1:40 PM
src/CMakeLists.txt
60 ↗(On Diff #163910)

I'm a little suspicious of this line, of forcibly linking against libgcc here, even if we might not have checked that it even exists.

cdavis5x updated this revision to Diff 168687.Oct 8 2018, 11:08 AM
  • Detect libgcc.
cdavis5x marked an inline comment as done.Oct 8 2018, 11:08 AM
mstorsjo accepted this revision.Oct 8 2018, 11:10 AM
This revision was automatically updated to reflect the committed changes.