RFR: 8311661: Resolve duplicate symbol of StringTable::StringTable with JDK static linking [v2]

Jiangli Zhou jiangli at openjdk.org
Tue Jul 11 05:08:54 UTC 2023


On Tue, 11 Jul 2023 01:34:13 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> Ok, yeah, I'd hate for Thread to get a namespace:: prepended to the million uses of it. Maybe the same approach should be used for StringTable too, since they're solving the same problem. 

`#define` renaming is a good workaround to avoid editing larger number of files and reducing integration/merge issues. Using namespace seems to be a better choice in the JDK mainline. We can also reduce the needed edits with `using`.

> Is there an #if STATIC_LINK or something that surrounds this #define?

We are proposing removing `#ifdef STATIC_BUILD` in https://github.com/jianglizhou/jdk/tree/static-java (not complete). That allows building `.so` and `.a` from the same set of object files.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/14808#issuecomment-1630123619


More information about the hotspot-dev mailing list