From e07a080aad6e1f10da9242e22e48e9eef79963e8 Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Wed, 5 Apr 2023 17:06:56 +0100 Subject: [PATCH 1/2] Reduce codegen units to 1 to ensure build works --- agb/Cargo.toml | 1 + examples/combo/Cargo.toml | 1 + examples/hyperspace-roll/Cargo.toml | 3 +-- template/Cargo.toml | 1 + 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/agb/Cargo.toml b/agb/Cargo.toml index 9bca59fb..02cdc17b 100644 --- a/agb/Cargo.toml +++ b/agb/Cargo.toml @@ -15,6 +15,7 @@ debug = true opt-level = 3 lto = "fat" debug = true +codegen-units = 1 [features] default = ["testing"] diff --git a/examples/combo/Cargo.toml b/examples/combo/Cargo.toml index bbe5f663..519934c3 100644 --- a/examples/combo/Cargo.toml +++ b/examples/combo/Cargo.toml @@ -20,3 +20,4 @@ debug = true panic = "abort" lto = true debug = true +codegen-units = 1 diff --git a/examples/hyperspace-roll/Cargo.toml b/examples/hyperspace-roll/Cargo.toml index c36eee96..0422fa8b 100644 --- a/examples/hyperspace-roll/Cargo.toml +++ b/examples/hyperspace-roll/Cargo.toml @@ -8,14 +8,13 @@ edition = "2021" [dependencies] agb = { version = "0.13.0", path = "../../agb" } -bare-metal = "1" [profile.dev] opt-level = 2 debug = true - [profile.release] panic = "abort" lto = true debug = true +codegen-units = 1 diff --git a/template/Cargo.toml b/template/Cargo.toml index d1efdf60..266cf916 100644 --- a/template/Cargo.toml +++ b/template/Cargo.toml @@ -17,3 +17,4 @@ debug = true panic = "abort" lto = true debug = true +codegen-units = 1 From 6c4f1bcc11767fca10a1e2c7ad16fd779eed1286 Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Wed, 5 Apr 2023 17:07:50 +0100 Subject: [PATCH 2/2] Add changelog entry for codegen-units=1 --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c6394868..4404d6fd 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,6 +10,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - Made Vector2D::new a const function. - The template now uses rust 2021 edition by default. - All objects which should only be created once now have the correct lifetimes to only allow one to exist. +- Template now uses codegen-units=1 to workaround bug in nightly. ### Fixed - Alpha channel is now considered by `include_gfx!()` even when `transparent_colour` is absent.