Skip to content

Fix Utf16::codepoint linking on modern gcc - #1451

Merged
Aidan63 merged 1 commit into
HaxeFoundation:masterfrom
tobil4sk:fix/utf16-codepoint-link-error
Oct 31, 2026
Merged

Aidan63 merged 1 commit into
HaxeFoundation:masterfrom
tobil4sk:fix/utf16-codepoint-link-error

Conversation

@tobil4sk

@tobil4sk tobil4sk commented Oct 31, 2026 •

Copy link
Copy Markdown
Member

It looks like in (at least) gcc 15+, the inline allows for the function definition to be omitted from linking altogether. This causes linking errors if another file calls it, as is the case in TestUtf16 in the native tests.

We didn't see this in ci before because it was using ubuntu 24.04, which ran gcc 13.

I did this in #1306 in an attempt to improve performance, but I guess it is not valid if other translation units can't see the inline definition. EDIT: I think this is the relevant part of the standard:
https://github.com/cplusplus/draft/blob/d4d6f38143c1b495aa33b2e5de0e0ec2daa173ca/source/declarations.tex#L1140-L1144

It looks like in (at least) gcc 15+, the inline allows for the function
definition to be omitted from linking altogether. This causes linking
errors if another file calls it, as is the case in TestUtf16 in the
native tests.

We didn't see this in ci before because it was using ubuntu 24.04, which
ran gcc 13.
@Aidan63
Aidan63 merged commit c9892dc into HaxeFoundation:master Oct 31, 2026
61 checks passed
@tobil4sk
tobil4sk deleted the fix/utf16-codepoint-link-error branch October 31, 2026 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants