[PATCH] D54681: [Driver] Avoid including -lm on the link line with -nostdlib++

Petr Hosek via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Dec 12 19:23:13 PST 2018


phosek added a comment.

In D54681#1329240 <https://reviews.llvm.org/D54681#1329240>, @thakis wrote:

> -lm is kind of the reason -nostdlib++ exists at all -- if you don't want _any_ stdlibs, you can just -nostdlib, no?


We still want standard libraries like `-lc` and compiler builtins, `-nostdlib` would remove those. Keeping `-lm` around is assuming that user is going to link against C++ library that needs `-lm` which is a lot of assumptions that IMHO driver shouldn't be doing.


Repository:
  rC Clang

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D54681/new/

https://reviews.llvm.org/D54681





More information about the cfe-commits mailing list