Changeset View
Changeset View
Standalone View
Standalone View
openmp/libomptarget/DeviceRTL/CMakeLists.txt
Show First 20 Lines • Show All 171 Lines • ▼ Show 20 Lines | foreach(src ${src_files}) | ||||
endif() | endif() | ||||
set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${outfile}) | set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES ${outfile}) | ||||
list(APPEND bc_files ${outfile}) | list(APPEND bc_files ${outfile}) | ||||
endforeach() | endforeach() | ||||
set(bclib_name "libomptarget-new-${target_name}-${target_cpu}.bc") | set(bclib_name "libomptarget-new-${target_name}-${target_cpu}.bc") | ||||
# Link to a bitcode library. | # Link to a bitcode library. | ||||
JonChesterfield: rearranging the naming here - the llvm-link file is now prefixed linked_, with the optimised… | |||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/linked_${bclib_name} | add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/linked_${bclib_name} | ||||
COMMAND ${LINK_TOOL} | COMMAND ${LINK_TOOL} | ||||
-o ${CMAKE_CURRENT_BINARY_DIR}/linked_${bclib_name} ${bc_files} | -o ${CMAKE_CURRENT_BINARY_DIR}/linked_${bclib_name} ${bc_files} | ||||
DEPENDS ${bc_files} | DEPENDS ${bc_files} | ||||
COMMENT "Linking LLVM bitcode ${bclib_name}" | COMMENT "Linking LLVM bitcode ${bclib_name}" | ||||
) | ) | ||||
add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${bclib_name} | add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${bclib_name} | ||||
Show All 32 Lines | |||||
endfunction() | endfunction() | ||||
# Generate a Bitcode library for all the compute capabilities the user requested | # Generate a Bitcode library for all the compute capabilities the user requested | ||||
foreach(sm ${nvptx_sm_list}) | foreach(sm ${nvptx_sm_list}) | ||||
compileDeviceRTLLibrary(sm_${sm} nvptx -target nvptx64 -Xclang -target-feature -Xclang +ptx61 "-D__CUDA_ARCH__=${sm}0") | compileDeviceRTLLibrary(sm_${sm} nvptx -target nvptx64 -Xclang -target-feature -Xclang +ptx61 "-D__CUDA_ARCH__=${sm}0") | ||||
endforeach() | endforeach() | ||||
foreach(mcpu ${amdgpu_mcpus}) | foreach(mcpu ${amdgpu_mcpus}) | ||||
# require D112227 or similar to enable the compilation for amdgpu | compileDeviceRTLLibrary(${mcpu} amdgpu -target amdgcn-amd-amdhsa -D__AMDGCN__ -fvisibility=default -nogpulib) | ||||
# compileDeviceRTLLibrary(${mcpu} amdgpu -target amdgcn-amd-amdhsa -D__AMDGCN__ -fvisibility=default -nogpulib) | |||||
endforeach() | endforeach() |
rearranging the naming here - the llvm-link file is now prefixed linked_, with the optimised library left without a prefix. Updated depends / output clauses to match.