[webkit-dev] unified sources build + forwarding headers that are copies
Konstantin Tokarev
annulen at yandex.ru
Fri Nov 17 04:16:14 PST 2017
14.11.2017, 14:54, "Salisbury, Mark" <mark.salisbury at hp.com>:
> Hello,
>
> I’m building on Windows (WPE platform, perhaps I’m the first to try this!) and I’m seeing some compile errors that I believe are arising from previously untested combinations of source files.
>
> If I understand unified sources build correctly, it uses a large list of files and then arranges them into groups, 8 files at a time. If I have a slightly different set of files than is standard, or if someone adds a new source file, the combinations of files can change. If the same header file is included twice (and forwarding header file is a copy of the original), this causes duplicate definitions / compile errors.
Huh, this seems to be a consequence of our conversion to #pragma once
>
> My question is – is there a right / ideal way to fix these conflicts?
>
> d:\git\webkit-org\source\javascriptcore\runtime\ArrayBufferSharingMode.h is included twice, the first time, via the real path, the second time, via a JavaScriptCore forwarding header. Note that this forwarding header is a copy of the header file, not a pointer/alias to the real header path.
>
> The code that creates the forwarding header version comes from D:\git\webkit-org\Source\JavaScriptCore\PlatformWin.cmake (see xcopy around line 40).
>
> Do non-windows ports use a more intelligent method (a pointer, not a file copy) for creating forwarding headers for JavaScriptCore includes?
>
> Is the windows build the only one to use unified sources currently?
>
> Source/WebKit/Scripts/generate-forwarding-headers.pl scans .c|.cpp files for forwarding headers that need to be created and creates a header ‘pointer’ to the real path, so both paths could be included (forwarding header vs. real) and there would be no conflict, because ultimately, only the real header is included.
>
> So I guess I’m suggesting to use a forwarding header ‘pointer’ instead of header file xcopy, which would mean running a script that recurses directories in javascriptcore and creates forwarding headers. That would mean no duplicate header file name would be allowed in JavaScriptCore – I don’t think that’s a problem though. (I don’t really like the idea of grep’ing all webcore to create forwarding headers where needed, grep’ing webcore gets expensive) . Just wondering if there are other suggestions.
>
> Thanks,
>
> Mark
>
> (Personally I don’t like forwarding headers but that’s another topic… not sure if the benefits outweigh associated problems)
>
> D:\git\webkit-org\WebKitBuild\Debug\DerivedSources\WebCore\unified-sources\UnifiedSource180.cpp
>
> Turned on ‘show includes’, you can see the two ways I get to the same header file:
>
> First source file including ArrayBufferSharingMode.h:
>
> 1>Note: including file: D:\git\webkit-org\Source\WebCore\css/DOMMatrix.cpp
>
> 1>Note: including file: D:\git\webkit-org\Source\WebCore\config.h
>
> 1>Note: including file: d:\git\webkit-org\source\webcore\css\DOMMatrix.h
>
> 1>Note: including file: d:\git\webkit-org\source\webcore\css\DOMMatrixReadOnly.h
>
> 1>Note: including file: d:\git\webkit-org\source\webcore\css\DOMMatrixInit.h
>
> 1>Note: including file: d:\git\webkit-org\source\webcore\css\DOMMatrix2DInit.h
>
> 1>Note: including file: D:\git\webkit-org\Source\WebCore\bindings\js\ScriptWrappable.h
>
> 1>Note: including file: D:\git\webkit-org\Source\JavaScriptCore\heap/Weak.h
>
> 1>Note: including file: D:\git\webkit-org\Source\WebCore\platform\graphics\transforms\TransformationMatrix.h
>
> 1>Note: including file: D:\git\webkit-org\Source\WebCore\platform\graphics\FloatPoint.h
>
> 1>Note: including file: d:\git\webkit-org\source\webcore\platform\graphics\FloatSize.h
>
> 1>Note: including file: d:\git\webkit-org\source\webcore\platform\graphics\IntPoint.h
>
> 1>Note: including file: d:\git\webkit-org\source\webcore\platform\graphics\IntSize.h
>
> 1>Note: including file: D:\git\webkit-org\Source\WebCore\platform\graphics\FloatPoint3D.h
>
> 1>Note: including file: D:\git\webkit-org\Source\JavaScriptCore\runtime/Float32Array.h
>
> 1>Note: including file: d:\git\webkit-org\source\javascriptcore\runtime\TypedArrays.h
>
> 1>Note: including file: d:\git\webkit-org\source\javascriptcore\runtime\GenericTypedArrayView.h
>
> 1>Note: including file: d:\git\webkit-org\source\javascriptcore\runtime\ArrayBuffer.h
>
> 1>Note: including file: d:\git\webkit-org\source\javascriptcore\runtime\ArrayBufferSharingMode.h
>
> Second source file including ArrayBufferSharingMode.h:
>
> 1>Note: including file: D:\git\webkit-org\Source\WebCore\css/DOMMatrixReadOnly.cpp
>
> 1>Note: including file: D:\git\webkit-org\Source\WebCore\config.h
>
> 1>Note: including file: d:\git\webkit-org\source\webcore\css\CSSToLengthConversionData.h
>
> 1>Note: including file: D:\git\webkit-org\Source\WebCore\dom\DOMPoint.h
>
> 1>Note: including file: d:\git\webkit-org\source\webcore\dom\DOMPointReadOnly.h
>
> 1>Note: including file: d:\git\webkit-org\source\webcore\dom\DOMPointInit.h
>
> 1>Note: including file: d:\git\webkit-org\source\webcore\css\TransformFunctions.h
>
> 1>Note: including file: D:\git\webkit-org\Source\WebCore\platform\graphics\transforms\TransformOperations.h
>
> 1>Note: including file: D:\git\webkit-org\Source\WebCore\platform\graphics\LayoutSize.h
>
> 1>Note: including file: d:\git\webkit-org\source\webcore\platform\graphics\transforms\TransformOperation.h
>
> 1>Note: including file: D:\git\webkit-org\WebKitBuild\Debug\DerivedSources\ForwardingHeaders\JavaScriptCore/GenericTypedArrayViewInlines.h
>
> 1>Note: including file: d:\git\webkit-org\webkitbuild\debug\derivedsources\forwardingheaders\javascriptcore\GenericTypedArrayView.h
>
> 1>Note: including file: d:\git\webkit-org\webkitbuild\debug\derivedsources\forwardingheaders\javascriptcore\ArrayBuffer.h
>
> 1>Note: including file: d:\git\webkit-org\webkitbuild\debug\derivedsources\forwardingheaders\javascriptcore\ArrayBufferSharingMode.h
>
> ,
>
> _______________________________________________
> webkit-dev mailing list
> webkit-dev at lists.webkit.org
> https://lists.webkit.org/mailman/listinfo/webkit-dev
--
Regards,
Konstantin
More information about the webkit-dev
mailing list