[libc-commits] [libc] [libc] move setjmp+longjmp to fullbuild-only entrypoints (PR #96708)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Tue Jun 25 15:34:11 PDT 2024


https://github.com/nickdesaulniers created https://github.com/llvm/llvm-project/pull/96708

The opaque type jmp_buf should only be tested in fullbuild mode.

>From 6173b523e432ec5ba8df7ec5500f52cdcd24079d Mon Sep 17 00:00:00 2001
From: Nick Desaulniers <ndesaulniers at google.com>
Date: Tue, 25 Jun 2024 15:33:16 -0700
Subject: [PATCH] [libc] move setjmp+longjmp to fullbuild-only entrypoints

The opaque type jmp_buf should only be tested in fullbuild mode.
---
 libc/config/linux/arm/entrypoints.txt | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/libc/config/linux/arm/entrypoints.txt b/libc/config/linux/arm/entrypoints.txt
index 53cdcc3caab1c..85cd5dee84b08 100644
--- a/libc/config/linux/arm/entrypoints.txt
+++ b/libc/config/linux/arm/entrypoints.txt
@@ -20,10 +20,6 @@ set(TARGET_LIBC_ENTRYPOINTS
     # errno.h entrypoints
     libc.src.errno.errno
 
-    # setjmp.h entrypoints
-    libc.src.setjmp.longjmp
-    libc.src.setjmp.setjmp
-
     # string.h entrypoints
     libc.src.string.bcmp
     libc.src.string.bcopy
@@ -185,6 +181,14 @@ set(TARGET_LIBC_ENTRYPOINTS
 
 )
 
+if(LLVM_LIBC_FULL_BUILD)
+  list(APPEND TARGET_LIBC_ENTRYPOINTS
+    # setjmp.h entrypoints
+    libc.src.setjmp.longjmp
+    libc.src.setjmp.setjmp
+  )
+endif()
+
 set(TARGET_LIBM_ENTRYPOINTS
     # fenv.h entrypoints
     libc.src.fenv.feclearexcept



More information about the libc-commits mailing list