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 | # -posix is Ubuntu's variant with pthreads support | 11 | # -posix is Ubuntu's variant with pthreads support |
| 12 | export CC=$TARGET-gcc-posix | 12 | export CC=$TARGET-gcc-posix |
| 13 | export AS=$TARGET-gcc-posix | ||
| 13 | export CXX=$TARGET-g++-posix | 14 | export CXX=$TARGET-g++-posix |
| 14 | export AR=$TARGET-ar | 15 | export AR=$TARGET-ar |
| 15 | export NM=$TARGET-nm | 16 | export NM=$TARGET-nm |
| @@ -50,9 +51,11 @@ EOF · 34 unmodified lines | |||
| 50 | # CMake | 51 | # CMake |
| 51 | cmake_args=( | 52 | cmake_args=( |
| 52 | -Wno-dev | 53 | -Wno-dev |
| 54 | -DCMAKE_SYSTEM_PROCESSOR="${fam}" | ||
| 53 | -DCMAKE_SYSTEM_NAME=Windows | 55 | -DCMAKE_SYSTEM_NAME=Windows |
| 54 | -DCMAKE_FIND_ROOT_PATH="$PKG_CONFIG_SYSROOT_DIR" | 56 | -DCMAKE_FIND_ROOT_PATH="$PKG_CONFIG_SYSROOT_DIR" |
| 55 | -DCMAKE_RC_COMPILER="${TARGET}-windres" | 57 | -DCMAKE_RC_COMPILER="${TARGET}-windres" |
| 58 | -DCMAKE_ASM_COMPILER="$AS" | ||
| 56 | -DCMAKE_BUILD_TYPE=Release | 59 | -DCMAKE_BUILD_TYPE=Release |
| 57 | ) | 60 | ) |
| 58 | 61 | ||
| @@ -192,7 +195,7 @@ _vulkan_loader () { · 133 unmodified lines | |||
| 192 | [ -d Vulkan-Loader ] || $gitclone https://github.com/KhronosGroup/Vulkan-Loader | 195 | [ -d Vulkan-Loader ] || $gitclone https://github.com/KhronosGroup/Vulkan-Loader |
| 193 | builddir Vulkan-Loader | 196 | builddir Vulkan-Loader |
| 194 | cmake .. "${cmake_args[@]}" \ | 197 | cmake .. "${cmake_args[@]}" \ |
| 195 | -DENABLE_WERROR=OFF | 198 | -DENABLE_WERROR=OFF -DUSE_GAS=ON |
| 196 | makeplusinstall | 199 | makeplusinstall |
| 197 | popd | 200 | popd |
| 198 | } | 201 | } |
| @@ -310,8 +313,10 @@ if [ "$2" = pack ]; then · 111 unmodified lines | |||
| 310 | libgcc_*.dll lib{ssp,stdc++,winpthread}-[0-9]*.dll # compiler runtime | 313 | libgcc_*.dll lib{ssp,stdc++,winpthread}-[0-9]*.dll # compiler runtime |
| 311 | av*.dll sw*.dll lib{ass,freetype,fribidi,harfbuzz,iconv,placebo}-[0-9]*.dll | 314 | av*.dll sw*.dll lib{ass,freetype,fribidi,harfbuzz,iconv,placebo}-[0-9]*.dll |
| 312 | lib{shaderc_shared,spirv-cross-c-shared,dav1d}.dll zlib1.dll | 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 | mv -v "${dlls[@]}" .. | 320 | mv -v "${dlls[@]}" .. |
| 316 | popd | 321 | popd |
| 317 | 322 | ||