1
0
Fork 0
mirror of https://github.com/tailix/libclayer.git synced 2024-11-20 11:06:24 -05:00

Remove assertions

This commit is contained in:
Alex Kotov 2022-12-25 13:57:12 +04:00
parent d5330b1744
commit e7a6eed1cf
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
5 changed files with 3 additions and 20 deletions

View file

@ -24,7 +24,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
matrix: matrix:
assert: ['--disable-assert', '--enable-assert']
cc: ['gcc', 'clang', 'tcc'] cc: ['gcc', 'clang', 'tcc']
opt: ['', '-O0', '-O3'] opt: ['', '-O0', '-O3']
steps: steps:
@ -34,7 +33,7 @@ jobs:
- name: autogen - name: autogen
run: ./autogen.sh run: ./autogen.sh
- name: configure - name: configure
run: ./configure ${{matrix.assert}} --enable-checks CC='${{matrix.cc}}' CFLAGS='${{matrix.opt}}' run: ./configure --enable-checks CC='${{matrix.cc}}' CFLAGS='${{matrix.opt}}'
- name: make - name: make
run: make run: make
- name: check - name: check
@ -106,9 +105,6 @@ jobs:
freestanding: freestanding:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy:
matrix:
assert: ['--disable-assert', '--enable-assert']
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v2
- name: apt update - name: apt update
@ -118,7 +114,7 @@ jobs:
- name: autogen - name: autogen
run: ./autogen.sh run: ./autogen.sh
- name: configure - name: configure
run: ./configure --host='i386-elf' ${{matrix.assert}} --enable-freestanding --with-libc CC="$(which i686-linux-gnu-gcc)" run: ./configure --host='i386-elf' --enable-freestanding --with-libc CC="$(which i686-linux-gnu-gcc)"
- name: make - name: make
run: make run: make

View file

@ -2,7 +2,7 @@ include $(top_srcdir)/make/shared.am
include $(top_srcdir)/make/checks.am include $(top_srcdir)/make/checks.am
ACLOCAL_AMFLAGS = -I m4 ACLOCAL_AMFLAGS = -I m4
EXTRA_DIST = autogen.sh CONTRIBUTING.md sha256sums.txt src/assert.h EXTRA_DIST = autogen.sh CONTRIBUTING.md sha256sums.txt
SUBDIRS = include SUBDIRS = include

View file

@ -93,7 +93,6 @@ stable options.
#### Features #### Features
* `--(enable|disable)-assert` - assertions
* `--(enable|disable)-float` - floating-point arithmetic * `--(enable|disable)-float` - floating-point arithmetic
* `--(enable|disable)-werror` - fail on warning (`CFLAGS+='-Werror'`) * `--(enable|disable)-werror` - fail on warning (`CFLAGS+='-Werror'`)

View file

@ -44,7 +44,6 @@ AC_SUBST([PACKAGE_VERSION_SO], m4_normalize(m4_include([VERSION_SO])))
############### ###############
dnl Features (enabled by default) dnl Features (enabled by default)
AC_ARG_ENABLE([assert], AS_HELP_STRING([--disable-assert], [disable assertions]))
AC_ARG_ENABLE([float], AS_HELP_STRING([--disable-float], [disable floating-point arithmetic])) AC_ARG_ENABLE([float], AS_HELP_STRING([--disable-float], [disable floating-point arithmetic]))
AC_ARG_ENABLE([werror], AS_HELP_STRING([--disable-werror], [disable -Werror])) AC_ARG_ENABLE([werror], AS_HELP_STRING([--disable-werror], [disable -Werror]))
@ -81,7 +80,6 @@ AS_IF([test "$enable_checks_all" = yes], do_enable_checks_all)
################## ##################
dnl Features (enabled by default) dnl Features (enabled by default)
AS_IF([test "$enable_assert" = no ], [enable_assert=no], [enable_assert=yes])
AS_IF([test "$enable_float" = no ], [enable_float=no], [enable_float=yes]) AS_IF([test "$enable_float" = no ], [enable_float=no], [enable_float=yes])
AS_IF([test "$enable_werror" = no ], [enable_werror=no], [enable_werror=yes]) AS_IF([test "$enable_werror" = no ], [enable_werror=no], [enable_werror=yes])
@ -123,7 +121,6 @@ dnl Architecture (additional)
AM_CONDITIONAL([ASM_X86], [test "$host_cpu" = i386 -o "$host_cpu" = x86_64]) AM_CONDITIONAL([ASM_X86], [test "$host_cpu" = i386 -o "$host_cpu" = x86_64])
dnl Features (enabled by default) dnl Features (enabled by default)
AM_CONDITIONAL([ENABLE_ASSERT], [test "$enable_assert" = yes])
AM_CONDITIONAL([ENABLE_FLOAT], [test "$enable_float" = yes]) AM_CONDITIONAL([ENABLE_FLOAT], [test "$enable_float" = yes])
AM_CONDITIONAL([ENABLE_WERROR], [test "$enable_werror" = yes]) AM_CONDITIONAL([ENABLE_WERROR], [test "$enable_werror" = yes])
@ -155,7 +152,6 @@ AS_IF([test "$host_cpu" = i386], [AC_DEFINE([ASM_X86],
AS_IF([test "$host_cpu" = x86_64], [AC_DEFINE([ASM_X86], [1], [architecture is x86])]) AS_IF([test "$host_cpu" = x86_64], [AC_DEFINE([ASM_X86], [1], [architecture is x86])])
dnl Features (enabled by default) dnl Features (enabled by default)
AS_IF([test "$enable_assert" = yes], [AC_DEFINE([ENABLE_ASSERT], [1], [enabled assertions])])
AS_IF([test "$enable_float" = yes], [AC_DEFINE([ENABLE_FLOAT], [1], [enabled floating-point arithmetic])]) AS_IF([test "$enable_float" = yes], [AC_DEFINE([ENABLE_FLOAT], [1], [enabled floating-point arithmetic])])
AS_IF([test "$enable_werror" = yes], [AC_DEFINE([ENABLE_WERROR], [1], [enabled -Werror])]) AS_IF([test "$enable_werror" = yes], [AC_DEFINE([ENABLE_WERROR], [1], [enabled -Werror])])

View file

@ -1,8 +0,0 @@
#ifndef KERNAUX_INCLUDED_ASSERT
#define KERNAUX_INCLUDED_ASSERT
#define KERNAUX_PANIC(msg) ((void)0)
#define KERNAUX_ASSERT(cond) ((void)0)
#define KERNAUX_NOTNULL(cond) KERNAUX_ASSERT(cond)
#endif