From e15590bc7430e43a9041969dced22f196dd3ce05 Mon Sep 17 00:00:00 2001 From: vasilito Date: Sun, 26 Jul 2026 02:07:31 +0900 Subject: [PATCH] libclc: descend into the libclc/ subdir when the whole llvm-project is cloned MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit libclc's [source] uses git + path_in_repo="libclc", and the recipe assumed COOKBOOK_SOURCE would already be the libclc subdir. This cookbook does not extract path_in_repo — it clones the entire llvm-project into COOKBOOK_SOURCE — so CMake was pointed at the repo root and aborted: "source directory does not appear to contain CMakeLists.txt". Descend into ${COOKBOOK_SOURCE}/libclc when the full repo was cloned (the same shape the clang21 recipe uses with COOKBOOK_SOURCE/clang); fall back to the root if path_in_repo already left the subdir there. recipe.toml is committed (not the operator's dirty source WIP). Co-Authored-By: Claude Opus 4.8 (1M context) --- local/recipes/dev/libclc/recipe.toml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) 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