From c3e0bec131a283536304ef27d4188c6b8ced39d5 Mon Sep 17 00:00:00 2001 From: psykose Date: Tue, 26 Nov 2024 14:10:11 +0100 Subject: [PATCH] option for mold passthrough easier than envvars --- Cargo.lock | 24 ++++++++++++------------ Cargo.toml | 5 +++-- meson.build | 4 ++++ meson.options | 6 ++++++ 4 files changed, 25 insertions(+), 14 deletions(-) create mode 100644 meson.options diff --git a/Cargo.lock b/Cargo.lock index 734d0c5..60c66ec 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -391,9 +391,9 @@ checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da" [[package]] name = "cacache" -version = "13.0.0" +version = "13.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a61ff12b19d89c752c213316b87fdb4a587f073d219b893cc56974b8c9f39bf7" +checksum = "5c5063741c7b2e260bbede781cf4679632dd90e2718e99f7715e46824b65670b" dependencies = [ "digest", "either", @@ -1645,9 +1645,9 @@ dependencies = [ [[package]] name = "libc" -version = "0.2.164" +version = "0.2.166" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" +checksum = "c2ccc108bbc0b1331bd061864e7cd823c0cab660bbe6970e66e2c0614decde36" [[package]] name = "libloading" @@ -2468,9 +2468,9 @@ dependencies = [ [[package]] name = "rustls" -version = "0.23.18" +version = "0.23.19" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" +checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1" dependencies = [ "once_cell", "ring", @@ -3053,9 +3053,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" [[package]] name = "tracing" -version = "0.1.40" +version = "0.1.41" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" +checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" dependencies = [ "pin-project-lite", "tracing-attributes", @@ -3064,9 +3064,9 @@ dependencies = [ [[package]] name = "tracing-attributes" -version = "0.1.27" +version = "0.1.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" +checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" dependencies = [ "proc-macro2", "quote", @@ -3075,9 +3075,9 @@ dependencies = [ [[package]] name = "tracing-core" -version = "0.1.32" +version = "0.1.33" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" +checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" dependencies = [ "once_cell", "valuable", diff --git a/Cargo.toml b/Cargo.toml index dda9e04..1fa3bc8 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -19,11 +19,12 @@ futures = { version = "0.3", default-features = false, features = ["std"] } getrandom = { features = ["linux_disable_fallback"], version = "0.2" } gettext-rs = { version = "0.7", features = ["gettext-system"] } http-cache = { version = "0.20", default-features = false, features = [ - "cacache", "cacache-tokio", "manager-cacache", ] } -http-cache-reqwest = "0.15" +http-cache-reqwest = { version = "0.15", default-features = false, features = [ + "manager-cacache", +] } image = { version = "0.25", default-features = false, features = [ "jpeg", "png", diff --git a/meson.build b/meson.build index 0c8e3e2..40fa4ab 100644 --- a/meson.build +++ b/meson.build @@ -49,6 +49,10 @@ else extra_rustflags = [] endif +if get_option('moldy') + cargo_env.append('RUSTFLAGS', '-Clink-arg=-fuse-ld=mold', separator: ' ') +endif + cargo_env.set('MESON_BUILD_ROOT', meson.project_build_root()) cargo_env.set('CARGO_MANIFEST_DIR', meson.project_source_root()) cargo_env.set('CARGO_TARGET_DIR', meson.project_build_root() / 'target') diff --git a/meson.options b/meson.options new file mode 100644 index 0000000..fda0abb --- /dev/null +++ b/meson.options @@ -0,0 +1,6 @@ +option( + 'moldy', + description: 'use mold', + type: 'boolean', + value:true, +)