You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If you build raylib with src/Makefile, with PLATFORM_WEB and DEBUG, you will notice following warning:
emcc: warning: linker setting ignored during compilation: 'ASSERTIONS' [-Wunused-command-line-argument]
This is because Makefile adds -sASSERTIONS=1 to CFLAGS despite that this is not a compiler option but a linker option. This is not severe at all, but I wonder if said flag hasn't been misused. Currently it has no effect at all.
It probably would be better to use -sASSERTIONS=1 as part of LDFLAGS. Makefile never links when building for WEB, since it can't create shared library for WEB, but someone may still query it for LDFLAGS (this is how I'm building and linking my project actually).
Anyway, I could quickly fix it and propose PR but there are more Makefiles than the one in src/ that also have this issue [SEE DOWN BELOW]. Let me know what do you think before taking care of this. The are actually some Makefiles that properly set it to LDFLAGS, but most do not [SEE DOWN BELOW].
Environment
~ $ uname -a
Linux MAL200424 6.12.9-arch1-1 #1 SMP PREEMPT_DYNAMIC Fri, 10 Jan 2025 00:39:41 +0000 x86_64 GNU/Linux~ $ emcc --version
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.1.72-git (437140d149d9c977ffc8b09dbaf9b0f5a02db190)
If you build raylib with src/Makefile, with PLATFORM_WEB and DEBUG, you will notice following warning:
This is because Makefile adds -sASSERTIONS=1 to CFLAGS despite that this is not a compiler option but a linker option. This is not severe at all, but I wonder if said flag hasn't been misused. Currently it has no effect at all.
It probably would be better to use -sASSERTIONS=1 as part of LDFLAGS. Makefile never links when building for WEB, since it can't create shared library for WEB, but someone may still query it for LDFLAGS (this is how I'm building and linking my project actually).
Anyway, I could quickly fix it and propose PR but there are more Makefiles than the one in src/ that also have this issue [SEE DOWN BELOW]. Let me know what do you think before taking care of this. The are actually some Makefiles that properly set it to LDFLAGS, but most do not [SEE DOWN BELOW].
Environment
Code Example
repro and outcome:
all files affected by this issue:
files NOT affected:
The text was updated successfully, but these errors were encountered: