Browse Source

Add debug option and flags to the Premake build and compile scripts.

pull/1352/head
João Matos 5 years ago committed by João Matos
parent
commit
bd783b1cd0
  1. 17
      build/Compile.sh
  2. 5
      build/Helpers.lua
  3. 1
      build/scripts/LLVM.lua

17
build/Compile.sh

@ -2,6 +2,19 @@ @@ -2,6 +2,19 @@
set -e
CUR_DIR=$(cd "$(dirname "$0")"; pwd)
DEBUG=false
for i in "$@"
do
case $i in
-debug|--debug)
DEBUG=true
;;
*)
# unknown option
;;
esac
done
if [ "$(uname)" == "Darwin" ]; then
PREMAKE=$CUR_DIR/premake5-osx;
@ -25,6 +38,10 @@ fi @@ -25,6 +38,10 @@ fi
export PATH=$PATH:$MONO_PATH
$PREMAKE --file=$CUR_DIR/premake5.lua gmake "$@"
if $DEBUG; then
BUILD_CONF=debug_x64;
fi
config=$BUILD_CONF make -C $CUR_DIR/gmake/
BUILD_CONF_DIR="$(tr '[:lower:]' '[:upper:]' <<< ${BUILD_CONF:0:1})${BUILD_CONF:1}"

5
build/Helpers.lua

@ -25,6 +25,11 @@ newoption { @@ -25,6 +25,11 @@ newoption {
description = "disable examples from being included"
}
newoption {
trigger = "debug",
description = "enable debug mode"
}
explicit_target_architecture = _OPTIONS["arch"]
function get_mono_path()

1
build/scripts/LLVM.lua

@ -124,6 +124,7 @@ function get_llvm_package_name(rev, conf, arch) @@ -124,6 +124,7 @@ function get_llvm_package_name(rev, conf, arch)
end
function get_llvm_configuration_name(debug)
debug = _OPTIONS["debug"]
if debug == true then
return "Debug"
end

Loading…
Cancel
Save