Fix regression in r227409 where we were passing -fsyntax-only

in all cases.

Patch by Artem Belevich.

llvm-svn: 227591
This commit is contained in:
Eric Christopher 2015-01-30 18:22:23 +00:00
parent b9a53f05f1
commit 58c2199cef
2 changed files with 8 additions and 0 deletions

View File

@ -5166,6 +5166,7 @@ void gcc::Compile::RenderExtraToolArgs(const JobAction &JA,
break;
case types::TY_PP_Asm:
CmdArgs.push_back("-S");
break;
case types::TY_Nothing:
CmdArgs.push_back("-fsyntax-only");
break;

View File

@ -251,3 +251,10 @@
!
! CHECK-PR22234-NOT: clang: error: invalid output type
! CHECK-PR22234: "-fsyntax-only"
!
! Regression test for the bug introduced with PR22234 fix.
! Make sure -fsyntax-only is not passed to gfortran during normal compilation.
!
! RUN: %clang -no-canonical-prefixes -target i386-linux -### %s -o %t 2>&1 \
! RUN: | FileCheck %s --check-prefix=CHECK-PR22234-R
! CHECK-PR22234-R-NOT: "-fsyntax-only"