@@ -132,9 +132,12 @@ function(compileDeviceRTLLibrary target_name target_triple)
132132 BUILD_RPATH ""
133133 INSTALL_RPATH ""
134134 RUNTIME_OUTPUT_NAME libomptarget-${target_name} .bc)
135- target_compile_options (libomptarget-${target_name} PRIVATE "--target=${target_triple} " "-fuse-ld=lld" "-march=" )
135+ target_compile_options (libomptarget-${target_name} PRIVATE
136+ "--target=${target_triple} " "-fuse-ld=lld" "-march=" "-mcpu="
137+ "-Wno-unused-command-line-argument" )
136138 target_link_options (libomptarget-${target_name} PRIVATE "--target=${target_triple} "
137- "-r" "-nostdlib" "-flto" "-Wl,--lto-emit-llvm" "-fuse-ld=lld" "-march=" )
139+ "-r" "-nostdlib" "-flto" "-Wl,--lto-emit-llvm"
140+ "-fuse-ld=lld" "-march=" "-mcpu=" )
138141 install (TARGETS libomptarget-${target_name}
139142 PERMISSIONS OWNER_WRITE OWNER_READ GROUP_READ WORLD_READ
140143 DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /${target_triple} " )
@@ -153,7 +156,8 @@ function(compileDeviceRTLLibrary target_name target_triple)
153156 )
154157 target_link_libraries (omptarget.${target_name} PRIVATE omptarget.${target_name} .all_objs)
155158 target_link_options (omptarget.${target_name} PRIVATE "--target=${target_triple} "
156- "-r" "-nostdlib" "-flto" "-Wl,--lto-emit-llvm" "-fuse-ld=lld" "-march=" )
159+ "-Wno-unused-command-line-argument""-r" "-nostdlib" "-flto"
160+ "-Wl,--lto-emit-llvm" "-fuse-ld=lld" "-march=" "-mcpu=" )
157161
158162 install (TARGETS omptarget.${target_name}
159163 ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX} /${target_triple} " )
0 commit comments