Skip to content

Commit

Permalink
build: statically link against libgcc and libstdc++ on Alpine
Browse files Browse the repository at this point in the history
  • Loading branch information
jesec committed Apr 12, 2021
1 parent 3cbaf49 commit b0c3336
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,13 @@ function getConfigureArgs(major: number): string[] {
// against packaged apps, hence v8_inspector is useless
args.push('--without-inspector');

// https://github.com/mhart/alpine-node/blob/base-7.4.0/Dockerfile#L33
if (hostPlatform === 'alpine') {
// https://github.com/mhart/alpine-node/blob/base-7.4.0/Dockerfile#L33
args.push('--without-snapshot');

// Statically Link against libgcc and libstdc++ libraries. See vercel/pkg#555.
// libgcc and libstdc++ grant GCC Runtime Library Exception of GPL
args.push('--partly-static');
}

// Link Time Optimization
Expand Down

0 comments on commit b0c3336

Please sign in to comment.