Unverified Commit bb65f97e authored by Philip Taron's avatar Philip Taron
Browse files

nix-doc: fix build for Rust 1.79+

As of Rust 1.79+ (turned on in a5b2fe73) `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`.
parent bc95156d
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -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=";