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
|
|
|
|
|
|
|
|
|
provides:
|
2022-10-27 09:05:13 +03:00
|
|
|
|
- bin/cargo-clippy
|
|
|
|
|
- bin/cargo-fmt
|
|
|
|
|
- bin/clippy-driver
|
|
|
|
|
- bin/rls
|
|
|
|
|
- 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
|
|
|
|
|
- bin/rustdoc
|
|
|
|
|
- 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:
|
|
|
|
|
- rls
|
|
|
|
|
- clippy
|
|
|
|
|
- rustfmt
|
|
|
|
|
- analysis
|
|
|
|
|
- { name: rust-demangler, default: false }
|
|
|
|
|
|
|
|
|
|
dependencies:
|
|
|
|
|
tea.xyz/gx/cc: c99
|
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:
|
|
|
|
|
tea.xyz/gx/make: '*' #FIXME surely we don’t need make AND ninja
|
|
|
|
|
cmake.org: ^3.20
|
|
|
|
|
ninja-build.org: ^1.10
|
|
|
|
|
python.org: 3
|
2022-10-27 09:05:13 +03:00
|
|
|
|
openssl.org: '*' # needed to build openssl-sys
|
|
|
|
|
freedesktop.org/pkg-config: ^0.29
|
2022-08-04 00:39:16 +03:00
|
|
|
|
script: |-
|
2022-10-03 18:26:06 +03:00
|
|
|
|
# --enable-optimize not available as of 1.63.0
|
|
|
|
|
if test {{version.major}} -eq 1 -a {{version.minor}} -lt 63; then
|
|
|
|
|
export ARGS="$ARGS --enable-optimize"
|
|
|
|
|
fi
|
|
|
|
|
|
2022-08-04 00:39:16 +03:00
|
|
|
|
./configure $ARGS
|
|
|
|
|
make install
|
2022-10-27 09:05:13 +03:00
|
|
|
|
|
|
|
|
|
for tool in $tools; do
|
|
|
|
|
./x.py install $tool
|
|
|
|
|
done
|
|
|
|
|
|
2022-08-27 18:58:16 +03:00
|
|
|
|
rm -rf {{prefix}}/share/doc
|
2022-08-04 00:39:16 +03:00
|
|
|
|
env:
|
|
|
|
|
ARGS:
|
|
|
|
|
- --enable-vendor
|
|
|
|
|
- --prefix={{ prefix }}
|
|
|
|
|
- --enable-ninja
|
2022-08-27 18:58:16 +03:00
|
|
|
|
- --disable-docs # docs are online
|
2022-10-27 09:05:13 +03:00
|
|
|
|
- --tools=rls,clippy,rustfmt,analysis
|
|
|
|
|
tools:
|
|
|
|
|
- rls # deprecated for rust-analyzer some time ago -- remove eventually
|
|
|
|
|
- clippy
|
|
|
|
|
- rustfmt
|
|
|
|
|
- rust-analyzer
|
|
|
|
|
|
2022-08-04 00:39:16 +03:00
|
|
|
|
test:
|
|
|
|
|
script: |
|
|
|
|
|
rustc $FIXTURE -o hello
|
|
|
|
|
./hello
|
|
|
|
|
fixture: |
|
|
|
|
|
fn main() {
|
|
|
|
|
println!("Hello World!");
|
2022-10-30 17:32:32 +03:00
|
|
|
|
}
|