diff --git a/.github/workflows/CICD.yml b/.github/workflows/CICD.yml index 338787bd6e3..277b15bf236 100644 --- a/.github/workflows/CICD.yml +++ b/.github/workflows/CICD.yml @@ -322,13 +322,13 @@ jobs: disable_search: true flags: makefile,${{ matrix.job.os }} fail_ci_if_error: false - - name: "`make install PROG_PREFIX=uu- PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n`" + - name: "`make install PROG_PREFIX=uu- PROFILE=release-small COMPLETIONS=n MANPAGES=n LOCALES=n`" shell: bash run: | set -x - DESTDIR=/tmp/ make install PROG_PREFIX=uu- PROFILE=release-fast COMPLETIONS=n MANPAGES=n LOCALES=n + DESTDIR=/tmp/ make install PROG_PREFIX=uu- PROFILE=release-small COMPLETIONS=n MANPAGES=n LOCALES=n # Check that utils are built with given profile - ./target/release-fast/true + ./target/release-small/true # Check that the progs have prefix test -f /tmp/usr/local/bin/uu-tty test -f /tmp/usr/local/libexec/uu-coreutils/libstdbuf.* @@ -501,10 +501,10 @@ jobs: - uses: Swatinem/rust-cache@v2 - name: Run sccache-cache uses: mozilla-actions/sccache-action@v0.0.9 - - name: "`make install PROFILE=release-fast`" + - name: "`make install PROFILE=release`" shell: bash run: | - export CARGO_TARGET_DIR=cargo-target RUSTFLAGS="${RUSTFLAGS} -C strip=symbols" PROFILE=release-fast MANPAGES=n COMPLETIONS=n LOCALES=n + export CARGO_TARGET_DIR=cargo-target RUSTFLAGS="${RUSTFLAGS} -C strip=symbols" PROFILE=release MANPAGES=n COMPLETIONS=n LOCALES=n mkdir -p "${CARGO_TARGET_DIR}" && sudo mount -t tmpfs -o noatime,size=16G tmpfs "${CARGO_TARGET_DIR}" make install DESTDIR=target/size-release/ make install COMPLETIONS=n MULTICALL=y LN="ln -vf" DESTDIR=target/size-multi-release/ diff --git a/Cargo.toml b/Cargo.toml index 5b2b1c83c58..c777df55230 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -606,18 +606,19 @@ name = "uudoc" path = "src/bin/uudoc.rs" required-features = ["uudoc"] -# The default release profile with some optimizations. [profile.release] lto = true panic = "abort" - -[profile.release-fast] -inherits = "release" codegen-units = 1 +# FIXME: https://github.com/uutils/coreutils/issues/10654 +[profile.release.package.uu_expand] +codegen-units = 16 +[profile.release.package.uu_unexpand] +codegen-units = 16 # A release-like profile that is as small as possible. [profile.release-small] -inherits = "release-fast" +inherits = "release" opt-level = "z" strip = true diff --git a/README.md b/README.md index f0411f5d220..e0625b2762d 100644 --- a/README.md +++ b/README.md @@ -102,7 +102,7 @@ other Rust program: cargo build --release ``` -Replace `--release` with `--profile=release-fast` or `--profile=release-small` to use all optimizations or save binary size. +Replace `--release` with `--profile=release-small` to optimize binary size. This command builds the most portable common core set of uutils into a multicall (BusyBox-type) binary, named 'coreutils', on most Rust-supported platforms. @@ -155,10 +155,10 @@ To simply build all available utilities (with debug profile): make ``` -In release-fast mode: +In release mode: ```shell -make PROFILE=release-fast +make PROFILE=release ``` To build all but a few of the available utilities: @@ -192,18 +192,12 @@ manpages or shell completion to work, use `GNU Make` or see ### Install with GNU Make -To install all available utilities: +To install all available utilities (PROFILE=release by default): ```shell make install ``` -To install all utilities with all possible optimizations: - -```shell -make PROFILE=release-fast install -``` - To install using `sudo` switch `-E` must be used: ```shell diff --git a/docs/src/packaging.md b/docs/src/packaging.md index ed664863eb3..2ea1696687c 100644 --- a/docs/src/packaging.md +++ b/docs/src/packaging.md @@ -55,17 +55,10 @@ view the full documentation in the We provide three release profiles out of the box, though you may want to tweak them: -- `release`: This is the standard Rust release profile, but with link-time - optimization enabled. It is a balance between compile time, performance and a - reasonable amount of debug info. The main drawback of this profile is that the - binary is quite large (roughly 2x the GNU coreutils). -- `release-fast`: Every setting is tuned for the best performance, at the cost - of compile time. This binary is still quite large. -- `release-small`: Generates the smallest binary possible. This strips _all_ - debug info from the binary, resulting in less informative backtraces. The performance of - this profile is also really good as it is close to the `release-fast` profile, - but with all debuginfo stripped. +- `release`: The profile with all performance optimization enabled. +- `release-small`: Optimize binary size. +They include panic abort which removes stack traces on old rust [https://blog.rust-lang.org/2025/12/11/Rust-1.92.0/]. For the precise definition of these profiles, you can look at the root [`Cargo.toml`](https://github.com/uutils/coreutils/blob/main/Cargo.toml).