Open 00sapo opened 4 years ago
This is how I managed to compile it on Windows. Took me a few hours to figure out:
git clone --recursive https://github.com/Syniurge/Calypso
cd Calypso
# Download and place the below in directory
# https://github.com/ldc-developers/llvm-project/releases/download/ldc-v9.0.1/llvm-9.0.1-windows-x64.7z
cmake -B ./build -G Ninja ^
-DCMAKE_C_COMPILER:PATH=cl.exe ^
-DCMAKE_CXX_COMPILER:PATH=cl.exe ^
-DCMAKE_LINKER:PATH=lld-link.exe ^
-DCMAKE_RC:PATH=llvm-rc.exe ^
-DCMAKE_RC_COMPILER:PATH=llvm-rc.exe ^
-DCMAKE_MT:PATH=mt.exe ^
-DCMAKE_BUILD_TYPE=Release ^
-DLLVM_ROOT_DIR="./llvm-9.0.1-windows-x64" ^
-DD_COMPILER=ldmd2
cmake --build ./build
In another comment here, someone else said that this worked for them on Ubuntu:
# DMD64 D Compiler v2.090.0
export DMD=/snap/bin/dmd
mkdir -p build && cd build
cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja -DLLVM_CONFIG=/usr/lib/llvm-9/bin/llvm-config ..
You might try just grabbing a copy of prebuilt LLVM9 from LDC repo that matches your OS, and fiddling with the C_COMPILER
, CXX_COMPILER
, LINKER
, RC
/RC_COMPILER
, and MT
CMake binaries to get it to run.
This did NOT work for me using clang-cl.exe
oddly.
I'm having trouble while compiling Calypso from scratch. I did what follows:
git clone --recursive https://github.com/Syniurge/Calypso
cd Calypso; mkdir build; cd build
cmake
make
make
fails because it tries to compileclang
into the base directory. To overcome this, I run:cd ../deps/clang
mkdir build; cd build
cmake; make
cd ../../../build
make
Now,
ld
fails in finding the newly compiled clang libraries. So I trymake "LDFLAGS=-L$PWD/../deps/clang/build/lib"
but it still fails with errors like:I also tried by using
cmake -DCLANG_PREBUILT_DIR="../deps/clang/build/"
but it doesn't change.By using
ninja
, as suggested in the originalldc
wiki,clang
is compiled correctly out-of-the-box, butld
still fails in the same way and I have not found a way to specify the option-L
.Am I the only one with these problems? I'm using Manjaro with Linux 5.4.44, cmake 3.17.3, make 4.3.