[clang] [clang] Add option for -nolibc in Driver/ToolChains/Baremetal.cpp (PR #145700)
William Huynh via cfe-commits
cfe-commits at lists.llvm.org
Fri Jun 27 01:56:01 PDT 2025
================
@@ -143,6 +143,20 @@
// RUN: | FileCheck %s --check-prefix=CHECK-RTLIB-GCC
// CHECK-RTLIB-GCC: -lgcc
+// RUN: %clang -### --target=arm-none-eabi -nolibc %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-NOLIBC
+// CHECK-NOLIBC-NOT: "-lc"
+// CHECK-NOLIBC-NOT: "-lm"
+// CHECK-NOLIBC-NOT: "-lc++"
+// CHECK-NOLIBC: "{{[^"]*}}libclang_rt.builtins.a"
+
+// RUN: %clang -### --target=arm-none-eabi -nostdlib %s 2>&1 \
+// RUN: | FileCheck %s --check-prefix=CHECK-NOSTDLIB
+// CHECK-NOSTDLIB-NOT: "-lc"
+// CHECK-NOSTDLIB-NOT: "-lm"
+// CHECK-NOSTDLIB-NOT: "-lc++"
+// CHECK-NOSTDLIB-NOT: "{{[^"]*}}libclang_rt.builtins.a"
----------------
saturn691 wrote:
Ditto previous comment
https://github.com/llvm/llvm-project/pull/145700
More information about the cfe-commits
mailing list