mirror of
https://github.com/realAscot/helix.git
synced 2025-09-14 04:03:03 +02:00
flake: Split platform and common RUSTFLAGS in devShell
The `--no-rosegment` is not supported on macOS but the other flag configurations can be used on both macOS and Linux.
This commit is contained in:
parent
19558839b7
commit
b6e58c0fa4
@ -57,7 +57,8 @@
|
||||
|
||||
# Devshell behavior is preserved.
|
||||
devShells.default = let
|
||||
rustFlagsEnv = pkgs.lib.optionalString pkgs.stdenv.isLinux "-C link-arg=-fuse-ld=lld -C target-cpu=native -Clink-arg=-Wl,--no-rosegment --cfg tokio_unstable";
|
||||
commonRustFlagsEnv = "-C link-arg=-fuse-ld=lld -C target-cpu=native --cfg tokio_unstable";
|
||||
platformRustFlagsEnv = pkgs.lib.optionalString pkgs.stdenv.isLinux "-Clink-arg=-Wl,--no-rosegment";
|
||||
in
|
||||
pkgs.mkShell
|
||||
{
|
||||
@ -73,7 +74,7 @@
|
||||
++ (lib.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreFoundation);
|
||||
shellHook = ''
|
||||
export RUST_BACKTRACE="1"
|
||||
export RUSTFLAGS="''${RUSTFLAGS:-""} ${rustFlagsEnv}"
|
||||
export RUSTFLAGS="''${RUSTFLAGS:-""} ${commonRustFlagsEnv} ${platformRustFlagsEnv}"
|
||||
'';
|
||||
};
|
||||
})
|
||||
|
Loading…
x
Reference in New Issue
Block a user