Skip to content

Unified build failure when compiling for iOS simulator debug - #75650

Merged
webkit-commit-queue merged 1 commit into
WebKit:mainfrom
jyavenard:eng/Unified-build-failure-when-compiling-for-iOS-simulator-debug
Oct 2, 2026
Merged

webkit-commit-queue merged 1 commit into
WebKit:mainfrom
jyavenard:eng/Unified-build-failure-when-compiling-for-iOS-simulator-debug

Conversation

@jyavenard

@jyavenard jyavenard commented Oct 2, 2026 •

Copy link
Copy Markdown
Member

720bc3a

Unified build failure when compiling for iOS simulator debug
https://bugs.webkit.org/show_bug.cgi?id=326068
rdar://188997830

Reviewed by Youenn Fablet.

JSObject.h defines JSObject::setStructure() inline, and it calls
JSCell::setStructure(), which is only defined, always-inline in release, in
JSCellInlines.h. The cmake build emits every inline function in a prefix
header into a PCH object (-fpch-codegen). WebCorePrefix.h includes JSObject.h
but not JSCellInlines.h, so each WebCore PCH object referenced a
JSCell::setStructure() that no object file defines. The release iOS build
failed to link with an undefined symbol
`JSC::JSCell::setStructure(JSC::VM&, JSC::Structure*)`.

Move the definition of JSObject::setStructure() to StructureCreateInlines.h,
next to JSObject::didBecomePrototype(), which calls it. Declare it inline in
JSObject.h, have JSObjectInlines.h include StructureCreateInlines.h, and have
the bindings generator include StructureCreateInlines.h in constructors that
call setSubclassStructureIfNeeded().

* Source/JavaScriptCore/runtime/JSObject.h:
(JSC::JSObject::setStructure): Deleted.
* Source/JavaScriptCore/runtime/JSObjectInlines.h:
* Source/JavaScriptCore/runtime/StructureCreateInlines.h:
(JSC::JSObject::setStructure):
* Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
* Source/WebCore/bindings/scripts/test/JS/JSExposedToWorkerAndWindow.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestLegacyFactoryFunction.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp:
* Source/WebCore/dom/ios/MouseEventIOS.cpp:

Canonical link: https://commits.webkit.org/322499@main

f1fc211

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows Apple Internal
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ⏳ 🛠 win ✅ 🛠 ios-apple
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug   🧪 wpe-wk2 ⏳ 🧪 win-tests ✅ 🛠 mac-apple
✅ 🧪 webkitperl ⏳ 🧪 ios-wk2 ⏳ 🧪 api-mac   🧪 api-wpe ✅ 🛠 vision-apple
✅ 🧪 ios-wk2-wpt ⏳ 🧪 api-mac-debug loading 🧪 jsc-wpe
✅ 🧪 jsc-x86-64 ⏳ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk3-gcc
✅ 🛠 🧪 jsc-debug-arm64 ⏳ 🛠 ios-safer-cpp ⏳ 🧪 mac-AS-debug-wk2 ✅ 🛠 gtk
✅ 🛠 vision ⏳ 🧪 gtk-wk2
✅ 🛠 🧪 merge ✅ 🛠 vision-sim ⏳ 🧪 mac-intel-wk2 ✅ 🧪 api-gtk
✅ 🧪 vision-wk2 ⏳ 🛠 mac-safer-cpp ✅ 🛠 playstation
✅ 🛠 tv ✅ 🧪 mac-site-isolation
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@jyavenard
jyavenard requested review from a team, cdumez and rniwa as code owners October 2, 2026 12:23
@jyavenard jyavenard self-assigned this Oct 2, 2026
@jyavenard jyavenard added the New Bugs Unclassified bugs are placed in this component until the correct component can be determined. label Oct 2, 2026
@jyavenard
jyavenard force-pushed the eng/Unified-build-failure-when-compiling-for-iOS-simulator-debug branch from df46d3d to f1fc211 Compare October 2, 2026 12:47

