Commit graph

433 commits

Author SHA1 Message Date
figsoda b9259df616 rustPlatform.buildRustPackage: fix cross compiling auditable packages 2023-01-12 12:22:59 -05:00
Rick van Schijndel e091693f13 cargo: fix cross-compilation by adding missing zlib dependency
Previously it was failing with:

   Compiling cargo v0.67.1 (/build/rustc-1.66.1-src/src/tools/cargo)
error: linking with `/nix/store/gcc-wrapper-11.3.0/bin/cc` failed: exit status: 1
  |
  = note: /nix/store/binutils-2.39/bin/ld: skipping incompatible /nix/store/zlib-aarch64-unknown-linux-gnu-1.2.13/lib/libz.so when searching for -lz
          /nix/store/binutils-2.39/bin/ld: cannot find -lz: No such file or directory
          /nix/store/binutils-2.39/bin/ld: skipping incompatible /nix/store/zlib-aarch64-unknown-linux-gnu-1.2.13/lib/libz.so when searching for -lz
          collect2: error: ld returned 1 exit status
2023-01-11 21:06:46 +01:00
Winter 21dbce8f83 rustc: 1.66.0 -> 1.66.1
https://github.com/rust-lang/rust/blob/stable/RELEASES.md#version-1661-2023-01-10

Fixes CVE-2022-46176.
2023-01-10 20:10:18 -05:00
Winter 8442601c64 rust: fix on aarch64-linux by using GCC 11 and passing -lgcc
This change switches to using GCC 11 by default on aarch64-linux, as well as passing `-lgcc` to the linker, per #201485.

See #201254 and #208412 for wider context on the issue.
2023-01-04 18:15:20 -05:00
Atemu 3eec3c8fed buildRustPackage: remove git from nativeBuildInputs
Having git in nativeBuildInputs causes thousands of rebuilds when git is touched
because every derivation that somehow transiently depends on a rust package will
change. See https://github.com/NixOS/nixpkgs/pull/205682 for instance.

AFAICT git is unused. Only the fetcher needs git which it has already.

Fixes https://github.com/NixOS/nixpkgs/issues/205804
2022-12-27 18:37:21 +10:00
figsoda ca370da6d3
Merge pull request #206270 from figsoda/rustc
rustc: 1.65.0 -> 1.66.0
2022-12-23 18:09:56 -05:00
Winter edfbbaf282 rustc: add note about libiconv dependency 2022-12-23 13:56:08 -05:00
Winter b1834a461e Revert "rustc: propagate libiconv on darwin"
This reverts commit b6fc00b8f4.

Rust 1.66.0 contains a fix for libiconv being linked unconditionally on macOS, but this only applies to packages that don't depend on older versions of `libc`.

For now, let's go back to including libiconv in `buildInputs` by default for packages that use `buildRustPackage`. As packages bump their `libc` versions, we can eventually stop including it by default, and manually add it where needed.
2022-12-23 13:55:46 -05:00
github-actions[bot] 392cc9b8fe
Merge staging-next into staging 2022-12-17 12:01:41 +00:00
Jörg Thalheim b0213fb143
Merge pull request #194388 from tomhoule/make-rust-platform/import-cargo-lock-cargo-argument
makeRustPlatform: inherit cargo in import-cargo-lock
2022-12-17 08:44:43 +00:00
figsoda 1ffbdda604 rustc: 1.65.0 -> 1.66.0 2022-12-15 11:26:42 -05:00
figsoda 0e5137f267 rustPlatform.buildRustPackage: make it not auditable by default 2022-12-05 18:46:00 -05:00
figsoda 8a041c63c0 rustPlatform.buildRustPackage: build auditable binaries 2022-12-05 16:18:17 -05:00
Martin Weinelt fe8eef1ae4 Merge remote-tracking branch 'origin/master' into staging-next 2022-12-04 22:06:42 +01:00
figsoda d3eb606296 rustPlatform.buildRustPackage: add useNextest option to check with cargo-nextest 2022-11-28 17:00:17 -05:00
github-actions[bot] e31b8a36d7
Merge staging-next into staging 2022-11-23 00:02:46 +00:00
figsoda 82fe76d1cd carnix,cratesIO: remove 2022-11-22 14:10:25 -05:00
Theodore Ni eea038cc8f rustc: 1.64.0 -> 1.65.0
https://github.com/rust-lang/rust/releases/tag/1.65.0
2022-11-15 06:47:17 +10:00
github-actions[bot] 71d2c63882
Merge staging-next into staging 2022-11-02 12:02:01 +00:00
github-actions[bot] 4b05cc6f66
Merge master into staging-next 2022-11-02 12:01:31 +00:00
Georges Dubus 2c039bba78 rustc: removing madjar as maintainer 2022-11-02 10:53:55 +01:00
Yureka 7852c61b6e cargo: no longer broken on musl 2022-10-30 18:55:47 +01:00
github-actions[bot] d86d8a1a3d
Merge staging-next into staging 2022-10-20 00:05:50 +00:00
Stéphan Kochen da85286b28 rustc: don't strip bootstrap on darwin 2022-10-20 09:02:51 +10:00
Alyssa Ross f989817c8d rustc: add build stdenv.cc dependency
This is required when cross-compiling, as otherwise the build will
fail due to the missing cc program.
2022-10-16 19:09:09 +02:00
Alyssa Ross ada5320ea3 rustc: add missing xz dependency
The "bootstrap" and "installer" crates depend on lzma-sys, which will
build its own version of xz if it can't find the liblzma.pc through
pkg-config.  Even though it's used as a library, xz here is a native
build input, as it is used by the build system rather than the end
product.
2022-10-16 19:09:09 +02:00
Vladimír Čunát 6565abc264
Merge branch 'master' into staging-next 2022-10-08 10:20:07 +02:00
Alex Martens bac7ee3208 rustc: fix build for no_std targets 2022-10-07 07:35:29 -07:00
Tom Houlé a37017ffd6 makeRustPlatform: inherit cargo in import-cargo-lock
The main purpose of `makeRustPlatform` is to enable users to override
the `rustc` and `cargo` versions used by the `rustPlatform` derivations.

