Skip to content
Discussion options

You must be logged in to vote

Oh, I see. I would recommend reading the rocks-db documentation that talks about the LTO feature:
https://github.com/rust-rocksdb/rust-rocksdb/blob/d6171b7ac13df012c250cebca26294f4f76cd52e/README.md#lto

On the rust side you should use RUSTFLAGS="-Clinker-plugin-lto -Clinker=clang -Clink-arg=-fuse-ld=lld".

So I gave this patch a try and it built fine:

diff --git a/flake.nix b/flake.nix
index 1a56ee079a..d89ca29cc6 100644
--- a/flake.nix
+++ b/flake.nix
@@ -57,9 +57,18 @@
         packages.default = craneLib.buildPackage {
           pname = "hello-world";
           version = "0.0.1";
+
           src = src;
+
+          stdenv = p: p.llvmPackages.stdenv;
           strictDeps = true;
-

Replies: 4 comments 8 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@eclairevoyant
Comment options

@lovesegfault
Comment options

@lovesegfault
Comment options

Comment options

You must be logged in to vote
5 replies
@RossSmyth
Comment options

Answer selected by lovesegfault
@RossSmyth
Comment options

@RossSmyth
Comment options

@lovesegfault
Comment options

@ipetkov
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants