Created
May 6, 2022 11:14
-
-
Save ibuclaw/73f91fd66b5d4a1a6ad29d739be627c1 to your computer and use it in GitHub Desktop.
dgdc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Minimal wrapper around dmd in order to build gdc-12+ | |
# ../configure --enable-languages=d GDC=dgdc.sh | |
TRANSLATED_ARGS= | |
while [ $# -gt 0 ]; do | |
case "$1" in | |
-frelease) | |
TRANSLATED_ARGS="${TRANSLATED_ARGS} -release" | |
shift | |
;; | |
-fversion=*) | |
TRANSLATED_ARGS="${TRANSLATED_ARGS} -version=`echo $1 | sed 's/.*=//g'`" | |
shift | |
;; | |
-o) | |
shift | |
TRANSLATED_ARGS="${TRANSLATED_ARGS} -of=${1}" | |
shift | |
;; | |
-Wall) | |
TRANSLATED_ARGS="${TRANSLATED_ARGS} -wi" | |
shift | |
;; | |
-Wdeprecated) | |
TRANSLATED_ARGS="${TRANSLATED_ARGS} -dw" | |
shift | |
;; | |
-no-pie|-l*|-L*) | |
TRANSLATED_ARGS="${TRANSLATED_ARGS} -L$1" | |
shift | |
;; | |
-MF) | |
shift | |
TRANSLATED_ARGS="${TRANSLATED_ARGS} -makedeps=$1" | |
shift | |
;; | |
-MT) | |
shift | |
shift | |
;; | |
-D*|-f*|-M*|-W*|-pedantic|-rdynamic|-static-*) | |
shift | |
;; | |
*) | |
TRANSLATED_ARGS="${TRANSLATED_ARGS} $1" | |
shift | |
;; | |
esac | |
done | |
dmd $TRANSLATED_ARGS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment