[PATCH] D70467: [Distro] Bypass distro detection on Windows
Reid Kleckner via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Nov 19 15:27:58 PST 2019
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.cpp
../clang/lib/Driver/ToolChains/Linux.cpp
I think the only one that matters is in Clang.cpp, but it looks like it should never run on Windows:
if (Args.hasFlag(options::OPT_faddrsig, options::OPT_fno_addrsig,
(TC.getTriple().isOSBinFormatELF() ||
TC.getTriple().isOSBinFormatCOFF()) &&
!TC.getTriple().isPS4() &&
!TC.getTriple().isOSNetBSD() &&
!Distro(D.getVFS()).IsGentoo() &&
!TC.getTriple().isAndroid() &&
TC.useIntegratedAs()))
CmdArgs.push_back("-faddrsig");
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 -faddrsig.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D70467/new/
https://reviews.llvm.org/D70467
More information about the cfe-commits
mailing list