diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-19 13:32:49 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-19 13:32:49 +0000 |
| commit | 3214d942145b7221078b37ce7b9e37907ad61b9d (patch) | |
| tree | c571e7713ec14419baa9c9c66f1163d7dce023b5 /cmake | |
| parent | f01cafc0ead695e8c5280e5e4a942b24e1922e13 (diff) | |
refactor(driver): prepare native runtime resources with Perl
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'cmake')
| -rw-r--r-- | cmake/NativeCompiler.cmake | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/cmake/NativeCompiler.cmake b/cmake/NativeCompiler.cmake index bd536f4..e0b4b3f 100644 --- a/cmake/NativeCompiler.cmake +++ b/cmake/NativeCompiler.cmake @@ -2,7 +2,8 @@ find_package(Clang REQUIRED CONFIG HINTS "${LLVM_INSTALL_PREFIX}/lib/cmake/clang") cpsc_find_dependency(PATH LLD_DIR NAMES LLDConfig.cmake PATH_SUFFIXES lib/cmake/lld cmake) find_package(LLD REQUIRED CONFIG HINTS "${LLVM_INSTALL_PREFIX}/lib/cmake/lld") -find_package(Python3 3.9 REQUIRED COMPONENTS Interpreter) +cpsc_find_dependency(PROGRAM PERL_EXECUTABLE NAMES perl REQUIRED) +find_package(Perl REQUIRED) if(NOT LLVM_ENABLE_ZLIB) message(FATAL_ERROR "Native link resources require LLVM built with zlib support") endif() @@ -56,9 +57,9 @@ if(APPLE) list(APPEND cpsc_native_flags "--flag=-mmacosx-version-min=${CMAKE_OSX_DEPLOYMENT_TARGET}") endif() endif() -set(cpsc_runtime_generator "${CMAKE_SOURCE_DIR}/tools/driver/prepare-native-runtime.py") +set(cpsc_runtime_generator "${CMAKE_SOURCE_DIR}/tools/driver/prepare-native-runtime.pl") set_property(DIRECTORY APPEND PROPERTY CMAKE_CONFIGURE_DEPENDS "${cpsc_runtime_generator}") -execute_process(COMMAND "${Python3_EXECUTABLE}" "${cpsc_runtime_generator}" +execute_process(COMMAND "${PERL_EXECUTABLE}" "${cpsc_runtime_generator}" "--compiler=${CMAKE_CXX_COMPILER}" "--output=${CMAKE_BINARY_DIR}/native-runtime/NativeRuntime.inc" "--platform=${cpsc_native_platform}" ${cpsc_native_flags} |
