Skip to content

Commit 45eb9b6

Browse files
lf-facebook-github-bot
authored andcommitted
fix(flake.nix): specify tokio_unstable cfg (#942)
Summary: This is supposed to be specified in .cargo/config.toml but since we add the environment variable, it overrides that. Fixes: #941 Pull Request resolved: #942 Reviewed By: alexlian Differential Revision: D74213872 fbshipit-source-id: eef95f1a37fd69a3f40895a1388e1e7085c62769
1 parent b0fdd45 commit 45eb9b6

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

flake.nix

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,14 +38,16 @@
3838
Security
3939
]);
4040
packages = [ pkgs.cargo-bloat my-rust-bin pkgs.mold-wrapped pkgs.reindeer pkgs.lld_16 pkgs.clang_16 ];
41-
shellHook =
41+
shellHook =
4242
''
4343
export BUCK2_BUILD_PROTOC=${pkgs.protobuf}/bin/protoc
4444
export BUCK2_BUILD_PROTOC_INCLUDE=${pkgs.protobuf}/include
4545
''
4646
# enable mold for linux users, for more tolerable link times
47+
# we have to specify tokio_unstable in the RUSTFLAGS here since they override
48+
# .cargo/config.toml that is the reasonable place to specify it
4749
+ pkgs.lib.optionalString pkgs.stdenv.isLinux ''
48-
export RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=mold $RUSTFLAGS"
50+
export RUSTFLAGS="-C linker=clang -C link-arg=-fuse-ld=mold --cfg=tokio_unstable $RUSTFLAGS"
4951
'';
5052
};
5153
});

0 commit comments

Comments
 (0)