[rcore][android] Document --wrap=fopen linker flag requirements per build system#5624
Conversation
|
Hi @ghera for zig, can you not just add on the list of flags? I do not have the v16 yet so I cannot test it sorry. |
|
@maiconpintoabreu No worries. I hadn’t tried that part earlier because I assumed those were C compiler flags rather than linker flags. I tried using When I get a chance, I’ll try your suggestion and put together a more detailed report covering the different build scenarios. |
|
@ghera thanks for the improvement! Definitely helpful for users dealing with custom build systems! |
|
Hi @maiconpintoabreu, I ran the full Android checks for build.zig, and adding while the expected pattern should be So, based on the symbol evidence, it looks like For static, it remains true that wrapping must be activated at the consumer final link step. Because of that, the Zig warning seems correct: Thanks to your suggestion and the resulting tests, I also found a small issue in the standalone CMake shared build, and I’ll address it in a separate PR. Building |
Follow-up to #5605, addressing @raysan5's suggestion for
// WARNING:comments in code.Adds a comment block before
__real_fopen/__wrap_fopenexplaining how and where-Wl,--wrap=fopenmust be applied for each supported build system, including the behavioral difference between CMake (flag propagates to final app link) and Make (SHARED) (wraps libraylib.so only).Tested on CMake and Make (both SHARED and STATIC). For build.zig, several approaches were attempted but none are available in the std.Build API required by raylib (0.16.0-dev.2349+); this will probably change in the near future, but for now the flag must be passed externally in the final link step.