From: Yuka Takahashi Date: Wed, 3 May 2017 06:02:45 +0000 (+0000) Subject: Revert rL301998: "Fix a bug that -isysroot is completely ignored on Unix" X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=d47d19ceb992e424047bd2b09163816693097efc;p=clang Revert rL301998: "Fix a bug that -isysroot is completely ignored on Unix" This reverts commit because it broke sanitizer-x86_64-linux-autoconf bot and clang-ppc64be-linux-multistage bot. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@302000 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index c69a7e6497..d3ebf48315 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -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. diff --git a/test/Driver/sysroot-flags.c b/test/Driver/sysroot-flags.c index 8149275d31..b0a10bfca4 100644 --- a/test/Driver/sysroot-flags.c +++ b/test/Driver/sysroot-flags.c @@ -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"