In all attributes of the result of `makeRustPlatform`, `rustc` and/or
`cargo` are overriden, except in `importCargoLock`. I think this is an
oversight / bug, and passing the received cargo derivation is the right
behaviour.

If `importCargoLock` always using the global cargo package even in
`makeRustPlatform` is the intended behaviour, I think it should be
documented at least in a comment.
2022-10-04 12:09:52 +02:00
zowoq 0be05bd970 rustc: fix building emulated x86_64-darwin with jemalloc on aarch64-darwin
Co-authored-by: Randy Eckenrode <randy@largeandhighquality.com>
Co-authored-by: Uri Baghin <uri@canva.com>
Co-authored-by: Winter <winter@winter.cafe>
2022-09-30 12:33:18 +10:00
zowoq 164865d98e Revert "Revert "rustc: build with jemalloc""
This reverts commit 539762709b.

the x86_64-darwin on aarch64-darwin emulation issue was fixed by setting JEMALLOC_SYS_WITH_LG_VADDR
2022-09-30 12:33:18 +10:00
Vladimír Čunát 292756e9ff
Merge #190093: rustc: propagate libiconv on darwin
...into staging
2022-09-28 09:45:11 +02:00
zowoq 8f7b253440 rustc: 1.63.0 -> 1.64.0
https://github.com/rust-lang/rust/releases/tag/1.64.0
2022-09-23 21:30:06 +00:00
zowoq 539762709b Revert "rustc: build with jemalloc"
This reverts commit 2a699029f4.

hopefully this fixes building x86_64-darwin under emulation on aarch64-darwin
2022-09-22 07:11:33 -04:00
Guillaume Girol 7794eb89c8 rls: remove
will be removed upstream in next rust release: https://blog.rust-lang.org/2022/07/01/RLS-deprecation.html
2022-09-07 12:00:00 +00:00
Winter b6fc00b8f4 rustc: propagate libiconv on darwin
Rust binaries are unconditionally linked to libiconv on Darwin (see https://github.com/rust-lang/libc/issues/2870). We already add it as a dependency in `buildRustPackage`, so let's go a step further and propagate it.
2022-09-06 23:17:56 -04:00
zowoq 45ad335d5d cargo: inherit passthru.tests from rustc 2022-08-29 08:12:23 +10:00
zowoq 9c26b06a5d rustc: add passthru.tests
we expect these to be built as part of rust version bumps
2022-08-29 08:12:23 +10:00
Jörg Thalheim f08b424f73
Merge pull request #186443 from yu-re-ka/feature/rustc-musl2
fix pkgsMusl.rustc
2022-08-13 16:39:56 +01:00
Yureka acf9dd6238 cargo: add broken flag for musl
A build script crashes:
> cannot produce dylib for `rustc_driver v0.0.0 (/build/rustc-1.63.0-src/compiler/rustc_driver)` as the target `x86_64-unknown-linux-musl` does not support these crate types
2022-08-13 15:23:26 +02:00
Yureka 202524ddf7 rustc: remove broken flag for musl
It builds!
2022-08-13 15:23:06 +02:00
Yureka 0a9c3640d3 rustc: set crt-static flag
The crt-static option selects if the C runtime is linked dynamically or
statically into the resulting binaries.

There is a default value of this setting for each platform, but it is
not always what we want. For example, musl targets are assumed to always
have the C runtime linked statically, but we support both.

In practise, this fixes an error in the pkgsMusl.rustc build:
> cannot produce dylib for `rustc_driver v0.0.0 (/build/rustc-1.63.0-src/compiler/rustc_driver)` as the target `x86_64-unknown-linux-musl` does not support these crate types
2022-08-13 15:19:22 +02:00
Yureka fb7811bf03 rustc: use autoPatchelfHook for bootstrap binaries
This is both simpler and works in more cases, e.g. for the bootstrap binaries
linked against musl libc.
2022-08-13 15:17:24 +02:00
Alyssa Ross 59dd915c11 rustc: 1.62.1 -> 1.63.0 2022-08-12 07:54:19 +00:00
zowoq 8bf97d639d
rustc: 1.62.0 -> 1.62.1 (#182140)
https://github.com/rust-lang/rust/releases/tag/1.62.1
2022-07-20 12:34:37 +10:00
github-actions[bot] 8517eca5ed
Merge staging-next into staging 2022-07-02 12:01:53 +00:00
Alyssa Ross 6f9359a504 rustc: mark broken for dynamic Musl target 2022-07-02 09:04:37 +00:00
Alyssa Ross 8004d0e497 rustc: 1.61.0 -> 1.62.0 2022-07-02 09:04:07 +00:00
Luka Blašković 55c8e27290
rust: 1.60.0 -> 1.61.0 (#173631) 2022-05-22 15:51:43 +02:00
Nick Cao be29f4575e
rustc: expose correct llvmPackages for cross compile 2022-05-13 06:40:43 +08:00