[PATCH] D141206: [clang] [MinGW] Avoid adding <base>/include and <base>/lib when cross compiling

Alvin Wong via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 9 10:40:16 PST 2023


alvinhochun added a comment.

The idea sounds reasonable. I don't know mingw-w64 toolchains well enough, but I'll try:

How does it interact with the following conditions (lines 469-475)? They look like they may be looking for a mingw-w64 sysroot, which may be ignored by the new check.

  else if (llvm::ErrorOr<std::string> TargetSubdir = findClangRelativeSysroot(
               getDriver(), LiteralTriple, getTriple(), SubdirName))
    Base = std::string(llvm::sys::path::parent_path(TargetSubdir.get()));
  else if (llvm::ErrorOr<std::string> GPPName =
               findGcc(LiteralTriple, getTriple()))
    Base = std::string(llvm::sys::path::parent_path(
        llvm::sys::path::parent_path(GPPName.get())));




Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D141206



More information about the cfe-commits mailing list