[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-02-15 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. In D95534#2550998 , @thakis wrote: > In D95534#2534510 , @smeenai wrote: > >> I saw this on LLVM Weekly, and I like it a lot :) >> >> Now if only Windows could case-correct their SDKs so we d

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-02-09 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. > We use ciopfs for this, > https://source.chromium.org/chromium/chromium/src/+/master:build/vs_toolchain.py;l=485?q=ciopfs > That code has worked without changes for the last 2.5 years. (ciopfs is user-space, so it can be set up transparently by a normal post-pull hook

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-02-09 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. In D95534#2534510 , @smeenai wrote: > I saw this on LLVM Weekly, and I like it a lot :) > > Now if only Windows could case-correct their SDKs so we didn't need VFS > overlays and symlinks for the linker... We use ciopfs for this,

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-02-08 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. In D95534#2534510 , @smeenai wrote: > Now if only Windows could case-correct their SDKs so we didn't need VFS > overlays and symlinks for the linker... I opened a ticket

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-02-01 Thread Shoaib Meenai via Phabricator via cfe-commits
smeenai added a comment. I saw this on LLVM Weekly, and I like it a lot :) Now if only Windows could case-correct their SDKs so we didn't need VFS overlays and symlinks for the linker... Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95534/new/ ht

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-02-01 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added subscribers: smeenai, compnerd. rnk added a comment. +People who have spent time on cross-compilation Windows sysroots in the past: @smeenai @compnerd Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95534/new/ https://reviews.llvm.org/D955

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-01-29 Thread Nico Weber via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG82847436e925: clang-cl: Invent a /winsysroot concept (authored by thakis). Herald added a project: clang. Changed prior to commit: https://reviews.llvm.org/D95534?vs=319949&id=320126#toc Repository:

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-01-29 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang/test/Driver/cl-sysroot.cpp:10 + +// CHECK: "-internal-isystem" "[[ROOT]]/VC/Tools/MSVC/14.26.28801/include" +// CHECK: "-internal-isystem" "[[ROOT]]/VC/Tools/MSVC/14.26.28801/atlmfc/include" hans wrote: > could the

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-01-29 Thread Hans Wennborg via Phabricator via cfe-commits
hans accepted this revision. hans added a comment. This revision is now accepted and ready to land. lgtm (with test nit) Comment at: clang/test/Driver/cl-sysroot.cpp:10 + +// CHECK: "-internal-isystem" "[[ROOT]]/VC/Tools/MSVC/14.26.28801/include" +// CHECK: "-internal-isystem"

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-01-28 Thread Nico Weber via Phabricator via cfe-commits
thakis added inline comments. Comment at: clang/lib/Driver/ToolChains/MSVC.cpp:75 + for (llvm::sys::fs::directory_iterator DirIt(Directory, EC), DirEnd; + DirIt != DirEnd && !EC; DirIt.increment(EC)) { +if (!llvm::sys::fs::is_directory(DirIt->path()))

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-01-28 Thread Nico Weber via Phabricator via cfe-commits
thakis updated this revision to Diff 319949. thakis marked an inline comment as done. thakis added a comment. address comments CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95534/new/ https://reviews.llvm.org/D95534 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/Tool

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-01-28 Thread Hans Wennborg via Phabricator via cfe-commits
hans added inline comments. Comment at: clang/lib/Driver/ToolChains/MSVC.cpp:75 + for (llvm::sys::fs::directory_iterator DirIt(Directory, EC), DirEnd; + DirIt != DirEnd && !EC; DirIt.increment(EC)) { +if (!llvm::sys::fs::is_directory(DirIt->path())) fo

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-01-28 Thread Nico Weber via Phabricator via cfe-commits
thakis updated this revision to Diff 319938. thakis added a comment. add test CHANGES SINCE LAST ACTION https://reviews.llvm.org/D95534/new/ https://reviews.llvm.org/D95534 Files: clang/include/clang/Driver/Options.td clang/lib/Driver/ToolChains/MSVC.cpp clang/test/Driver/cl-sysroot.cp

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-01-28 Thread Nico Weber via Phabricator via cfe-commits
thakis updated this revision to Diff 319936. thakis edited the summary of this revision. thakis added a comment. Seems like there are no strong opinions, so now with actual code. I went with "VC/Tools/MSVC/XXX" and "Windows Kits/10" since that seems like the obvious thing. CHANGES SINCE LAST A

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-01-27 Thread Martin Storsjö via Phabricator via cfe-commits
mstorsjo added a comment. > "Windows Kits/10" has the drawback that it contains a space and yet another > number. Ideally the contents of that directory would be available under some > short name, so I went with /winsdkdir /win_sdk. I'm not married to this > though. Maybe /WinSdk looks move lik

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-01-27 Thread Nico Weber via Phabricator via cfe-commits
thakis added a comment. Maybe we should just go with `Windows Kits/10" -- the space is only seen at the driver->cc1 boundary and it works fine there, and the 10 can be inferred from /winsdkversion. On the other hand, thinking about how to create such a sysroot directory, saying "just copy %vct

[PATCH] D95534: clang-cl: Invent a /winsysroot concept

2021-01-27 Thread Nico Weber via Phabricator via cfe-commits
thakis created this revision. thakis added a reviewer: hans. Herald added subscribers: dang, pengfei. Herald added a reviewer: jansvoboda11. thakis requested review of this revision. On non-Windows platforms, --sysroot can be used to make the compiler use a single, hermetic directory for all heade