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
For example on FreeBSD, because #2876 is not done yet, zig tries to call the system C compiler to find out where certain libraries and paths are. Normally this works fine, but if the environment variable CC is set to zig cc, which is now an advertised use case of zig cc, then zig will end up calling itself as a child process.
#2876 will solve this issue for FreeBSD, but we also should solve this issue for all systems that require learning the location of libc.
I think it should simply output an error message, telling the user that they should use the native C compiler to compile natively, because on this particular system Zig depends on the native C compiler anyway to learn about where libc paths are. Note that on systems like this, using zig to cross compile still works fine.
Another way to resolve this problem (on the user's end) is to explicitly specify a --libc parameter (well this would be for zig command line, zig cc would need a way to specify the information that --libc provides).
The text was updated successfully, but these errors were encountered:
andrewrk
added
bug
Observed behavior contradicts documented or intended behavior
zig cc
Zig as a drop-in C compiler feature
labels
Mar 25, 2020
For example on FreeBSD, because #2876 is not done yet, zig tries to call the system C compiler to find out where certain libraries and paths are. Normally this works fine, but if the environment variable
CC
is set tozig cc
, which is now an advertised use case ofzig cc
, then zig will end up calling itself as a child process.#2876 will solve this issue for FreeBSD, but we also should solve this issue for all systems that require learning the location of libc.
I think it should simply output an error message, telling the user that they should use the native C compiler to compile natively, because on this particular system Zig depends on the native C compiler anyway to learn about where libc paths are. Note that on systems like this, using zig to cross compile still works fine.
Another way to resolve this problem (on the user's end) is to explicitly specify a
--libc
parameter (well this would be for zig command line,zig cc
would need a way to specify the information that--libc
provides).The text was updated successfully, but these errors were encountered: