Unverified Commit 6b51cbf7 authored by Wolfgang Walther's avatar Wolfgang Walther Committed by GitHub
Browse files

treewide: prepare Rust packages for structuredAttrs by putting RUSTFLAGS in env (#475545)

parents 1f41e4ff b4088bce
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -44,14 +44,15 @@ rustPlatform.buildRustPackage rec {
  # https://github.com/cloud-hypervisor/rust-hypervisor-firmware/issues/249
  auditable = false;

  env = {
    RUSTC_BOOTSTRAP = 1;
    RUSTFLAGS = "-C linker=lld -C linker-flavor=ld.lld";
  };

  nativeBuildInputs = [
    lld
  ];

  RUSTFLAGS = "-C linker=lld -C linker-flavor=ld.lld";

  # Tests don't work for `no_std`. See https://os.phil-opp.com/testing/
  doCheck = false;

+10 −9
Original line number Diff line number Diff line
@@ -78,18 +78,19 @@ rustPlatform.buildRustPackage rec {
      "-lpng"
      "-lssl"
    ];
  };

  RUSTFLAGS = map (a: "-C link-arg=${a}") [
    RUSTFLAGS = toString (
      map (a: "-C link-arg=${a}") [
        "-Wl,--push-state,--no-as-needed"
        "-lEGL"
        "-lwayland-client"
        "-lxkbcommon"
        "-Wl,--pop-state"
  ];
      ]
    );
  };

  cargoBuildFlags = [
    "--exclude alvr_xtask"
    "--exclude=alvr_xtask"
    "--workspace"
  ];

+12 −8
Original line number Diff line number Diff line
@@ -77,14 +77,18 @@ rustPlatform.buildRustPackage rec {
    wayland
  ];

  env = {
    # force linking to all the dlopen()ed dependencies
  RUSTFLAGS = map (a: "-C link-arg=${a}") [
    RUSTFLAGS = toString (
      map (a: "-C link-arg=${a}") [
        "-Wl,--push-state,--no-as-needed"
        "-lEGL"
        "-lfontconfig"
        "-lwayland-client"
        "-Wl,--pop-state"
  ];
      ]
    );
  };

  # upstream has minimal tests, so don't rebuild twice
  doCheck = false;
+1 −1
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ rustPlatform.buildRustPackage rec {
    rustPlatform.bindgenHook
  ];

  RUSTFLAGS = "--cfg tracing_unstable";
  env.RUSTFLAGS = "--cfg tracing_unstable";

  meta = {
    description = "User-friendly, lightweight TUI for disk imaging";
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ rustPlatform.buildRustPackage rec {
  cargoHash = "sha256-8YftVt72JpmxWB/WvOPpduE0/QgYvQhSuFRmsFth2iU=";
  sourceRoot = "${src.name}/rust";
  buildAndTestSubdir = "gateway";
  RUSTFLAGS = "--cfg system_certs";
  env.RUSTFLAGS = "--cfg system_certs";

  # Required to remove profiling arguments which conflict with this builder
  postPatch = ''
Loading