r266108 - clang-cl: Remove -isystem, add -imsvc.

Ismail Donmez via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 14 01:09:57 PDT 2016


Hi,

On Tue, Apr 12, 2016 at 10:04 PM, Nico Weber via cfe-commits
<cfe-commits at lists.llvm.org> wrote:
> Author: nico
> Date: Tue Apr 12 14:04:37 2016
> New Revision: 266108
>
> URL: http://llvm.org/viewvc/llvm-project?rev=266108&view=rev
> Log:
> clang-cl: Remove -isystem, add -imsvc.
>
> r260990 exposed -isystem in clang-cl. -isystem adds a directory to the front of
> the system include search path. The idea was to use this to point to a hermetic
> msvc install, but as it turns out this doesn't work: -isystem then adds the
> hermetic headers in front of clang's builtin headers, and clang's headers that
> are supposed to wrap msvc headers (say, stdarg.h) aren't picked up at all
> anymore.
>
> So revert that, and instead expose -imsvc which works as if the passed
> directory was part of %INCLUDE%: The header is treated as a system header, but
> it is searched after clang's lib/Header headers.
>
> Fixes half of PRPR26751.

This fails the test for me on Linux x86-64:

 /home/abuild/rpmbuild/BUILD/llvm/stage2/./bin/clang --driver-mode=cl
     --driver-mode=cl      -fcolor-diagnostics
-fno-color-diagnostics      -fdiagnostics-color
-fno-diagnostics-color      -fdiagnostics-parseable-fixits
-ferror-limit=10      -fmsc-version=1800      -fno-strict-aliasing
 -fstrict-aliasing      -fsyntax-only      -fms-compatibility
-fno-ms-compatibility      -fms-extensions      -fno-ms-extensions
 -mllvm -disable-llvm-optzns      -Wunused-variable
-fmacro-backtrace-limit=0      -Werror /Zs --
/home/abuild/rpmbuild/BUILD/llvm/tools/clang/test/Driver/cl-options.c
2>&1
 --
 Exit Code: 1

 Command Output (stderr):
 --
 /home/abuild/rpmbuild/BUILD/llvm/tools/clang/test/Driver/cl-options.c:88:17:
error: expected string not found in input
 // SLASH_imsvc: "-internal-isystem"
"{{[^"]*}}lib{{/|\\\\}}clang{{[^"]*}}include"
                 ^
 <stdin>:1:1: note: scanning from here
 openSUSE Linux clang version 3.9.0 (trunk 266277) (based on LLVM 3.9.0svn)
 ^
 <stdin>:5:709: note: possible intended match here
  "/home/abuild/rpmbuild/BUILD/llvm/stage2/bin/clang-3.9" "-cc1"
"-triple" "x86_64-pc-windows-msvc18.0.0" "-emit-obj" "-mrelax-all"
"-mincremental-linker-compatible" "-disable-free"
"-disable-llvm-verifier" "-discard-value-names" "-main-file-name"
"cl-options.c" "-mrelocation-model" "pic" "-pic-level" "2"
"-mthread-model" "posix" "-relaxed-aliasing" "-fmath-errno"
"-masm-verbose" "-mconstructor-aliases" "-munwind-tables"
"-target-cpu" "x86-64" "-D_MT" "--dependent-lib=libcmt"
"--dependent-lib=oldnames" "-fms-volatile" "-fdiagnostics-format"
"msvc" "-momit-leaf-frame-pointer" "-dwarf-column-info"
"-debugger-tuning=gdb" "-resource-dir"
"/home/abuild/rpmbuild/BUILD/llvm/stage2/bin/../lib64/clang/3.9.0"
"-internal-isystem"
"/home/abuild/rpmbuild/BUILD/llvm/stage2/bin/../lib64/clang/3.9.0/include"
"-internal-isystem" "myincludedir" "-internal-isystem" "C:/Program
Files/Microsoft Visual Studio 10.0/VC/include" "-internal-isystem"
"C:/Program Files/Microsoft Visual Studio 9.0/VC/include"
"-internal-isystem" "C:/Program Files/Microsoft Visual Studio
9.0/VC/PlatformSDK/Include" "-internal-isystem" "C:/Program
Files/Microsoft Visual Studio 8/VC/include" "-internal-isystem"
"C:/Program Files/Microsoft Visual Studio 8/VC/PlatformSDK/Include"
"-fdebug-compilation-dir"
"/home/abuild/rpmbuild/BUILD/llvm/stage2/tools/clang/test/Driver"
"-ferror-limit" "19" "-fmessage-length" "0" "-fms-extensions"
"-fms-compatibility" "-fms-compatibility-version=18"
"-fno-threadsafe-statics" "-fdelayed-template-parsing"
"-fobjc-runtime=gcc" "-fdiagnostics-show-option" "-o"
"/tmp/cl-options-ca1c04.obj" "-x" "c"
"/home/abuild/rpmbuild/BUILD/llvm/tools/clang/test/Driver/cl-options.c"

Any ideas?


More information about the cfe-commits mailing list