[libc-commits] [libc] 7ffa52d - [libc] re-enable assert

Michael Jones via libc-commits libc-commits at lists.llvm.org
Tue Nov 15 13:39:40 PST 2022


Author: Michael Jones
Date: 2022-11-15T13:39:34-08:00
New Revision: 7ffa52dfd12b51201162a317808147865bffd345

URL: https://github.com/llvm/llvm-project/commit/7ffa52dfd12b51201162a317808147865bffd345
DIFF: https://github.com/llvm/llvm-project/commit/7ffa52dfd12b51201162a317808147865bffd345.diff

LOG: [libc] re-enable assert

The assert functions were disabled while the signal functions were being
fixed. This patch re-enables them.

Reviewed By: sivachandra

Differential Revision: https://reviews.llvm.org/D138056

Added: 
    

Modified: 
    libc/config/linux/x86_64/entrypoints.txt
    libc/spec/llvm_libc_ext.td
    libc/src/CMakeLists.txt
    libc/test/src/CMakeLists.txt

Removed: 
    


################################################################################
diff  --git a/libc/config/linux/x86_64/entrypoints.txt b/libc/config/linux/x86_64/entrypoints.txt
index 5b34636dc5fb..1512640b7c14 100644
--- a/libc/config/linux/x86_64/entrypoints.txt
+++ b/libc/config/linux/x86_64/entrypoints.txt
@@ -313,7 +313,7 @@ set(TARGET_LIBM_ENTRYPOINTS
 if(LLVM_LIBC_FULL_BUILD)
   list(APPEND TARGET_LIBC_ENTRYPOINTS
     # assert.h entrypoints
-    # libc.src.assert.__assert_fail
+    libc.src.assert.__assert_fail
 
     # dirent.h entrypoints
     libc.src.dirent.closedir

diff  --git a/libc/spec/llvm_libc_ext.td b/libc/spec/llvm_libc_ext.td
index 428d5bc5fcc8..76f06223756d 100644
--- a/libc/spec/llvm_libc_ext.td
+++ b/libc/spec/llvm_libc_ext.td
@@ -28,7 +28,6 @@ def LLVMLibcExt : StandardSpec<"llvm_libc_ext"> {
               "__assert_fail",
               RetValSpec<NoReturn>,
               [ArgSpec<ConstCharPtr>, ArgSpec<ConstCharPtr>, ArgSpec<UnsignedType>, ArgSpec<ConstCharPtr>]
-
           >,
       ]
   >;

diff  --git a/libc/src/CMakeLists.txt b/libc/src/CMakeLists.txt
index eac68d3187ca..32d557ad7157 100644
--- a/libc/src/CMakeLists.txt
+++ b/libc/src/CMakeLists.txt
@@ -23,9 +23,7 @@ if(NOT LLVM_LIBC_FULL_BUILD)
   return()
 endif()
 
-# The signal API is currently disabled as signal.h is incorrect.
-# since assert uses the signal API, we disable assert also.
-# add_subdirectory(assert)
+add_subdirectory(assert)
 add_subdirectory(setjmp)
 add_subdirectory(signal)
 add_subdirectory(spawn)

diff  --git a/libc/test/src/CMakeLists.txt b/libc/test/src/CMakeLists.txt
index c4f0aab5a380..426ab66a54c1 100644
--- a/libc/test/src/CMakeLists.txt
+++ b/libc/test/src/CMakeLists.txt
@@ -49,9 +49,7 @@ if(NOT LLVM_LIBC_FULL_BUILD)
 endif()
 
 add_subdirectory(dirent)
-# The signal API is currently disabled as signal.h is incorrect.
-# since assert uses the signal API, we disable assert also.
-# add_subdirectory(assert)
+add_subdirectory(assert)
 add_subdirectory(setjmp)
 add_subdirectory(signal)
 add_subdirectory(spawn)


        


More information about the libc-commits mailing list