jhuber6 wrote:

> No, I'm afraid that didn't change anything. However, it did if I added it to 
> `target_link_options` too.
> 
> That said, you want to instead:
> 
> ```diff
> --- a/offload/DeviceRTL/CMakeLists.txt
> +++ b/offload/DeviceRTL/CMakeLists.txt
> @@ -132,7 +132,7 @@ function(compileDeviceRTLLibrary target_name 
> target_triple)
>      BUILD_RPATH ""
>      INSTALL_RPATH ""
>      RUNTIME_OUTPUT_NAME libomptarget-${target_name}.bc)
> -  target_compile_options(libomptarget-${target_name} PRIVATE 
> "--target=${target_triple}")
> +  target_compile_options(libomptarget-${target_name} PRIVATE 
> "--target=${target_triple}" "-march=")
>    target_link_options(libomptarget-${target_name} PRIVATE 
> "--target=${target_triple}"
> -                      "-r" "-nostdlib" "-flto" "-Wl,--lto-emit-llvm")
> +                      "-r" "-nostdlib" "-flto" "-Wl,--lto-emit-llvm" 
> "-march=")
>    install(TARGETS libomptarget-${target_name}
> ```
> 
> without the `''` since that gets passed literally, and triggers warnings 
> about `''` being an invalid target :-).

Alright, thanks. Do you want to make a PR for that? Sorry this is a little 
disruptive but I think this is long overdue. After I land the follow up you'll 
need to do a separate standalone build for the GPU portions, since they'd be 
considered different cross-compiling libraries. It's a much more 
straightforward model I'm trying to move all the existing GPU runtimes to.

https://github.com/llvm/llvm-project/pull/126143
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to