[PATCH] D133329: [Driver] Add --gcc-install-dir=

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 5 16:02:20 PDT 2022


MaskRay created this revision.
Herald added subscribers: StephenFan, pengfei.
Herald added a project: All.
MaskRay requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

This option specifies a GCC installation directory such as
/usr/lib/gcc/x86_64-linux-gnu/12, /usr/lib/gcc/x86_64-gentoo-linux-musl/11.2.0 .

It is intended to replace --gcc-toolchain=, which specifies a directory where
`lib/gcc{,-cross}` can be found. In most cases the user does not specify
--gcc-toolchain=. When --gcc-toolchain= is specified, the selected
`lib/gcc/$triple/$version` installation may not be desired.

D25661 <https://reviews.llvm.org/D25661> added gcc-config detection for Gentoo: `ScanGentooConfigs`.
The implementation may be simplified by using --gcc-install-dir=.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D133329

Files:
  clang/include/clang/Driver/Options.td
  clang/lib/Driver/ToolChains/Gnu.cpp
  clang/test/Driver/gcc-install-dir.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D133329.458061.patch
Type: text/x-patch
Size: 6476 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220905/bf63cf16/attachment.bin>


More information about the cfe-commits mailing list