use -nostdinc and sometimes -nolibc when compiling C code
This commit is contained in:
@@ -8151,8 +8151,15 @@ static void gen_c_object(CodeGen *g, Buf *self_exe_path, CFile *c_file) {
|
||||
}
|
||||
|
||||
args.append("-nobuiltininc");
|
||||
args.append("-nostdinc");
|
||||
args.append("-nostdinc++");
|
||||
|
||||
if (g->libc_link_lib == nullptr) {
|
||||
args.append("-nolibc");
|
||||
}
|
||||
|
||||
args.append("-fno-spell-checking");
|
||||
|
||||
args.append("-isystem");
|
||||
args.append(buf_ptr(g->zig_c_headers_dir));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user