Skip to content

Commit

Permalink
Use the new naming format for snapshots on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiou87 committed Nov 22, 2022
1 parent f54276d commit 6b696d6
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion script/lib/generate-startup-snapshot.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,10 +322,20 @@ module.exports = function(packagedAppPath) {

const snapshotBinaries = ['v8_context_snapshot.bin', 'snapshot_blob.bin'];
for (let snapshotBinary of snapshotBinaries) {
const destinationPath = path.join(
let destinationPath = path.join(
startupBlobDestinationPath,
snapshotBinary
);
if (
process.platform === 'darwin' &&
snapshotBinary === 'v8_context_snapshot.bin'
) {
// TODO: check if we're building for arm64 and use the arm64 version of the binary
destinationPath = path.join(
startupBlobDestinationPath,
'v8_context_snapshot.x86_64.bin'
);
}
console.log(`Moving generated startup blob into "${destinationPath}"`);
try {
fs.unlinkSync(destinationPath);
Expand Down

0 comments on commit 6b696d6

Please sign in to comment.