this allows us to securely bundle the vulkan loader and include it in CI artifacts
Unified · Split
| @@ -10,6 +10,7 @@ gitclone="git clone --depth=1 --recursive --shallow-submodules" · 9 unmodified lines | ||
| 10 | 10 | |
| 11 | 11 | # -posix is Ubuntu's variant with pthreads support |
| 12 | 12 | export CC=$TARGET-gcc-posix |
| 13 | +export AS=$TARGET-gcc-posix | |
| 13 | 14 | export CXX=$TARGET-g++-posix |
| 14 | 15 | export AR=$TARGET-ar |
| 15 | 16 | export NM=$TARGET-nm |
| @@ -50,9 +51,11 @@ EOF · 34 unmodified lines | ||
| 50 | 51 | # CMake |
| 51 | 52 | cmake_args=( |
| 52 | 53 | -Wno-dev |
| 54 | + -DCMAKE_SYSTEM_PROCESSOR="${fam}" | |
| 53 | 55 | -DCMAKE_SYSTEM_NAME=Windows |
| 54 | 56 | -DCMAKE_FIND_ROOT_PATH="$PKG_CONFIG_SYSROOT_DIR" |
| 55 | 57 | -DCMAKE_RC_COMPILER="${TARGET}-windres" |
| 58 | + -DCMAKE_ASM_COMPILER="$AS" | |
| 56 | 59 | -DCMAKE_BUILD_TYPE=Release |
| 57 | 60 | ) |
| 58 | 61 | |
| @@ -192,7 +195,7 @@ _vulkan_loader () { · 133 unmodified lines | ||
| 192 | 195 | [ -d Vulkan-Loader ] || $gitclone https://github.com/KhronosGroup/Vulkan-Loader |
| 193 | 196 | builddir Vulkan-Loader |
| 194 | 197 | cmake .. "${cmake_args[@]}" \ |
| 195 | − -DENABLE_WERROR=OFF | |
| 198 | + -DENABLE_WERROR=OFF -DUSE_GAS=ON | |
| 196 | 199 | makeplusinstall |
| 197 | 200 | popd |
| 198 | 201 | } |
| @@ -310,8 +313,10 @@ if [ "$2" = pack ]; then · 111 unmodified lines | ||
| 310 | 313 | libgcc_*.dll lib{ssp,stdc++,winpthread}-[0-9]*.dll # compiler runtime |
| 311 | 314 | av*.dll sw*.dll lib{ass,freetype,fribidi,harfbuzz,iconv,placebo}-[0-9]*.dll |
| 312 | 315 | lib{shaderc_shared,spirv-cross-c-shared,dav1d}.dll zlib1.dll |
| 313 | − # note: vulkan-1.dll is not here since drivers provide it | |
| 314 | 316 | ) |
| 317 | + if [[ -f vulkan-1.dll ]]; then | |
| 318 | + dlls+=(vulkan-1.dll) | |
| 319 | + fi | |
| 315 | 320 | mv -v "${dlls[@]}" .. |
| 316 | 321 | popd |
| 317 | 322 | |