I have nim C++ project (nim cpp --backend cpp to compile), having .c as an dependency.
If I passed --passC:"--std=c++17", clang causes error on compiling .c files.
Work-around is to rename .c into .cpp and wrap extern "C" { ... } whole the file, but I don't like use this...
Any way to pass compiler flag only to c++ compiler, not to c compiler?
separating flags into passC (for C files) and passCpp (for C++ files) is the standard, supported way to handle this I think,
You should try passCpp instead.