stdio performance in tango, stdlib, and perl
Sean Kelly
sean at f4.ca
Thu Mar 22 13:29:47 PDT 2007
Andrei Alexandrescu (See Website For Email) wrote:
> Sean Kelly wrote:
>> Andrei Alexandrescu (See Website For Email) wrote:
>>> Several documented attempts of installing Tango failed for me, so in
>>> the end I figured some way to get programs to compile with a special
>>> command line and a modification of dmd.conf. I need to modify
>>> dmd.conf whenever I switch between Phobos programs and Tango programs.
>>
>> This page describes one way to use Tango and Phobos together:
>> http://www.dsource.org/projects/tango/wiki/PhobosTangoCooperation
>> It's Win32-oriented, but the approach should be essentially the same
>> for Linux. One issue with install instructions is that the
>> installation procedure is in flux as we try to simplify/automate it,
>> and some of the documentation is lagging behind.
>
> Here's what worked for me. The script also allows compiling dmd programs
> on the fly. For some reason I needed to include libtango.a in the DFLAGS
> variable.
This is intentional, though it may change later based on user feedback.
That said, my personal belief is that only the compiler runtime code
should be implicitly linked, and the rest should be linked via DFLAGS or
by some other means. In Tango parlance, this would mean implicitly
linking the compiler runtime (libdmd.a), but not the GC code, the Tango
runtime, or Tango user code. This is currently quite possible--it just
isn't the default configuration because it's unnecessarily complex for
most users. For those who are interested however, the process is
outlined here:
http://www.dsource.org/projects/tango/wiki/TopicAdvancedConfiguration
> -----------------------------------------
> #!/bin/sh
>
> D_BIN=$(dirname $(which dmd))
> WHICH=$1
>
> if [ "$WHICH" = "phobos" ]; then
> DFLAGS="-I$D_BIN/../src/phobos -L-L$D_BIN/../lib
> -L-L$D_BIN/../../dm/lib"
> elif [ "$WHICH" = "tango" ]; then
> DFLAGS="-I$D_BIN/../../tango-0.96-bin -version=Tango -version=Posix"
> DFLAGS="$DFLAGS -L-L$D_BIN/../../tango-0.96-bin/lib libtango.a"
> else
> echo "Please pass either phobos or tango as the first argument"
> WHICH=""
> fi
>
> if [ ! -z "$WHICH" ]; then
> shift
> if [ "$*" != "" ]; then
> dmd $*
> else
> export DFLAGS
> echo "dmd configured for $WHICH"
> fi
> fi
> -----------------------------------------
Thanks. I'll look this over and see about adding it to the wiki.
Sean
More information about the Digitalmars-d
mailing list