Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
build: don't strip global symbols of macOS binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
jesec committed May 10, 2021
1 parent a062bb4 commit 5d2bc3b
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions lib/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,14 @@ async function compileOnUnix(

const output = path.join(nodePath, 'out/Release/node');

await spawn(process.env.STRIP || 'strip', [output], {
stdio: 'inherit',
});
await spawn(
process.env.STRIP || 'strip',
// global symbols are required for native bindings on macOS
[...(targetPlatform === 'macos' ? ['-x'] : []), output],
{
stdio: 'inherit',
}
);

if (targetPlatform === 'macos') {
// Newer versions of Apple Clang automatically ad-hoc sign the compiled executable.
Expand Down

0 comments on commit 5d2bc3b

Please sign in to comment.