diff --git a/local/recipes/dev/libclc/recipe.toml b/local/recipes/dev/libclc/recipe.toml index 7e222228d5..aac562a1a1 100644 --- a/local/recipes/dev/libclc/recipe.toml +++ b/local/recipes/dev/libclc/recipe.toml @@ -107,7 +107,16 @@ export CFLAGS="$_SAVED_CFLAGS" export CXXFLAGS="$_SAVED_CXXFLAGS" export CPPFLAGS="$_SAVED_CPPFLAGS" -# Source dir is the path_in_repo subdir of the cloned llvm-project. +# Source dir is the path_in_repo subdir of the cloned llvm-project. This +# cookbook does not extract path_in_repo into COOKBOOK_SOURCE — it clones the +# whole llvm-project there — so CMake was pointed at the repo root and failed +# with "source directory does not appear to contain CMakeLists.txt". Descend +# into the libclc subdir when the whole repo was cloned (mirrors how the clang21 +# recipe does COOKBOOK_SOURCE/clang); if path_in_repo already left the subdir at +# the root, use it as-is. +if [ -f "${COOKBOOK_SOURCE}/libclc/CMakeLists.txt" ]; then + COOKBOOK_SOURCE="${COOKBOOK_SOURCE}/libclc" +fi "${COOKBOOK_CMAKE}" "${COOKBOOK_SOURCE}" "${COOKBOOK_CMAKE_FLAGS[@]}" "${COOKBOOK_NINJA}" -j"${COOKBOOK_MAKE_JOBS}" DESTDIR="${COOKBOOK_STAGE}/stage" "${COOKBOOK_NINJA}" install