From 108289b2da949fe0b94043886ab0493f5169e4b3 Mon Sep 17 00:00:00 2001 From: Gordon Tisher Date: Fri, 8 Nov 2024 11:30:51 -0800 Subject: [PATCH] Correctly find custom-built `llc` (#4537) Use `HINTS` instead of `PATHS` in the CMake `find_path` command that tries to find our custom-built `llc`. `HINTS` is searched before the system `PATH`, so a system `llc` will now no longer be picked before ours. --------- Co-authored-by: Sean T Allen --- .release-notes/4537.md | 3 +++ src/libponyrt/CMakeLists.txt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 .release-notes/4537.md diff --git a/.release-notes/4537.md b/.release-notes/4537.md new file mode 100644 index 0000000000..018624d079 --- /dev/null +++ b/.release-notes/4537.md @@ -0,0 +1,3 @@ +## Correctly find custom-built `llc` during build process + +Previously our CMake build was failing to find our custom-built `llc` binary, but builds worked by accident if there was a system `llc`. The build system now finds our custom `llc` correctly. diff --git a/src/libponyrt/CMakeLists.txt b/src/libponyrt/CMakeLists.txt index 22be9c5eff..f8f13fd10d 100644 --- a/src/libponyrt/CMakeLists.txt +++ b/src/libponyrt/CMakeLists.txt @@ -56,7 +56,7 @@ set(_ll_except_obj "${CMAKE_BINARY_DIR}/except_try_catch.o") find_file(_llc_command NAMES llc.exe llc - PATHS "${CMAKE_BINARY_DIR}/../../libs/bin" "${CMAKE_BINARY_DIR}/../libs/bin" + HINTS "${CMAKE_BINARY_DIR}/../../libs/bin" "${CMAKE_BINARY_DIR}/../libs/bin" ) if(${CMAKE_HOST_SYSTEM_NAME} MATCHES "Darwin")