Rename the mold package to libmold and mold-cli to mold

To make mold installable with `cargo install mold`, the package that
builds the mold executable must be named `mold`. The library package,
which the per-target crates and the executable depend on, is now
`libmold`.
This commit is contained in:
Rui Ueyama committed 2026-10-07 07:30:19 +09:00
1 parent 1347ca95c9
commit e4e0ad7c92
47 files changed
+249 -249

No files matched your search

+11 -11
View File
@@ -31,12 +31,12 @@ jobs:
cargo check --locked --workspace --all-targets --target powerpc-unknown-linux-gnu
- name: verify all target toolchains are available
run: |
cargo test --locked -p mold-cli --test integration -- --list |
cargo test --locked -p mold --test integration -- --list |
tee "$RUNNER_TEMP/test-inventory.txt"
! grep -q '^unavailable:' "$RUNNER_TEMP/test-inventory.txt"
# All workspace crates were built above. Avoid linking empty test binaries
# for the target crates and command.
- run: cargo test --locked -p mold -p mold-tests -p mold-cli --lib --test integration
- run: cargo test --locked -p libmold -p mold-tests -p mold --lib --test integration
- name: archive test results
uses: actions/upload-artifact@v7
if: failure()
@@ -71,14 +71,14 @@ jobs:
with:
components: rust-src
- run: sudo ./install-test-deps.sh
- run: cargo +nightly build --locked -Zbuild-std --target x86_64-unknown-linux-gnu -p mold-cli --no-default-features --features system-allocator,x86_64
- run: cargo +nightly build --locked -Zbuild-std --target x86_64-unknown-linux-gnu -p mold --no-default-features --features system-allocator,x86_64
- run: |
if [ '${{ matrix.sanitizer }}' = address ]; then
export ASAN_OPTIONS='${{ matrix.runtime-options }}'
else
export TSAN_OPTIONS='${{ matrix.runtime-options }}'
fi
${{ matrix.test-prefix }} cargo +nightly test --locked -Zbuild-std --target x86_64-unknown-linux-gnu -p mold-cli --no-default-features --features system-allocator,x86_64 --test integration -- --native --test-threads 1 --timeout ${{ matrix.test-timeout }}
${{ matrix.test-prefix }} cargo +nightly test --locked -Zbuild-std --target x86_64-unknown-linux-gnu -p mold --no-default-features --features system-allocator,x86_64 --test integration -- --native --test-threads 1 --timeout ${{ matrix.test-timeout }}
- name: archive test results
uses: actions/upload-artifact@v7
if: failure()
@@ -127,8 +127,8 @@ jobs:
- uses: actions/checkout@v6
- run: ./install-test-deps.sh
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --locked -p mold-cli --no-default-features --features x86_64
- run: cargo test --locked -p mold-cli --no-default-features --features x86_64 --test integration -- --native
- run: cargo build --locked -p mold --no-default-features --features x86_64
- run: cargo test --locked -p mold --no-default-features --features x86_64 --test integration -- --native
- name: sanitize distro name
if: failure()
id: sanitize
@@ -146,7 +146,7 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --locked -p mold-cli --no-default-features --features x86_64
- run: cargo build --locked -p mold --no-default-features --features x86_64
build-windows:
runs-on: windows-latest
@@ -154,7 +154,7 @@ jobs:
steps:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@stable
- run: cargo build --locked -p mold-cli --no-default-features --features x86_64
- run: cargo build --locked -p mold --no-default-features --features x86_64
build-msys:
runs-on: windows-latest
@@ -170,7 +170,7 @@ jobs:
install: git
pacboy: rust:p cc:p dlfcn:p
- shell: msys2 {0}
run: cargo build --locked -p mold-cli --no-default-features --features x86_64
run: cargo build --locked -p mold --no-default-features --features x86_64
build-freebsd:
runs-on: ubuntu-latest
@@ -188,5 +188,5 @@ jobs:
run: |
pkg install -y rust
./install-test-deps.sh
cargo build --locked -p mold-cli --no-default-features --features x86_64
cargo test --locked -p mold-cli --no-default-features --features x86_64 --test integration -- --native
cargo build --locked -p mold --no-default-features --features x86_64
cargo test --locked -p mold --no-default-features --features x86_64 --test integration -- --native
+3 -3
View File
@@ -17,11 +17,11 @@ export MSAN_OPTIONS=halt_on_error=1
export CARGO_PROFILE_DEV_OPT_LEVEL=1
# Use instrumentable implementations instead of BLAKE3/Zstd assembly, and
# select mold as well as mold-cli so Cargo enables its dependency features.
# select libmold as well as mold so Cargo enables its dependency features.
args=(
--locked -Zbuild-std --target x86_64-unknown-linux-gnu
--package mold --package mold-cli --no-default-features
--features mold-cli/system-allocator,mold-cli/x86_64,blake3/pure,zstd/no_asm
--package libmold --package mold --no-default-features
--features mold/system-allocator,mold/x86_64,blake3/pure,zstd/no_asm
--test integration
)
cargo +nightly test "${args[@]}" -- --native --test-threads 1 --timeout 60 "$@"
Generated
+166 -166
View File
@@ -193,6 +193,31 @@ dependencies = [
"cc",
]
[[package]]
name = "libmold"
version = "3.0.0"
dependencies = [
"blake3",
"bstr",
"cc",
"cpp_demangle",
"crc32fast",
"flate2",
"getrandom",
"hashbrown",
"libc",
"libz-rs-sys",
"memchr",
"memmap2",
"portable-atomic",
"rayon",
"rustc-demangle",
"uuid",
"xxhash-rust",
"zlib-rs",
"zstd",
]
[[package]]
name = "libz-rs-sys"
version = "0.6.8"
@@ -229,173 +254,8 @@ dependencies = [
name = "mold"
version = "3.0.0"
dependencies = [
"blake3",
"bstr",
"cc",
"cpp_demangle",
"crc32fast",
"flate2",
"getrandom",
"hashbrown",
"libc",
"libz-rs-sys",
"memchr",
"memmap2",
"portable-atomic",
"rayon",
"rustc-demangle",
"uuid",
"xxhash-rust",
"zlib-rs",
"zstd",
]
[[package]]
name = "mold-arch-arm32"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-arm32be"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-arm64"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-arm64be"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-i386"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-loongarch32"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-loongarch64"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-m68k"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-ppc32"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-ppc64v1"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-ppc64v2"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-riscv32"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-riscv32be"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-riscv64"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-riscv64be"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-s390x"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-sh4"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-sh4be"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-sparc64"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-arch-x86_64"
version = "3.0.0"
dependencies = [
"mold",
]
[[package]]
name = "mold-cli"
version = "3.0.0"
dependencies = [
"libmold",
"mimalloc",
"mold",
"mold-arch-arm32",
"mold-arch-arm32be",
"mold-arch-arm64",
@@ -419,6 +279,146 @@ dependencies = [
"mold-tests",
]
[[package]]
name = "mold-arch-arm32"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-arm32be"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-arm64"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-arm64be"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-i386"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-loongarch32"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-loongarch64"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-m68k"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-ppc32"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-ppc64v1"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-ppc64v2"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-riscv32"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-riscv32be"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-riscv64"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-riscv64be"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-s390x"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-sh4"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-sh4be"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-sparc64"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-arch-x86_64"
version = "3.0.0"
dependencies = [
"libmold",
]
[[package]]
name = "mold-tests"
version = "3.0.0"
+2 -2
View File
@@ -1,5 +1,5 @@
[package]
name = "mold"
name = "libmold"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
@@ -24,7 +24,7 @@ license = "MIT"
[workspace.dependencies]
libc = "0.2"
mold = { path = "." }
libmold = { path = "." }
[dependencies]
blake3 = "1.8.7"
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::Arm32>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::Arm32>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::Arm32Be>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::Arm32Be>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::Arm64>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::Arm64>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::Arm64Be>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::Arm64Be>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::I386>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::I386>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::LoongArch32>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::LoongArch32>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::LoongArch64>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::LoongArch64>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::M68k>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::M68k>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::Ppc32>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::Ppc32>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::Ppc64V1>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::Ppc64V1>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::Ppc64V2>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::Ppc64V2>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::Riscv32>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::Riscv32>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::Riscv32Be>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::Riscv32Be>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::Riscv64>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::Riscv64>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::Riscv64Be>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::Riscv64Be>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::S390x>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::S390x>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::Sh4>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::Sh4>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::Sh4Be>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::Sh4Be>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::Sparc64>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::Sparc64>(cmdline)
}
+1 -1
View File
@@ -10,4 +10,4 @@ license.workspace = true
path = "lib.rs"
[dependencies]
mold.workspace = true
libmold.workspace = true
+2 -2
View File
@@ -1,3 +1,3 @@
pub fn link(cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
mold::driver::link::<mold::arch::X86_64>(cmdline)
pub fn link(cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
libmold::driver::link::<libmold::arch::X86_64>(cmdline)
}
+2 -2
View File
@@ -1,5 +1,5 @@
[package]
name = "mold-cli"
name = "mold"
version.workspace = true
edition.workspace = true
rust-version.workspace = true
@@ -17,7 +17,7 @@ harness = false
[dependencies]
mimalloc = { git = "https://github.com/rui314/mimalloc_rust", rev = "3979460494f1cd1e7f936cb8e10f41e927c9f698" }
mold.workspace = true
libmold.workspace = true
mold-arch-x86_64 = { path = "../arch/x86_64", optional = true }
mold-arch-i386 = { path = "../arch/i386", optional = true }
mold-arch-arm32 = { path = "../arch/arm32", optional = true }
+3 -3
View File
@@ -9,7 +9,7 @@
#[global_allocator]
static GLOBAL: mimalloc::MiMalloc = mimalloc::MiMalloc;
type LinkFn = fn(mold::driver::Cmdline) -> mold::driver::LinkResult;
type LinkFn = fn(libmold::driver::Cmdline) -> libmold::driver::LinkResult;
// Each target has its own monomorphized link function. Start with the first
// enabled target and switch to the matching function if the inputs differ.
@@ -56,7 +56,7 @@ const TARGETS: &[(&str, LinkFn)] = &[
("loongarch32", mold_arch_loongarch32::link),
];
fn link_for_target(target: &str, cmdline: mold::driver::Cmdline) -> mold::driver::LinkResult {
fn link_for_target(target: &str, cmdline: libmold::driver::Cmdline) -> libmold::driver::LinkResult {
for &(name, link) in TARGETS {
if name == target {
return link(cmdline);
@@ -74,6 +74,6 @@ fn main() {
std::process::exit(1);
};
let args = std::env::args_os().collect();
let status = mold::driver::main(args, initial_target, link_for_target);
let status = libmold::driver::main(args, initial_target, link_for_target);
std::process::exit(status);
}
+2 -2
View File
@@ -187,7 +187,7 @@ podman run --arch "$arch" -it --rm --userns=host --pids-limit=-1 --network=none
set -e
export CARGO_TARGET_DIR=/build/target
cd /mold
cargo build --release --frozen --config /vendor/config.toml --package mold-cli
cargo build --release --frozen --config /vendor/config.toml --package mold
# Link mold again with the mold just built, so that every release binary
# gets Identical Code Folding (see cli/build.rs). The default linker for
@@ -197,7 +197,7 @@ cargo build --release --frozen --config /vendor/config.toml --package mold-cli
mkdir /build/stage1
cp $CARGO_TARGET_DIR/release/mold /build/stage1
/build/stage1/mold -run cargo rustc --release --frozen --config /vendor/config.toml \
--package mold-cli --bin mold -- -Clink-arg=-Wl,--icf=all
--package mold --bin mold -- -Clink-arg=-Wl,--icf=all
stage=/build/$DEST
DESTDIR=/build PREFIX=/$DEST ./install-mold.sh