From 4969c637d4e2298aba96a769749b6549000c0295 Mon Sep 17 00:00:00 2001 From: Bryan Stitt Date: Tue, 14 Nov 2023 16:50:32 -0800 Subject: [PATCH] aarch gnu and musl --- docker/cargo-config.toml | 47 +++++++++++++++++++++++++++------------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/docker/cargo-config.toml b/docker/cargo-config.toml index 1ed51c0e..0dfc1a23 100644 --- a/docker/cargo-config.toml +++ b/docker/cargo-config.toml @@ -1,18 +1,3 @@ -[target.x86_64-unknown-linux-gnu] -linker = "clang" -rustflags = [ - # faster linker - "-C", "link-arg=-fuse-ld=/usr/local/bin/mold", - # potentially faster. https://nnethercote.github.io/perf-book/build-configuration.html - "-C", "target-cpu=native", - # tokio unstable is needed for tokio-console - "--cfg", "tokio_unstable", - # uuid unstable is needed for zerocopy deserialize - "--cfg", "uuid_unstable", - # parallel build frontend - "-Z", "threads=8", -] - [target.aarch64-unknown-linux-gnu] linker = "clang" rustflags = [ @@ -29,3 +14,35 @@ rustflags = [ # parallel build frontend "-Z", "threads=8", ] + +[target.aarch64-unknown-linux-musl] +linker = "clang" +rustflags = [ + # faster linker + "-C", "link-arg=-fuse-ld=/usr/local/bin/mold", + # potentially faster. https://github.com/aws/aws-graviton-getting-started/blob/main/rust.md + "-C", "target-feature=+lse", + # potentially faster. https://nnethercote.github.io/perf-book/build-configuration.html + "-C", "target-cpu=native", + # tokio unstable is needed for tokio-console + "--cfg", "tokio_unstable", + # uuid unstable is needed for zerocopy deserialize + "--cfg", "uuid_unstable", + # parallel build frontend + "-Z", "threads=8", +] + +[target.x86_64-unknown-linux-gnu] +linker = "clang" +rustflags = [ + # faster linker + "-C", "link-arg=-fuse-ld=/usr/local/bin/mold", + # potentially faster. https://nnethercote.github.io/perf-book/build-configuration.html + "-C", "target-cpu=native", + # tokio unstable is needed for tokio-console + "--cfg", "tokio_unstable", + # uuid unstable is needed for zerocopy deserialize + "--cfg", "uuid_unstable", + # parallel build frontend + "-Z", "threads=8", +]