some updates
[iv.d.git] / README
blob5d2fe2cb2810c2154237aaba851da8473b18815f
1 WARNING! this is the mirror of Fossil repository at
2 https://ketmar.no-ip.org/fossil/ivd/
4 WARNING! the policy of "being compatible with Vanilla D" is dropped.
6 vanilla D (and dmd as its reference compiler) is going to be more and
7 more broken. stupid compiler refucktoring, dropping useful features...
8 i see it as a complete disaster.
10 thus, i did a hard fork of dmd, and will not "vanilize" any modules in
11 IV anymore.
13 go get Aliced today if you want to use IV!
16 how to get Aliced
17 =================
18 it is probably not that easy, but doable. you will need vanilla dmd 2.076
19 (other versions aren't tested, and versions starting from 2.078 are outright
20 broken).
22 then do this to get Aliced source code:
23 mkdir aliced
24 cd aliced
25 git clone git://repo.or.cz/ivdmd.git dmd
26 cd dmd
27 git checkout k8
28 cd ..
29 git clone git://repo.or.cz/ivdruntime.git druntime
30 cd druntime
31 git checkout k8
32 cd ..
33 git clone git://repo.or.cz/ivdphobos.git phobos
34 cd phobos
35 git checkout k8
36 cd ..
37 git clone git://repo.or.cz/ivdtools.git tools
38 cd tools
39 git checkout k8
40 cd ..
43 to build aliced:
44 cd aliced
45 cd dmd
46 HOST_DMD=/path/to/your/dmd076/dmd make -f posix.mak
47 cd ..
48 cd druntime
49 make -f posix.mak DMD=../dmd/src/dmd
50 cd ..
51 cd phobos
52 make -f posix.mak DMD=../dmd/src/dmd
53 cd ..
56 to install aliced, execute the following shell script from aliced/ directory
57 (note that you either have to be root, or have rights to create directories in /opt/):
59 ============================================
60 #!/bin/sh
61 DMD_INSTALL_PATH=/opt/dmd
62 ARCH=32
64 aliced_dir=`pwd`
65 cd "$aliced_dir"
66 aliced_dir=`pwd`
68 if [ -f phobos/generated/linux/release/${ARCH}/libphobos2.a ]; then
69   phorel="release"
70   echo "MSG: RELEASE Phobos found!"
71 elif [ -f phobos/generated/linux/debug/${ARCH}/libphobos2.a ]; then
72   phorel="debug"
73   echo "MSG: DEBUG Phobos found!"
74 else
75   echo "wtf?! where is Phobos?!"
76   exit 1
79 mkdir $DMD_INSTALL_PATH 2>/dev/null
81 echo "copying dmd..."
82 mkdir -p $DMD_INSTALL_PATH/bin
83 cp dmd/generated/linux/release/32/dmd $DMD_INSTALL_PATH/bin
85 echo "copying runtime..."
86 cd "$aliced_dir/druntime"
87 mkdir -p $DMD_INSTALL_PATH/include/d2
88 cp -r import/* $DMD_INSTALL_PATH/include/d2
89 cd src
90 cp -ar gc $DMD_INSTALL_PATH/include/d2
92 echo "copying phobos..."
93 cd "$aliced_dir/phobos"
94 mkdir -p $DMD_INSTALL_PATH/lib
95 cp -va generated/linux/$phorel/${ARCH}/libphobos2.a $DMD_INSTALL_PATH/lib
96 rm $DMD_INSTALL_PATH/lib/*.o 2>/dev/null
97 cp -ar std $DMD_INSTALL_PATH/include/d2
98 cp -ar etc $DMD_INSTALL_PATH/include/d2
99 rm -rf $DMD_INSTALL_PATH/include/d2/std/experimental 2>/dev/null
101 ( cat <<EOT
102 [Environment]
103 ; the special name %@P% is replaced with the path to this file.
104 DFLAGS=-defaultlib=libphobos2.a -I%@P%/../include/d2 -L-L%@P%/../lib -L--no-warn-search-mismatch -L--export-dynamic -L--demangle=dlang
106 ) >$DMD_INSTALL_PATH/bin/dmd.conf
108 echo "compiling rdmd..."
109 cd "$aliced_dir/tools"
110 $DMD_INSTALL_PATH/bin/dmd -conf=$DMD_INSTALL_PATH/bin/dmd.conf -O -release -of$DMD_INSTALL_PATH/bin/rdmd rdmd.d rpkgman.d -L-s -wi
111 rm $DMD_INSTALL_PATH/bin/*.o 2>/dev/null
113 strip -s $DMD_INSTALL_PATH/bin/* 2>/dev/null
115 cd "$aliced_dir"
116 ============================================
119 now you should have a fully functional Aliced compiler (still named dmd for historical reasons).
120 if you can't figure out what to change in case the script is not working, or what to do next,
121 Aliced is probably not for you. go get vanilla dmd.
123 and no, dub is not supported, and never will be.
126 ok, some last words. to use IV with rdmd, clone IV like this:
128   mkdir /opt/dlibs
129   git clone git://repo.or.cz/iv.d.git /opt/dlibs/iv
131 and add "-I/opt/dlibs" to 'dmd.conf' creation part in Aliced install script.
132 it is advisable to add "-J/opt/dlibs/iv" too.
134 note that it is IMPORTANT to clone IV in the way that it lands in iv/ directory,
135 and to -I a directory of one level upper than iv/.
137 also, it is VERY convenient to clone Adam D. Ruppe's ARSD repo too (i'm using it alot):
139   git clone https://github.com/adamdruppe/arsd.git /opt/dlibs/arsd
141 there is nothing to add to 'dmd.conf' at this stage (only /opt/dlibs is required, and we
142 already added it.)