Check whether /etc/env.d/gcc exists before trying to read from any
file from there. This saves a few OS calls on a non-Gentoo system.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang/lib/Driver/ToolChains/Gnu.cpp | ||
---|---|---|
2538–2539 | I think it should be D.SysRoot + GentooConfigDir. Otherwise, there is no way to test a Gentoo configuration tests on a non-Gentoo machine. |
clang/lib/Driver/ToolChains/Gnu.cpp | ||
---|---|---|
2538–2539 | Probably correct, given that D.SysRoot is used below. However, this code is a bit above my pay grade and I was never sure whether it's doing right what it's supposed to do. I would really prefer if someone higher up reviewed this. |
clang/lib/Driver/ToolChains/Gnu.cpp | ||
---|---|---|
2538 | Thanks. This should reduce the number of stat syscalls. |
Thanks. This should reduce the number of stat syscalls.