[PATCH] D101331: hurd: Detect libstdc++ include paths on Debian Hurd i386
Samuel Thibault via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Apr 26 17:47:57 PDT 2021
sthibaul marked 4 inline comments as done.
sthibaul added inline comments.
================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:3014
llvm::opt::ArgStringList &CC1Args) const {
- addGCCLibStdCxxIncludePaths(DriverArgs, CC1Args);
+ if (!GCCInstallation.isValid())
+ return;
----------------
MaskRay wrote:
> I'd be glad if we could use `GCCInstallation.isValid()`.
>
> However, @thakis has a chromium usage where `lib/gcc/$triple/crtbegin.o` is not provided while compile-only libstdc++ search paths are expected.
>
> For now, use `GCCInstallation.isValid() ? GCCInstallation.getTriple().str() : ""`
Ok, fixed so
================
Comment at: clang/lib/Driver/ToolChains/Gnu.cpp:3018
+ StringRef TripleStr = GCCInstallation.getTriple().str();
+
+ addGCCLibStdCxxIncludePaths(DriverArgs, CC1Args, TripleStr);
----------------
MaskRay wrote:
> No need for a blank line
Ok, fixed so
================
Comment at: clang/test/Driver/hurd.cpp:9
+/// though the installation is i686-gnu.
+// CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0/../../../../include/c++/4.6.0"
+// CHECK-SAME: "-internal-isystem" "[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0/../../../../include/i386-gnu/c++/4.6.0"
----------------
MaskRay wrote:
> Windows may use backslashes in some places.
> It is really difficult to tell where need backslashes, so I just add `UNSUPPORTED: system-windows` to linux-cross.cpp
Ok, added so.
================
Comment at: clang/test/Driver/hurd.cpp:21
+// CHECK-SAME: "-L[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0"
+// CHECK-SAME: "-L[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0/../../../../lib32"
+// CHECK-SAME: "-L[[SYSROOT]]/lib/i386-gnu"
----------------
MaskRay wrote:
> `{{^}} ` is important, otherwise a new addition cannot be detected.
Ok, added so.
================
Comment at: clang/test/Driver/hurd.cpp:5
+// RUN: | FileCheck --check-prefix=CHECK %s
+// CHECK-NOT: warning:
+// CHECK: "-cc1"
----------------
MaskRay wrote:
> sthibaul wrote:
> > MaskRay wrote:
> > > The warning negative pattern doesn't really work.
> > You mean because it was misplaced?
> > Indeed, fixed so.
> `-###` cannot detect unused warning options: `clang -Wfoobar '-###' a.cc -c` => no warning
>
> It is probably not the test's task to check it.
Ok, dropped it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D101331/new/
https://reviews.llvm.org/D101331
More information about the cfe-commits
mailing list