Skip to content

Commit 52d7bee

Browse files
committed
wrappers: Set the right -std= arguments when invoked as c99/c11
1 parent 966f88e commit 52d7bee

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

wrappers/clang-target-wrapper.c

+4
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ int _tmain(int argc, TCHAR* argv[]) {
6161
// If changing this wrapper, change clang-target-wrapper.sh accordingly.
6262
if (!_tcscmp(exe, _T("clang++")) || !_tcscmp(exe, _T("g++")) || !_tcscmp(exe, _T("c++")))
6363
exec_argv[arg++] = _T("--driver-mode=g++");
64+
else if (!_tcscmp(exe, _T("c99")))
65+
exec_argv[arg++] = _T("-std=c99");
66+
else if (!_tcscmp(exe, _T("c11")))
67+
exec_argv[arg++] = _T("-std=c11");
6468

6569
if (!_tcscmp(arch, _T("i686"))) {
6670
// Dwarf is the default for i686.

wrappers/clang-target-wrapper.sh

+6
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,12 @@ case $EXE in
5050
clang++|g++|c++)
5151
FLAGS="$FLAGS --driver-mode=g++"
5252
;;
53+
c99)
54+
FLAGS="$FLAGS -std=c99"
55+
;;
56+
c11)
57+
FLAGS="$FLAGS -std=c11"
58+
;;
5359
esac
5460
case $ARCH in
5561
i686)

0 commit comments

Comments
 (0)