@@ -11,7 +11,7 @@ Config:
1111 type : str
1212 # crocus,etnaviv,freedreno,i915,iris,lima,nouveau,panfrost,r300,r600,radeonsi,svga,softpipe,llvmpipe,tegra,v3d,vc4,virgl
1313 # this is the maximum we support right now:
14- default : " crocus,lima,panfrost,svga,nouveau,tegra,v3d,vc4,virgl"
14+ default : " crocus,lima,panfrost,svga,nouveau,llvmpipe, tegra,v3d,vc4,virgl"
1515 MESA3D_GLX :
1616 help : " Build support for GLX platform. Ignored if building for wayland. Default: auto."
1717 type : choice
@@ -66,6 +66,7 @@ multiPackage:
6666 - devel::llvm-libclc-tgt
6767 - libs::spirv-tools-tgt
6868 - libs::spirv-llvm-translator-tgt
69+
6970 buildTools : [llvm]
7071 buildSetup : |
7172 if [ -e cross_file.txt ] && ! grep -q llvm-config cross_file.txt ; then
@@ -108,12 +109,26 @@ multiPackage:
108109 mesa_clc : " usr/bin"
109110
110111 " " :
112+ environment :
113+ LLVM_OCAML_BINDINGS : " 0"
114+
111115 depends :
116+ - libs::libunwind-dev
117+ - libs::zlib-dev
118+ - virtual::libs::libdrm-dev
119+ - use : []
120+ depends :
121+ - libs::libunwind-tgt
122+ - libs::zlib-tgt
123+ - virtual::libs::libdrm-tgt
112124
113125 - if : " $(eq,$MESA3D_PLATFORM,wayland)"
114126 depends :
115127 - graphics::wayland::wayland-protocols
116128 - graphics::wayland::wayland-dev
129+ - use : []
130+ depends :
131+ - graphics::wayland::wayland-tgt
117132
118133 - if : " $(eq,$MESA3D_PLATFORM,x11)"
119134 depends :
@@ -127,27 +142,7 @@ multiPackage:
127142 - libs::xorg::libXt-dev
128143 - libs::xorg::libXxf86vm-dev
129144 - virtual::core::udev-dev
130-
131- - if : " $(match,$MESA3D_GALLIUM_DRIVERS,iris)"
132- tools :
133- target-toolchain : host-compat-toolchain
134- depends :
135- - name : libs::mesa3d-clc
136- use : [tools]
137-
138- - libs::libunwind-dev
139- - libs::zlib-dev
140- - virtual::libs::libdrm-dev
141- - use : []
142- depends :
143- - libs::libunwind-tgt
144- - libs::zlib-tgt
145- - virtual::libs::libdrm-tgt
146-
147- - if : " $(eq,$MESA3D_PLATFORM,wayland)"
148- name : graphics::wayland::wayland-tgt
149-
150- - if : " $(eq,$MESA3D_PLATFORM,x11)"
145+ - use : []
151146 depends :
152147 - libs::xcb::libxcb-tgt
153148 - libs::xorg::libX11-tgt
@@ -160,6 +155,27 @@ multiPackage:
160155 - libs::xorg::libXxf86vm-tgt
161156 - virtual::core::udev-tgt
162157
158+ - if : " $(match,$MESA3D_GALLIUM_DRIVERS,llvmpipe)"
159+ depends :
160+ - devel::llvm-libs-dev
161+ - use : []
162+ depends :
163+ - devel::llvm-libs-tgt
164+
165+ - if : " $(match,$MESA3D_GALLIUM_DRIVERS,iris)"
166+ tools :
167+ target-toolchain : host-compat-toolchain
168+ depends :
169+ - name : libs::mesa3d-clc
170+ use : [tools]
171+
172+ buildSetup : |
173+ if [[ ${BOB_DEP_PATHS['devel::llvm-libs-dev']:+set} && -e cross_file.txt ]] &&
174+ ! grep -q llvm-config cross_file.txt ; then
175+ sed -i \
176+ "/\[binaries\]/a llvm-config = '${BOB_DEP_PATHS['devel::llvm-libs-dev']}\/usr\/bin\/llvm-config'" \
177+ cross_file.txt
178+ fi
163179 buildTools :
164180 - if : " $(match,$MESA3D_GALLIUM_DRIVERS,iris)"
165181 name : mesa_clc
@@ -181,7 +197,7 @@ multiPackage:
181197 -Dgles2=enabled \
182198 -Dglx-read-only-text=$([[ $MESA3D_GLX_READ_ONLY_TEXT -ne 0 ]] && echo true || echo false) \
183199 -Dvalgrind=disabled \
184- -Dllvm=disabled \
200+ -Dllvm=$([[ "$MESA3D_GALLIUM_DRIVERS" =~ "llvmpipe" ]] && echo 'enabled' || echo ' disabled') \
185201 -Dintel-clc=system \
186202 ${BOB_TOOL_PATHS[mesa_clc]+-Dmesa-clc=system} \
187203 -Dosmesa=false
0 commit comments