Re: Mark all GUC variable as PGDLLIMPORT
Robert Haas <robertmhaas@gmail.com>
From: Robert Haas <robertmhaas@gmail.com>
To: Andres Freund <andres@anarazel.de>
Cc: Tom Lane <tgl@sss.pgh.pa.us>, Chapman Flack <chap@anastigmatix.net>, Julien Rouhaud <rjuju123@gmail.com>, Michael Paquier <michael@paquier.xyz>, PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Date: 2022-02-15T13:58:05Z
Lists: pgsql-hackers
Attachments
- v1-0001-Dumb-script-to-apply-PGDLLIMPORT-markings.patch (application/octet-stream) patch v1-0001
- v1-0002-Plaster-PGDLLIMPORT-declarations-on-header-files.patch (application/octet-stream) patch v1-0002
On Mon, Feb 14, 2022 at 8:53 PM Andres Freund <andres@anarazel.de> wrote: > > An alternative rule which would dodge that particular issue would be > > to just slap PGDLLIMPORT on every global variable in every header > > file. That would arguably be a simpler rule, though it means even more > > PGDLLIMPORT declarations floating around. > > That would have the advantage of being comparatively easy to check in an > automated way. Might even be cheap enough to just make it part of the build. I wasn't able to quickly write something that was smart enough to use as part of the build, but I wrote something dumb that I think works well enough to use with a little bit of human intelligence alongside. See attached. > But it seems like it'd be a fair amount of work and cause a lot of patch > rebasing pain? If we end up going that way, we should schedule this to happen > just after the feature freeze, I think. We could do that. I'd sort of rather get it done. We still have two weeks before the last CommitFest officially starts, and it's not as if there won't be tons of uncommitted patches floating around after that. > If we consider doing this for all extern variables, we should think about > doing this for headers *and* functions. That'd allow us to get rid of the > fairly complicated logic to generate the .def file for the postgres binary on > windows (src/tools/gendef.pl). And maybe also the related thing on AIX > (src/backend/port/aix/mkldexport.sh) I don't know what you mean by this. -- Robert Haas EDB: http://www.enterprisedb.com
Commits
-
Remove PGDLLIMPORT marker from __pg_log_level
- 8d3341266508 15.0 landed
-
Mark a few 'bbsink' related functions / variables static.
- b5f44225b833 15.0 landed
-
Add some missing PGDLLIMPORT markings
- 5edeb574285e 15.0 landed
-
Apply PGDLLIMPORT markings broadly.
- 8ec569479fc2 15.0 landed
-
Helper script to apply PGDLLIMPORT markings.
- 80900d469091 15.0 landed
-
Simplify declaring variables exported from libpgcommon and libpgport.
- e04a8059a74c 15.0 cited