From 23750dac9bf5268c382232e90fa28c7e4c38a649 Mon Sep 17 00:00:00 2001 From: iliana etaoin Date: Fri, 7 Aug 2020 05:14:27 +0000 Subject: [PATCH 1/2] Update SDK to 0.12.0 --- Makefile.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile.toml b/Makefile.toml index bb325306a75..f3de705e744 100644 --- a/Makefile.toml +++ b/Makefile.toml @@ -55,7 +55,7 @@ DOCKER_BUILDKIT = "1" # on the command line. # Depends on ${BUILDSYS_ARCH}. -BUILDSYS_SDK_IMAGE = "bottlerocket/sdk-${BUILDSYS_ARCH}:v0.11.0" +BUILDSYS_SDK_IMAGE = "bottlerocket/sdk-${BUILDSYS_ARCH}:v0.12.0" # Depends on ${BUILDSYS_JOBS}. CARGO_MAKE_CARGO_ARGS = "--jobs ${BUILDSYS_JOBS} --offline --locked" From 8f9306cf183ed65473822db6401031cded30a65a Mon Sep 17 00:00:00 2001 From: iliana etaoin Date: Fri, 7 Aug 2020 05:14:34 +0000 Subject: [PATCH 2/2] Set lto=thin for Rust static builds elsewhere rustc's `lto` flag is incompatible with the new `embed-bitcode=no`. The release notes for Rust 1.45 recommend controlling LTO with Cargo profiles, and one way to do that is setting `CARGO_PROFILE__LTO` in the environment. --- macros/cargo | 2 +- macros/rust | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/macros/cargo b/macros/cargo index cf2dfcba6c3..a8fbeef1f5f 100644 --- a/macros/cargo +++ b/macros/cargo @@ -18,7 +18,7 @@ %__cargo_env CARGO_TARGET_DIR="${HOME}/.cache" SKIP_README="true" %__cargo_cross_pkg_config PKG_CONFIG_PATH="%{_cross_pkgconfigdir}" PKG_CONFIG_ALLOW_CROSS=1 %__cargo_cross_env %{__cargo_env} %{__cargo_cross_pkg_config} TARGET_CC="%{_cross_triple}-gnu-gcc" -%__cargo_cross_env_static %{__cargo_env} %{__cargo_cross_pkg_config} TARGET_CC="%{_cross_triple}-musl-gcc" +%__cargo_cross_env_static %{__cargo_env} %{__cargo_cross_pkg_config} TARGET_CC="%{_cross_triple}-musl-gcc" CARGO_PROFILE_RELEASE_LTO=thin %cargo_prep (\ %{__mkdir} -p %{_builddir}/.cargo \ diff --git a/macros/rust b/macros/rust index 669beac6a74..4ffdae4c424 100644 --- a/macros/rust +++ b/macros/rust @@ -15,7 +15,7 @@ %__global_rustflags_shared -Cprefer-dynamic %__global_rustflags # Enable LTO and static C runtime. -%__global_rustflags_static -Clto=thin -Ctarget-feature=+crt-static -Clink-arg=-lgcc %__global_rustflags +%__global_rustflags_static -Ctarget-feature=+crt-static -Clink-arg=-lgcc %__global_rustflags %__global_rustflags_shared_toml [%{lua: for arg in string.gmatch(rpm.expand("%{__global_rustflags_shared}"), "%S+") do