Skip to content

Commit 74b0983

Browse files
aus-inteligcbot
authored andcommitted
VC cmake cleanup
Remove some unused outdated code.
1 parent 67d5a14 commit 74b0983

File tree

2 files changed

+2
-58
lines changed

2 files changed

+2
-58
lines changed

IGC/VectorCompiler/CMakeLists.txt

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@ set(IGC_BUILD__PROJ_LABEL__VectorCompiler "${IGC_BUILD__PROJ__VectorCompiler}")
4141
message(STATUS "+++ Source/IGC/VectorCompiler +++")
4242
message(STATUS "[VC] Build proj: ${IGC_BUILD__PROJ__VectorCompiler}")
4343

44-
45-
igc_arch_get_cpu(_cpuSuffix)
46-
47-
set(BUILD_EXTERNAL YES)
48-
4944
# --- LLVM ---
5045
if(${IGC_OPTION__LLVM_FROM_SYSTEM} OR (WIN32 AND ${IGC_OPTION__LLVM_PREBUILDS}))
5146
message(STATUS "[VC] Using system llvm")
@@ -143,7 +138,8 @@ if(NOT DEFINED INTRSRC)
143138
endif()
144139

145140
message(STATUS "[VC] Using vc-intrinsics source from: ${INTRSRC}")
146-
141+
# Trick intrinsics.
142+
set(BUILD_EXTERNAL YES)
147143
# We are using prebuilt SPIRV and building intrinsics.
148144
set(INTRBUILD "${CMAKE_CURRENT_BINARY_DIR}/intrbuild")
149145
add_subdirectory(${INTRSRC} ${INTRBUILD})

IGC/VectorCompiler/cmake/spirv.cmake

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,6 @@ endif()
9292
# Currently, release build of spirvdll is used to read spirv.
9393
# For debugging, one has to build debug version locally and replace release library.
9494
if(INSTALL_SPIRVDLL)
95-
if(NOT DEFINED SPIRV_PREBUILD_DIR AND NOT WIN32)
9695
include(ExternalProject)
9796
set(MAKE_EXEC ${CMAKE_MAKE_PROGRAM})
9897
message(STATUS "[VC] SPIRVDLL_SRC = ${SPIRVDLL_SRC}")
@@ -212,55 +211,4 @@ else()
212211
)
213212

214213
endif(DEFINED SPIRVDLL_SRC)
215-
216-
elseif(NOT TARGET SPIRVDLL)
217-
if(DEFINED SPIRV_PREBUILD_DIR)
218-
set(PREBUILT_SPIRVDLL_PATH "${SPIRV_PREBUILD_DIR}/lib" )
219-
endif()
220-
if(DEFINED WIN32)
221-
set(SPIRVDLL_NAME "SPIRVDLL.dll")
222-
else()
223-
set(SPIRVDLL_NAME "libSPIRVDLL.so")
224-
endif()
225-
find_file(SPIRVDLL_LIB
226-
${SPIRVDLL_NAME}
227-
PATHS ${PREBUILT_SPIRVDLL_PATH}
228-
NO_DEFAULT_PATH
229-
)
230-
if(NOT SPIRVDLL_LIB)
231-
message(FATAL_ERROR "[VC] Cannot find SPIRVDLL in prebuilds")
232-
endif()
233-
message(STATUS "[VC] Found SPIRVDLL: ${SPIRVDLL_LIB}")
234-
if(WIN32)
235-
if ("${vc_uses_custom_spirv}" STREQUAL "True")
236-
set(INSTALL_SPRIRVDLL_NAME "SPIRVDLL.dll")
237-
if("${_cpuSuffix}" STREQUAL "32")
238-
set(INSTALL_SPRIRVDLL_NAME "SPIRVDLL32.dll")
239-
endif()
240-
install(FILES ${SPIRVDLL_LIB}
241-
CONFIGURATIONS Debug Release
242-
DESTINATION $<CONFIG>/lh64
243-
RENAME ${INSTALL_SPRIRVDLL_NAME}
244-
)
245-
endif()
246-
else()
247-
install(FILES
248-
${SPIRVDLL_LIB}
249-
DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}
250-
COMPONENT igc-core
251-
)
252-
endif()
253-
else()
254-
get_target_property(SPIRVDLL_IMPORTED SPIRVDLL IMPORTED)
255-
if(SPIRVDLL_IMPORTED)
256-
message(STATUS "[VC] SPIRVDLL is already imported")
257-
else()
258-
message(STATUS "[VC] SPIRVDLL will be built in-tree")
259-
install(FILES
260-
$<TARGET_FILE:SPIRVDLL>
261-
DESTINATION ${CMAKE_INSTALL_FULL_LIBDIR}
262-
COMPONENT igc-core
263-
)
264-
endif()
265-
endif()
266214
endif(INSTALL_SPIRVDLL)

0 commit comments

Comments
 (0)