Skip to content

build: extract ninja cflags_cc from electron_app.ninja in spec runners #34209

Description

@ckerr

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

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions