[PATCH] D59264: [Driver] Support compiler-rt crtbegin.o/crtend.o for Linux
Manoj Gupta via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Wed Mar 13 13:56:05 PDT 2019
manojgupta added subscribers: manojgupta, llozano.
manojgupta added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:447
const char *crtbegin;
- if (Args.hasArg(options::OPT_static))
- crtbegin = isAndroid ? "crtbegin_static.o" : "crtbeginT.o";
- else if (Args.hasArg(options::OPT_shared))
- crtbegin = isAndroid ? "crtbegin_so.o" : "crtbeginS.o";
- else if (IsPIE || IsStaticPIE)
- crtbegin = isAndroid ? "crtbegin_dynamic.o" : "crtbeginS.o";
- else
- crtbegin = isAndroid ? "crtbegin_dynamic.o" : "crtbegin.o";
-
- if (HasCRTBeginEndFiles)
+ if (ToolChain.GetRuntimeLibType(Args) == ToolChain::RLT_CompilerRT &&
+ !isAndroid) {
----------------
This is currently unconditional on using compiler-rt. Given that compiler-rt provides the crt*.o files only under the CMake flag COMPILER_RT_BUILD_CRT, shouldn't there be an equivalent clang CMake flag to conditionally enable this.
Repository:
rC Clang
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D59264/new/
https://reviews.llvm.org/D59264
More information about the cfe-commits
mailing list