Skip to content

Commit

Permalink
trace compiler params
Browse files Browse the repository at this point in the history
  • Loading branch information
rigille committed Jul 27, 2023
1 parent 30e9c70 commit 843befb
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion build-rust-crate/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ let

# https://doc.rust-lang.org/cargo/reference/profiles.html
profileToRustcFlags = p:
builtins.trace p (
[]
++ lib.optional (p.opt-level or 0 != 0) "-Copt-level=${toString p.opt-level}"
++ lib.optional (p.debug or false != false) "-Cdebuginfo=${if p.debug == true then "2" else toString p.debug}"
Expand All @@ -67,7 +68,7 @@ let
++ lib.optional (p.rpath or false) "-Crpath"

++ lib.optional (p.lto or false == false) "-Cembed-bitcode=no"
;
);

convertProfile = p: {
buildFlags =
Expand Down

0 comments on commit 843befb

Please sign in to comment.