[PATCH] D87143: Check whether Gentoo-specific configuration directory exists

2020-09-23 Thread Fangrui Song via Phabricator via cfe-commits
MaskRay added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2538 const SmallVectorImpl &CandidateBiarchTriples) { + if (!D.getVFS().exists(D.SysRoot + GentooConfigDir)) +return false; Thanks. This should reduce the number of stat sysc

[PATCH] D87143: Check whether Gentoo-specific configuration directory exists

2020-09-23 Thread Dmitry Antipov via Phabricator via cfe-commits
This revision was landed with ongoing or failed builds. This revision was automatically updated to reflect the committed changes. Closed by commit rGd882ca7f1f1d: [Driver] Check whether Gentoo-specific configuration directory exists (authored by dmantipov). Changed prior to commit: https://revi

[PATCH] D87143: Check whether Gentoo-specific configuration directory exists

2020-09-04 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta accepted this revision. manojgupta added a comment. This revision is now accepted and ready to land. Looks ok to me. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87143/new/ https://reviews.llvm.org/D87143 __

[PATCH] D87143: Check whether Gentoo-specific configuration directory exists

2020-09-04 Thread Dmitry Antipov via Phabricator via cfe-commits
dmantipov updated this revision to Diff 289998. dmantipov added a comment. Add D.SysRoot as suggested during initial review. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D87143/new/ https://reviews.llvm.org/D87143 Files: clang/lib/Driver/ToolCha

[PATCH] D87143: Check whether Gentoo-specific configuration directory exists

2020-09-04 Thread Michał Górny via Phabricator via cfe-commits
mgorny added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2537-2538 const SmallVectorImpl &CandidateBiarchTriples) { + if (!D.getVFS().exists(GentooConfigDir)) +return false; + manojgupta wrote: > I think it should be D.SysRoot + Gen

[PATCH] D87143: Check whether Gentoo-specific configuration directory exists

2020-09-04 Thread Manoj Gupta via Phabricator via cfe-commits
manojgupta added a reviewer: mgorny. manojgupta added inline comments. Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:2537-2538 const SmallVectorImpl &CandidateBiarchTriples) { + if (!D.getVFS().exists(GentooConfigDir)) +return false; + I think it shou

[PATCH] D87143: Check whether Gentoo-specific configuration directory exists

2020-09-04 Thread Dmitry Antipov via Phabricator via cfe-commits
dmantipov created this revision. dmantipov added a reviewer: manojgupta. Herald added a project: clang. Herald added a subscriber: cfe-commits. dmantipov requested review of this revision. Check whether /etc/env.d/gcc exists before trying to read from any file from there. This saves a few OS calls