@youennf youennf left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.
I wonder whether we should not move JSObject::setStructure and JSObject::didBecomePrototype to JSObjectInlines.h instead.

@jyavenard

Copy link
Copy Markdown
Member Author

I wonder whether we should not move JSObject::setStructure and JSObject::didBecomePrototype to JSObjectInlines.h instead.

I tried that already

StructureCreateInlines.h doesn't include JSObjectInlines.h, so any file that included StructureCreateInlines.h but not JSObjectInlines.h called setStructure without its body. The build failed when linking libWebCoreTestSupport.dylib in a similar fashion as the bug description.
So moving it to StructureCreateInlines.h was the least intrusive patch.

@jyavenard

Copy link
Copy Markdown
Member Author

LGTM. I wonder whether we should not move JSObject::setStructure and JSObject::didBecomePrototype to JSObjectInlines.h instead.

and it created a an include cycle:

  • StructureCreateInlines.h would include JSObjectInlines.h.
  • JSObjectInlines.h includes StructureInlines.h.
  • StructureInlines.h includes StructureCreateInlines.h (line 38).

@jyavenard jyavenard added the merge-queue Applied to send a pull request to merge-queue label Oct 2, 2026
@webkit-commit-queue
webkit-commit-queue force-pushed the eng/Unified-build-failure-when-compiling-for-iOS-simulator-debug branch from f1fc211 to b1ef4a2 Compare October 2, 2026 15:02
https://bugs.webkit.org/show_bug.cgi?id=326068
rdar://188997830

Reviewed by Youenn Fablet.

JSObject.h defines JSObject::setStructure() inline, and it calls
JSCell::setStructure(), which is only defined, always-inline in release, in
JSCellInlines.h. The cmake build emits every inline function in a prefix
header into a PCH object (-fpch-codegen). WebCorePrefix.h includes JSObject.h
but not JSCellInlines.h, so each WebCore PCH object referenced a
JSCell::setStructure() that no object file defines. The release iOS build
failed to link with an undefined symbol
`JSC::JSCell::setStructure(JSC::VM&, JSC::Structure*)`.

Move the definition of JSObject::setStructure() to StructureCreateInlines.h,
next to JSObject::didBecomePrototype(), which calls it. Declare it inline in
JSObject.h, have JSObjectInlines.h include StructureCreateInlines.h, and have
the bindings generator include StructureCreateInlines.h in constructors that
call setSubclassStructureIfNeeded().

* Source/JavaScriptCore/runtime/JSObject.h:
(JSC::JSObject::setStructure): Deleted.
* Source/JavaScriptCore/runtime/JSObjectInlines.h:
* Source/JavaScriptCore/runtime/StructureCreateInlines.h:
(JSC::JSObject::setStructure):
* Source/WebCore/bindings/scripts/CodeGeneratorJS.pm:
(GenerateConstructorDefinition):
* Source/WebCore/bindings/scripts/test/JS/JSExposedToWorkerAndWindow.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestEventConstructor.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestInterface.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestLegacyFactoryFunction.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestNode.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestObj.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructors.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestOverloadedConstructorsWithSequence.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestPromiseRejectionEvent.cpp:
* Source/WebCore/bindings/scripts/test/JS/JSTestTypedefs.cpp:
* Source/WebCore/dom/ios/MouseEventIOS.cpp:

Canonical link: https://commits.webkit.org/322499@main
@webkit-commit-queue
webkit-commit-queue force-pushed the eng/Unified-build-failure-when-compiling-for-iOS-simulator-debug branch from b1ef4a2 to 720bc3a Compare October 2, 2026 15:04
@webkit-commit-queue

Copy link
Copy Markdown
Collaborator

Committed 322499@main (720bc3a): https://commits.webkit.org/322499@main

Reviewed commits have been landed. Closing PR #75650 and removing active labels.

@webkit-commit-queue
webkit-commit-queue merged commit 720bc3a into WebKit:main Oct 2, 2026
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Oct 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

New Bugs Unclassified bugs are placed in this component until the correct component can be determined.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants