mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-21 09:14:47 +08:00
Rename offline compiler: cloc -> ocloc
Change-Id: I0595bac4c7266e77bd2ee17588694233547c8315
This commit is contained in:
committed by
sys_ocldev
parent
af46d88fc1
commit
d46969a7f2
@@ -4,7 +4,7 @@
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
project(cloc)
|
||||
project(ocloc)
|
||||
|
||||
set(CLOC_SRCS_LIB
|
||||
${IGDRCL_SOURCE_DIR}/offline_compiler/decoder/binary_decoder.cpp
|
||||
@@ -69,10 +69,10 @@ set(CLOC_SRCS
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/main.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
)
|
||||
add_executable(cloc ${CLOC_SRCS})
|
||||
add_executable(ocloc ${CLOC_SRCS})
|
||||
add_subdirectories()
|
||||
|
||||
create_project_source_tree(cloc ${IGDRCL_SOURCE_DIR}/runtime)
|
||||
create_project_source_tree(ocloc ${IGDRCL_SOURCE_DIR}/runtime)
|
||||
|
||||
set(CLOC_INCLUDES
|
||||
${IGC_OCL_ADAPTOR_DIR}
|
||||
@@ -85,22 +85,22 @@ set(CLOC_INCLUDES
|
||||
${THIRD_PARTY_DIR}
|
||||
)
|
||||
|
||||
target_include_directories(cloc BEFORE PRIVATE ${CLOC_INCLUDES})
|
||||
target_include_directories(ocloc BEFORE PRIVATE ${CLOC_INCLUDES})
|
||||
|
||||
target_compile_definitions(cloc PUBLIC ${CLOC_LIB_FLAGS_DEFINITIONS} ${SUPPORTED_GEN_FLAGS_DEFINITONS} DEFAULT_PLATFORM=${DEFAULT_SUPPORTED_PLATFORM})
|
||||
target_compile_definitions(ocloc PUBLIC ${CLOC_LIB_FLAGS_DEFINITIONS} ${SUPPORTED_GEN_FLAGS_DEFINITONS} DEFAULT_PLATFORM=${DEFAULT_SUPPORTED_PLATFORM})
|
||||
|
||||
if(MSVC)
|
||||
target_link_libraries(cloc dbghelp)
|
||||
target_link_libraries(ocloc dbghelp)
|
||||
endif()
|
||||
|
||||
if(UNIX)
|
||||
target_link_libraries(cloc dl pthread)
|
||||
target_link_libraries(ocloc dl pthread)
|
||||
endif()
|
||||
|
||||
target_link_libraries(cloc elflib)
|
||||
target_link_libraries(ocloc elflib)
|
||||
|
||||
set_target_properties(cloc PROPERTIES FOLDER "offline_compiler")
|
||||
set_property(TARGET cloc APPEND_STRING PROPERTY COMPILE_FLAGS ${ASAN_FLAGS} ${TSAN_FLAGS})
|
||||
set_target_properties(ocloc PROPERTIES FOLDER "offline_compiler")
|
||||
set_property(TARGET ocloc APPEND_STRING PROPERTY COMPILE_FLAGS ${ASAN_FLAGS} ${TSAN_FLAGS})
|
||||
|
||||
add_custom_target(copy_compiler_files DEPENDS ${IGDRCL__IGC_TARGETS})
|
||||
set_target_properties(copy_compiler_files PROPERTIES FOLDER "opencl runtime")
|
||||
@@ -109,7 +109,7 @@ foreach(TARGET_tmp ${IGDRCL__IGC_TARGETS})
|
||||
add_custom_command(
|
||||
TARGET copy_compiler_files
|
||||
PRE_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${TARGET_tmp}> $<TARGET_FILE_DIR:cloc>
|
||||
COMMAND ${CMAKE_COMMAND} -E copy_if_different $<TARGET_FILE:${TARGET_tmp}> $<TARGET_FILE_DIR:ocloc>
|
||||
)
|
||||
endforeach()
|
||||
|
||||
|
||||
@@ -620,7 +620,7 @@ std::string getDevicesTypes() {
|
||||
void OfflineCompiler::printUsage() {
|
||||
|
||||
printf("Compiles CL files into llvm (.bc or .ll), gen isa (.gen), and binary files (.bin)\n\n");
|
||||
printf("cloc -file <filename> -device <device_type> [OPTIONS]\n\n");
|
||||
printf("ocloc -file <filename> -device <device_type> [OPTIONS]\n\n");
|
||||
printf(" -file <filename> Indicates the CL kernel file to be compiled.\n");
|
||||
printf(" -device <device_type> Indicates which device for which we will compile.\n");
|
||||
printf(" <device_type> can be: %s\n", getDevicesTypes().c_str());
|
||||
|
||||
@@ -22,4 +22,4 @@ else()
|
||||
)
|
||||
endif()
|
||||
|
||||
target_sources(cloc PRIVATE ${CLOC_SRCS_UTILITIES})
|
||||
target_sources(ocloc PRIVATE ${CLOC_SRCS_UTILITIES})
|
||||
|
||||
Reference in New Issue
Block a user