[clang] [llvm] [OpenMP] Remove 'libomptarget.devicertl.a' fatbinary and use static library (PR #126143)

Joseph Huber via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 19 10:13:08 PDT 2025


jhuber6 wrote:

> Yeah, appending `-march=` seems to work.

Is this a functional work-around for now?
```diff
diff --git a/offload/DeviceRTL/CMakeLists.txt b/offload/DeviceRTL/CMakeLists.txt
index cce360236960..277ad9816411 100644
--- 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")
   install(TARGETS libomptarget-${target_name}
```

https://github.com/llvm/llvm-project/pull/126143


More information about the llvm-commits mailing list