From 21e2a92c0df289a5b9c454e0e4c299c5ed67e557 Mon Sep 17 00:00:00 2001 From: serge-sans-paille Date: Thu, 28 Jan 2021 21:37:32 +0100 Subject: [PATCH] Parametrize targets to build --- llvm.spec | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/llvm.spec b/llvm.spec index 05ec06e..040cd1f 100644 --- a/llvm.spec +++ b/llvm.spec @@ -35,6 +35,14 @@ %global pkg_libdir %{install_libdir} %endif +%if 0%{?rhel} +%global targets_to_build "X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF" +%global experimental_targets_to_build "" +%else +%global targets_to_build "all" +%global experimental_targets_to_build "AVR" +%endif + %global build_install_prefix %{buildroot}%{install_prefix} Name: %{pkg_name} @@ -216,7 +224,7 @@ pathfix.py -i %{__python3} -pn \ %endif %endif \ - -DLLVM_TARGETS_TO_BUILD=all \ + -DLLVM_TARGETS_TO_BUILD=%{targets_to_build} \ -DLLVM_ENABLE_LIBCXX:BOOL=OFF \ -DLLVM_ENABLE_ZLIB:BOOL=ON \ -DLLVM_ENABLE_FFI:BOOL=ON \ @@ -224,7 +232,7 @@ pathfix.py -i %{__python3} -pn \ %if %{with gold} -DLLVM_BINUTILS_INCDIR=%{_includedir} \ %endif - -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=AVR \ + -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{experimental_targets_to_build} \ \ -DLLVM_BUILD_RUNTIME:BOOL=ON \ \