diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2019-02-26 14:50:20 -0500 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2019-02-26 14:59:36 -0500 |
| commit | 1ec1097bd389b9af1b3e40d9edbc4c1c0b65f6a1 (patch) | |
| tree | 585879f49932a1bc29405e2aa7bac62efc87c2fc /src/codegen.cpp | |
| parent | 0eed72d6874b1705405df0d7975c66a2178c7106 (diff) | |
| download | zig-1ec1097bd389b9af1b3e40d9edbc4c1c0b65f6a1.tar.gz zig-1ec1097bd389b9af1b3e40d9edbc4c1c0b65f6a1.zip | |
use -nostdinc and sometimes -nolibc when compiling C code
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index 6e4e66e978..b7230328c3 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -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)); |
