Skip to content

Commit 4de4bff

Browse files
authored
feat: enable build metrics and timings (#31)
1 parent 9bdaf68 commit 4de4bff

File tree

2 files changed

+35
-9
lines changed

2 files changed

+35
-9
lines changed

.github/workflows/rust-compiler-builder.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,8 @@ jobs:
5454
# https://support.apple.com/en-us/100100
5555

5656
# Regression: macos-14 arm64
57+
# Regression: --enable-profiler
58+
# Regression: --set build.optimized-compiler-builtins
5759

5860
- rust-targets: arm64e-apple-darwin
5961
rust-host: x86_64-apple-darwin
@@ -64,9 +66,10 @@ jobs:
6466
rust-use-lld: false
6567
macosx_deployment_target: 11.0
6668
iphoneos_deployment_target: 15.0
67-
# TODO: FIX ME
69+
# TODO: See regressions
6870
rust-configure-args: >-
6971
--set target.arm64e-apple-darwin.profiler=false
72+
--set build.optimized-compiler-builtins=false
7073
7174
- rust-targets: aarch64-apple-ios,arm64e-apple-darwin
7275
rust-host: x86_64-apple-darwin
@@ -77,8 +80,10 @@ jobs:
7780
rust-use-lld: false
7881
macosx_deployment_target: 11.0
7982
iphoneos_deployment_target: 15.0
83+
# TODO: See regressions
8084
rust-configure-args: >-
8185
--set target.arm64e-apple-darwin.profiler=false
86+
--set build.optimized-compiler-builtins=false
8287
8388
- rust-targets: x86_64-apple-tvos,aarch64-apple-tvos,arm64e-apple-tvos
8489
rust-host: x86_64-apple-darwin

Makefile

Lines changed: 29 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -38,22 +38,28 @@ configure: ## Configure Rust & LLVM with optimizations
3838
cd rust && ./configure \
3939
--enable-option-checking \
4040
--enable-verbose-configure \
41-
--enable-sccache \
42-
--enable-ninja \
43-
--enable-verbose-tests \
41+
--enable-locked-deps \
42+
--enable-cargo-native-static \
4443
--enable-codegen-tests \
44+
--enable-verbose-tests \
4545
--enable-dist-src \
46+
--enable-sccache \
47+
--enable-ninja \
4648
--enable-optimize-llvm \
4749
--enable-full-tools \
4850
--enable-sanitizers \
4951
--enable-profiler \
5052
--host=${RUST_HOST} \
5153
--target=${RUST_TARGETS} \
54+
--codegen-backends=${RUST_CODEGEN_BACKENDS} \
5255
--set llvm.download-ci-llvm=false \
5356
--set llvm.targets="AArch64;X86" \
5457
--set llvm.experimental-targets="" \
5558
--set llvm.static-libstdcpp \
5659
--set llvm.tests=true \
60+
--set build.optimized-compiler-builtins \
61+
--set build.print-step-timings \
62+
--set build.metrics \
5763
--set build.verbose=${RUST_VERBOSE} \
5864
--set rust.channel=${RUST_CHANNEL} \
5965
--set rust.jemalloc \
@@ -62,6 +68,7 @@ configure: ## Configure Rust & LLVM with optimizations
6268
--set rust.codegen-backends=${RUST_CODEGEN_BACKENDS} \
6369
--set rust.use-lld=${RUST_USE_LLD} \
6470
--set rust.omit-git-hash=true \
71+
--set dist.compression-profile=balanced \
6572
--dist-compression-formats=${RUST_DIST_FORMATS} \
6673
--prefix=${RUST_INSTALL_DIR} \
6774
${RUST_CONFIGURE_ARGS}
@@ -71,16 +78,23 @@ configure-dev: ## Configure Rust without optimizations
7178
cd rust && ./configure \
7279
--enable-option-checking \
7380
--enable-verbose-configure \
74-
--enable-verbose-tests \
81+
--enable-locked-deps \
82+
--enable-cargo-native-static \
7583
--enable-codegen-tests \
84+
--enable-verbose-tests \
85+
--enable-dist-src \
7686
--host=${RUST_HOST} \
7787
--target=${RUST_TARGETS} \
7888
--tools=${RUST_TOOLS} \
7989
--set llvm.download-ci-llvm=true \
90+
--set build.optimized-compiler-builtins \
91+
--set build.print-step-timings \
92+
--set build.metrics \
8093
--set build.verbose=${RUST_VERBOSE} \
8194
--set rust.channel=${RUST_CHANNEL} \
8295
--set rust.description=${RUST_DESCRIPTION} \
8396
--set rust.use-lld=${RUST_USE_LLD} \
97+
--set dist.compression-profile=balanced \
8498
--dist-compression-formats=${RUST_DIST_FORMATS} \
8599
--prefix=${RUST_INSTALL_DIR} \
86100
${RUST_CONFIGURE_ARGS}
@@ -90,28 +104,35 @@ configure-dev-llvm: ## Configure Rust & LLVM without optimizations
90104
cd rust && ./configure \
91105
--enable-option-checking \
92106
--enable-verbose-configure \
93-
--enable-verbose-tests \
107+
--enable-locked-deps \
108+
--enable-cargo-native-static \
94109
--enable-codegen-tests \
110+
--enable-verbose-tests \
111+
--enable-dist-src \
95112
--enable-sccache \
96113
--enable-ninja \
97-
--host=${RUST_HOST} \
98-
--target=${RUST_TARGETS} \
99-
--tools=${RUST_TOOLS} \
100114
--enable-debug-assertions \
101115
--enable-overflow-checks \
102116
--enable-llvm-assertions \
117+
--host=${RUST_HOST} \
118+
--target=${RUST_TARGETS} \
119+
--tools=${RUST_TOOLS} \
103120
--codegen-backends=${RUST_CODEGEN_BACKENDS} \
104121
--set llvm.download-ci-llvm=false \
105122
--set llvm.targets="AArch64;X86" \
106123
--set llvm.experimental-targets="" \
107124
--set llvm.static-libstdcpp \
108125
--set llvm.tests=true \
126+
--set build.optimized-compiler-builtins \
127+
--set build.print-step-timings \
128+
--set build.metrics \
109129
--set build.verbose=${RUST_VERBOSE} \
110130
--set rust.channel=${RUST_CHANNEL} \
111131
--set rust.verify-llvm-ir \
112132
--set rust.use-lld=${RUST_USE_LLD} \
113133
--set rust.codegen-backends=${RUST_CODEGEN_BACKENDS} \
114134
--set rust.omit-git-hash=true \
135+
--set dist.compression-profile=balanced \
115136
--dist-compression-formats=${RUST_DIST_FORMATS} \
116137
--prefix=${RUST_INSTALL_DIR} \
117138
${RUST_CONFIGURE_ARGS}

0 commit comments

Comments
 (0)