[VENTUS][RISCV][feat] Accelerate libclc building process
Disable builtin cmake script defined in libclc by upstream to accelerate ventus libclc building process
This commit is contained in:
parent
9d56abe113
commit
85cf676b2c
|
@ -311,13 +311,13 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
|
||||||
set( obj_suffix ${arch_suffix}.bc )
|
set( obj_suffix ${arch_suffix}.bc )
|
||||||
|
|
||||||
# Add opt target
|
# Add opt target
|
||||||
add_custom_command( OUTPUT "builtins.opt.${obj_suffix}"
|
# add_custom_command( OUTPUT "builtins.opt.${obj_suffix}"
|
||||||
COMMAND ${LLVM_OPT} ${opt_flags} -o
|
# COMMAND ${LLVM_OPT} ${opt_flags} -o
|
||||||
"builtins.opt.${obj_suffix}"
|
# "builtins.opt.${obj_suffix}"
|
||||||
"builtins.link.${obj_suffix}"
|
# "builtins.link.${obj_suffix}"
|
||||||
DEPENDS "builtins.link.${arch_suffix}" )
|
# DEPENDS "builtins.link.${arch_suffix}" )
|
||||||
add_custom_target( "opt.${obj_suffix}" ALL
|
# add_custom_target( "opt.${obj_suffix}" ALL
|
||||||
DEPENDS "builtins.opt.${obj_suffix}" )
|
# DEPENDS "builtins.opt.${obj_suffix}" )
|
||||||
|
|
||||||
if( ${ARCH} STREQUAL "spirv" OR ${ARCH} STREQUAL "spirv64" )
|
if( ${ARCH} STREQUAL "spirv" OR ${ARCH} STREQUAL "spirv64" )
|
||||||
set( spv_suffix ${arch_suffix}.spv )
|
set( spv_suffix ${arch_suffix}.spv )
|
||||||
|
@ -333,15 +333,15 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
|
||||||
else()
|
else()
|
||||||
|
|
||||||
# Add prepare target
|
# Add prepare target
|
||||||
add_custom_command( OUTPUT "${obj_suffix}"
|
# add_custom_command( OUTPUT "${obj_suffix}"
|
||||||
COMMAND prepare_builtins -o
|
# COMMAND prepare_builtins -o
|
||||||
"${obj_suffix}"
|
# "${obj_suffix}"
|
||||||
"builtins.opt.${obj_suffix}"
|
# "builtins.opt.${obj_suffix}"
|
||||||
DEPENDS "opt.${obj_suffix}"
|
# DEPENDS "opt.${obj_suffix}"
|
||||||
"builtins.opt.${obj_suffix}"
|
# "builtins.opt.${obj_suffix}"
|
||||||
prepare_builtins )
|
# prepare_builtins )
|
||||||
add_custom_target( "prepare-${obj_suffix}" ALL
|
# add_custom_target( "prepare-${obj_suffix}" ALL
|
||||||
DEPENDS "${obj_suffix}" )
|
# DEPENDS "${obj_suffix}" )
|
||||||
|
|
||||||
# nvptx-- targets don't include workitem builtins
|
# nvptx-- targets don't include workitem builtins
|
||||||
if( NOT ${t} MATCHES ".*ptx.*--$" )
|
if( NOT ${t} MATCHES ".*ptx.*--$" )
|
||||||
|
@ -350,16 +350,16 @@ foreach( t ${LIBCLC_TARGETS_TO_BUILD} )
|
||||||
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} )
|
WORKING_DIRECTORY ${CMAKE_SOURCE_DIR} )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${obj_suffix} DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" )
|
# install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${obj_suffix} DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" )
|
||||||
foreach( a ${${d}_aliases} )
|
# foreach( a ${${d}_aliases} )
|
||||||
set( alias_suffix "${a}-${t}.bc" )
|
# set( alias_suffix "${a}-${t}.bc" )
|
||||||
add_custom_target( ${alias_suffix} ALL
|
# add_custom_target( ${alias_suffix} ALL
|
||||||
COMMAND ${CMAKE_COMMAND} -E
|
# COMMAND ${CMAKE_COMMAND} -E
|
||||||
create_symlink ${obj_suffix}
|
# create_symlink ${obj_suffix}
|
||||||
${alias_suffix}
|
# ${alias_suffix}
|
||||||
DEPENDS "prepare-${obj_suffix}" )
|
# DEPENDS "prepare-${obj_suffix}" )
|
||||||
install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${alias_suffix} DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" )
|
# install( FILES ${CMAKE_CURRENT_BINARY_DIR}/${alias_suffix} DESTINATION "${CMAKE_INSTALL_DATADIR}/clc" )
|
||||||
endforeach( a )
|
# endforeach( a )
|
||||||
endif()
|
endif()
|
||||||
endforeach( d )
|
endforeach( d )
|
||||||
endforeach( t )
|
endforeach( t )
|
||||||
|
|
|
@ -16,6 +16,7 @@ for item in $(ls ${LIBCLC_DIR}/generic/lib | grep ll)
|
||||||
do
|
do
|
||||||
${BINARY_DIR}/bin/clang -target riscv32 -mcpu=ventus-gpgpu \
|
${BINARY_DIR}/bin/clang -target riscv32 -mcpu=ventus-gpgpu \
|
||||||
-cl-std=CL2.0 \
|
-cl-std=CL2.0 \
|
||||||
|
-Wno-override-module \
|
||||||
-ffunction-sections -fdata-sections \
|
-ffunction-sections -fdata-sections \
|
||||||
-c ${LIBCLC_DIR}/generic/lib/${item} \
|
-c ${LIBCLC_DIR}/generic/lib/${item} \
|
||||||
-o ${LIBCLC_BUILD_DIR}/${item}.o
|
-o ${LIBCLC_BUILD_DIR}/${item}.o
|
||||||
|
|
Loading…
Reference in New Issue