wrappers: Set the right -std= arguments when invoked as c99/c11

This commit is contained in:
Martin Storsjö
2022-04-22 14:13:41 +03:00
parent 966f88e3da
commit 52d7bee3a8
2 changed files with 10 additions and 0 deletions
+4
View File
@@ -61,6 +61,10 @@ int _tmain(int argc, TCHAR* argv[]) {
// If changing this wrapper, change clang-target-wrapper.sh accordingly.
if (!_tcscmp(exe, _T("clang++")) || !_tcscmp(exe, _T("g++")) || !_tcscmp(exe, _T("c++")))
exec_argv[arg++] = _T("--driver-mode=g++");
else if (!_tcscmp(exe, _T("c99")))
exec_argv[arg++] = _T("-std=c99");
else if (!_tcscmp(exe, _T("c11")))
exec_argv[arg++] = _T("-std=c11");
if (!_tcscmp(arch, _T("i686"))) {
// Dwarf is the default for i686.
+6
View File
@@ -50,6 +50,12 @@ case $EXE in
clang++|g++|c++)
FLAGS="$FLAGS --driver-mode=g++"
;;
c99)
FLAGS="$FLAGS -std=c99"
;;
c11)
FLAGS="$FLAGS -std=c11"
;;
esac
case $ARCH in
i686)