Skip to content

Commit

Permalink
Fix IGC in-tree build
Browse files Browse the repository at this point in the history
.
  • Loading branch information
vmustya authored and sys-cmllvm committed Oct 11, 2022
1 parent 774479c commit c7afc56
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 5 deletions.
9 changes: 6 additions & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,12 @@ if(LLVM_VERSION_MAJOR VERSION_LESS 8)
message(FATAL_ERROR "VC-intrinsics do not support ${LLVM_VERSION} LLVM version")
endif()

find_package(Python REQUIRED COMPONENTS Interpreter)
if("${Python_VERSION}" VERSION_LESS 2.7)
message(FATAL_ERROR "Python 2.7 or newer is required")
if (NOT DEFINED PYTHON_EXECUTABLE)
find_package(Python REQUIRED COMPONENTS Interpreter)
if("${Python_VERSION}" VERSION_LESS 2.7)
message(FATAL_ERROR "Python 2.7 or newer is required")
endif()
set(PYTHON_EXECUTABLE "${Python_EXECUTABLE}")
endif()


Expand Down
2 changes: 1 addition & 1 deletion GenXIntrinsics/include/llvm/GenXIntrinsics/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

add_custom_command(
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${GENX_INTRINSICS_DESCRIPTION}
COMMAND ${Python_EXECUTABLE} -B
COMMAND ${PYTHON_EXECUTABLE} -B
${CMAKE_CURRENT_SOURCE_DIR}/Intrinsics.py
${CMAKE_CURRENT_SOURCE_DIR}/Intrinsic_definitions.py
${CMAKE_CURRENT_BINARY_DIR}/${GENX_INTRINSICS_DESCRIPTION}
Expand Down
2 changes: 1 addition & 1 deletion GenXIntrinsics/test/lit.site.cfg.py.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
config.host_triple = "@LLVM_HOST_TRIPLE@"
config.target_triple = "@TARGET_TRIPLE@"
config.host_arch = "@HOST_ARCH@"
config.python_executable = "@Python_EXECUTABLE@"
config.python_executable = "@PYTHON_EXECUTABLE@"
config.test_run_dir = "@CMAKE_CURRENT_BINARY_DIR@"
config.vc_intrinsics_plugin = "$<TARGET_FILE:VCIntrinsicsPlugin>"
config.llvm_version_major = "@LLVM_VERSION_MAJOR@"
Expand Down

0 comments on commit c7afc56

Please sign in to comment.