Skip to content

Commit

Permalink
add mybuild script
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Göttsche <cgzones@googlemail.com>
  • Loading branch information
cgzones committed Jul 14, 2021
1 parent 86ed416 commit f66ccee
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions checkpolicy/mybuild.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

set -e

if [ "$1x" = "cleanx" ]; then
make -C ../libsepol/src/ clean
make clean

exit 0
fi

CC=${CC:-'ccache clang-12'}
CFLAGS=${CFLAGS:-'-O1 -g -fsanitize=address -fsanitize-address-use-after-scope -fno-omit-frame-pointer -fsanitize=undefined -fsanitize=nullability -fsanitize=implicit-conversion -fsanitize=integer -fsanitize=float-divide-by-zero -fsanitize=local-bounds'}

make -C ../libsepol/src/ CC="$CC" CFLAGS="$CFLAGS -Werror -Wall -Wdeclaration-after-statement -Wextra -Wfloat-equal -Wformat -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wnull-dereference -Wpointer-arith -Wshadow -Wstrict-prototypes -Wundef -Wunused -Wwrite-strings" libsepol.a -j4

make clean
make CC="$CC" CFLAGS="$CFLAGS -Werror -Wall -Wcast-qual -Wdeclaration-after-statement -Wextra -Wfloat-equal -Wformat=2 -Winit-self -Wmissing-format-attribute -Wmissing-noreturn -Wmissing-prototypes -Wnull-dereference -Wpointer-arith -Wshadow -Wstrict-prototypes -Wundef -Wunused -Wwrite-strings -isystem $(pwd)/../libsepol/include/" LIBSEPOLA="$(pwd)/../libsepol/src/libsepol.a" -j4

0 comments on commit f66ccee

Please sign in to comment.