From 6efd400c98cff15347774152481885e2194fbc27 Mon Sep 17 00:00:00 2001 From: Zac Pierson Date: Mon, 6 Feb 2017 15:45:51 -0600 Subject: [PATCH] Updated build script in an attempt to track down a segfault. It's not helping, though. --- build.sh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/build.sh b/build.sh index 059b593c8..a143f52a8 100755 --- a/build.sh +++ b/build.sh @@ -1,6 +1,13 @@ -#!/bin/sh +#!/bin/bash -WARNINGS_DISABLE="-Wno-attributes -Wno-implicit-function-declaration -Wno-incompatible-pointer-types" -LIBRARIES="-pthread -ldl -lm" +release_mode=0 -gcc src/main.c ${WARNINGS_DISABLE} ${LIBRARIES} -o odin +warnings_to_disable="-Wno-attributes -Wno-implicit-function-declaration -Wno-incompatible-pointer-types" +libraries="-pthread -ldl -lm" +other_args="" + +if [ "$release_mode" -eq "0" ]; then + other_args="${other_args} -g -fno-inline-functions -fno-inline-small-functions" +fi + +gcc src/main.c ${warnings_to_disable} ${libraries} ${other_args} -o odin