Commit Graph

133 Commits

Author SHA1 Message Date
Sandro Jäckel
c90dcc7327 rustc: add ripgrep and wezterm to passthru.tests
ripgrep is a very popular grep replacement (similar to fd and find)
and wezterm is a popular terminal emulator which has a big codebase with
lots of features tested (it also broke in the past multiple times on
rustc upgrades.).
2023-02-20 01:16:58 -05:00
Vladimír Čunát
52bef35053
Merge #213694: Revert "rustc: add note about libiconv dependency"
...into staging-next
2023-02-05 15:37:02 +01:00
Winter
1e814042af rustc, cargo: add rust team to maintainers 2023-01-31 18:10:08 +10:00
Winter
ede7b1d98a Revert "rustc: add note about libiconv dependency"
This reverts commit edfbbaf282.

I mistakingly believed that once 1.66.0 was used to bootstrap, we'd be
able to remove libiconv from rustc's build-time dependency tree on Darwin.
Sadly, this isn't the case, because src/tools/bootstrap depends on libc.

Additionally, it seems that my assessment in b1834a461e
was wrong -- *any* dependency on `libc` will cause a requirement on
libiconv, due to rustc unconditionally linking every library specified
in `link` directives, no matter if the function is actually used.

This was worked around somewhat in https://github.com/rust-lang/libc/pull/2944
by not linking libiconv if libc is only a dependency of std, but this
doesn't apply when `libc` is a dependency of anything else.

Maybe one day we'll just rip out libiconv from `libc` entirely (or hide it
behind a feature flag), but for now, we can just keep it in `buildRustPackage`'s
`buildInputs` by default.
2023-01-30 21:13:05 -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
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]
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
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
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
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
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
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
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
Alyssa Ross
6f9359a504 rustc: mark broken for dynamic Musl target 2022-07-02 09:04:37 +00:00
Nick Cao
be29f4575e
rustc: expose correct llvmPackages for cross compile 2022-05-13 06:40:43 +08:00
misuzu
2a699029f4 rustc: build with jemalloc
This change should fix intermittent crashes on macOS Monterey.

Co-authored-by: Pavol Rusnak <pavol@rusnak.io>
2021-12-30 17:45:08 +02:00
Martin Weinelt
c28e3f9d00
rustc: Expose llvmPackages set used to build rustc
Reusing the same llvmPackages version used for building rustc is
required for LTO in Firefox.
2021-11-02 17:34:05 +01:00
Alyssa Ross
181f012824 rustc: don't install uninstall.sh 2021-06-18 13:58:16 +00:00
Pavol Rusnak
252bf94a74 rust: 1.51.0 -> 1.52.0 2021-05-08 11:42:10 -07:00
John Ericson
50b6631929 rustc: Fix build
Thanks @jonringer for catching, and sorry I didn't myself!
2021-04-30 23:09:15 -07:00
volth
bc0d605cf1 treewide: fix double quoted strings in meta.description
Signed-off-by: Ben Siraphob <bensiraphob@gmail.com>
2021-01-24 19:56:59 +07:00
Ben Siraphob
acc5f7b18a pkgs/development/compilers: stdenv.lib -> lib 2021-01-23 08:57:37 +07:00
Jonathan Ringer
9bb3fccb5b treewide: pkgs.pkgconfig -> pkgs.pkg-config, move pkgconfig to alias.nix
continuation of #109595

pkgconfig was aliased in 2018, however, it remained in
all-packages.nix due to its wide usage. This cleans
up the remaining references to pkgs.pkgsconfig and
moves the entry to aliases.nix.

python3Packages.pkgconfig remained unchanged because
it's the canonical name of the upstream package
on pypi.
2021-01-19 01:16:25 -08:00
Luka Blaskovic
c73d96f776 rustc: cleanup, use correct llvm version 2020-12-14 15:14:03 +00:00
github-actions[bot]
11d68e6adb
Merge staging-next into staging 2020-12-13 00:42:45 +00:00
Ben Wolsieffer
5a923e552c rustc: add host platform to --target when building cross-compiler
As of 1.48, std is only built for platforms in --target. If the host platform is
not included, the resulting rustc can't compile build.rs scripts.
2020-12-12 15:24:55 -05:00
Jörg Thalheim
650db4a0db
Merge pull request #106284 from raboof/rustc-deterministic-manifest 2020-12-08 09:47:33 +00:00
Arnout Engelen
b909a333ad
rustc: generate deterministic manifest
The order of the entries in the manifest generated while installing
rustc depends on the (parallel) build, so let's sort it to make it
deterministic. Also remove install.log from the output.

Co-Authored-By: Jörg Thalheim <joerg@thalheim.io>
2020-12-07 23:02:09 +01:00
John Ericson
47b99769f9 rustc: Improve musl support
There was a slight error in the target logic I didn't notice before, and
also should do the same thing for the other platforms.
2020-12-02 15:30:51 +00:00
John Ericson
5d75fe4ed0
Merge pull request #105314 from lopsided98/rustc-musl-target
rustc: allow building for musl targets
2020-11-29 00:39:36 -05:00
Ben Wolsieffer
2857455b03 rustc: allow building for musl targets 2020-11-28 22:15:35 -05:00
John Ericson
c0df12de5d rust: Add support for managing target JSON in Nix 2020-10-14 04:20:23 +00:00
Konrad Borowski
41d681c85f rustc: use LLVM 10
Fixes rust-lang/rust#74585
2020-07-31 08:52:22 +02:00
Aaron Janse
60fd049b65 redox: add as target 2020-07-21 13:11:36 -07:00
Aneesh Agrawal
ce9bec83da
rustc: remove test-only git dependency
The tests have been disabled for over a year,
and AFAIK `git` was added and is only used for the rustc tests.
2020-03-29 06:36:06 +01:00
John Ericson
83a4705f49
Merge pull request #80843 from obsidiansystems/rust-no-std
rust 1.41: Fix build with no_std only target
2020-02-23 00:48:45 -05:00
John Ericson
0b0e691833 rust 1.41: Fix build with no_std only target
See https://github.com/rust-lang/rust/pull/69381
2020-02-22 18:34:05 -05:00
Cole Helbling
502c0ee899
clippy: add rustc.llvm to buildInputs
The Hydra build [1] failed because it was unable to link to `LLVM9`; add
`llvmShared` to `passthru` in order to stay up to date with required
LLVM versions. Also quote the homepage URLs, since that's preferred.

[1] https://hydra.nixos.org/build/112989779/nixlog/1
2020-02-18 08:46:31 -08:00
Daiderd Jordan
8df4338f51
rustPackages: make rustc-dev optional
This was only introduced in 1.40.0 and doesn't work on older versions.

    thread 'main' panicked at 'Error: no rules matched rustc-dev.', src/bootstrap/builder.rs:231:21
    note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
    failed to run: /build/rustc-1.38.0-src/build/bootstrap/debug/bootstrap dist rustc-dev
2020-01-18 10:57:13 +01:00
Symphorien Gibol
47681d7c5c rust: include the rustc-dev component
This enables to compile rls and rustc

See also https://github.com/rust-lang/rust/pull/64823
2020-01-11 12:00:00 +00:00
Maximilian Bosch
823b96a52b
rustc: fix for structured attrs 2019-12-31 01:29:57 +01:00
Robin Gloster
981ae25113
treewide: NIX_*_COMPILE -> string 2019-12-31 00:07:21 +01:00