From c376201dc1286544886ce6057e9c7e9d09d5d228 Mon Sep 17 00:00:00 2001 From: Basile Burg Date: Tue, 9 Oct 2018 16:16:46 +0200 Subject: [PATCH] dastwork sh script supports the env variables "dc" and "mflags" --- dastworx/build.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) mode change 100644 => 100755 dastworx/build.sh diff --git a/dastworx/build.sh b/dastworx/build.sh old mode 100644 new mode 100755 index 613b12ea..8d637235 --- a/dastworx/build.sh +++ b/dastworx/build.sh @@ -1,3 +1,8 @@ +if [[ -z "$DC" ]]; then DC=dmd; fi +if [[ "$DC" == "ldc" ]]; then DC=ldmd2; fi +if [[ "$DC" == "gdc" ]]; then DC=gdmd; fi +if [[ -z "$MFLAGS" ]]; then MFLAGS=-m64; fi + #iz sources cd ../etc/iz/import/ iz=$(find `pwd` -type f -name \*.d) @@ -18,11 +23,11 @@ cd src/ dast=$(find `pwd` -type f -name \*.d) cd ../ -echo building... +echo building using $DC... #build -dmd ${dast[@]} ${dparse[@]} ${iz[@]} ${stdxalloc[@]} \ --O -release -inline -boundscheck=off \ +$DC ${dast[@]} ${dparse[@]} ${iz[@]} ${stdxalloc[@]} \ +-O -release -inline -boundscheck=off $MFLAGS \ -Isrc -I../etc/iz/import -I../etc/libdparse/src -I../etc/stdx-allocator/source \ -of../bin/dastworx