Revert rL301998: "Fix a bug that -isysroot is completely ignored on Unix"
authorYuka Takahashi <yukatkh@gmail.com>
Wed, 3 May 2017 06:02:45 +0000 (06:02 +0000)
committerYuka Takahashi <yukatkh@gmail.com>
Wed, 3 May 2017 06:02:45 +0000 (06:02 +0000)
This reverts commit because it broke
sanitizer-x86_64-linux-autoconf bot and
clang-ppc64be-linux-multistage  bot.

llvm-svn: 302000

clang/lib/Frontend/CompilerInvocation.cpp
clang/test/Driver/sysroot-flags.c

index c69a7e6..d3ebf48 100644 (file)
@@ -1565,7 +1565,7 @@ static void ParseHeaderSearchArgs(HeaderSearchOptions &Opts, ArgList &Args,
     frontend::IncludeDirGroup Group = frontend::System;
     if (A->getOption().matches(OPT_internal_externc_isystem))
       Group = frontend::ExternCSystem;
-    Opts.AddPath(A->getValue(), Group, false, false);
+    Opts.AddPath(A->getValue(), Group, false, true);
   }
 
   // Add the path prefixes which are implicitly treated as being system headers.
index 8149275..b0a10bf 100644 (file)
@@ -26,7 +26,3 @@
 // RUN:   FileCheck %s -check-prefix=SYSROOT_SEPARATE
 // SYSROOT_SEPARATE: "-isysroot" "{{[^"]*}}/foo/bar"
 // SYSROOT_SEPARATE: "--sysroot{{" "|=}}{{[^"]*}}/foo/bar"
-
-// Check that -isysroot is handled properly
-// RUN: %clang -isysroot /foo/bar -c %s -v 2>&1 | \
-// RUN:   grep "/foo/bar"