[llvm-branch-commits] [clang] [Driver] Add support for crtbegin.o, crtend.o and libgloss lib to BareMetal toolchain object (PR #121830)
Petr Hosek via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Fri Apr 4 00:29:46 PDT 2025
================
@@ -545,9 +545,27 @@ void baremetal::Linker::ConstructJob(Compilation &C, const JobAction &JA,
CmdArgs.push_back(Arch == llvm::Triple::aarch64_be ? "-EB" : "-EL");
}
- if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles,
- options::OPT_r)) {
- CmdArgs.push_back(Args.MakeArgString(TC.GetFilePath("crt0.o")));
+ bool WantCRTs =
+ !Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles);
+
+ const char *crtbegin, *crtend;
----------------
petrhosek wrote:
This is probably more consistent with LLVM style:
```suggestion
const char *CRTBegin, *CRTEnd;
```
https://github.com/llvm/llvm-project/pull/121830
More information about the llvm-branch-commits
mailing list