option for mold passthrough

easier than envvars
This commit is contained in:
psykose 2024-11-26 14:10:11 +01:00
parent a7cd8b86d3
commit c3e0bec131
Signed by: psykose
SSH key fingerprint: SHA256:pRMVjV3kRB6zl+wNx+sV8KoMnPqQAW6v8dNCxsCGZv8
4 changed files with 25 additions and 14 deletions

24
Cargo.lock generated
View file

@ -391,9 +391,9 @@ checksum = "9ac0150caa2ae65ca5bd83f25c7de183dea78d4d366469f148435e2acfbad0da"
[[package]] [[package]]
name = "cacache" name = "cacache"
version = "13.0.0" version = "13.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a61ff12b19d89c752c213316b87fdb4a587f073d219b893cc56974b8c9f39bf7" checksum = "5c5063741c7b2e260bbede781cf4679632dd90e2718e99f7715e46824b65670b"
dependencies = [ dependencies = [
"digest", "digest",
"either", "either",
@ -1645,9 +1645,9 @@ dependencies = [
[[package]] [[package]]
name = "libc" name = "libc"
version = "0.2.164" version = "0.2.166"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "433bfe06b8c75da9b2e3fbea6e5329ff87748f0b144ef75306e674c3f6f7c13f" checksum = "c2ccc108bbc0b1331bd061864e7cd823c0cab660bbe6970e66e2c0614decde36"
[[package]] [[package]]
name = "libloading" name = "libloading"
@ -2468,9 +2468,9 @@ dependencies = [
[[package]] [[package]]
name = "rustls" name = "rustls"
version = "0.23.18" version = "0.23.19"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c9cc1d47e243d655ace55ed38201c19ae02c148ae56412ab8750e8f0166ab7f" checksum = "934b404430bb06b3fae2cba809eb45a1ab1aecd64491213d7c3301b88393f8d1"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"ring", "ring",
@ -3053,9 +3053,9 @@ checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3"
[[package]] [[package]]
name = "tracing" name = "tracing"
version = "0.1.40" version = "0.1.41"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
dependencies = [ dependencies = [
"pin-project-lite", "pin-project-lite",
"tracing-attributes", "tracing-attributes",
@ -3064,9 +3064,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-attributes" name = "tracing-attributes"
version = "0.1.27" version = "0.1.28"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -3075,9 +3075,9 @@ dependencies = [
[[package]] [[package]]
name = "tracing-core" name = "tracing-core"
version = "0.1.32" version = "0.1.33"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c"
dependencies = [ dependencies = [
"once_cell", "once_cell",
"valuable", "valuable",

View file

@ -19,11 +19,12 @@ futures = { version = "0.3", default-features = false, features = ["std"] }
getrandom = { features = ["linux_disable_fallback"], version = "0.2" } getrandom = { features = ["linux_disable_fallback"], version = "0.2" }
gettext-rs = { version = "0.7", features = ["gettext-system"] } gettext-rs = { version = "0.7", features = ["gettext-system"] }
http-cache = { version = "0.20", default-features = false, features = [ http-cache = { version = "0.20", default-features = false, features = [
"cacache",
"cacache-tokio", "cacache-tokio",
"manager-cacache", "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 = [ image = { version = "0.25", default-features = false, features = [
"jpeg", "jpeg",
"png", "png",

View file

@ -49,6 +49,10 @@ else
extra_rustflags = [] extra_rustflags = []
endif 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('MESON_BUILD_ROOT', meson.project_build_root())
cargo_env.set('CARGO_MANIFEST_DIR', meson.project_source_root()) cargo_env.set('CARGO_MANIFEST_DIR', meson.project_source_root())
cargo_env.set('CARGO_TARGET_DIR', meson.project_build_root() / 'target') cargo_env.set('CARGO_TARGET_DIR', meson.project_build_root() / 'target')

6
meson.options Normal file
View file

@ -0,0 +1,6 @@
option(
'moldy',
description: 'use mold',
type: 'boolean',
value:true,
)