2022-08-04 00:39:16 +03:00
|
|
|
distributable:
|
|
|
|
url: https://static.rust-lang.org/dist/rustc-{{ version }}-src.tar.gz
|
|
|
|
strip-components: 1
|
|
|
|
|
|
|
|
versions:
|
|
|
|
github: rust-lang/rust
|
|
|
|
strip: /^Rust /
|
|
|
|
|
2022-10-30 17:32:32 +03:00
|
|
|
companions:
|
|
|
|
rust-lang.org/cargo: '*'
|
2022-08-04 00:39:16 +03:00
|
|
|
|
2023-08-08 17:07:11 +03:00
|
|
|
display-name: rust
|
2023-08-08 12:24:35 +03:00
|
|
|
|
2022-08-04 00:39:16 +03:00
|
|
|
provides:
|
2022-10-27 09:05:13 +03:00
|
|
|
- bin/cargo-clippy
|
|
|
|
- bin/cargo-fmt
|
|
|
|
- bin/clippy-driver
|
|
|
|
- bin/rust-analyzer
|
2022-08-04 00:39:16 +03:00
|
|
|
- bin/rust-gdb
|
|
|
|
- bin/rust-gdbgui
|
2022-10-27 09:05:13 +03:00
|
|
|
- bin/rust-lldb
|
|
|
|
- bin/rustc
|
2023-08-26 21:32:26 +03:00
|
|
|
- bin/rustdoc
|
2022-10-27 09:05:13 +03:00
|
|
|
- bin/rustfmt
|
2022-08-04 00:39:16 +03:00
|
|
|
|
2022-10-30 17:32:32 +03:00
|
|
|
#TODO: unimplemented idea for the “options” feature
|
2022-08-04 00:39:16 +03:00
|
|
|
options:
|
|
|
|
- clippy
|
|
|
|
- rustfmt
|
|
|
|
- analysis
|
|
|
|
- { name: rust-demangler, default: false }
|
|
|
|
|
|
|
|
dependencies:
|
2023-10-02 06:11:32 +03:00
|
|
|
linux:
|
|
|
|
llvm.org: '*'
|
2022-10-30 17:32:32 +03:00
|
|
|
#FIXME ^^ strictly rustc only needs a linker
|
2022-10-03 18:26:06 +03:00
|
|
|
zlib.net: 1
|
2022-08-04 00:39:16 +03:00
|
|
|
|
|
|
|
build:
|
|
|
|
dependencies:
|
|
|
|
cmake.org: ^3.20
|
|
|
|
ninja-build.org: ^1.10
|
2023-10-03 18:23:56 +03:00
|
|
|
python.org: '>=3<3.12'
|
2022-10-27 09:05:13 +03:00
|
|
|
openssl.org: '*' # needed to build openssl-sys
|
|
|
|
freedesktop.org/pkg-config: ^0.29
|
2023-03-10 00:44:43 +03:00
|
|
|
crates.io/semverator: 0
|
2023-10-06 07:04:24 +03:00
|
|
|
linux:
|
|
|
|
gnu.org/make: '*'
|
|
|
|
script:
|
2022-10-03 18:26:06 +03:00
|
|
|
# --enable-optimize not available as of 1.63.0
|
2023-10-06 07:04:24 +03:00
|
|
|
- run: export ARGS="$ARGS --enable-optimize"
|
|
|
|
if: <1.63.0
|
2022-10-03 18:26:06 +03:00
|
|
|
|
2023-03-10 00:44:43 +03:00
|
|
|
# 1.68.0 introduced a regression w.r.t. CI builds
|
|
|
|
# https://github.com/rust-lang/rust/issues/108959
|
2023-10-06 07:04:24 +03:00
|
|
|
- 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
|
2023-03-10 00:44:43 +03:00
|
|
|
|
2023-10-06 07:04:24 +03:00
|
|
|
- ./configure $ARGS
|
|
|
|
- make install
|
2022-10-27 09:05:13 +03:00
|
|
|
|
2023-10-06 07:04:24 +03:00
|
|
|
- |
|
|
|
|
for tool in $tools; do
|
|
|
|
./x.py install $tool
|
|
|
|
done
|
2022-10-27 09:05:13 +03:00
|
|
|
|
2023-10-06 07:04:24 +03:00
|
|
|
- rm -rf {{prefix}}/share/doc
|
2022-08-04 00:39:16 +03:00
|
|
|
env:
|
|
|
|
ARGS:
|
|
|
|
- --enable-vendor
|
|
|
|
- --prefix={{ prefix }}
|
|
|
|
- --enable-ninja
|
2023-10-02 06:11:32 +03:00
|
|
|
- --disable-docs # docs are online
|
2023-08-26 21:32:26 +03:00
|
|
|
- --tools=clippy,rustdoc,rustfmt,analysis
|
2023-11-16 21:47:36 +03:00
|
|
|
- --sysconfdir={{ prefix }}/etc
|
2022-10-27 09:05:13 +03:00
|
|
|
tools:
|
|
|
|
- clippy
|
|
|
|
- rustfmt
|
|
|
|
- rust-analyzer
|
|
|
|
|
2022-08-04 00:39:16 +03:00
|
|
|
test:
|
|
|
|
script: |
|
2023-03-10 00:44:43 +03:00
|
|
|
mv $FIXTURE hello.rs
|
|
|
|
rustc hello.rs
|
2022-08-04 00:39:16 +03:00
|
|
|
./hello
|
|
|
|
fixture: |
|
|
|
|
fn main() {
|
|
|
|
println!("Hello World!");
|
2022-10-30 17:32:32 +03:00
|
|
|
}
|