view bin/ldmd2 @ 1621:fb2e6707ad17

Merge DMD r314+r315: bugzilla 2029 Typesafe variadic functions don't... Both DMD revisions are for fixing bugzilla 2029 (Typesafe variadic functions don't work in CTFE). The DMD r314 commit message is: bugzilla 2029 (Typesafe variadic functions don't work in CTFE The DMD r315 commit message is: bugzilla 2029 - try again --- dmd/constfold.c | 11 ++++- dmd/declaration.c | 21 +++++++++- dmd/declaration.h | 10 ++++- dmd/expression.c | 1 + dmd/interpret.c | 111 +++++++++++++++++++++++++++++++++++++++++++++-------- dmd/mars.h | 2 +- dmd/mtype.c | 2 +- 7 files changed, 135 insertions(+), 23 deletions(-)
author Leandro Lucarella <llucax@gmail.com>
date Wed, 06 Jan 2010 15:18:22 -0300
parents 593f99fddd2f
children
line wrap: on
line source

#! /usr/bin/env bash

# Default to 'ldc' next to this file
LDC=`dirname "$0"`/ldc2
if [ ! -x "$LDC" ]; then
    # If that doesn't work, assume this script was called via $PATH
    # and do the same for ldc
    if which ldc2 &> /dev/null; then
        LDC=ldc2
    else
        echo 'ldc not found, check your installation' >/dev/stderr
        exit 1
    fi
fi

declare -a ARGS
IDX=0
for arg; do
    case "$arg" in
    -C*)
        # turn -Cfoo into -foo.
        # Useful for passing -inline to ldc, for instance.
        arg="-${arg:2}"
        ;;
    -debug|-debug=*|-version=*)
        arg="-d$arg"
        ;;
    -inline)
        arg="-enable-inlining"
        ;;
    -fPIC)
        arg="-relocation-model=pic"
        ;;
    --a|--b|--c|--f|--r|--w|--x|--y)
        # "Hidden debug switches"
        # Are these ever used?
        arg="-hidden-debug${arg:1}"
        ;;
    esac
    ARGS[IDX++]="$arg"
done

exec "$LDC" "${ARGS[@]}"