mirror of
https://github.com/denoland/deno.git
synced 2025-03-03 17:34:47 -05:00
perf: full LTO in sysroot (#27771)
Decreases binary size by ~15MB on Linux ``` $ du -h ./deno # full LTO 122M ./deno $ du -h $(which deno) # thin LTO, canary 137M /usr/bin/deno ```
This commit is contained in:
parent
773825aeb9
commit
f175b5b50f
2 changed files with 2 additions and 6 deletions
4
.github/workflows/ci.generate.ts
vendored
4
.github/workflows/ci.generate.ts
vendored
|
@ -130,9 +130,7 @@ cat /sysroot/.env
|
|||
# to build because the object formats are not compatible.
|
||||
echo "
|
||||
CARGO_PROFILE_BENCH_INCREMENTAL=false
|
||||
CARGO_PROFILE_BENCH_LTO=false
|
||||
CARGO_PROFILE_RELEASE_INCREMENTAL=false
|
||||
CARGO_PROFILE_RELEASE_LTO=false
|
||||
RUSTFLAGS<<__1
|
||||
-C linker-plugin-lto=true
|
||||
-C linker=clang-${llvmVersion}
|
||||
|
@ -156,7 +154,7 @@ RUSTDOCFLAGS<<__1
|
|||
$RUSTFLAGS
|
||||
__1
|
||||
CC=/usr/bin/clang-${llvmVersion}
|
||||
CFLAGS=-flto=thin $CFLAGS
|
||||
CFLAGS=$CFLAGS
|
||||
" > $GITHUB_ENV`,
|
||||
};
|
||||
|
||||
|
|
4
.github/workflows/ci.yml
vendored
4
.github/workflows/ci.yml
vendored
|
@ -307,9 +307,7 @@ jobs:
|
|||
# to build because the object formats are not compatible.
|
||||
echo "
|
||||
CARGO_PROFILE_BENCH_INCREMENTAL=false
|
||||
CARGO_PROFILE_BENCH_LTO=false
|
||||
CARGO_PROFILE_RELEASE_INCREMENTAL=false
|
||||
CARGO_PROFILE_RELEASE_LTO=false
|
||||
RUSTFLAGS<<__1
|
||||
-C linker-plugin-lto=true
|
||||
-C linker=clang-19
|
||||
|
@ -333,7 +331,7 @@ jobs:
|
|||
$RUSTFLAGS
|
||||
__1
|
||||
CC=/usr/bin/clang-19
|
||||
CFLAGS=-flto=thin $CFLAGS
|
||||
CFLAGS=$CFLAGS
|
||||
" > $GITHUB_ENV
|
||||
- name: Remove macOS cURL --ipv4 flag
|
||||
run: |-
|
||||
|
|
Loading…
Add table
Reference in a new issue