Skip to content

Conversation

bassiounix
Copy link
Contributor

@bassiounix bassiounix commented Oct 16, 2025

RFC https://discourse.llvm.org/t/rfc-bounds-checking-interfaces-for-llvm-libc/87685

Add libannex_k.a as build target in LLVM libc.

Copy link
Contributor Author

bassiounix commented Oct 16, 2025

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@llvmbot
Copy link
Member

llvmbot commented Oct 16, 2025

@llvm/pr-subscribers-backend-risc-v

@llvm/pr-subscribers-libc

Author: Muhammad Bassiouni (bassiounix)

Changes

RFC https://discourse.llvm.org/t/rfc-bounds-checking-interfaces-for-llvm-libc/87685

Add libannex_k.a as build target in LLVM libc.


Full diff: https://github.com/llvm/llvm-project/pull/163869.diff

4 Files Affected:

  • (modified) libc/config/linux/aarch64/entrypoints.txt (+3)
  • (modified) libc/config/linux/riscv/entrypoints.txt (+3)
  • (modified) libc/config/linux/x86_64/entrypoints.txt (+3)
  • (modified) libc/lib/CMakeLists.txt (+6-3)
diff --git a/libc/config/linux/aarch64/entrypoints.txt b/libc/config/linux/aarch64/entrypoints.txt
index 4824684103983..f372a7a4c0af0 100644
--- a/libc/config/linux/aarch64/entrypoints.txt
+++ b/libc/config/linux/aarch64/entrypoints.txt
@@ -1,3 +1,5 @@
+set(TARGET_ANNEX_K_ENTRYPOINTS "")
+
 set(TARGET_LIBC_ENTRYPOINTS
     # ctype.h entrypoints
     libc.src.ctype.isalnum
@@ -1176,4 +1178,5 @@ endif()
 set(TARGET_LLVMLIBC_ENTRYPOINTS
   ${TARGET_LIBC_ENTRYPOINTS}
   ${TARGET_LIBM_ENTRYPOINTS}
+  ${TARGET_ANNEX_K_ENTRYPOINTS}
 )
diff --git a/libc/config/linux/riscv/entrypoints.txt b/libc/config/linux/riscv/entrypoints.txt
index 5f407e842121e..18043c9e43759 100644
--- a/libc/config/linux/riscv/entrypoints.txt
+++ b/libc/config/linux/riscv/entrypoints.txt
@@ -1,3 +1,5 @@
+set(TARGET_ANNEX_K_ENTRYPOINTS "")
+
 set(TARGET_LIBC_ENTRYPOINTS
     # ctype.h entrypoints
     libc.src.ctype.isalnum
@@ -1321,4 +1323,5 @@ endif()
 set(TARGET_LLVMLIBC_ENTRYPOINTS
   ${TARGET_LIBC_ENTRYPOINTS}
   ${TARGET_LIBM_ENTRYPOINTS}
+  ${TARGET_ANNEX_K_ENTRYPOINTS}
 )
diff --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index 87b78a337b875..20d6274fec223 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -1,3 +1,5 @@
+set(TARGET_ANNEX_K_ENTRYPOINTS "")
+
 set(TARGET_LIBC_ENTRYPOINTS
     # ctype.h entrypoints
     libc.src.ctype.isalnum
@@ -1377,4 +1379,5 @@ endif()
 set(TARGET_LLVMLIBC_ENTRYPOINTS
   ${TARGET_LIBC_ENTRYPOINTS}
   ${TARGET_LIBM_ENTRYPOINTS}
+  ${TARGET_ANNEX_K_ENTRYPOINTS}
 )
diff --git a/libc/lib/CMakeLists.txt b/libc/lib/CMakeLists.txt
index ce0b07fb6cb49..6fde2c8fc827d 100644
--- a/libc/lib/CMakeLists.txt
+++ b/libc/lib/CMakeLists.txt
@@ -2,10 +2,13 @@ set(libc_archive_targets "")
 set(libc_archive_names "")
 set(libc_archive_entrypoint_lists "")
 if(LLVM_LIBC_FULL_BUILD)
-  list(APPEND libc_archive_names c m)
-  list(APPEND libc_archive_targets libc libm)
+  list(APPEND libc_archive_names c m annex_k)
+  list(APPEND libc_archive_targets libc libm libannex_k)
   list(APPEND libc_archive_entrypoint_lists
-       TARGET_LIBC_ENTRYPOINTS TARGET_LIBM_ENTRYPOINTS)
+       TARGET_LIBC_ENTRYPOINTS
+       TARGET_LIBM_ENTRYPOINTS
+       TARGET_ANNEX_K_ENTRYPOINTS
+  )
 else()
   list(APPEND libc_archive_names llvmlibc)
   list(APPEND libc_archive_targets libc)

@bassiounix bassiounix force-pushed the users/bassiounix/spr/10-17-_libc_annex_k_add_libannex_k_as_build_target_in_llvm_libc branch from a2f4fe3 to 7275542 Compare October 16, 2025 21:54
@bassiounix bassiounix force-pushed the users/bassiounix/spr/10-17-_libc_annex_k_add_libannex_k_as_build_target_in_llvm_libc branch from 7275542 to 1b6ea98 Compare October 16, 2025 22:17
@bassiounix bassiounix force-pushed the users/bassiounix/spr/10-13-_libc_annex_k_add_constraint_handler_t branch from 4490790 to 3ce1678 Compare October 16, 2025 22:17
@bassiounix bassiounix force-pushed the users/bassiounix/spr/10-13-_libc_annex_k_add_constraint_handler_t branch from 3ce1678 to 49c7417 Compare October 16, 2025 23:01
@bassiounix bassiounix force-pushed the users/bassiounix/spr/10-17-_libc_annex_k_add_libannex_k_as_build_target_in_llvm_libc branch 2 times, most recently from b99b05c to 65e8394 Compare October 16, 2025 23:06
@bassiounix bassiounix force-pushed the users/bassiounix/spr/10-13-_libc_annex_k_add_constraint_handler_t branch from 49c7417 to 5a59294 Compare October 16, 2025 23:06
@bassiounix bassiounix force-pushed the users/bassiounix/spr/10-13-_libc_annex_k_add_constraint_handler_t branch from 5a59294 to d836ef1 Compare October 17, 2025 13:13
@bassiounix bassiounix force-pushed the users/bassiounix/spr/10-17-_libc_annex_k_add_libannex_k_as_build_target_in_llvm_libc branch from 65e8394 to 10c6deb Compare October 17, 2025 13:13
@bassiounix bassiounix closed this Oct 18, 2025
@bassiounix bassiounix deleted the users/bassiounix/spr/10-17-_libc_annex_k_add_libannex_k_as_build_target_in_llvm_libc branch October 18, 2025 13:42
@bassiounix bassiounix restored the users/bassiounix/spr/10-17-_libc_annex_k_add_libannex_k_as_build_target_in_llvm_libc branch October 18, 2025 13:49
@bassiounix bassiounix deleted the users/bassiounix/spr/10-17-_libc_annex_k_add_libannex_k_as_build_target_in_llvm_libc branch October 18, 2025 13:49
@bassiounix bassiounix restored the users/bassiounix/spr/10-17-_libc_annex_k_add_libannex_k_as_build_target_in_llvm_libc branch October 18, 2025 13:54
@bassiounix bassiounix deleted the users/bassiounix/spr/10-17-_libc_annex_k_add_libannex_k_as_build_target_in_llvm_libc branch October 18, 2025 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants