Skip to content

Commit f761ff6

Browse files
committed
[Offload] Restore optimization options for libomptarget
1 parent 8f97359 commit f761ff6

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

offload/DeviceRTL/CMakeLists.txt

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -181,9 +181,11 @@ function(compileDeviceRTLLibrary target_name target_triple)
181181
target_compile_options(libomptarget-${target_name} PRIVATE
182182
"--target=${target_triple}" "-fuse-ld=lld" "-march=" "-mcpu="
183183
"-Wno-unused-command-line-argument")
184-
target_link_options(libomptarget-${target_name} PRIVATE "--target=${target_triple}"
185-
"-r" "-nostdlib" "-flto" "-Wl,--lto-emit-llvm"
186-
"-fuse-ld=lld" "-march=" "-mcpu=")
184+
target_link_options(libomptarget-${target_name} PRIVATE
185+
"--target=${target_triple}" "-r" "-nostdlib" "-flto" "-Wl,--lto-emit-llvm"
186+
"-Wl,--lto-newpm-passes=default<O3>" "-Wl,-plugin-opt=-openmp-opt-disable"
187+
"-Wl,-plugin-opt=-attributor-enable=module"
188+
"-Wl,-plugin-opt=-vectorize-slp=false" "-fuse-ld=lld" "-march=" "-mcpu=")
187189
install(TARGETS libomptarget-${target_name}
188190
PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
189191
DESTINATION "lib${LLVM_LIBDIR_SUFFIX}/${target_triple}")

0 commit comments

Comments
 (0)