Add GHS dotciscxx flag to compile as C++
With GHS, ccppc and cxppc both determine the file type by its extension. Since the files the scratch uses are called ctx.c and code.c, they're treated as C files. The flag dotciscxx is needed to treat them as C++ files instead.
Before this PR is accepted, I think it's better to consider how other platforms handle it?
Do they let you choose the language? (I have not used the platform much yet.)
Otherwise why even add this flag instead of renaming the files to use the .cpp extension?
Other platforms also expose the language as a drop-down, which just sets a compiler flag (-x c++ for GCC for instance), so conceptually this solution is okay.
Is there a flag to explicitly set C (rather than C++)? such that we can leverage LanguageFlagSet behaviour like other compilers?
edit looks like -nodotciscxx might do the trick?
edit2 seems like we arent super consistent given we take the language from the compiler to determine file extension, rather than dynamically from flags (unless im missing something) ?
Alternatively, you could use -filetype.[extension] where [extension] is c, cpp, etc. (e.g. -filetype.cpp code.c), though that would have to come directly before the filenames. Is there a way to guarantee that?