DM linker vs GCC linker?

Jacob Carlborg doob at me.com
Wed Jan 18 07:35:38 PST 2012


On 2012-01-18 16:00, Andrea Fontana wrote:
> This param:
> --Xlinker --export-dynamic
>
> slows down the entire app (check() std.xml function) by 29x on test.
>
> Is it useful to add it on default config? Probably if you use external
> dl, you should add it...
>
> andrea at ububox <mailto:andrea at ububox>:~/src/xml-test$ dmd -c test.d &&
> gcc test.o -o testgcc2 -m64 -Xlinker --export-dynamic -Xlinker
> --no-warn-search-mismatch -lphobos2 -lpthread -lm -lrt
> andrea at ububox <mailto:andrea at ububox>:~/src/xml-test$ time ./testgcc2
> cities.xml
>
> real 3m23.426s
> user 3m22.901s
> sys 0m0.276s
>
> andrea at ububox:~/src/xml-test$ dmd -c test.d && gcc test.o -o testgcc2
> -m64 -Xlinker --no-warn-search-mismatch -lphobos2 -lpthread -lm -lrt
> andrea at ububox <mailto:andrea at ububox>:~/src/xml-test$ time ./testgcc2
> cities.xml
>
> real 0m7.433s
> user 0m7.316s
> sys 0m0.112s
>
> Il giorno mer, 18/01/2012 alle 15.43 +0100, Trass3r ha scritto:
>> >  dmd -c test.d&&  gcc test.o -lphobos2 -lrt -lpthread -o testgcc
>> >  vs
>> >  dmd -c test.d&&  dmd test.o -oftestd
>>
>> Well dmd test.d calls
>> gcc test.o -o test -m64 -Xlinker -L/dmd/linux/lib64 -Xlinker
>> -L/dmd/linux/lib32 -Xlinker --no-warn-search-mismatch -Xlinker
>> --export-dynamic -lphobos2 -lpthread -lm -lrt
>

How about DMD passing --export-dynamic to GCC if -shared is passed to DMD?

-- 
/Jacob Carlborg


More information about the Digitalmars-d mailing list