Skip to content

Commit

Permalink
rust: add gnullvm target for CLANG{32,64} envs
Browse files Browse the repository at this point in the history
  • Loading branch information
mati865 committed Sep 11, 2024
1 parent db8a457 commit 4f3c9d9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion mingw-w64-rust/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
$([[ ${CARCH} == i686 ]] || echo "${MINGW_PACKAGE_PREFIX}-rust-wasm")
"${MINGW_PACKAGE_PREFIX}-rust-src")
pkgver=1.81.0
pkgrel=1
pkgrel=2
pkgdesc="Systems programming language focused on safety, speed and concurrency (mingw-w64)"
arch=('any')
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clangarm64' 'clang32')
Expand Down Expand Up @@ -213,6 +213,11 @@ build() {
sed -i '/target = \[/a\ "wasm32-unknown-unknown", "wasm32-wasip1", "wasm32-wasip1-threads", "wasm32-wasip2",' "${srcdir}/${_realname}c-${pkgver}-src/config.toml"
fi

# Add target *-gnullvm
if [[ $MINGW_PACKAGE_PREFIX == *-clang-i686 || $MINGW_PACKAGE_PREFIX == *-clang-x86_64 ]]; then
sed -i '/target = \[/a\ "${CARCH}-pc-windows-gnullvm",' "${srcdir}/${_realname}c-${pkgver}-src/config.toml"
fi

# Building out of tree is not officially supported so we have to workaround some things like vendored deps
cp -r ../${_realname}c-${pkgver}-src/.cargo .
sed -i "s|directory = \"vendor\"|directory = \"../${_realname}c-${pkgver}-src/vendor\"|" .cargo/config.toml
Expand Down

0 comments on commit 4f3c9d9

Please sign in to comment.