build: statically link against libgcc and libstdc++ on Alpine

Bug: vercel/pkg#555
This commit is contained in:
Jesse Chan 2021-04-12 20:31:08 +08:00
parent 07b80947e2
commit 21ab8a26c8

View File

@ -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