From cd1c63ad71965df6ee95d156fd17271177bd50c8 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Thu, 6 Oct 2022 08:50:00 -0700 Subject: fix(build): don't export all symbols to dynamic symbol table (#16171) Currently, we use `-rdynamic` for exporting Node API symbols to the symbol table. `-rdynamic` will export *all* symbols, that means previously unused functions will not be optimized away introducing a lot of binary bloat. This patch uses `-exported_symbol` and `--export-dynamic-symbol` link flags (not as universal as `-rdynamic`) to only mark Node API symbols to be put in the dynamic symbol table. --- .github/workflows/ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to '.github/workflows') diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2da07b31f..28c9bbdcd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -40,6 +40,7 @@ jobs: - os: ${{ github.repository == 'denoland/deno' && 'ubuntu-20.04-xl' || 'ubuntu-20.04' }} job: test profile: debug + use_sysroot: true - os: ${{ github.repository == 'denoland/deno' && 'ubuntu-20.04-xl' || 'ubuntu-20.04' }} job: lint profile: debug @@ -412,7 +413,7 @@ jobs: # Verify that the binary actually works in the Ubuntu-16.04 sysroot. - name: Check deno binary (in sysroot) - if: matrix.use_sysroot + if: matrix.profile == 'release' && matrix.use_sysroot run: sudo chroot /sysroot "$(pwd)/target/release/deno" --version # TODO(ry): Because CI is so slow on for OSX and Windows, we currently -- cgit v1.2.3