freestanding target adds -ffrestanding to cc parameters

closes #2287
This commit is contained in:
Andrew Kelley
2019-04-16 12:06:14 -04:00
parent 3226b5315e
commit 4e2f6ebf39
2 changed files with 6 additions and 0 deletions

View File

@@ -8531,6 +8531,9 @@ static void gen_c_object(CodeGen *g, Buf *self_exe_path, CFile *c_file) {
args.append("-target");
args.append(buf_ptr(&g->triple_str));
}
if (g->zig_target->os == OsFreestanding) {
args.append("-ffreestanding");
}
if (!g->strip_debug_symbols) {
args.append("-g");