Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestWTF tests compilation unit names clash with WTF implementation compilation unit names, causing linker warnings #16858

Conversation

emw-apple
Copy link
Contributor

@emw-apple emw-apple commented Aug 19, 2023

ce7e7da

TestWTF tests compilation unit names clash with WTF implementation compilation unit names, causing linker warnings
https://bugs.webkit.org/show_bug.cgi?id=224860
rdar://problem/77255847

Reviewed by Alexey Proskuryakov.

libWTF.a was being merged into libTestWTF.a, causing a
naming collision that resulted in thousands of warnings like

    Libtool libTestWTF
    /Volumes/.../usr/bin/libtool: warning same member name (AtomString.o) in output file used for input files:

and

    GenerateDSYMFile TestWTF.dSYM
    warning: (x86_64)  could not find object file symbol for symbol __ZNK3WTF10AtomString23convertToASCIILowercaseEv

Instead, move the linkage of libWTF.a down into the TestWTF binary.
Tests in TestWTF can have the same file name as their implementation in
WTF without symbol name collisions, because they are never part of the
same static archive.

* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

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

5d9a883

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  wincairo
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ wpe-wk2
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ§ͺ api-mac βœ… πŸ›  gtk
βœ… πŸ§ͺ ios-wk2-wpt βœ… πŸ§ͺ mac-wk1 βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ api-gtk
βœ… πŸ›  tv βœ… πŸ§ͺ mac-AS-debug-wk2
βœ… πŸ›  tv-sim
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch
βœ… πŸ›  watch-sim

@emw-apple emw-apple self-assigned this Aug 19, 2023
@emw-apple emw-apple added the Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases label Aug 19, 2023
@emw-apple emw-apple force-pushed the eng/TestWTF-tests-compilation-unit-names-clash-with-WTF-implementation-compilation-unit-names-causing-linker-warnings branch from 332c3d6 to 5d9a883 Compare August 19, 2023 02:17
@emw-apple
Copy link
Contributor Author

EWS shows the warning count greatly reduced: The macOS-AppleSilicon-Ventura-Debug-Build-EWS build emitted 79 warnings, compared to a recent build on the same queue that emitted 4814.

Copy link
Contributor

@aproskuryakov aproskuryakov left a comment

Choose a reason for hiding this comment

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

Can't meaningfully review the pbxproj change, but the explanation makes good sense, and the XML diff for it would indeed look something like this.

@emw-apple emw-apple added the merge-queue Applied to send a pull request to merge-queue label Aug 21, 2023
…mpilation unit names, causing linker warnings

https://bugs.webkit.org/show_bug.cgi?id=224860
rdar://problem/77255847

Reviewed by Alexey Proskuryakov.

libWTF.a was being merged into libTestWTF.a, causing a
naming collision that resulted in thousands of warnings like

    Libtool libTestWTF
    /Volumes/.../usr/bin/libtool: warning same member name (AtomString.o) in output file used for input files:

and

    GenerateDSYMFile TestWTF.dSYM
    warning: (x86_64)  could not find object file symbol for symbol __ZNK3WTF10AtomString23convertToASCIILowercaseEv

Instead, move the linkage of libWTF.a down into the TestWTF binary.
Tests in TestWTF can have the same file name as their implementation in
WTF without symbol name collisions, because they are never part of the
same static archive.

* Tools/TestWebKitAPI/TestWebKitAPI.xcodeproj/project.pbxproj:

Canonical link: https://commits.webkit.org/267099@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/TestWTF-tests-compilation-unit-names-clash-with-WTF-implementation-compilation-unit-names-causing-linker-warnings branch from 5d9a883 to ce7e7da Compare August 21, 2023 18:28
@webkit-commit-queue
Copy link
Collaborator

Committed 267099@main (ce7e7da): https://commits.webkit.org/267099@main

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

@webkit-commit-queue webkit-commit-queue merged commit ce7e7da into WebKit:main Aug 21, 2023
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Aug 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Tools / Tests Tools in the Tools directory, build issues, test infrastructure, and bugs in test cases
Projects
None yet
5 participants