| Summary: | Remove warnings caused by export g_config extern definition in WTFConfig.h | ||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | WebKit | Reporter: | Basuke Suzuki <Basuke.Suzuki> | ||||||||||||
| Component: | Platform | Assignee: | Basuke Suzuki <Basuke.Suzuki> | ||||||||||||
| Status: | RESOLVED FIXED | ||||||||||||||
| Severity: | Normal | CC: | annulen, Basuke.Suzuki, don.olmstead, ews-watchlist, gyuyoung.kim, ross.kirsling, ryuan.choi, sergio, stephan.szabo, webkit-bug-importer | ||||||||||||
| Priority: | P2 | Keywords: | InRadar | ||||||||||||
| Version: | WebKit Nightly Build | ||||||||||||||
| Hardware: | Unspecified | ||||||||||||||
| OS: | Unspecified | ||||||||||||||
| Attachments: |
|
||||||||||||||
Created attachment 425813 [details]
PATCH
Comment on attachment 425813 [details] PATCH View in context: https://bugs.webkit.org/attachment.cgi?id=425813&action=review > Source/bmalloc/bmalloc/GigacageConfig.h:38 > +extern "C" BEXPORT Slot g_config[]; This seems like it would work for normal configurations on declspec platforms where bmalloc is built statically into WTF or a higher level. I think bmalloc as a shared library might still get warnings though as we'd presumably get dllimport in WTF. To get around that, we might have to be using something that would be nothing if we're building bmalloc, and equivalent to WTF_EXPORT_PRIVATE when included by WTF or a higher layer. The whole dependency on the item linking to bmalloc providing the space feels unfortunate, but given that the redeclaration warning presumably only happens on platforms using declspec, maybe it'd be easier to just disable the warning since it seems like it's indicative of a possible problem that we don't see in practice. Created attachment 426048 [details]
PATCH
Created attachment 426051 [details]
PATCH
Comment on attachment 426051 [details] PATCH View in context: https://bugs.webkit.org/attachment.cgi?id=426051&action=review > Source/cmake/OptionsPlayStation.cmake:16 > +add_compile_options(-Wno-dll-attribute-on-redeclaration) We should see if using the WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS (or WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS although the former is recommended) macro from WebKitCompilerFlags.cmake will work for this. The above should be fine if it doesn't, but it'll let us get any additional behavior added in the future. (In reply to Stephan Szabo from comment #5) > Comment on attachment 426051 [details] > PATCH > > View in context: > https://bugs.webkit.org/attachment.cgi?id=426051&action=review > > > Source/cmake/OptionsPlayStation.cmake:16 > > +add_compile_options(-Wno-dll-attribute-on-redeclaration) > > We should see if using the WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS (or > WEBKIT_APPEND_GLOBAL_COMPILER_FLAGS although the former is recommended) > macro from WebKitCompilerFlags.cmake will work for this. > > The above should be fine if it doesn't, but it'll let us get any additional > behavior added in the future. Oh, thanks. I've never heard about that macro. Let's see. Created attachment 426077 [details]
PATCH
Created attachment 426104 [details]
PATCH
Committed r276022 (236574@main): <https://commits.webkit.org/236574@main> All reviewed patches have been landed. Closing bug and clearing flags on attachment 426104 [details]. |
Suppress hundreds of warnings while building PlayStation branch. WTF/Headers\wtf/WTFConfig.h:49:36: warning: redeclaration of 'WebConfig::g_config' should not add 'dllimport' attribute [-Wdll-attribute-on-redeclaration] extern "C" WTF_EXPORT_PRIVATE Slot g_config[]; ^ bmalloc/Headers\bmalloc/GigacageConfig.h:38:17: note: previous declaration is here extern "C" Slot g_config[]; ^ 1 warning generated.