[Driver] Only check -nostdinc++ for -stdlib++-isystem
A drive-by change in 53c98d85 made -stdlib++-isystem be suppressed by -nostdinc and -nostdlibinc in addition to -nostdinc++. However, that's contrary to the intent of the flag. It's common to provide your own C++ headers (e.g. when building libc++ by itself or as a compiler-rt dependency) but rely on the system C headers, and having -stdlib++-isystem only look at -nostdinc++ allows us to customize both the C header path (via -nostdinc or -nostdlibinc) and the C++ header path (via -stdlib++-isystem) at the toolchain level but still let users of the toolchain provide their own C++ headers. Add a comment explaining the rationale to make it clearer.
Loading
Please sign in to comment