From 94d67d2b4494ca6db8c9118ba3a5c7341a6b6aae Mon Sep 17 00:00:00 2001 From: crabman Date: Thu, 30 May 2024 09:09:45 +0000 Subject: [PATCH] attempt fixing build on macos x86 --- .gitlab/CI/build.gitlab-ci.yml | 7 ++++--- Cargo.toml | 4 ++++ 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.gitlab/CI/build.gitlab-ci.yml b/.gitlab/CI/build.gitlab-ci.yml index 6d46bf0dcc..25c80f8caf 100644 --- a/.gitlab/CI/build.gitlab-ci.yml +++ b/.gitlab/CI/build.gitlab-ci.yml @@ -141,7 +141,7 @@ coverage: script: - export MACOSX_DEPLOYMENT_TARGET="10.13" - export VELOREN_USERDATA_STRATEGY=executable - - cargo build --release --no-default-features --features default-publish --target $RUST_TARGET + - cargo build --profile ${PROFILE} --no-default-features --features default-publish --target $RUST_TARGET - cp -r target/$RUST_TARGET/release/veloren-server-cli $CI_PROJECT_DIR - cp -r target/$RUST_TARGET/release/veloren-voxygen $CI_PROJECT_DIR artifacts: @@ -156,15 +156,16 @@ coverage: extends: - .tmacos before_script: + # Using fat LTO on macos_x86_64 caused timeouts in the build pipeline, overriding it to thin here fixes this + - export PROFILE="release-thinlto" - *tmacos-before-script - export RUST_TARGET="x86_64-apple-darwin" - # Using fat LTO on macos_x86_64 caused timeouts in the build pipeline, overriding it to thin here fixes this - - export RUSTFLAGS="-C lto=thin" .tmacos-aarch64: extends: - .tmacos before_script: + - export PROFILE="release" - *tmacos-before-script - rustup target add aarch64-apple-darwin - export RUST_TARGET="aarch64-apple-darwin" diff --git a/Cargo.toml b/Cargo.toml index 7963d360c2..4c96ed94d6 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -97,6 +97,10 @@ debug = 1 [profile.release.package."veloren-world"] debug = 1 +[profile.release-thinlto] +inherits = 'release' +lto = "thin" + # used for cargo bench [profile.bench] opt-level = 2