Skip to content
This repository was archived by the owner on Mar 15, 2023. It is now read-only.

Commit b38bd22

Browse files
committed
fix(rust)
1 parent a26eec4 commit b38bd22

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

projects/rust-lang.org/package.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,20 @@ build:
4141
python.org: 3
4242
openssl.org: '*' # needed to build openssl-sys
4343
freedesktop.org/pkg-config: ^0.29
44+
crates.io/semverator: 0
4445
script: |-
4546
# --enable-optimize not available as of 1.63.0
46-
if test {{version.major}} -eq 1 -a {{version.minor}} -lt 63; then
47+
if semverator satisfies '<1.63' {{ version }}; then
4748
export ARGS="$ARGS --enable-optimize"
4849
fi
4950
51+
# 1.68.0 introduced a regression w.r.t. CI builds
52+
# https://github.com/rust-lang/rust/issues/108959
53+
if semverator satisfies ^1.68 {{ version }}; then
54+
sed -i.bak -e 's/if CiEnv::is_ci() {/if CiEnv::is_ci() \&\& config.rust_info.is_managed_git_subrepository() {/' src/bootstrap/native.rs
55+
rm src/bootstrap/native.rs.bak
56+
fi
57+
5058
./configure $ARGS
5159
make install
5260
@@ -69,7 +77,8 @@ build:
6977

7078
test:
7179
script: |
72-
rustc $FIXTURE -o hello
80+
mv $FIXTURE hello.rs
81+
rustc hello.rs
7382
./hello
7483
fixture: |
7584
fn main() {

0 commit comments

Comments
 (0)