Skip to content

Commit 3cac3b3

Browse files
committed
fix(build): use cmake to build aws-lc-sys
aws-lc-rs has a bug [1] due to which the AWS_LC_SYS_CFLAGS env var is ignored in the default "ccBuilder". When we removed "bindgen" feature, we were switched back to the default ccBuilder, thus the optimization to not compile AVX512 code was getting ignored and our binary size increased by 600kB. This patch reverts to the cmake builder while the cc builder is fixed. [1]: aws/aws-lc-rs#965 Signed-off-by: Riccardo Mancini <[email protected]>
1 parent 7482d55 commit 3cac3b3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

.cargo/config.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,8 @@ git-fetch-with-cli = true
1111
AWS_LC_SYS_NO_JITTER_ENTROPY = "1"
1212
# disable AVX512 as it adds 600k of binary size
1313
# this was only used for MMDS token generation
14+
# Note: due to a bug in aws-lc [1] the AWS_LC_SYS_CFLAGS only work with
15+
# the cmake compiler.
16+
# [1]: https://github.com/aws/aws-lc-rs/issues/965
17+
AWS_LC_SYS_CMAKE_BUILDER = "1"
1418
AWS_LC_SYS_CFLAGS = "-DMY_ASSEMBLER_IS_TOO_OLD_FOR_512AVX"

0 commit comments

Comments
 (0)