Skip to content

Commit a058317

Browse files
committed
fix: add includes needed for mac target
1 parent ab6210c commit a058317

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

build.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,18 @@ const buildDir = path.join(__dirname, 'build')
66
if (!fs.existsSync(buildDir)) {
77
fs.mkdirSync(buildDir, { recursive: true })
88
}
9+
10+
let includes = `-I${path.relative(buildDir, path.join(__dirname, 'deps'))}`
11+
if (process.platform === 'darwin') {
12+
// needed for `#include "common/*.h"` in `src/tools/mac/dump_syms/dump_syms_tool`
13+
includes = includes + ` -I${path.relative(buildDir, path.join(__dirname, 'deps', 'breakpad', 'src'))}`
14+
}
15+
916
spawnSync(path.join(__dirname, 'deps', 'breakpad', 'configure'), [], {
1017
cwd: buildDir,
1118
env: {
1219
...process.env,
13-
CPPFLAGS: `-I${path.relative(buildDir, path.join(__dirname, 'deps'))}`
20+
CPPFLAGS: includes
1421
},
1522
stdio: 'inherit'
1623
})
@@ -22,6 +29,6 @@ if (process.platform === 'darwin') {
2229
targets.push('src/tools/mac/dump_syms/dump_syms_tool')
2330
}
2431

25-
spawnSync('make', ['-C', buildDir, '-j', require('os').cpus().length, ...targets], {
32+
spawnSync('make', [includes, '-C', buildDir, '-j', require('os').cpus().length, ...targets], {
2633
stdio: 'inherit'
2734
})

0 commit comments

Comments
 (0)