Pass LLVM_DEFAULT_TARGET_TRIPLE to cmake

This will ensure that clang always defaults the system gcc install.
This commit is contained in:
Tom Stellard 2021-09-13 19:48:01 +00:00
parent bbb00db171
commit 20aa2e6b37
2 changed files with 41 additions and 1 deletions

View file

@ -0,0 +1,33 @@
From 9320ffeda3915c8f7be744c983a3470a89107bd7 Mon Sep 17 00:00:00 2001
From: Tom Stellard <tstellar@redhat.com>
Date: Tue, 14 Sep 2021 20:21:20 -0700
Subject: [PATCH] XFAIL missing-abstract-variable.ll test on ppc64le
It's seems the strategy with this test is to XFAIL it on all
architectures that it fails on. I wonder if we should be passing
it a specific triple? Also, from what I can tell, this tests only
runs when llvm is configured with LLVM_DEFAULT_TARGET_TRIPLE set
to a non-empty value, which is why it may not fail in every build
configuration.
Differential Revision: https://reviews.llvm.org/D109806
---
llvm/test/DebugInfo/Generic/missing-abstract-variable.ll | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll b/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll
index bd0de60268b6..cc5d56b0c512 100644
--- a/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll
+++ b/llvm/test/DebugInfo/Generic/missing-abstract-variable.ll
@@ -4,7 +4,7 @@
; powerpc64 (and on x86_64 at at least -O2). Presumably this is a SelectionDAG
; issue.
; FIXME: arm64 is an alias for aarch64 on macs, apparently?
-; XFAIL: powerpc64, aarch64, arm64, hexagon
+; XFAIL: powerpc64, aarch64, arm64, hexagon, ppc64le
; Build from the following source with clang -O2.
--
2.31.1

View file

@ -54,7 +54,7 @@
Name: %{pkg_name} Name: %{pkg_name}
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}} Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}
Release: 2%{?dist} Release: 3%{?dist}
Summary: The Low Level Virtual Machine Summary: The Low Level Virtual Machine
License: NCSA License: NCSA
@ -71,6 +71,7 @@ Source4: lit.fedora.cfg.py
Patch0: 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch Patch0: 0001-cmake-Allow-shared-libraries-to-customize-the-soname.patch
# This has been backported to release/13.x and should be in 13.0.0-rc2 # This has been backported to release/13.x and should be in 13.0.0-rc2
Patch1: 0001-test-Fix-tools-gold-X86-comdat-nodeduplicate.ll-on-n.patch Patch1: 0001-test-Fix-tools-gold-X86-comdat-nodeduplicate.ll-on-n.patch
Patch2: 0001-XFAIL-missing-abstract-variable.ll-test-on-ppc64le.patch
BuildRequires: gcc BuildRequires: gcc
BuildRequires: gcc-c++ BuildRequires: gcc-c++
@ -208,6 +209,8 @@ pathfix.py -i %{__python3} -pn \
%endif %endif
# force off shared libs as cmake macros turns it on. # force off shared libs as cmake macros turns it on.
# We need to set LLVM_DEFAULT_TARGET_TRIPLE, because llvm fails to detect it
# correctly.
%cmake -G Ninja \ %cmake -G Ninja \
-DBUILD_SHARED_LIBS:BOOL=OFF \ -DBUILD_SHARED_LIBS:BOOL=OFF \
-DLLVM_PARALLEL_LINK_JOBS=1 \ -DLLVM_PARALLEL_LINK_JOBS=1 \
@ -271,6 +274,7 @@ pathfix.py -i %{__python3} -pn \
-DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF \ -DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF \
-DLLVM_ABI_REVISION=%{abi_revision} \ -DLLVM_ABI_REVISION=%{abi_revision} \
\ \
-DLLVM_DEFAULT_TARGET_TRIPLE=%{_host} \
-DSPHINX_WARNINGS_AS_ERRORS=OFF \ -DSPHINX_WARNINGS_AS_ERRORS=OFF \
-DCMAKE_INSTALL_PREFIX=%{install_prefix} \ -DCMAKE_INSTALL_PREFIX=%{install_prefix} \
-DLLVM_INSTALL_SPHINX_HTML_DIR=%{_pkgdocdir}/html \ -DLLVM_INSTALL_SPHINX_HTML_DIR=%{_pkgdocdir}/html \
@ -533,6 +537,9 @@ fi
%endif %endif
%changelog %changelog
* Mon Sep 13 2021 Tom Stellard <tstellar@redhat.com> - 13.0.0~rc1-3
- Pass LLVM_DEFAULT_TARGET_TRIPLE to cmake
* Mon Sep 13 2021 Konrad Kleine <kkleine@redhat.com> - 13.0.0~rc1-2 * Mon Sep 13 2021 Konrad Kleine <kkleine@redhat.com> - 13.0.0~rc1-2
- Add --without=check option - Add --without=check option