The Zig compiler, very conveniently for us Nix users, automatically detects $NIX_CFLAGS_COMPILE and $NIX_LDFLAGS. This means that when you add a C library to your nix shell, it’s automatically picked up as a system library by @cInclude("...."). This is very cool and I like it a lot ![]()
The new Aro-based Translate-C does not do this, as far as I can tell. Is this something that someone (me) could contribute? Or is this an intentional omission?
I’m opening up a discussion topic on this instead of a github issue because I’m not particularly sure where the detection should go - I see 3 viable places:
- The bit of translate-c that runs during the build script (my favorite of the three)
- The bit of translate-c that runs during build time
- Arocc itself
But again I’m also not sure this patch would be accepted & so I wanted to check in first. I would also appreciate having a person to throw questions at in the process of creating a patch ![]()