MaskRay added a comment.

In D97993#2607523 <https://reviews.llvm.org/D97993#2607523>, @manojgupta wrote:

> Another concern is people generally want clang to work out of box without any 
> special arguments.  As a user, after installing clang's distro package or 
> building from source, I expect that basic compilation should work out-of-box 
> which includes gcc detection.
> i.e. "clang foo.cpp -o foo" should just work in most cases.
>
> If a user now needs to pass "-gcc-toolchain" to find gcc libraries when it 
> just used to work, that is most likely not desirable.

There may be some confusion. The regular usage all works fine.

- `clang++ foo.cpp` detects GCC installation.
- `clang++ --gcc-toolchain=Inputs foo.cpp` detects GCC installation under 
Inputs.
- `clang++ -BInputs foo.cpp` detects GCC installation under Inputs and `/`. 
With this patch `Inputs` is not used for detection. `Inputs` is still used for 
finding executables (ld, as)
- `clang++ -BA --gcc-toolchain=B foo.cpp` detects GCC installation under A and 
B. With this patch, only B is used for detection.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97993/new/

https://reviews.llvm.org/D97993

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to