Discussed at
|
// TODO(ckerr) this is cribbed from read obj/electron/electron_app.ninja. |
|
// Maybe it would be better to have this script literally open up that |
|
// file and pull cflags_cc from it instead of using bespoke code here? |
|
// I think it's unlikely to work; but if it does, it would be more futureproof |
|
const cxxflags = [ |
|
'-std=c++14', |
|
'-nostdinc++', |
|
`-isystem"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++')}"`, |
|
`-isystem"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++', 'trunk', 'include')}"`, |
|
`-isystem"${path.resolve(BASE, 'buildtools', 'third_party', 'libc++abi', 'trunk', 'include')}"`, |
|
'-fPIC' |
|
].join(' '); |
|
|
|
const ldflags = [ |
|
'-stdlib=libc++', |
|
'-fuse-ld=lld', |
|
`-L"${path.resolve(BASE, 'out', `${utils.getOutDir({ shouldLog: true })}`, 'obj', 'buildtools', 'third_party', 'libc++abi')}"`, |
|
`-L"${path.resolve(BASE, 'out', `${utils.getOutDir({ shouldLog: true })}`, 'obj', 'buildtools', 'third_party', 'libc++')}"`, |
|
'-lc++abi' |
|
].join(' '); |
but not implemented. Would have prevented the need for
41a03a5.
Most importantly, cxxflags -std= and -nostdinc++ are needed.
It's possible that the includes and isystem also need to be pulled in if it's necessary for the chromium/v8 and the 3rd party modules to be built with the same system system headers
Discussed at
electron/script/nan-spec-runner.js
Lines 34 to 53 in d67532e
Most importantly, cxxflags -std= and -nostdinc++ are needed.
It's possible that the includes and isystem also need to be pulled in if it's necessary for the chromium/v8 and the 3rd party modules to be built with the same system system headers