[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 18:21:10 PDT 2021


sthibaul added inline comments.


================
Comment at: clang/test/Driver/hurd.cpp:4
+// RUN: %clang -no-canonical-prefixes %s -### 2>&1 \
+// RUN:     --target=i386-pc-gnu \
+// RUN:     --sysroot=%S/Inputs/basic_hurd_tree \
----------------
MaskRay wrote:
> The target should exactly match the hurd triple. Other aliases are supported but should be considered discouraged.
> 
> Driver testing is difficult. Good to test `-DCLANG_DEFAULT_RTLIB=compiler-rt -DCLANG_DEFAULT_CXX_STDLIB=libc++` as well whether you need to fix some options.
> 
> If `hurd.c` has now duplicated testing for some properties, consider dropping it. We should try making tests orthogonal.
> The target should exactly match the hurd triple. Other aliases are supported but should be considered discouraged.

Well, i386-pc-gnu is the GCC triplet for hurd on x86. i386-pc-hurd-gnu is llvm-only. Alright anyway.

> If hurd.c has now duplicated testing for some properties, consider dropping it.

Ok I have moved everything from hurd.c to hurd.cpp.


================
Comment at: clang/test/Driver/hurd.cpp:20
+// CHECK: "-dynamic-linker" "/lib/ld.so"
+// CHECK: "{{.*}}/usr/lib/gcc/i686-gnu/4.6.0{{/|\\\\}}crtbegin.o"
+// CHECK-SAME: {{^}} "-L[[SYSROOT]]/usr/lib/gcc/i686-gnu/4.6.0"
----------------
MaskRay wrote:
> You probably missed that I used `"-L` as the first line value (also note that the thing after `CHECK:` is aligned). The ensures the test can catch the case when a "-L" is added to the start of the list.
I noticed that afterwards indeed, fixed so.


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