[PATCH] D33259: Don't defer to the GCC driver for linking arm-baremetal

Jonathan Roelofs via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 17 14:41:14 PDT 2017


jroelofs marked 2 inline comments as done.
jroelofs added inline comments.


================
Comment at: lib/Driver/ToolChains/BareMetal.cpp:107-108
+                                    ArgStringList &CmdArgs) const {
+  CmdArgs.push_back("-lc++");
+  CmdArgs.push_back("-lc++abi");
+  CmdArgs.push_back("-lunwind");
----------------
jroelofs wrote:
> compnerd wrote:
> > I think that this is a bit extreme.  We already have `-stdlib=libc++` and `-stdlib=libstdc++`.  Why not just honor that?
> I wasn't going for "support every possible thing out of the tin", instead preferring incremental development :)
Added support for `-stdlib=`.

I made the assumption that `-stdlib=libstdc++` implies the user wants libsupc++ as their ABI library, though someone may want libstdc++ + libc++abi, or other combinations. If that's the case, we can add `-abilib=`, and likewise `-unwinder=`... but let's save that for another patch, on another day.


https://reviews.llvm.org/D33259





More information about the cfe-commits mailing list