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

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

Reply via email to