Bug#1052009: Provide compiler-rt builtins for windows/mingw-64

Norbert Lange nolange79 at gmail.com
Fri Sep 15 23:29:12 BST 2023


Package: libclang-rt-16-dev
Version: 1:16.0.6-3
Severity: wishlist
X-Debbugs-Cc: nolange79 at gmail.com

Adding the compiler-rt library for windows / mingw-64 would allow ease building
mingw-64 tools,
the builtins seem to be pretty universal for any windows target.

There is a project providing a full mingw toolchain for reference:
https://github.com/mstorsjo/llvm-mingw

I am able to create the builtins just with the mingw-w64-common package and
debians llvm/clang like this:

for a in i686 x86_64 armv7 aarch64; do
cmake -G Ninja -DLLVM_DIR=$(llvm-config --cmakedir)
-DCMAKE_INSTALL_PREFIX=/tmp/hugo/lib/clang/16 -DCMAKE_BUILD_TYPE=Release
-DCMAKE_SYSROOT=/usr/share/mingw-w64 -DCMAKE_C_COMPILER=clang
-DCMAKE_CXX_COMPILER=clang++ -DCMAKE_SYSTEM_NAME=Windows \
    -DCMAKE_ASM_COMPILER_TARGET=${a}-w64-windows-gnu
-DCMAKE_C_COMPILER_TARGET=${a}-w64-windows-gnu
-DCMAKE_CXX_COMPILER_TARGET=${a}-w64-windows-gnu \
    -DCOMPILER_RT_DEFAULT_TARGET_ONLY=TRUE
-DCOMPILER_RT_USE_BUILTINS_LIBRARY=TRUE
-DCMAKE_FIND_ROOT_PATH=/tmp/hugo/x86_64-w64-mingw32
-DCMAKE_FIND_ROOT_PATH_MODE_INCLUDE=ONLY
-DCMAKE_FIND_ROOT_PATH_MODE_PACKAGE=ONLY \
    -S $HOME/git/llvm-project/compiler-rt/lib/builtins -B ${a}
ninja -C $a
done


-- System Information:
Debian Release: 12.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 6.1.0-10-amd64 (SMP w/8 CPU threads; PREEMPT)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages libclang-rt-16-dev depends on:
ii  lib32stdc++6  12.2.0-14
ii  libc6         2.36-9+deb12u1
ii  libc6-i386    2.36-9+deb12u1
ii  libstdc++6    12.2.0-14

libclang-rt-16-dev recommends no packages.

libclang-rt-16-dev suggests no packages.

-- no debconf information



More information about the Pkg-llvm-team mailing list