Commit 9a057a4
committed
build: fix what the sixth node.yml run found
win32 got past the ICU object the fifth run fixed - genccode now writes it as
IMAGE_FILE_MACHINE_I386, and the log confirms it: "genccode: using architecture
cpu=332 bits=32 big-endian=0". Then the linker refused the object it had just
been taught to write:
lld-link : error : /safeseh: ../obj/global_intermediate/icudt78l_dat.obj is
not compatible with SEH [tools\v8_gypfiles\gen-regexp-special-case.vcxproj]
icudt78l_dat.obj is generated DATA. It holds no code, so it has no safe
exception handler table and nothing can give it one; opting out of /SAFESEH is
the only way to link it. That is not a new discovery - node.gyp already carried
ImageHasSafeExceptionHandlers: 'false', restored with 32-bit Windows and
originally from nodejs#25852.
It was in the wrong place. A target_defaults in node.gyp reaches only the
targets NODE.GYP DEFINES, and this object is linked by targets in
tools/v8_gypfiles/v8.gyp and tools/icu/icu-generic.gyp - gen-regexp-special-case
is one of V8's build tools - which never saw the setting. Nothing had to opt
those in before because gyp turns /SAFESEH on BY ITSELF for every x86 link
(safeseh_default = "true" when the arch is x86, in
tools/gyp/pylib/gyp/msvs_emulation.py), and upstream stopped building the one
architecture where that default means anything.
The opt-out moves to common.gypi, scoped to ia32 - the only architecture
/SAFESEH applies to, which the node.gyp copy was not. tools/gyp_node.py passes
common.gypi to gyp with -I, and LoadTargetBuildFile passes its includes down to
every dependency build file it loads (tools/gyp/pylib/gyp/input.py), so one rule
there covers node, V8 and ICU alike.
NOT verified: the build itself, which needs a Windows runner - there is none
here, and the other five jobs of the sixth run are still going, so only win32's
log exists to read. What was checked: that common.gypi and node.gyp are still
valid gyp literals and the ia32 linker condition now reads {'TargetMachine': 1,
'ImageHasSafeExceptionHandlers': 'false'}; that the vendored gyp converts that
to the MSBuild Link setting with no validation errors, which is what MSBuild
turns into /SAFESEH:NO; that gyp really does default /SAFESEH on for x86; and
that gyp really does hand -I includes down to dependency build files, which is
the whole reason common.gypi is the right place for it.
Thanks to xet7 !1 parent ea3fc8a commit 9a057a4
2 files changed
Lines changed: 30 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
| 430 | + | |
405 | 431 | | |
406 | 432 | | |
407 | 433 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
548 | 548 | | |
549 | 549 | | |
550 | 550 | | |
551 | | - | |
552 | | - | |
553 | | - | |
554 | | - | |
555 | | - | |
556 | | - | |
557 | | - | |
558 | | - | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
559 | 555 | | |
560 | 556 | | |
561 | 557 | | |
| |||
0 commit comments