WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
247206
[GLib] Improvements for generate-api-header.py
https://bugs.webkit.org/show_bug.cgi?id=247206
Summary
[GLib] Improvements for generate-api-header.py
Michael Catanzaro
Reported
2022-10-28 11:28:20 PDT
generate-api-header.py has worked well enough so far, but there are a few problems: * It cannot expand USE(2022_GLIB_API) because its regex cannot handle underscores, and only handles flag names where all alphabetical characters occur before all numeric characters. The regex should be more permissive * It expands USE(FOO) to WTF_USE_FOO, but only HAVE(FOO) flags should receive the WTF_ prefix * It doesn't handle ENABLE_ at all * It translates FOO(BAR) to FOO_BAR, but we really want it to be translated to "defined(FOO_BAR) && FOO_BAR" because unifdef will ignore any directive that it cannot fully evaluate, leaving unwanted guards in the generated headers.
Attachments
Add attachment
proposed patch, testcase, etc.
Michael Catanzaro
Comment 1
2022-10-30 06:26:11 PDT
(In reply to Michael Catanzaro from
comment #0
)
> * It expands USE(FOO) to WTF_USE_FOO, but only HAVE(FOO) flags should > receive the WTF_ prefix
This actually doesn't matter, since we control exactly which defines get passed to unifdef, and unifdef is supposed to remove them all. Since our normal build flags are not used, there is no requirement to expand things exactly the same way that the rest of the build would.
Michael Catanzaro
Comment 2
2022-10-30 06:59:09 PDT
Pull request:
https://github.com/WebKit/WebKit/pull/5943
EWS
Comment 3
2022-11-07 07:23:00 PST
Committed
256403@main
(40b3dbe8a327): <
https://commits.webkit.org/256403@main
> Reviewed commits have been landed. Closing PR #5943 and removing active labels.
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