From bb65f97e8850eb80db110615e14de0d7593e01c3 Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Mon, 29 Jul 2024 12:34:19 -0700 Subject: [PATCH] nix-doc: fix build for Rust 1.79+ MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As of Rust 1.79+ (turned on in a5b2fe73740c) `relro-level` is now stable. 🎉 This means `nix-doc` (which uses this option in its unstable form) needs to pass through `-C` instead of `-Z`. --- pkgs/tools/package-management/nix-doc/default.nix | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/pkgs/tools/package-management/nix-doc/default.nix b/pkgs/tools/package-management/nix-doc/default.nix index 59704a0a6836..34873438d556 100644 --- a/pkgs/tools/package-management/nix-doc/default.nix +++ b/pkgs/tools/package-management/nix-doc/default.nix @@ -35,13 +35,11 @@ rustPlatform.buildRustPackage rec { # the wrong Nix version (disabling bindnow permits loading libraries # requiring unavailable symbols if they are unreached) hardeningDisable = lib.optionals withPlugin [ "bindnow" ]; - # Due to a Rust bug, setting -Z relro-level to anything including "off" on + + # Due to a Rust bug, setting -C relro-level to anything including "off" on # macOS will cause link errors env = lib.optionalAttrs (withPlugin && stdenv.isLinux) { - # nix-doc does not use nightly features, however, there is no other way to - # set relro-level - RUSTC_BOOTSTRAP = 1; - RUSTFLAGS = "-Z relro-level=partial"; + RUSTFLAGS = "-C relro-level=partial"; }; cargoHash = "sha256-CHagzXTG9AfrFd3WmHanQ+YddMgmVxSuB8vK98A1Mlw=";