Skip to content

Commit

Permalink
Revert "rustc: add note about libiconv dependency"
Browse files Browse the repository at this point in the history
This reverts commit edfbbaf.

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 b1834a4
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 rust-lang/libc#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.
  • Loading branch information
winterqt committed Jan 31, 2023
1 parent 63f869f commit ede7b1d
Showing 1 changed file with 0 additions and 1 deletion.
1 change: 0 additions & 1 deletion pkgs/development/compilers/rust/rustc.nix
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ in stdenv.mkDerivation rec {
];

buildInputs = [ openssl ]
# TODO: remove libiconv once 1.66 is used to bootstrap
++ optionals stdenv.isDarwin [ libiconv Security ]
++ optional (!withBundledLLVM) llvmShared;

Expand Down

0 comments on commit ede7b1d

Please sign in to comment.