Skip to content

Fix stale library objects when flags change - #1450

Merged
Simn merged 5 commits into
HaxeFoundation:masterfrom
tobil4sk:fix/libs-depend-options
Oct 31, 2026
Merged

Simn merged 5 commits into
HaxeFoundation:masterfrom
tobil4sk:fix/libs-depend-options

Conversation

@tobil4sk

Copy link
Copy Markdown
Member

Now if you rebuild a project that uses RegExp with -D disable-unicode-strings, you don't get linking errors due to RegExp.o being stale. This is demonstrated with the test. It should also apply to other flags. This closes #922.

The fix is adapted from #1420.

tobil4sk and others added 5 commits October 31, 2026 12:02
Paves the way for more tools tests
The libraries may need to be recompiled as some flags in Options.txt
affect whether functions in hxcpp.h are inline. In the case of
hxcpp_regexp, hxcpp_smart_strings affects whether it will use pcre2-16
symbols.
import changes the relative directory, which means Options.txt is no
longer relative to the original Build.xml. include doesn't change it, so
we can use it instead.
Previously, compiling hxcpp_regexp once with smart strings and again
without would lead to a stale RegExp.o that still referenced pcre2-16
symbols. This test ensures it is now working properly, since
hxcpp_regexp now tracks Options.txt changes.
@Simn
Simn merged commit f5142e8 into HaxeFoundation:master Oct 31, 2026
60 of 61 checks passed
@tobil4sk
tobil4sk deleted the fix/libs-depend-options branch October 31, 2026 18:04
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.

Linking fails on pcre16_* functions

3 participants