Skip to content

Commit d344f7c

Browse files
committed
builds: Enable lld, optimize linking more, faster cargo-test build
1 parent e06911a commit d344f7c

File tree

3 files changed

+13
-4
lines changed

3 files changed

+13
-4
lines changed

.cargo/config

+10-4
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,9 @@
1313
# Sync: This target-cpu and list of features should be kept in sync with the ones in ci-builder and
1414
# xcompile.
1515
rustflags = [
16-
"-C",
17-
"link-arg=-Wl,--compress-debug-sections=zlib-gabi",
16+
"-Clink-arg=-Wl,--compress-debug-sections=zlib",
17+
"-Clink-arg=-Wl,-O2",
18+
"-Clink-arg=-fuse-ld=lld",
1819
"-Csymbol-mangling-version=v0",
1920
"-Ctarget-cpu=x86-64-v3",
2021
"-Ctarget-feature=+aes",
@@ -31,8 +32,9 @@ rustflags = [
3132
# xcompile.
3233
[target."aarch64-unknown-linux-gnu"]
3334
rustflags = [
34-
"-C",
35-
"link-arg=-Wl,--compress-debug-sections=zlib-gabi",
35+
"-Clink-arg=-Wl,--compress-debug-sections=zlib",
36+
"-Clink-arg=-Wl,-O2",
37+
"-Clink-arg=-fuse-ld=lld",
3638
"-Csymbol-mangling-version=v0",
3739
"-Ctarget-cpu=neoverse-n1",
3840
"-Ctarget-feature=+aes,+sha2",
@@ -43,3 +45,7 @@ rustflags = [
4345
# Always reserve at least one core so Cargo doesn't pin our CPU
4446
jobs = -1
4547
rustflags = ["--cfg=tokio_unstable"]
48+
49+
[profile.ci]
50+
inherits = "dev"
51+
debug = "line-tables-only"

ci/test/cargo-test/mzcompose.py

+2
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ def workflow_default(c: Composition, parser: WorkflowArgumentParser) -> None:
122122
"build",
123123
"--bin",
124124
"clusterd",
125+
"--profile=ci",
125126
],
126127
env=env,
127128
)
@@ -138,6 +139,7 @@ def workflow_default(c: Composition, parser: WorkflowArgumentParser) -> None:
138139
"nextest",
139140
"run",
140141
"--profile=ci",
142+
"--cargo-profile=ci",
141143
f"--partition=count:{partition}/{total}",
142144
# Most tests don't use 100% of a CPU core, so run two tests per CPU.
143145
# TODO(def-): Reenable when #19931 is fixed

ci/test/pipeline.template.yml

+1
Original file line numberDiff line numberDiff line change
@@ -195,6 +195,7 @@ steps:
195195
artifact_paths: [junit_*.xml, target/nextest/ci/junit_cargo-test.xml]
196196
inputs:
197197
- Cargo.lock
198+
- ".config/nextest.toml"
198199
- "**/Cargo.toml"
199200
- "**/*.rs"
200201
- "**/*.proto"

0 commit comments

Comments
 (0)