Support using gcc-config to determine the correct GCC toolchain location
on Gentoo. In order to do that, attempt to read gcc-config configuration
form [[sysroot]]/etc/env.d/gcc, if no custom toolchain location is
provided.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/Driver/ToolChains.cpp | ||
---|---|---|
1438 ↗ | (On Diff #74801) | Use range-based for here |
1446–1463 ↗ | (On Diff #74801) | I think it is better to use llvm::Triple class here for parsing ARCHITECTURE-VENDOR-OPERATING_SYSTEM-ENVIRONMENT string rather than StringRef::split() |
lib/Driver/ToolChains.cpp | ||
---|---|---|
1446–1463 ↗ | (On Diff #74801) | This is not parsing the triple but detaching the version appended to it. |
lib/Driver/ToolChains.cpp | ||
---|---|---|
1446–1463 ↗ | (On Diff #74801) | But still it is better to use some standard infrastructure rather than inventing a new one (with possible bugs, incompatibilities etc.) |
lib/Driver/ToolChains.cpp | ||
---|---|---|
1446–1463 ↗ | (On Diff #74801) | I still don't understand what you want me to do. llvm::Triple does not support triple + version thingy that is the case here. I don't need to parse the triple, just split the version out of it. |
lib/Driver/ToolChains.cpp | ||
---|---|---|
1446–1463 ↗ | (On Diff #74801) | Can you use Triple::getEnvironmentVersion()? |
lib/Driver/ToolChains.cpp | ||
---|---|---|
1446–1463 ↗ | (On Diff #74801) | No. This is not embedded in environment field but used as a separate component following it. Triple class doesn't cover it at all. |
lib/Driver/ToolChains.cpp | ||
---|---|---|
1446–1463 ↗ | (On Diff #74801) | Ok |