r240432 - Driver: Pass -I options to cc1as for .include search paths.

Jim Grosbach grosbach at apple.com
Tue Jun 23 11:20:13 PDT 2015


Author: grosbach
Date: Tue Jun 23 13:20:13 2015
New Revision: 240432

URL: http://llvm.org/viewvc/llvm-project?rev=240432&view=rev
Log:
Driver: Pass -I options to cc1as for .include search paths.

Modified:
    cfe/trunk/lib/Driver/Tools.cpp
    cfe/trunk/test/Driver/integrated-as.s

Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=240432&r1=240431&r2=240432&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Tue Jun 23 13:20:13 2015
@@ -5246,6 +5246,9 @@ void ClangAs::ConstructJob(Compilation &
   // Ignore explicit -force_cpusubtype_ALL option.
   (void) Args.hasArg(options::OPT_force__cpusubtype__ALL);
 
+  // Pass along any -I options so we get proper .include search paths.
+  Args.AddAllArgs(CmdArgs, options::OPT_I_Group);
+
   // Determine the original source input.
   const Action *SourceAction = &JA;
   while (SourceAction->getKind() != Action::InputClass) {

Modified: cfe/trunk/test/Driver/integrated-as.s
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/integrated-as.s?rev=240432&r1=240431&r2=240432&view=diff
==============================================================================
--- cfe/trunk/test/Driver/integrated-as.s (original)
+++ cfe/trunk/test/Driver/integrated-as.s Tue Jun 23 13:20:13 2015
@@ -43,3 +43,6 @@
 
 // RUN: %clang -### -c -integrated-as %s -Wa,-gdwarf-2 2>&1 | FileCheck --check-prefix=DWARF2WA %s
 // DWARF2WA: "-gdwarf-2"
+
+// RUN: %clang -### -x assembler -c -integrated-as %s -I myincludedir 2>&1 | FileCheck --check-prefix=INCLUDEPATH %s
+// INCLUDEPATH: "-I" "myincludedir"





More information about the cfe-commits mailing list