WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
224462
Remove warnings caused by export g_config extern definition in WTFConfig.h
https://bugs.webkit.org/show_bug.cgi?id=224462
Summary
Remove warnings caused by export g_config extern definition in WTFConfig.h
Basuke Suzuki
Reported
2021-04-12 17:03:32 PDT
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.
Attachments
PATCH
(1.58 KB, patch)
2021-04-12 17:12 PDT
,
Basuke Suzuki
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
PATCH
(2.95 KB, patch)
2021-04-14 14:51 PDT
,
Basuke Suzuki
no flags
Details
Formatted Diff
Diff
PATCH
(1.75 KB, patch)
2021-04-14 14:55 PDT
,
Basuke Suzuki
no flags
Details
Formatted Diff
Diff
PATCH
(1.78 KB, patch)
2021-04-14 23:31 PDT
,
Basuke Suzuki
ews-feeder
: commit-queue-
Details
Formatted Diff
Diff
PATCH
(1.78 KB, patch)
2021-04-15 07:56 PDT
,
Basuke Suzuki
no flags
Details
Formatted Diff
Diff
Show Obsolete
(4)
View All
Add attachment
proposed patch, testcase, etc.
Basuke Suzuki
Comment 1
2021-04-12 17:12:02 PDT
Created
attachment 425813
[details]
PATCH
Stephan Szabo
Comment 2
2021-04-12 18:20:11 PDT
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.
Basuke Suzuki
Comment 3
2021-04-14 14:51:41 PDT
Created
attachment 426048
[details]
PATCH
Basuke Suzuki
Comment 4
2021-04-14 14:55:54 PDT
Created
attachment 426051
[details]
PATCH
Stephan Szabo
Comment 5
2021-04-14 16:55:01 PDT
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.
Basuke Suzuki
Comment 6
2021-04-14 17:38:51 PDT
(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.
Basuke Suzuki
Comment 7
2021-04-14 23:31:22 PDT
Created
attachment 426077
[details]
PATCH
Basuke Suzuki
Comment 8
2021-04-15 07:56:15 PDT
Created
attachment 426104
[details]
PATCH
EWS
Comment 9
2021-04-15 08:48:18 PDT
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]
.
Radar WebKit Bug Importer
Comment 10
2021-04-15 08:49:16 PDT
<
rdar://problem/76705157
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug