[PATCH] D134478: BareMetal: detect usr/include/c++/v1 path in sysroot
Fangrui Song via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 3 14:55:35 PDT 2022
MaskRay accepted this revision.
MaskRay added a comment.
This revision is now accepted and ready to land.
LGTM.
================
Comment at: clang/test/Driver/baremetal.cpp:77
+// RUN: mkdir -p %T/baremetal_cxx_sysroot/usr/include/c++/v1
+// RUN: %clangxx -no-canonical-prefixes %s -### -o %t.o 2>&1 \
+// RUN: -target armv6m-none-eabi \
----------------
Delete unused `-no-canonical-prefixes` and `-o %t.o`
Change legacy `-target ` to `--target=`
================
Comment at: clang/test/Driver/baremetal.cpp:85
+// CHECK-V6M-LIBCXX-USR-SAME: "-internal-isystem" "{{[^"]+}}baremetal_cxx_sysroot{{[/\\]+}}usr{{[/\\]+}}include{{[/\\]+}}c++{{[/\\]+}}v1"
+// CHECK-V6M-LIBCXX-USR: "{{[^"]*}}ld{{(\.(lld|bfd|gold))?}}{{(\.exe)?}}" "{{.*}}.o" "-Bstatic"
+// CHECK-V6M-LIBCXX-USR-SAME: "-L{{[^"]*}}{{[/\\]+}}baremetal_cxx_sysroot{{[/\\]+}}lib"
----------------
It's not necessary to test the linker name. `-Bstatic` is a good enough indicator.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D134478/new/
https://reviews.llvm.org/D134478
More information about the cfe-commits
mailing list