Skip to content

Commit 072addb

Browse files
committed
Enable the crt-static target feature
We were relying on the fact that our current targets link the C runtime statically. However, this may be different for other targets and could even change in the future (e.g., see rust-lang/compiler-team#422). With this commit we adopt the current recommendation, which is enabling the crt-static target feature when building. See https://doc.rust-lang.org/reference/linkage.html#static-and-dynamic-c-runtimes for details. Given the current defaults for Rust targets, this change should be a no-op, but this shall make us safer and more resilient to Rust changes in the long run. Signed-off-by: Leandro Motta Barros <[email protected]> Change-type: patch
1 parent 9f45d84 commit 072addb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Cross.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[build.env]
2+
passthrough = ["RUSTFLAGS=-C target-feature=+crt-static"]

0 commit comments

Comments
 (0)