wrappers: Set the right -std= arguments when invoked as c99/c11
This commit is contained in:
1 parent
966f88e3da
commit
52d7bee3a8
2 files changed
+10
No files matched your search
@@ -61,6 +61,10 @@ int _tmain(int argc, TCHAR* argv[]) {
|
|||||||
// If changing this wrapper, change clang-target-wrapper.sh accordingly.
|
// If changing this wrapper, change clang-target-wrapper.sh accordingly.
|
||||||
if (!_tcscmp(exe, _T("clang++")) || !_tcscmp(exe, _T("g++")) || !_tcscmp(exe, _T("c++")))
|
if (!_tcscmp(exe, _T("clang++")) || !_tcscmp(exe, _T("g++")) || !_tcscmp(exe, _T("c++")))
|
||||||
exec_argv[arg++] = _T("--driver-mode=g++");
|
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"))) {
|
if (!_tcscmp(arch, _T("i686"))) {
|
||||||
// Dwarf is the default for i686.
|
// Dwarf is the default for i686.
|
||||||
|
|||||||
@@ -50,6 +50,12 @@ case $EXE in
|
|||||||
clang++|g++|c++)
|
clang++|g++|c++)
|
||||||
FLAGS="$FLAGS --driver-mode=g++"
|
FLAGS="$FLAGS --driver-mode=g++"
|
||||||
;;
|
;;
|
||||||
|
c99)
|
||||||
|
FLAGS="$FLAGS -std=c99"
|
||||||
|
;;
|
||||||
|
c11)
|
||||||
|
FLAGS="$FLAGS -std=c11"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
case $ARCH in
|
case $ARCH in
|
||||||
i686)
|
i686)
|
||||||
|
|||||||
Reference in new issue
Block a user