[PATCH] D70467: [Distro] Bypass distro detection on Windows

2019-11-21 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea updated this revision to Diff 230525. aganea added a comment. Removed `#ifdef _WIN32` Use the target triple where possible to detect the distro. The Cuda installation detector uses the host triple, in order to use the host tooling. Skip distro detection when the target or host system is no

[PATCH] D70467: [Distro] Bypass distro detection on Windows

2019-11-21 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. Actually, I'm not sure the `DetectDistro()` does what it intends to do when cross-compiling: if I compile on Ubuntu and I forcibly specify `-target x86_64-linux` on the cmd-line, should it detect which Linux distro I'm on? Shouldn't it use the target triple, not the host

[PATCH] D70467: [Distro] Bypass distro detection on Windows

2019-11-21 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea added a comment. In D70467#1752611 , @rnk wrote: > Hm, I guess it does happen. I think that condition should be restructured to > only do all that BSD, PS4, Android, Gentoo etc logic if the format is ELF, if > COFF, then always default to -faddrsi

[PATCH] D70467: [Distro] Bypass distro detection on Windows

2019-11-19 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added a comment. I'd rather avoid the ifdef if possible. I looked to see where these come from: $ git grep -l Distro ../clang/lib/Driver/ ../clang/lib/Driver/CMakeLists.txt ../clang/lib/Driver/Distro.cpp ../clang/lib/Driver/ToolChains/Clang.cpp ../clang/lib/Driver/ToolChains/Cuda.cp

[PATCH] D70467: [Distro] Bypass distro detection on Windows

2019-11-19 Thread Alexandre Ganea via Phabricator via cfe-commits
aganea created this revision. aganea added reviewers: sylvestre.ledru, rnk. Herald added a project: clang. Herald added a subscriber: cfe-commits. This skips distro detection on Windows, thus saving a few `stat` calls for each invocation of `clang.exe`. Repository: rG LLVM Github Monorepo ht