fix(rust)

This commit is contained in:
Jacob Heider 2023-10-06 00:04:24 -04:00
parent 843a3983c8
commit a94cbfc456
No known key found for this signature in database
GPG key ID: 51E3FD0EE62677B6

View file

@ -44,27 +44,30 @@ build:
openssl.org: '*' # needed to build openssl-sys
freedesktop.org/pkg-config: ^0.29
crates.io/semverator: 0
script: |-
linux:
gnu.org/make: '*'
script:
# --enable-optimize not available as of 1.63.0
if semverator satisfies '<1.63' {{ version }}; then
export ARGS="$ARGS --enable-optimize"
fi
- run: export ARGS="$ARGS --enable-optimize"
if: <1.63.0
# 1.68.0 introduced a regression w.r.t. CI builds
# https://github.com/rust-lang/rust/issues/108959
if semverator satisfies '>=1.68<1.70' {{ version }}; then
sed -i.bak -e 's/CiEnv::is_ci()/CiEnv::is_ci() \&\& config.rust_info.is_managed_git_subrepository()/' src/bootstrap/native.rs
rm src/bootstrap/native.rs.bak
fi
- run: |
sed -i.bak -e 's/CiEnv::is_ci()/CiEnv::is_ci() \&\& config.rust_info.is_managed_git_subrepository()/' native.rs
rm native.rs.bak
if: '>=1.68<1.70'
working-directory: src/bootstrap
./configure $ARGS
make install
- ./configure $ARGS
- make install
for tool in $tools; do
./x.py install $tool
done
- |
for tool in $tools; do
./x.py install $tool
done
rm -rf {{prefix}}/share/doc
- rm -rf {{prefix}}/share/doc
env:
ARGS:
- --enable-vendor