Join Nostr
2025-01-13 11:42:00 UTC

Joxean Koret (@matalaz) on Nostr: Does anybody know how to prevent #clang from issuing calls to libc functions like ...

Does anybody know how to prevent #clang from issuing calls to libc functions like `memset` in this case when compiling C programs? I have tried I don't know how many command line arguments to try to disable it but none worked at all.

Here you have an example program in #godbolt: https://godbolt.org/z/jheYoPWzj

These are the command line arguments I've tried to disable it:

-ffreestanding -disable-simplify-libcalls -fno-builtin -nostdinc -nostdlib -fno-builtin-memset -nostdlib++ -nostdinc++

Any idea?