[PATCH] D87164: Extending Baremetal toolchain's support for the rtlib option.
Manuel Carrasco via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Fri Sep 11 10:23:11 PDT 2020
mcarrasco marked an inline comment as done.
mcarrasco added a comment.
@jroelofs no worries, thanks a lot for your time.
Please tell me if I understood you correctly.
It is acceptable just to append the -lgcc if -rtlib=libgcc is used, although the user is responsible to ensure that correct paths are provided so libgcc is found.
I also agree with the above, although I just want to know if I got your words correctly. In addition, you suggest that the build system should invoke clang with a valid value in --resource-dir option in order find libgcc.
Could you point me where I can find more info regarding --resource-dir? So far I only found this:
clang --help-hidden | grep resource-dir
-print-resource-dir Print the resource directory pathname
-resource-dir <value> The directory which holds the compiler resource files
Sincerly, I'm a little bit confused about: -sysroot, -gcc-toolchain and now -resource-dir
================
Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:164
+ Args.MakeArgString("-lclang_rt.builtins-" + getTriple().getArchName()));
+ break;
+ case ToolChain::RLT_Libgcc:
----------------
jroelofs wrote:
> If you make these `break`s into `return`s, and put an `llvm_unreachable("unhandled RuntimeLibType");` after the switch, then whoever adds a new entry to that enum will get a nice warning showing them that they need to update this code.
Thanks!
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D87164/new/
https://reviews.llvm.org/D87164
More information about the cfe-commits
mailing list