diff options
| author | Michael Dusan <michael.dusan@gmail.com> | 2020-04-12 01:03:27 -0400 |
|---|---|---|
| committer | Michael Dusan <michael.dusan@gmail.com> | 2020-04-12 01:03:27 -0400 |
| commit | 20b2457388c924ec01cc6ea9d5331edbf27176ff (patch) | |
| tree | 23c4b7dd040e63e9d1b112b8206fd58771472248 /src/codegen.cpp | |
| parent | d27ef1aaef8ac12801ba4e6c2ed748c7151096a7 (diff) | |
| download | zig-20b2457388c924ec01cc6ea9d5331edbf27176ff.tar.gz zig-20b2457388c924ec01cc6ea9d5331edbf27176ff.zip | |
only use `-nostdinc++` on c++ files
This is a follow-up to d27ef1aaef8ac12801ba4e6c2ed748c7151096a7
and avoids compiler warnings:
warning: argument unused during compilation: '-nostdinc++'
Diffstat (limited to 'src/codegen.cpp')
| -rw-r--r-- | src/codegen.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/codegen.cpp b/src/codegen.cpp index 6a1db495a2..23ab2a130e 100644 --- a/src/codegen.cpp +++ b/src/codegen.cpp @@ -9252,7 +9252,9 @@ void add_cc_args(CodeGen *g, ZigList<const char *> &args, const char *out_dep_pa } args.append("-nostdinc"); - args.append("-nostdinc++"); + if (source_kind == FileExtCpp) { + args.append("-nostdinc++"); + } args.append("-fno-spell-checking"); if (g->function_sections) { |
