diff options
author | WaLyong Cho <walyong.cho@samsung.com> | 2016-11-15 14:01:06 +0900 |
---|---|---|
committer | WaLyong Cho <walyong.cho@samsung.com> | 2016-11-15 14:12:48 +0900 |
commit | 574dbaa55e4f8c5efd29e4eacad0e6ad5281e8cd (patch) | |
tree | 0ad85067b6c033c01e1dfb684b10e70fc6252587 | |
parent | f949f53e9e76545325d69e8f4445c6cc61c44949 (diff) | |
download | libsystem-574dbaa55e4f8c5efd29e4eacad0e6ad5281e8cd.tar.gz libsystem-574dbaa55e4f8c5efd29e4eacad0e6ad5281e8cd.tar.bz2 libsystem-574dbaa55e4f8c5efd29e4eacad0e6ad5281e8cd.zip |
autogen.sh: add some of useful options
* c: do normal configure
* d: do configure with none optimization
* g: Optimize debugging experience. -Og enables optimizations that do
not interfere with debugging. It should be the optimization level of
choice for the standard edit-compile-debug cycle, offering a
reasonable level of optimization while maintaining fast compilation
and a good debugging experience.
* l: build with llvm
* s: support clang scan-build(front-end of llvm)
Change-Id: Id887143b8d3b7a8388d876c8c5cbea4e4505a375
Signed-off-by: WaLyong Cho <walyong.cho@samsung.com>
-rwxr-xr-x | autogen.sh | 24 |
1 files changed, 24 insertions, 0 deletions
@@ -2,6 +2,8 @@ set -e +opt="$1" + if [ -f .git/hooks/pre-commit.sample ] && [ ! -f .git/hooks/pre-commit ]; then # This part is allowed to fail cp -p .git/hooks/pre-commit.sample .git/hooks/pre-commit && \ @@ -16,3 +18,25 @@ fi touch README INSTALL autoreconf --force --install --verbose || exit $? + +if [ "x$opt" = "xc" ]; then + set -x + ./configure $args + make clean > /dev/null +elif [ "x$opt" = "xd" ]; then + set -x + ./configure CFLAGS='-g -O0 -ftrapv' $args + make clean > /dev/null +elif [ "x$opt" = "xg" ]; then + set -x + ./configure CFLAGS='-g -Og -ftrapv' $args + make clean > /dev/null +elif [ "x$opt" = "xl" ]; then + set -x + ./configure CC=clang CFLAGS='-g -O0 -ftrapv' $args + make clean > /dev/null +elif [ "x$opt" = "xs" ]; then + set -x + scan-build ./configure CFLAGS='-std=gnu99 -g -O0 -ftrapv' $args + scan-build make +fi |