mesa: consume native mesa-clc host tools (-Dmesa-clc=system -Dprecomp-compiler=system)
Add the mesa-clc dependency, put its staged usr/bin on PATH so meson's find_program(native) resolves mesa_clc/vtn_bindgen2, and pass -Dmesa-clc=system -Dprecomp-compiler=system. This resolves the cross-build structural error where vtn_bindgen2 (native) linked target libs; with_clc now flips false so the cross build no longer builds the in-tree CLC infra. Verified: cross mesa finds both tools YES and passes every dependency + CLC gate (next blocker is the Redox gallium winsys port).
This commit is contained in:
@@ -46,6 +46,10 @@ dependencies = [
|
||||
"libwayland",
|
||||
"linux-kpi",
|
||||
"llvm21",
|
||||
# Native host shader-precompile tools (mesa_clc, vtn_bindgen2) consumed via
|
||||
# -Dmesa-clc=system -Dprecomp-compiler=system (the cross build can't run
|
||||
# Redox target tools on the host).
|
||||
"mesa-clc",
|
||||
# with_clc also links clang's C++ libraries: Mesa resolves clang via
|
||||
# cpp.find_library('clang-cpp', dirs: llvm-config --libdir), and the
|
||||
# llvm-config wrapper rewrites libdir to Mesa's target sysroot/lib. So the
|
||||
@@ -118,7 +122,17 @@ else
|
||||
COOKBOOK_MESON_FLAGS+=(-Dshared-llvm=disabled)
|
||||
fi
|
||||
|
||||
# The build-time shader compilers (mesa_clc, vtn_bindgen2) cannot be run as
|
||||
# Redox target binaries on the host, so we consume the natively-built host tools
|
||||
# from the mesa-clc dependency (staged into usr/bin) via -Dmesa-clc=system
|
||||
# -Dprecomp-compiler=system. Put them on PATH so meson's find_program(native)
|
||||
# resolves them. This also flips with_clc to false, so the cross build no longer
|
||||
# links the in-tree CLC infra (LLVMSPIRVLib/SPIRV-Tools/clang).
|
||||
export PATH="${COOKBOOK_SYSROOT}/usr/bin:${PATH}"
|
||||
|
||||
cookbook_meson \
|
||||
-Dmesa-clc=system \
|
||||
-Dprecomp-compiler=system \
|
||||
-Ddri-drivers-path=/usr/lib/dri \
|
||||
-Degl=enabled \
|
||||
-Dgbm=enabled \
|
||||
|
||||
Reference in New Issue
Block a user