tambre added a comment.

In D86877#2248064 <https://reviews.llvm.org/D86877#2248064>, @phosek wrote:

> This was discussed when `LLVM_ENABLE_PER_TARGET_RUNTIME_DIR` was introduced 
> and there was a pushback against changing the driver behavior depending on 
> the value of that option, so if we're going to reverse that decision for 
> BareMetal, I think that deserves a broader discussion.

Thanks for the background. I'd rather not go for a compile-time behaviour 
change in that case and have gone with using `getCompilerRTArgString()`. I'll 
do an internal toolchain build and do some testing before landing this.



================
Comment at: clang/lib/Driver/ToolChains/BareMetal.cpp:163
+  CmdArgs.push_back(
+      Args.MakeArgString("-lclang_rt.builtins-" + getTriple().getArchName()));
+#endif
----------------
phosek wrote:
> Is there a reason why BareMetal doesn't just use 
> https://github.com/llvm/llvm-project/blob/master/clang/lib/Driver/ToolChain.cpp#L462
>  like all other drivers, and instead re-implements the runtime library lookup 
> logic?
Was unaware of that function before, thanks!
I can't see a good reason not to use it, so I've switched it over.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D86877/new/

https://reviews.llvm.org/D86877

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to