SHA256
1
0
forked from pool/ldc

Accepting request 1010627 from devel:languages:D

OBS-URL: https://build.opensuse.org/request/show/1010627
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/ldc?expand=0&rev=18
This commit is contained in:
Dominique Leuenberger 2022-10-14 13:42:42 +00:00 committed by Git OBS Bridge
commit ed62bd9e7a
2 changed files with 27 additions and 0 deletions

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Oct 7 14:51:48 UTC 2022 - Guillaume GARDET <guillaume.gardet@opensuse.org>
- Build against llvm14 for Tumbleweed since llvm15 is not
supported yet
------------------------------------------------------------------- -------------------------------------------------------------------
Tue May 10 07:39:30 UTC 2022 - Fabian Vogt <fvogt@suse.com> Tue May 10 07:39:30 UTC 2022 - Fabian Vogt <fvogt@suse.com>

View File

@ -33,11 +33,16 @@
%bcond_with ldc_tests %bcond_with ldc_tests
# Dynamic compiling is not supported with LLVM >= 12 # Dynamic compiling is not supported with LLVM >= 12
%if 0%{?suse_version} > 1550
# We force llvm14 on TW
%global jit_support 0
%else
%if %{pkg_vcmp llvm-devel >= 12} %if %{pkg_vcmp llvm-devel >= 12}
%global jit_support 0 %global jit_support 0
%else %else
%global jit_support 1 %global jit_support 1
%endif %endif
%endif
# LLVM LTO is too much for 32bit ARM # LLVM LTO is too much for 32bit ARM
%ifarch %arm %ifarch %arm
@ -59,8 +64,14 @@ BuildRequires: help2man
BuildRequires: libconfig++-devel BuildRequires: libconfig++-devel
BuildRequires: libcurl-devel BuildRequires: libcurl-devel
BuildRequires: libstdc++-devel BuildRequires: libstdc++-devel
%if 0%{?suse_version} > 1550
# Cannot build with llvm15, so stick with llvm14 for now
BuildRequires: clang14
BuildRequires: llvm14-devel
%else
BuildRequires: llvm-clang >= 6.0 BuildRequires: llvm-clang >= 6.0
BuildRequires: llvm-devel >= 6.0 BuildRequires: llvm-devel >= 6.0
%endif
BuildRequires: ncurses-devel BuildRequires: ncurses-devel
BuildRequires: sqlite3-devel BuildRequires: sqlite3-devel
BuildRequires: zlib-devel BuildRequires: zlib-devel
@ -171,8 +182,13 @@ sed -i "s# - -o-# \"$PWD/feVer.d\" -o-#" cmake/Modules/FindDCompiler.cmake
touch no-suse-rules touch no-suse-rules
%cmake \ %cmake \
-DCMAKE_USER_MAKE_RULES_OVERRIDE=./no-suse-rules \ -DCMAKE_USER_MAKE_RULES_OVERRIDE=./no-suse-rules \
%if 0%{?suse_version} > 1550
-DCMAKE_C_COMPILER="%{_bindir}/clang-14" \
-DCMAKE_CXX_COMPILER="%{_bindir}/clang++-14" \
%else
-DCMAKE_C_COMPILER="%{_bindir}/clang" \ -DCMAKE_C_COMPILER="%{_bindir}/clang" \
-DCMAKE_CXX_COMPILER="%{_bindir}/clang++" \ -DCMAKE_CXX_COMPILER="%{_bindir}/clang++" \
%endif
-DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/d \ -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/d \
-DD_COMPILER:PATH=%{_bindir}/gdmd%{?gdc_suffix} \ -DD_COMPILER:PATH=%{_bindir}/gdmd%{?gdc_suffix} \
-DCMAKE_CXX_FLAGS="-std=c++11" -DCMAKE_CXX_FLAGS="-std=c++11"
@ -191,8 +207,13 @@ cd ..
touch no-suse-rules touch no-suse-rules
%cmake \ %cmake \
-DCMAKE_USER_MAKE_RULES_OVERRIDE=./no-suse-rules \ -DCMAKE_USER_MAKE_RULES_OVERRIDE=./no-suse-rules \
%if 0%{?suse_version} > 1550
-DCMAKE_C_COMPILER="%{_bindir}/clang-14" \
-DCMAKE_CXX_COMPILER="%{_bindir}/clang++-14" \
%else
-DCMAKE_C_COMPILER="%{_bindir}/clang" \ -DCMAKE_C_COMPILER="%{_bindir}/clang" \
-DCMAKE_CXX_COMPILER="%{_bindir}/clang++" \ -DCMAKE_CXX_COMPILER="%{_bindir}/clang++" \
%endif
-DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/d \ -DINCLUDE_INSTALL_DIR:PATH=%{_includedir}/d \
%if %{with ldc_bootstrap} %if %{with ldc_bootstrap}
-DD_COMPILER:PATH=$PWD/../build-bootstrap/bin/ldmd2 \ -DD_COMPILER:PATH=$PWD/../build-bootstrap/bin/ldmd2 \