From 9835f81b5ff1113d5cf18b00382d0686a383a430 Mon Sep 17 00:00:00 2001 From: Gwilym Inzani Date: Tue, 25 Apr 2023 20:22:44 +0100 Subject: [PATCH] Maybe make the build faster by using the same settings for all crates --- agb-fixnum/Cargo.toml | 10 ++++++++++ agb-gbafix/Cargo.toml | 10 ++++++++++ agb-hashmap/Cargo.toml | 12 ++++++++++- agb-image-converter/Cargo.toml | 10 ++++++++++ agb-macros/Cargo.toml | 10 ++++++++++ agb-sound-converter/Cargo.toml | 18 +++++++++-------- agb/Cargo.toml | 20 +++++++++---------- book/games/pong/Cargo.toml | 9 ++++----- examples/combo/Cargo.toml | 9 ++++----- examples/hyperspace-roll/Cargo.toml | 10 ++++------ .../the-hat-chooses-the-wizard/Cargo.toml | 9 ++++++++- examples/the-purple-night/Cargo.toml | 9 ++++++--- mgba-test-runner/Cargo.toml | 15 +++++++++----- template/Cargo.toml | 8 ++++---- tools/Cargo.toml | 12 +++++++++-- 15 files changed, 121 insertions(+), 50 deletions(-) diff --git a/agb-fixnum/Cargo.toml b/agb-fixnum/Cargo.toml index cb4e16ef..3040c760 100644 --- a/agb-fixnum/Cargo.toml +++ b/agb-fixnum/Cargo.toml @@ -8,3 +8,13 @@ repository = "https://github.com/agbrs/agb" [dependencies] agb_macros = { version = "0.14.0", path = "../agb-macros" } + +[profile.dev] +opt-level = 3 +debug = true + +[profile.release] +opt-level = 3 +lto = "fat" +debug = true +codegen-units = 1 \ No newline at end of file diff --git a/agb-gbafix/Cargo.toml b/agb-gbafix/Cargo.toml index 71f85fbc..f09df928 100644 --- a/agb-gbafix/Cargo.toml +++ b/agb-gbafix/Cargo.toml @@ -13,3 +13,13 @@ gbafix = "1" bytemuck = "1" anyhow = "1" clap = "4" + +[profile.dev] +opt-level = 3 +debug = true + +[profile.release] +opt-level = 3 +lto = "fat" +debug = true +codegen-units = 1 \ No newline at end of file diff --git a/agb-hashmap/Cargo.toml b/agb-hashmap/Cargo.toml index 3a1a7875..57ad0b1b 100644 --- a/agb-hashmap/Cargo.toml +++ b/agb-hashmap/Cargo.toml @@ -10,4 +10,14 @@ repository = "https://github.com/agbrs/agb" rustc-hash = { version = "1", default-features = false } [dev-dependencies] -rand = { version = "0.8", default-features = false, features = ["small_rng"] } \ No newline at end of file +rand = { version = "0.8", default-features = false, features = ["small_rng"] } + +[profile.dev] +opt-level = 3 +debug = true + +[profile.release] +opt-level = 3 +lto = "fat" +debug = true +codegen-units = 1 \ No newline at end of file diff --git a/agb-image-converter/Cargo.toml b/agb-image-converter/Cargo.toml index 4978edde..6200ddd3 100644 --- a/agb-image-converter/Cargo.toml +++ b/agb-image-converter/Cargo.toml @@ -17,3 +17,13 @@ proc-macro2 = "1" quote = "1" asefile = "0.3.5" fontdue = "0.7" + +[profile.dev] +opt-level = 3 +debug = true + +[profile.release] +opt-level = 3 +lto = "fat" +debug = true +codegen-units = 1 \ No newline at end of file diff --git a/agb-macros/Cargo.toml b/agb-macros/Cargo.toml index 64184680..1570e7f7 100644 --- a/agb-macros/Cargo.toml +++ b/agb-macros/Cargo.toml @@ -14,3 +14,13 @@ proc-macro = true syn = { version = "2", features = ["full", "extra-traits"] } proc-macro2 = "1" quote = "1" + +[profile.dev] +opt-level = 3 +debug = true + +[profile.release] +opt-level = 3 +lto = "fat" +debug = true +codegen-units = 1 \ No newline at end of file diff --git a/agb-sound-converter/Cargo.toml b/agb-sound-converter/Cargo.toml index 4ac5bc29..358388fe 100644 --- a/agb-sound-converter/Cargo.toml +++ b/agb-sound-converter/Cargo.toml @@ -7,14 +7,6 @@ license = "MPL-2.0" description = "Library for converting wavs for use on the Game Boy Advance" repository = "https://github.com/agbrs/agb" -[profile.dev] -opt-level = 3 -debug = true - -[profile.release] -lto = true -debug = true - [lib] proc-macro = true @@ -23,3 +15,13 @@ hound = "3.5" syn = "2" proc-macro2 = "1" quote = "1" + +[profile.dev] +opt-level = 3 +debug = true + +[profile.release] +opt-level = 3 +lto = "fat" +debug = true +codegen-units = 1 \ No newline at end of file diff --git a/agb/Cargo.toml b/agb/Cargo.toml index 1f572e9a..34b3ad92 100644 --- a/agb/Cargo.toml +++ b/agb/Cargo.toml @@ -7,16 +7,6 @@ description = "Library for Game Boy Advance Development" license = "MPL-2.0" repository = "https://github.com/agbrs/agb" -[profile.dev] -opt-level = 3 -debug = true - -[profile.release] -opt-level = 3 -lto = "fat" -debug = true -codegen-units = 1 - [features] default = ["testing"] testing = [] @@ -35,3 +25,13 @@ rustc-hash = { version = "1", default-features = false } [package.metadata.docs.rs] default-target = "thumbv6m-none-eabi" targets = [] + +[profile.dev] +opt-level = 3 +debug = true + +[profile.release] +opt-level = 3 +lto = "fat" +debug = true +codegen-units = 1 \ No newline at end of file diff --git a/book/games/pong/Cargo.toml b/book/games/pong/Cargo.toml index ec83e037..48684995 100644 --- a/book/games/pong/Cargo.toml +++ b/book/games/pong/Cargo.toml @@ -4,16 +4,15 @@ version = "0.1.0" authors = ["Gwilym Kuiper "] edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] agb = { version = "0.14.0", path = "../../../agb" } [profile.dev] -opt-level = 2 +opt-level = 3 debug = true [profile.release] -panic = "abort" -lto = true +opt-level = 3 +lto = "fat" debug = true +codegen-units = 1 \ No newline at end of file diff --git a/examples/combo/Cargo.toml b/examples/combo/Cargo.toml index d27c394e..91d4772b 100644 --- a/examples/combo/Cargo.toml +++ b/examples/combo/Cargo.toml @@ -11,13 +11,12 @@ the-purple-night = { path = "../the-purple-night" } the-hat-chooses-the-wizard = { path = "../the-hat-chooses-the-wizard" } hyperspace-roll = { path = "../hyperspace-roll" } - [profile.dev] -opt-level = 2 +opt-level = 3 debug = true [profile.release] -panic = "abort" -lto = true +opt-level = 3 +lto = "fat" debug = true -codegen-units = 1 +codegen-units = 1 \ No newline at end of file diff --git a/examples/hyperspace-roll/Cargo.toml b/examples/hyperspace-roll/Cargo.toml index 1e8cdd9d..029efcd5 100644 --- a/examples/hyperspace-roll/Cargo.toml +++ b/examples/hyperspace-roll/Cargo.toml @@ -4,17 +4,15 @@ version = "0.1.0" authors = [""] edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] agb = { version = "0.14.0", path = "../../agb" } [profile.dev] -opt-level = 2 +opt-level = 3 debug = true [profile.release] -panic = "abort" -lto = true +opt-level = 3 +lto = "fat" debug = true -codegen-units = 1 +codegen-units = 1 \ No newline at end of file diff --git a/examples/the-hat-chooses-the-wizard/Cargo.toml b/examples/the-hat-chooses-the-wizard/Cargo.toml index 9af5d5fb..ca7c6f4e 100644 --- a/examples/the-hat-chooses-the-wizard/Cargo.toml +++ b/examples/the-hat-chooses-the-wizard/Cargo.toml @@ -14,4 +14,11 @@ serde = { version = "1.0", features = ["derive"] } serde_json = "1.0" [profile.dev] -opt-level = 2 +opt-level = 3 +debug = true + +[profile.release] +opt-level = 3 +lto = "fat" +debug = true +codegen-units = 1 \ No newline at end of file diff --git a/examples/the-purple-night/Cargo.toml b/examples/the-purple-night/Cargo.toml index 7c6daae6..3b34b96d 100644 --- a/examples/the-purple-night/Cargo.toml +++ b/examples/the-purple-night/Cargo.toml @@ -15,8 +15,11 @@ quote = "1.0.10" tiled = { version = "0.9.4", default-features = false } [profile.dev] -opt-level = 2 +opt-level = 3 +debug = true [profile.release] -panic = "abort" -lto = true +opt-level = 3 +lto = "fat" +debug = true +codegen-units = 1 \ No newline at end of file diff --git a/mgba-test-runner/Cargo.toml b/mgba-test-runner/Cargo.toml index a309d884..58e7839b 100644 --- a/mgba-test-runner/Cargo.toml +++ b/mgba-test-runner/Cargo.toml @@ -4,11 +4,6 @@ version = "0.1.0" authors = ["Corwin Kuiper "] edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[profile.release] -debug = true - [dependencies] regex = "1" anyhow = "1" @@ -16,3 +11,13 @@ image = { version = "0.24", default-features = false, features = [ "png", "bmp" [build-dependencies] cc = { version = "1", features = ["parallel"] } + +[profile.dev] +opt-level = 3 +debug = true + +[profile.release] +opt-level = 3 +lto = "fat" +debug = true +codegen-units = 1 \ No newline at end of file diff --git a/template/Cargo.toml b/template/Cargo.toml index 29bc4d85..8252e28f 100644 --- a/template/Cargo.toml +++ b/template/Cargo.toml @@ -10,11 +10,11 @@ edition = "2021" agb = "0.14.0" [profile.dev] -opt-level = 2 +opt-level = 3 debug = true [profile.release] -panic = "abort" -lto = true +opt-level = 3 +lto = "fat" debug = true -codegen-units = 1 +codegen-units = 1 \ No newline at end of file diff --git a/tools/Cargo.toml b/tools/Cargo.toml index 30f662e6..bd6f8ee5 100644 --- a/tools/Cargo.toml +++ b/tools/Cargo.toml @@ -3,11 +3,19 @@ name = "tools" version = "0.1.0" edition = "2021" -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - [dependencies] clap = "4" toml_edit = "0.19" glob = "0.3" chrono = "0.4" dependency-graph = "0.1.5" + +[profile.dev] +opt-level = 3 +debug = true + +[profile.release] +opt-level = 3 +lto = "fat" +debug = true +codegen-units = 1 \ No newline at end of file