cargoSetupHook: Force frame pointers for !isx86_32
We did this for C in #399014 but not Rust. Add -Cforce-frame-pointers=yes to rustflags in cargoSetupHook
This commit is contained in:
parent
e87e319c8e
commit
e05a1a15ac
@ -91,13 +91,21 @@
|
||||
lib.optionalString (stdenv.hostPlatform.config != stdenv.targetPlatform.config) ''
|
||||
[target."${stdenv.targetPlatform.rust.rustcTarget}"]
|
||||
"linker" = "${pkgsTargetTarget.stdenv.cc}/bin/${pkgsTargetTarget.stdenv.cc.targetPrefix}cc"
|
||||
"rustflags" = [ "-C", "target-feature=${
|
||||
if pkgsTargetTarget.stdenv.targetPlatform.isStatic then "+" else "-"
|
||||
}crt-static" ]
|
||||
"rustflags" = [ ${
|
||||
lib.concatStringsSep ", " (
|
||||
[
|
||||
''"-Ctarget-feature=${if stdenv.targetPlatform.isStatic then "+" else "-"}crt-static"''
|
||||
]
|
||||
++ lib.optional (!stdenv.targetPlatform.isx86_32) ''"-Cforce-frame-pointers=yes"''
|
||||
)
|
||||
} ]
|
||||
''
|
||||
+ ''
|
||||
[target."${stdenv.hostPlatform.rust.rustcTarget}"]
|
||||
"linker" = "${stdenv.cc}/bin/${stdenv.cc.targetPrefix}cc"
|
||||
"rustflags" = [ ${
|
||||
lib.optionalString (!stdenv.hostPlatform.isx86_32) ''"-Cforce-frame-pointers=yes"''
|
||||
} ]
|
||||
'';
|
||||
};
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user