dastwork sh script supports the env variables "dc" and "mflags"

This commit is contained in:
Basile Burg 2018-10-09 16:16:46 +02:00
parent d5ff97c98e
commit c376201dc1
1 changed files with 8 additions and 3 deletions

11
dastworx/build.sh Normal file → Executable file
View File

@ -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 #iz sources
cd ../etc/iz/import/ cd ../etc/iz/import/
iz=$(find `pwd` -type f -name \*.d) iz=$(find `pwd` -type f -name \*.d)
@ -18,11 +23,11 @@ cd src/
dast=$(find `pwd` -type f -name \*.d) dast=$(find `pwd` -type f -name \*.d)
cd ../ cd ../
echo building... echo building using $DC...
#build #build
dmd ${dast[@]} ${dparse[@]} ${iz[@]} ${stdxalloc[@]} \ $DC ${dast[@]} ${dparse[@]} ${iz[@]} ${stdxalloc[@]} \
-O -release -inline -boundscheck=off \ -O -release -inline -boundscheck=off $MFLAGS \
-Isrc -I../etc/iz/import -I../etc/libdparse/src -I../etc/stdx-allocator/source \ -Isrc -I../etc/iz/import -I../etc/libdparse/src -I../etc/stdx-allocator/source \
-of../bin/dastworx -of../bin/dastworx