[PATCH] D25661: [Driver] Support obtaining active toolchain from gcc-config on Gentoo

2016-10-25 Thread Benjamin Kramer via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. ship it. https://reviews.llvm.org/D25661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D25661: [Driver] Support obtaining active toolchain from gcc-config on Gentoo

2016-10-25 Thread Michał Górny via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL285074: [Driver] Support obtaining active toolchain from gcc-config on Gentoo (authored by mgorny). Changed prior to commit: https://reviews.llvm.org/D25661?vs=75707=75710#toc Repository: rL LLVM

[PATCH] D25661: [Driver] Support obtaining active toolchain from gcc-config on Gentoo

2016-10-25 Thread Michał Górny via cfe-commits
mgorny updated this revision to Diff 75707. mgorny marked 3 inline comments as done. mgorny added a comment. Thanks for the review. Implemented all three suggestions. https://reviews.llvm.org/D25661 Files: lib/Driver/ToolChains.cpp

[PATCH] D25661: [Driver] Support obtaining active toolchain from gcc-config on Gentoo

2016-10-25 Thread Benjamin Kramer via cfe-commits
bkramer added inline comments. Comment at: lib/Driver/ToolChains.cpp:1438 + if (GCCToolchainDir == "" || GCCToolchainDir == D.SysRoot + "/usr") { +for (const StringRef& CandidateTriple : CandidateTripleAliases) { + llvm::ErrorOr File =

[PATCH] D25661: [Driver] Support obtaining active toolchain from gcc-config on Gentoo

2016-10-17 Thread Alexey Bataev via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains.cpp:1446-1463 + // CURRENT=triple-version + if (Line.startswith("CURRENT=")) { +const std::pair ActiveVersion = + Line.substr(8).rsplit('-'); +

[PATCH] D25661: [Driver] Support obtaining active toolchain from gcc-config on Gentoo

2016-10-17 Thread Michał Górny via cfe-commits
mgorny added inline comments. Comment at: lib/Driver/ToolChains.cpp:1446-1463 + // CURRENT=triple-version + if (Line.startswith("CURRENT=")) { +const std::pair ActiveVersion = + Line.substr(8).rsplit('-'); +

[PATCH] D25661: [Driver] Support obtaining active toolchain from gcc-config on Gentoo

2016-10-17 Thread Alexey Bataev via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains.cpp:1446-1463 + // CURRENT=triple-version + if (Line.startswith("CURRENT=")) { +const std::pair ActiveVersion = + Line.substr(8).rsplit('-'); +

[PATCH] D25661: [Driver] Support obtaining active toolchain from gcc-config on Gentoo

2016-10-17 Thread Michał Górny via cfe-commits
mgorny added inline comments. Comment at: lib/Driver/ToolChains.cpp:1446-1463 + // CURRENT=triple-version + if (Line.startswith("CURRENT=")) { +const std::pair ActiveVersion = + Line.substr(8).rsplit('-'); +

[PATCH] D25661: [Driver] Support obtaining active toolchain from gcc-config on Gentoo

2016-10-17 Thread Alexey Bataev via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains.cpp:1446-1463 + // CURRENT=triple-version + if (Line.startswith("CURRENT=")) { +const std::pair ActiveVersion = + Line.substr(8).rsplit('-'); +

[PATCH] D25661: [Driver] Support obtaining active toolchain from gcc-config on Gentoo

2016-10-17 Thread Michał Górny via cfe-commits
mgorny updated this revision to Diff 74855. mgorny added a comment. Updated to use range-based for loop as suggested by @ABataev. https://reviews.llvm.org/D25661 Files: lib/Driver/ToolChains.cpp

[PATCH] D25661: [Driver] Support obtaining active toolchain from gcc-config on Gentoo

2016-10-17 Thread Michał Górny via cfe-commits
mgorny added inline comments. Comment at: lib/Driver/ToolChains.cpp:1446-1463 + // CURRENT=triple-version + if (Line.startswith("CURRENT=")) { +const std::pair ActiveVersion = + Line.substr(8).rsplit('-'); +

[PATCH] D25661: [Driver] Support obtaining active toolchain from gcc-config on Gentoo

2016-10-17 Thread Alexey Bataev via cfe-commits
ABataev added inline comments. Comment at: lib/Driver/ToolChains.cpp:1438 + if (GCCToolchainDir == "" || GCCToolchainDir == D.SysRoot + "/usr") { +for (unsigned k = 0, ke = CandidateTripleAliases.size(); k < ke; ++k) { + llvm::ErrorOr File =

[PATCH] D25661: [Driver] Support obtaining active toolchain from gcc-config on Gentoo

2016-10-16 Thread Michał Górny via cfe-commits
mgorny created this revision. mgorny added reviewers: rafael, chandlerc, bruno, bkramer. mgorny added a subscriber: cfe-commits. 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