Building LDC for the first time
Daniel N via digitalmars-d-ldc
digitalmars-d-ldc at puremagic.com
Thu Aug 21 19:24:08 PDT 2014
Dear All,
I downloaded ldc-0.14.0-src.tar.gz and tried following the
instructions located at:
http://wiki.dlang.org/Building_LDC_on_MinGW_x86
I was only partially successful.
$ uname
MINGW32_NT-6.1
My version:
LDC - the LLVM D compiler (0.14.0):
based on DMD v2.065 and LLVM 3.5.0svn
Default target: i686-pc-windows-gnu
Official version:
LDC - the LLVM D compiler (0.14.0):
based on DMD v2.065 and LLVM 3.4.2
Default target: i686-pc-mingw32
I realize I used too new LLVM, but nevertheless there's two
things puzzling me:
1) My targetTriple.getOS() == llvm::Triple::Win32 which results
in my compiler invoking the Visual Studio Linker, which isn't
necessarily a bad thing, but it was unexpected, because the
official build uses ld from MinGW.
2) The compiler builds fine, but the Druntime/Phobos doesn't.
"ldc/import\core\stdc\math.d(672): Error: undefined identifier
isnan, did you mean function nan?" I guess that's a consequence
of my compiler having an identity crisis, using the wrong version
code-path...
The combination of these two issues, is a problem since the
official build uses a different toolchain so I cannot use the
libs from it together with the MS linker, which means I'm stuck.
I also tried using VS Express 2013:
http://wiki.dlang.org/Building_and_hacking_LDC_on_Windows_using_MSVC
But I can't get it to build either... my stdlib.h already defines:
long double strtold(const char *p,char **endp);
(even if long double is just 8 bytes)
But the workaround in \dmd2\root\longdouble.h redefines it as:
longdouble strtold(const char *p,char **endp);
I didn't find a clean way to solve it, every workaround resulted
in a new error down the road until I gave up and switched to
using MinGW...
Any advice for me? (I can't switch OS right now).
More information about the digitalmars-d-ldc
mailing list