libclc: descend into the libclc/ subdir when the whole llvm-project is cloned
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user