This is an archive of the discontinued LLVM Phabricator instance.

[Driver] Disable static C++ library support on Fuchsia
ClosedPublic

Authored by phosek on Aug 1 2017, 5:28 PM.

Diff Detail

Repository
rL LLVM

Event Timeline

phosek created this revision.Aug 1 2017, 5:28 PM
mcgrathr accepted this revision.Aug 1 2017, 5:32 PM

LGTM. The nit below is orthogonal to this change.

lib/Driver/ToolChains/Fuchsia.cpp
112 ↗(On Diff #109255)

Shouldn't -lm be conditionalized on ShouldLinkCXXStdlib too?
It's only there to satisfy references from libc++, right?

OTOH, -lm is a no-op on Fuchsia so perhaps we should just drop it. On the third hand, we might separate libm from libc in the future so perhaps it's better to leave it.

This revision is now accepted and ready to land.Aug 1 2017, 5:32 PM
phosek added inline comments.Aug 1 2017, 5:51 PM
lib/Driver/ToolChains/Fuchsia.cpp
112 ↗(On Diff #109255)

I looked at all the other drivers and they all add -lm unconditionally, I'm not sure if it's just a copypasta or if there's some other reason behind it.

I also thought about removing it altogether but arrived to the same conclusion as you did.

This revision was automatically updated to reflect the committed changes.