RESOLVED FIXED144837
[Cocoa] Don't soft link DataDetectorsCore
https://bugs.webkit.org/show_bug.cgi?id=144837
Summary [Cocoa] Don't soft link DataDetectorsCore
Darin Adler
Reported 2015-05-09 18:08:17 PDT
[Cocoa] Don't soft link DataDetectorsCore
Attachments
Patch (317.61 KB, patch)
2015-05-09 18:18 PDT, Darin Adler
no flags
Patch (18.06 KB, patch)
2015-05-09 20:22 PDT, Darin Adler
no flags
Patch (27.47 KB, patch)
2015-05-09 20:26 PDT, Darin Adler
no flags
Patch (21.83 KB, patch)
2015-05-09 20:28 PDT, Darin Adler
no flags
Patch (21.93 KB, patch)
2015-05-10 09:31 PDT, Darin Adler
mitz: review+
Darin Adler
Comment 1 2015-05-09 18:18:44 PDT
Darin Adler
Comment 2 2015-05-09 18:21:38 PDT
I noticed the dlopen for this framework in a profile of the web process when launching Safari. The only thing I am unsure about is whether this will cause some kind of dependency cycle in Apple's build process.
Darin Adler
Comment 3 2015-05-09 18:22:26 PDT
And yes, I am happy to land the project file fixes separate from the DataDetectorsCore change. Won’t be hard to disentangle them.
mitz
Comment 4 2015-05-09 19:48:37 PDT
For this to work, $(SYSTEM_LIBRARY_DIR)/PrivateFrameworks needs to be added to FRAMEWORK_SEARCH_PATHS[sdk=macosx*]. Everything compiles because of the system frameworks include path in OTHER_CFLAGS, but linking is failing.
Darin Adler
Comment 5 2015-05-09 19:50:24 PDT
OK. Xcode had actually added that to the project, and I deleted it by hand, but clearly we would need to add it to the .xcconfig file instead as your syntax implies. I currently have this linking for iOS as well as Mac. I guess we don’t want that. I don’t know how to have a conditional framework in the project file.
mitz
Comment 6 2015-05-09 19:52:48 PDT
(In reply to comment #5) > I currently have this linking for iOS as well as Mac. I guess we don’t want > that. I don’t know how to have a conditional framework in the project file. Good point! It should go in OTHER_LDFLAGS_PLATFORM[sdk=macosx*].
Darin Adler
Comment 7 2015-05-09 20:22:15 PDT
Darin Adler
Comment 8 2015-05-09 20:26:17 PDT
Darin Adler
Comment 9 2015-05-09 20:28:22 PDT
Darin Adler
Comment 10 2015-05-10 09:31:37 PDT
mitz
Comment 11 2015-05-10 10:21:45 PDT
Comment on attachment 252816 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=252816&action=review > Source/WebCore/platform/spi/mac/DataDetectorsSPI.h:27 > +#import "DataDetectorsCoreSPI.h" > #import "SoftLinking.h" This being a framework (private) header I would have expected these to be #import <WebCore/DataDetectorsCoreSPI.h> and #import <WebCore/SoftLinking.h>.
Darin Adler
Comment 12 2015-05-10 11:31:22 PDT
Darin Adler
Comment 13 2015-05-10 11:31:50 PDT
Darin Adler
Comment 14 2015-05-10 13:30:39 PDT
Myles C. Maxfield
Comment 15 2015-05-11 14:45:07 PDT
Upon compiling with ASAN, the "Check For Weak VTables and Externals" step fails with: ERROR: WebCore has a weak external symbol in it (/Volumes/Data/home/mmaxfield/Build/Debug/WebCore.framework/Versions/A/WebCore) ERROR: A weak external symbol is generated when a symbol is defined in multiple compilation units and is also marked as being exported from the library. ERROR: A common cause of weak external symbols is when an inline function is listed in the linker export file. ERROR: symbol _DDHighlightCreateWithRectsInVisibleRectWithStyleAndDirection ERROR: symbol _DDHighlightPointIsOnHighlight It looks like this patch is relevant.
Darin Adler
Comment 16 2015-05-11 17:22:51 PDT
It seems that we need to export the soft-linking symbols to fix that.
mitz
Comment 17 2015-05-11 17:51:02 PDT
(In reply to comment #16) > It seems that we need to export the soft-linking symbols to fix that. I don’t think we can simply export those symbols, because they are named the same as their counterparts in DataDetectors. If we did that, when building a target that links against WebKit and DataDetectors, the static might end up record those symbols as coming from WebKit.
mitz
Comment 18 2015-05-11 17:51:53 PDT
(In reply to comment #17) > (In reply to comment #16) > > It seems that we need to export the soft-linking symbols to fix that. > > I don’t think we can simply export those symbols, because they are named the > same as their counterparts in DataDetectors. If we did that, when building a > target that links against WebKit and DataDetectors, the static might end up > record those symbols as coming from WebKit. Unless we can exclude them from the blanket reexport of WebCore by WebKit.
mitz
Comment 19 2015-05-11 22:09:46 PDT
Is there a downside to not checking for weak vTables and externals when building with ASAN?
Alexey Proskuryakov
Comment 20 2015-05-11 22:19:40 PDT
I do not know if there is anything about ASan that would make a difference, and in fact this doesn't happen on ASan bots, as far as I can tell.
Alexey Proskuryakov
Comment 21 2015-05-15 14:15:19 PDT
Zalan fixed the failure in bug 145070.
Note You need to log in before you can comment on or make changes to this bug.