Skip to content
This repository was archived by the owner on Dec 20, 2019. It is now read-only.

Commit 01be6fe

Browse files
committed
Windows: Fix builtins compiler-rt lib and build with clang
Building with clang is required to make the builtins compiler-rt lib include some objects implemented in ASM, as the MS assembler doesn't support the used AT&T syntax. There were some more minor annoyances standing in the way of using LDC with MinGW-w64-based libs.
1 parent aaa4575 commit 01be6fe

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

.gitmodules

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,4 @@
33
url = https://github.com/ldc-developers/lld.git
44
[submodule "projects/compiler-rt"]
55
path = projects/compiler-rt
6-
url = https://github.com/llvm-mirror/compiler-rt.git
6+
url = https://github.com/ldc-developers/compiler-rt.git

appveyor.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@ install:
5050
- set PATH=%CD%\ninja;%PATH%
5151
- if "%APPVEYOR_BUILD_WORKER_IMAGE:~-4%" == "2017" call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\Common7\Tools\VsDevCmd.bat" -arch=%APPVEYOR_JOB_ARCH%
5252
- if "%APPVEYOR_BUILD_WORKER_IMAGE:~-4%" == "2015" call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" %APPVEYOR_JOB_ARCH%
53+
# Let CMake configure 64-bit clang-cl for 32-bit code emission
54+
- if "%APPVEYOR_JOB_ARCH%" == "x86" ( set "CFLAGS=-m32" && set "CXXFLAGS=-m32" && set "ASMFLAGS=-m32" )
5355
# Print environment info
5456
- set
5557
- msbuild /version
@@ -65,7 +67,7 @@ build_script:
6567
- cd c:\projects
6668
- md ninja-llvm
6769
- cd ninja-llvm
68-
- cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=c:\projects\LLVM-%APPVEYOR_JOB_ARCH% -DLLVM_USE_CRT_RELEASE=MT -DLLVM_TARGETS_TO_BUILD=AArch64;ARM;Mips;MSP430;NVPTX;PowerPC;X86 -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=RISCV;WebAssembly -DLLVM_ENABLE_ASSERTIONS=%LLVM_ENABLE_ASSERTIONS% -DLLVM_DEFAULT_TARGET_TRIPLE=%LLVM_DEFAULT_TARGET_TRIPLE% -DCOMPILER_RT_INCLUDE_TESTS=OFF ..\llvm
70+
- cmake -G Ninja -DCMAKE_C_COMPILER:PATH=clang-cl.exe -DCMAKE_CXX_COMPILER:PATH=clang-cl.exe -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=c:\projects\LLVM-%APPVEYOR_JOB_ARCH% -DLLVM_USE_CRT_RELEASE=MT -DLLVM_TARGETS_TO_BUILD=AArch64;ARM;Mips;MSP430;NVPTX;PowerPC;X86 -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=RISCV;WebAssembly -DLLVM_ENABLE_ASSERTIONS=%LLVM_ENABLE_ASSERTIONS% -DLLVM_DEFAULT_TARGET_TRIPLE=%LLVM_DEFAULT_TARGET_TRIPLE% -DCOMPILER_RT_INCLUDE_TESTS=OFF ..\llvm
6971
- ninja -j3 install
7072

7173
after_build:

0 commit comments

Comments
 (0)