This is an archive of the discontinued LLVM Phabricator instance.

libcxx: Allow auto-linking to be disabled with a macro.
ClosedPublic

Authored by pcc on Jan 23 2018, 11:43 AM.

Details

Summary

Some users may have a custom build system which gives a different
name to the libc++ archive (or does not create an archive at all,
instead passing the object files directly to the linker). Give those
users a way to disable auto-linking.

Diff Detail

Repository
rL LLVM

Event Timeline

pcc created this revision.Jan 23 2018, 11:43 AM

I'm fine with the idea of this knob, I just would prefer a slightly different implementation. Could you wrap the entire block in the defined(_LIBCPP_NO_AUTO_LINK) rather than adding the additional conditional? I feel like it makes it easier to read.

pcc updated this revision to Diff 131181.Jan 23 2018, 5:38 PM
  • Wrap the auto-link block in an ifndef
pcc added a comment.Jan 23 2018, 5:38 PM

I'm fine with the idea of this knob, I just would prefer a slightly different implementation. Could you wrap the entire block in the defined(_LIBCPP_NO_AUTO_LINK) rather than adding the additional conditional? I feel like it makes it easier to read.

Done.

compnerd accepted this revision.Jan 23 2018, 7:30 PM

IMO !defined(...) makes it easier to alter in the future IMO.

This revision is now accepted and ready to land.Jan 23 2018, 7:30 PM
This revision was automatically updated to reflect the committed changes.