jrtc27 wrote:

> > > > > the inclusion of LLVMExports relies on the target system supporting 
> > > > > shared libraries
> > > > 
> > > > 
> > > > But you're building the compiler for the host, not the target, so why 
> > > > does that matter?
> > > 
> > > 
> > > Yes, the issue is that I get CMake errors when building compiler-rt (in 
> > > its cmake:112, we call load_llvm_config()), because I set the SYSTEM_NAME 
> > > while building it to Generic?
> > 
> > 
> > Building for baremetal targets has been done for many years without such 
> > issue, why is this one special?
> 
> I was also confused when it didn't work out-of-the-box, and maybe I'm still 
> doing something wrong.
> 
> > And load_llvm_config is gated on NOT LLVM_RUNTIMES_BUILD...
> 
> This doesn't match when the (BUILTINS|RUNTIMES)_$TARGET_FOO way of building 
> baremetal builtins/runtimes is used, unfortunately. I think it's relatively 
> new, and probably doesn't work without our patch? I suspect that 
> compiler-rt's cmake is broken in terms of correctly detecting standalone 
> builds in this mode, and I tried to fix it initially, but failed :(

I suggest looking at clang/cmake/caches/BaremetalARM.cmake, which doesn't need 
such hacks (assuming it's not bitrotted), and figuring out why it behaves 
differently.

https://github.com/llvm/llvm-project/pull/176353
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to