Detecting libgcc vs compiler-rt use

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Detecting libgcc vs compiler-rt use

Matthieu Brucher via cfe-dev

I am looking for a way to detect whether Clang is using libgcc or
compiler-rt. I've analyzed the -v output and it appears the only
different is in the underlying ld command line. Specifically, the
--rtlib option does not affect any preprocessor macros.

Is there a reasonably light-weight way (i.e., without compiling
or linking anything) to detect which runtime is being used?

Failed that, is there a way to figure out what is the default?
If there were a way, then I could look for any --rtlib options
and figure something out.

Also, am I correct in assuming that the default runtime (i.e.,
without --rtlib=compiler-rt) for Clang targeting MSVC is the
msvc runtime?

cfe-dev mailing list
[hidden email]