Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
Description
Discussed at
electron/script/nan-spec-runner.js
Lines 34 to 53 in d67532e
| // 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(' '); |
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
Projects
- StatusShow more project fieldsFixed for Next Release
Activity
ckerr commentedon Jul 27, 2022
I'm not sure how to proceed with this ticket:
The original scope was to sync cflags between the Electron build and the specs. In that situation where we know the build sandbox is available, we could do something like
gn desc /path/to/src/out //electron:electron_app cflags_ccto pull out the build cflags.But it looks like there's also the question of syncing it between Electron and
electron-rebuildas discussed at electron/rebuild#1022 which maybe makes things a little more complicated? I'm not aware of a good way to shuttle these cflags (e.g. --std=c++17 vs --std=c++14) from Electron to electron-rebuild so that they'll be in sync.Options:
Maybe someone has an idea of how to cleanly sync between
electron/electronandelectron/electron-rebuild. (@MarshallOfSound? @nornagon?)If all else fails, we could hardcode everything to
--std=c++17. V8 FTBFS without that flag, so it's a hard requirement for E20. That would unblock this issue for E20 (it's marked asblocks-stable) and would clear us until Chromium starts using `--std=c++20 sometime in 2025 😄, but it's not as satisfying as a non-hardcoded fix.github-actions commentedon Oct 26, 2022
This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!
github-actions commentedon Nov 26, 2022
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.
Govind-gupta75 commentedon Dec 13, 2022
bump