RESOLVED FIXED 224812
gtest.a exports symbols, causing link-time warning: direct access in function ... means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings.
https://bugs.webkit.org/show_bug.cgi?id=224812
Summary gtest.a exports symbols, causing link-time warning: direct access in function...
Kimmo Kinnunen
Reported 2021-04-20 06:46:24 PDT
gtest.a exports symbols, causing link-time warning: direct access in function ... means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings. ld: warning: direct access in function 'testing::internal::SuiteApiResolver<testing::internal::(anonymous namespace)::FailureTest>::GetSetUpCaseOrSuite(char const*, int)' from file '/Users/kkinnunen/Build/Debug/libgtest.a(gtest-all.o)' to global weak symbol 'testing::Test::SetUpTestSuite()' from file '/Users/kkinnunen/Build/Debug/libTestWTF.a(AtomString.o)' means the weak symbol cannot be overridden at runtime. This was likely caused by different translation units being compiled with different visibility settings. This is due to gtest.a static library is being compiled with dynamic library settings. This causes the symbols to be marked as default visibility. This is being worked around by hiding the symbols explicitly via ld flags This causes ld warning.
Attachments
Patch (6.82 KB, patch)
2021-04-20 07:04 PDT, Kimmo Kinnunen
no flags
Kimmo Kinnunen
Comment 1 2021-04-20 07:00:49 PDT
Kimmo Kinnunen
Comment 2 2021-04-20 07:04:33 PDT
EWS
Comment 3 2021-04-20 15:06:25 PDT
Committed r276319 (236800@main): <https://commits.webkit.org/236800@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 426544 [details].
Ling Ho
Comment 4 2021-04-23 02:45:56 PDT
Note You need to log in before you can comment on or make changes to this bug.