diff --git a/.ci/scripts/test_llama.sh b/.ci/scripts/test_llama.sh index 0422f8114bb..84278e290f6 100644 --- a/.ci/scripts/test_llama.sh +++ b/.ci/scripts/test_llama.sh @@ -154,6 +154,7 @@ cmake_install_executorch_libraries() { echo "Installing libexecutorch.a, libextension_module.so, libportable_ops_lib.a" rm -rf cmake-out retry cmake --preset llm \ + -DEXECUTORCH_BUILD_TESTS=ON \ -DBUILD_TESTING=OFF \ -DCMAKE_INSTALL_PREFIX=cmake-out \ -DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" \ @@ -170,6 +171,7 @@ cmake_build_llama_runner() { popd dir="examples/models/llama" retry cmake \ + -DEXECUTORCH_BUILD_TESTS=ON \ -DBUILD_TESTING=OFF \ -DCMAKE_INSTALL_PREFIX=cmake-out \ -DCMAKE_BUILD_TYPE="$CMAKE_BUILD_TYPE" \ diff --git a/examples/models/llama/CMakeLists.txt b/examples/models/llama/CMakeLists.txt index f59252c0df2..e7c73c0cffc 100644 --- a/examples/models/llama/CMakeLists.txt +++ b/examples/models/llama/CMakeLists.txt @@ -220,7 +220,8 @@ target_include_directories(llama_main PUBLIC ${_common_include_directories}) target_link_libraries(llama_main PUBLIC llama_runner ${link_libraries}) target_compile_options(llama_main PUBLIC ${_common_compile_options}) if(APPLE) - target_link_options(llama_main PRIVATE -Wl,-rpath,@executable_path) + target_link_options(llama_main PRIVATE -Wl,-rpath,@loader_path) elseif(UNIX) set_target_properties(llama_main PROPERTIES LINK_FLAGS "-Wl,-rpath='$ORIGIN'") endif() +# Windows doesn't need rpath - DLLs are found via standard Windows search order diff --git a/runtime/executor/test/method_test.cpp b/runtime/executor/test/method_test.cpp index 60f4e096bac..c0a58793248 100644 --- a/runtime/executor/test/method_test.cpp +++ b/runtime/executor/test/method_test.cpp @@ -8,6 +8,7 @@ #include #include +#include #include #include