From dadfb45eb23adc53f8815265eef92b295fe9cebf Mon Sep 17 00:00:00 2001 From: Hiroshi Hatake Date: Thu, 4 Apr 2024 17:02:36 +0900 Subject: [PATCH] wamrc: build: macos: Prioritize for defined LLVM_DIR environment variable This is because macOS's homebrew sometimes introduces the cutting edge version of Formulae. So, we need to make a room for user specified LLVM_DIR here. Signed-off-by: Hiroshi Hatake --- src/wamrc/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wamrc/CMakeLists.txt b/src/wamrc/CMakeLists.txt index 7b6e7d6ff6d..ba41f247bd2 100644 --- a/src/wamrc/CMakeLists.txt +++ b/src/wamrc/CMakeLists.txt @@ -118,7 +118,7 @@ if (NOT MSVC) endif () # Searching homebrewed LLVM automatically on macOS. -if(FLB_SYSTEM_MACOS) +if(FLB_SYSTEM_MACOS AND NOT DEFINED ENV{LLVM_DIR}) execute_process( COMMAND brew --prefix llvm RESULT_VARIABLE HOMEBREW_LLVM