Compare commits
9 Commits
Author | SHA1 | Date |
---|---|---|
sergesanspaille | 6b5d94a6bd | |
sergesanspaille | 358169aac7 | |
sergesanspaille | 4fdd308673 | |
sergesanspaille | 77598dc4d7 | |
sergesanspaille | 36f33bdfe5 | |
sergesanspaille | 0a9c3de7a9 | |
sergesanspaille | 580aaa14a1 | |
Tom Stellard | 6c49bf25f9 | |
Tom Stellard | 2e6c311e78 |
|
@ -52,50 +52,3 @@
|
|||
/clang-tools-extra-7.0.0.src.tar.xz
|
||||
/clang-tools-extra-7.0.1.src.tar.xz
|
||||
/cfe-7.0.1.src.tar.xz
|
||||
/clang-tools-extra-8.0.0rc1.src.tar.xz
|
||||
/cfe-8.0.0rc1.src.tar.xz
|
||||
/cfe-8.0.0rc2.src.tar.xz
|
||||
/clang-tools-extra-8.0.0rc2.src.tar.xz
|
||||
/cfe-8.0.0rc3.src.tar.xz
|
||||
/clang-tools-extra-8.0.0rc3.src.tar.xz
|
||||
|
||||
/cfe-8.0.0rc4.src.tar.xz
|
||||
/clang-tools-extra-8.0.0rc4.src.tar.xz
|
||||
/cfe-8.0.0.src.tar.xz
|
||||
/clang-tools-extra-8.0.0.src.tar.xz
|
||||
/cfe-9.0.0rc2.src.tar.xz
|
||||
/clang-tools-extra-9.0.0rc2.src.tar.xz
|
||||
/cfe-9.0.0rc3.src.tar.xz
|
||||
/clang-tools-extra-9.0.0rc3.src.tar.xz
|
||||
/cfe-9.0.0.src.tar.xz
|
||||
/clang-tools-extra-9.0.0.src.tar.xz
|
||||
/clang-9.0.1.src.tar.xz
|
||||
/clang-tools-extra-9.0.1.src.tar.xz
|
||||
/clang-10.0.0rc1.src.tar.xz
|
||||
/clang-tools-extra-10.0.0rc1.src.tar.xz
|
||||
/clang-10.0.0rc1.src.tar.xz.sig
|
||||
/clang-tools-extra-10.0.0rc1.src.tar.xz.sig
|
||||
/clang-10.0.0rc2.src.tar.xz
|
||||
/clang-tools-extra-10.0.0rc2.src.tar.xz
|
||||
/clang-tools-extra-10.0.0rc2.src.tar.xz.sig
|
||||
/clang-10.0.0rc2.src.tar.xz.sig
|
||||
/clang-10.0.0rc3.src.tar.xz
|
||||
/clang-tools-extra-10.0.0rc3.src.tar.xz
|
||||
/clang-tools-extra-10.0.0rc3.src.tar.xz.sig
|
||||
/clang-10.0.0rc3.src.tar.xz.sig
|
||||
/clang-10.0.0rc4.src.tar.xz
|
||||
/clang-tools-extra-10.0.0rc4.src.tar.xz
|
||||
/clang-tools-extra-10.0.0rc4.src.tar.xz.sig
|
||||
/clang-10.0.0rc4.src.tar.xz.sig
|
||||
/clang-10.0.0rc5.src.tar.xz
|
||||
/clang-tools-extra-10.0.0rc5.src.tar.xz
|
||||
/clang-tools-extra-10.0.0rc5.src.tar.xz.sig
|
||||
/clang-10.0.0rc5.src.tar.xz.sig
|
||||
/clang-10.0.0rc6.src.tar.xz
|
||||
/clang-tools-extra-10.0.0rc6.src.tar.xz
|
||||
/clang-tools-extra-10.0.0rc6.src.tar.xz.sig
|
||||
/clang-10.0.0rc6.src.tar.xz.sig
|
||||
/clang-10.0.0.src.tar.xz.sig
|
||||
/clang-tools-extra-10.0.0.src.tar.xz.sig
|
||||
/clang-tools-extra-10.0.0.src.tar.xz
|
||||
/clang-10.0.0.src.tar.xz
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
From f5f712dfcac6ee99381c5aca212950276f1743e8 Mon Sep 17 00:00:00 2001
|
||||
From: Eric Fiselier <eric@efcs.ca>
|
||||
Date: Fri, 10 Feb 2017 01:59:20 +0000
|
||||
Subject: [PATCH] [CMake] Fix pthread handling for out-of-tree builds
|
||||
|
||||
LLVM defines `PTHREAD_LIB` which is used by AddLLVM.cmake and various projects
|
||||
to correctly link the threading library when needed. Unfortunately
|
||||
`PTHREAD_LIB` is defined by LLVM's `config-ix.cmake` file which isn't installed
|
||||
and therefore can't be used when configuring out-of-tree builds. This causes
|
||||
such builds to fail since `pthread` isn't being correctly linked.
|
||||
|
||||
This patch attempts to fix that problem by renaming and exporting
|
||||
`LLVM_PTHREAD_LIB` as part of`LLVMConfig.cmake`. I renamed `PTHREAD_LIB`
|
||||
because It seemed likely to cause collisions with downstream users of
|
||||
`LLVMConfig.cmake`.
|
||||
|
||||
|
||||
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@294690 91177308-0d34-0410-b5e6-96231b3b80d8
|
||||
---
|
||||
include-fixer/plugin/CMakeLists.txt | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include-fixer/plugin/CMakeLists.txt b/include-fixer/plugin/CMakeLists.txt
|
||||
index 2799fd4..df792ea 100644
|
||||
--- a/include-fixer/plugin/CMakeLists.txt
|
||||
+++ b/include-fixer/plugin/CMakeLists.txt
|
||||
@@ -9,5 +9,5 @@ add_clang_library(clangIncludeFixerPlugin
|
||||
clangParse
|
||||
clangSema
|
||||
clangTooling
|
||||
- ${PTHREAD_LIB}
|
||||
+ ${LLVM_PTHREAD_LIB}
|
||||
)
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,122 @@
|
|||
From b9d6dba608ab50d2e4a1b0f2318a5d1b390fc702 Mon Sep 17 00:00:00 2001
|
||||
From: Vedant Kumar <vsk@apple.com>
|
||||
Date: Tue, 18 Dec 2018 21:05:03 +0000
|
||||
Subject: [PATCH] [CodeGen] Handle mixed-width ops in mixed-sign
|
||||
mul-with-overflow lowering
|
||||
|
||||
The special lowering for __builtin_mul_overflow introduced in r320902
|
||||
fixed an ICE seen when passing mixed-sign operands to the builtin.
|
||||
|
||||
This patch extends the special lowering to cover mixed-width, mixed-sign
|
||||
operands. In a few common scenarios, calls to muloti4 will no longer be
|
||||
emitted.
|
||||
|
||||
This should address the latest comments in PR34920 and work around the
|
||||
link failure seen in:
|
||||
|
||||
https://bugzilla.redhat.com/show_bug.cgi?id=1657544
|
||||
|
||||
Testing:
|
||||
- check-clang
|
||||
- A/B output comparison with: https://gist.github.com/vedantk/3eb9c88f82e5c32f2e590555b4af5081
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D55843
|
||||
|
||||
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@349542 91177308-0d34-0410-b5e6-96231b3b80d8
|
||||
---
|
||||
lib/CodeGen/CGBuiltin.cpp | 19 ++++++++++++++-----
|
||||
test/CodeGen/builtins-overflow.c | 21 +++++++++++++++++++++
|
||||
2 files changed, 35 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/lib/CodeGen/CGBuiltin.cpp b/lib/CodeGen/CGBuiltin.cpp
|
||||
index 0770c20..4303a7a 100644
|
||||
--- a/lib/CodeGen/CGBuiltin.cpp
|
||||
+++ b/lib/CodeGen/CGBuiltin.cpp
|
||||
@@ -1077,7 +1077,7 @@ static bool isSpecialMixedSignMultiply(unsigned BuiltinID,
|
||||
WidthAndSignedness Op2Info,
|
||||
WidthAndSignedness ResultInfo) {
|
||||
return BuiltinID == Builtin::BI__builtin_mul_overflow &&
|
||||
- Op1Info.Width == Op2Info.Width && Op1Info.Width >= ResultInfo.Width &&
|
||||
+ std::max(Op1Info.Width, Op2Info.Width) >= ResultInfo.Width &&
|
||||
Op1Info.Signed != Op2Info.Signed;
|
||||
}
|
||||
|
||||
@@ -1098,11 +1098,20 @@ EmitCheckedMixedSignMultiply(CodeGenFunction &CGF, const clang::Expr *Op1,
|
||||
const clang::Expr *UnsignedOp = Op1Info.Signed ? Op2 : Op1;
|
||||
llvm::Value *Signed = CGF.EmitScalarExpr(SignedOp);
|
||||
llvm::Value *Unsigned = CGF.EmitScalarExpr(UnsignedOp);
|
||||
+ unsigned SignedOpWidth = Op1Info.Signed ? Op1Info.Width : Op2Info.Width;
|
||||
+ unsigned UnsignedOpWidth = Op1Info.Signed ? Op2Info.Width : Op1Info.Width;
|
||||
+
|
||||
+ // One of the operands may be smaller than the other. If so, [s|z]ext it.
|
||||
+ if (SignedOpWidth < UnsignedOpWidth)
|
||||
+ Signed = CGF.Builder.CreateSExt(Signed, Unsigned->getType(), "op.sext");
|
||||
+ if (UnsignedOpWidth < SignedOpWidth)
|
||||
+ Unsigned = CGF.Builder.CreateZExt(Unsigned, Signed->getType(), "op.zext");
|
||||
|
||||
llvm::Type *OpTy = Signed->getType();
|
||||
llvm::Value *Zero = llvm::Constant::getNullValue(OpTy);
|
||||
Address ResultPtr = CGF.EmitPointerWithAlignment(ResultArg);
|
||||
llvm::Type *ResTy = ResultPtr.getElementType();
|
||||
+ unsigned OpWidth = std::max(Op1Info.Width, Op2Info.Width);
|
||||
|
||||
// Take the absolute value of the signed operand.
|
||||
llvm::Value *IsNegative = CGF.Builder.CreateICmpSLT(Signed, Zero);
|
||||
@@ -1120,8 +1129,8 @@ EmitCheckedMixedSignMultiply(CodeGenFunction &CGF, const clang::Expr *Op1,
|
||||
if (ResultInfo.Signed) {
|
||||
// Signed overflow occurs if the result is greater than INT_MAX or lesser
|
||||
// than INT_MIN, i.e when |Result| > (INT_MAX + IsNegative).
|
||||
- auto IntMax = llvm::APInt::getSignedMaxValue(ResultInfo.Width)
|
||||
- .zextOrSelf(Op1Info.Width);
|
||||
+ auto IntMax =
|
||||
+ llvm::APInt::getSignedMaxValue(ResultInfo.Width).zextOrSelf(OpWidth);
|
||||
llvm::Value *MaxResult =
|
||||
CGF.Builder.CreateAdd(llvm::ConstantInt::get(OpTy, IntMax),
|
||||
CGF.Builder.CreateZExt(IsNegative, OpTy));
|
||||
@@ -1139,9 +1148,9 @@ EmitCheckedMixedSignMultiply(CodeGenFunction &CGF, const clang::Expr *Op1,
|
||||
llvm::Value *Underflow = CGF.Builder.CreateAnd(
|
||||
IsNegative, CGF.Builder.CreateIsNotNull(UnsignedResult));
|
||||
Overflow = CGF.Builder.CreateOr(UnsignedOverflow, Underflow);
|
||||
- if (ResultInfo.Width < Op1Info.Width) {
|
||||
+ if (ResultInfo.Width < OpWidth) {
|
||||
auto IntMax =
|
||||
- llvm::APInt::getMaxValue(ResultInfo.Width).zext(Op1Info.Width);
|
||||
+ llvm::APInt::getMaxValue(ResultInfo.Width).zext(OpWidth);
|
||||
llvm::Value *TruncOverflow = CGF.Builder.CreateICmpUGT(
|
||||
UnsignedResult, llvm::ConstantInt::get(OpTy, IntMax));
|
||||
Overflow = CGF.Builder.CreateOr(Overflow, TruncOverflow);
|
||||
diff --git a/test/CodeGen/builtins-overflow.c b/test/CodeGen/builtins-overflow.c
|
||||
index 57f90eb..79a3186 100644
|
||||
--- a/test/CodeGen/builtins-overflow.c
|
||||
+++ b/test/CodeGen/builtins-overflow.c
|
||||
@@ -339,6 +339,27 @@ long long test_smulll_overflow(long long x, long long y) {
|
||||
return result;
|
||||
}
|
||||
|
||||
+int test_mixed_sign_mul_overflow_sext_signed_op(int x, unsigned long long y) {
|
||||
+// CHECK: @test_mixed_sign_mul_overflow_sext_signed_op
|
||||
+// CHECK: [[SignedOp:%.*]] = sext i32 %0 to i64
|
||||
+// CHECK: [[IsNeg:%.*]] = icmp slt i64 [[SignedOp]], 0
|
||||
+ int result;
|
||||
+ if (__builtin_mul_overflow(x, y, &result))
|
||||
+ return LongErrorCode;
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
+int test_mixed_sign_mul_overflow_zext_unsigned_op(long long x, unsigned y) {
|
||||
+// CHECK: @test_mixed_sign_mul_overflow_zext_unsigned_op
|
||||
+// CHECK: [[UnsignedOp:%.*]] = zext i32 %1 to i64
|
||||
+// CHECK: [[IsNeg:%.*]] = icmp slt i64 %0, 0
|
||||
+// CHECK: @llvm.umul.with.overflow.i64({{.*}}, i64 [[UnsignedOp]])
|
||||
+ int result;
|
||||
+ if (__builtin_mul_overflow(x, y, &result))
|
||||
+ return LongErrorCode;
|
||||
+ return result;
|
||||
+}
|
||||
+
|
||||
int test_mixed_sign_mull_overflow(int x, unsigned y) {
|
||||
// CHECK: @test_mixed_sign_mull_overflow
|
||||
// CHECK: [[IsNeg:%.*]] = icmp slt i32 [[Op1:%.*]], 0
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,52 @@
|
|||
From a1bccf89a02accab69b359ef004faa95257333c0 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Fri, 7 Sep 2018 18:27:16 +0000
|
||||
Subject: [PATCH] Convert clang-format-diff.py to python3 using 2to3
|
||||
|
||||
---
|
||||
tools/clang-format/clang-format-diff.py | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/tools/clang-format/clang-format-diff.py b/tools/clang-format/clang-format-diff.py
|
||||
index ffa30e70dd..1525a3815c 100755
|
||||
--- a/tools/clang-format/clang-format-diff.py
|
||||
+++ b/tools/clang-format/clang-format-diff.py
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/usr/bin/env python
|
||||
+#!/usr/bin/python3
|
||||
#
|
||||
#===- clang-format-diff.py - ClangFormat Diff Reformatter ----*- python -*--===#
|
||||
#
|
||||
@@ -27,7 +27,7 @@ import difflib
|
||||
import re
|
||||
import string
|
||||
import subprocess
|
||||
-import StringIO
|
||||
+import io
|
||||
import sys
|
||||
|
||||
|
||||
@@ -89,9 +89,9 @@ def main():
|
||||
['-lines', str(start_line) + ':' + str(end_line)])
|
||||
|
||||
# Reformat files containing changes in place.
|
||||
- for filename, lines in lines_by_file.iteritems():
|
||||
+ for filename, lines in lines_by_file.items():
|
||||
if args.i and args.verbose:
|
||||
- print 'Formatting', filename
|
||||
+ print('Formatting', filename)
|
||||
command = [args.binary, filename]
|
||||
if args.i:
|
||||
command.append('-i')
|
||||
@@ -109,7 +109,7 @@ def main():
|
||||
if not args.i:
|
||||
with open(filename) as f:
|
||||
code = f.readlines()
|
||||
- formatted_code = StringIO.StringIO(stdout).readlines()
|
||||
+ formatted_code = io.StringIO(stdout).readlines()
|
||||
diff = difflib.unified_diff(code, formatted_code,
|
||||
filename, filename,
|
||||
'(before formatting)', '(after formatting)')
|
||||
--
|
||||
2.14.3
|
||||
|
|
@ -0,0 +1,61 @@
|
|||
From 6430ef09aecb30bce588c2d7f35b2294d219c835 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Mon, 26 Nov 2018 19:18:12 -0800
|
||||
Subject: [PATCH] Convert run-find-all-symbols.py to python3 using 2to3
|
||||
|
||||
---
|
||||
include-fixer/find-all-symbols/tool/run-find-all-symbols.py | 10 +++++-----
|
||||
1 file changed, 5 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/include-fixer/find-all-symbols/tool/run-find-all-symbols.py b/include-fixer/find-all-symbols/tool/run-find-all-symbols.py
|
||||
index 461d959..89a6cf5 100755
|
||||
--- a/include-fixer/find-all-symbols/tool/run-find-all-symbols.py
|
||||
+++ b/include-fixer/find-all-symbols/tool/run-find-all-symbols.py
|
||||
@@ -27,7 +27,7 @@ import argparse
|
||||
import json
|
||||
import multiprocessing
|
||||
import os
|
||||
-import Queue
|
||||
+import queue
|
||||
import shutil
|
||||
import subprocess
|
||||
import sys
|
||||
@@ -40,7 +40,7 @@ def find_compilation_database(path):
|
||||
result = './'
|
||||
while not os.path.isfile(os.path.join(result, path)):
|
||||
if os.path.realpath(result) == '/':
|
||||
- print 'Error: could not find compilation database.'
|
||||
+ print('Error: could not find compilation database.')
|
||||
sys.exit(1)
|
||||
result += '../'
|
||||
return os.path.realpath(result)
|
||||
@@ -50,7 +50,7 @@ def MergeSymbols(directory, args):
|
||||
"""Merge all symbol files (yaml) in a given directaory into a single file."""
|
||||
invocation = [args.binary, '-merge-dir='+directory, args.saving_path]
|
||||
subprocess.call(invocation)
|
||||
- print 'Merge is finished. Saving results in ' + args.saving_path
|
||||
+ print('Merge is finished. Saving results in ' + args.saving_path)
|
||||
|
||||
|
||||
def run_find_all_symbols(args, tmpdir, build_path, queue):
|
||||
@@ -96,7 +96,7 @@ def main():
|
||||
|
||||
try:
|
||||
# Spin up a bunch of tidy-launching threads.
|
||||
- queue = Queue.Queue(max_task)
|
||||
+ queue = queue.Queue(max_task)
|
||||
for _ in range(max_task):
|
||||
t = threading.Thread(target=run_find_all_symbols,
|
||||
args=(args, tmpdir, build_path, queue))
|
||||
@@ -116,7 +116,7 @@ def main():
|
||||
except KeyboardInterrupt:
|
||||
# This is a sad hack. Unfortunately subprocess goes
|
||||
# bonkers with ctrl-c and we start forking merrily.
|
||||
- print '\nCtrl-C detected, goodbye.'
|
||||
+ print('\nCtrl-C detected, goodbye.')
|
||||
os.kill(0, 9)
|
||||
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,411 @@
|
|||
diff -r -u cfe-7.0.1.src.orig/tools/scan-view/bin/scan-view cfe-7.0.1.src/tools/scan-view/bin/scan-view
|
||||
--- cfe-7.0.1.src.orig/tools/scan-view/bin/scan-view 2019-01-25 06:33:02.331385931 +0000
|
||||
+++ cfe-7.0.1.src/tools/scan-view/bin/scan-view 2019-01-25 06:34:16.207696772 +0000
|
||||
@@ -7,9 +7,9 @@
|
||||
import imp
|
||||
import os
|
||||
import posixpath
|
||||
-import thread
|
||||
+import _thread
|
||||
import time
|
||||
-import urllib
|
||||
+import urllib.request, urllib.parse, urllib.error
|
||||
import webbrowser
|
||||
|
||||
# How long to wait for server to start.
|
||||
@@ -27,7 +27,7 @@
|
||||
|
||||
def url_is_up(url):
|
||||
try:
|
||||
- o = urllib.urlopen(url)
|
||||
+ o = urllib.request.urlopen(url)
|
||||
except IOError:
|
||||
return False
|
||||
o.close()
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
|
||||
def start_browser(port, options):
|
||||
- import urllib
|
||||
+ import urllib.request, urllib.parse, urllib.error
|
||||
import webbrowser
|
||||
|
||||
url = 'http://%s:%d' % (options.host, port)
|
||||
@@ -52,10 +52,10 @@
|
||||
sys.stderr.flush()
|
||||
time.sleep(kSleepTimeout)
|
||||
else:
|
||||
- print >> sys.stderr, 'WARNING: Unable to detect that server started.'
|
||||
+ print('WARNING: Unable to detect that server started.', file=sys.stderr)
|
||||
|
||||
if options.debug:
|
||||
- print >> sys.stderr, '%s: Starting webbrowser...' % sys.argv[0]
|
||||
+ print('%s: Starting webbrowser...' % sys.argv[0], file=sys.stderr)
|
||||
webbrowser.open(url)
|
||||
|
||||
|
||||
@@ -69,9 +69,9 @@
|
||||
|
||||
import ScanView
|
||||
try:
|
||||
- print 'Starting scan-view at: http://%s:%d' % (options.host,
|
||||
- port)
|
||||
- print ' Use Ctrl-C to exit.'
|
||||
+ print('Starting scan-view at: http://%s:%d' % (options.host,
|
||||
+ port))
|
||||
+ print(' Use Ctrl-C to exit.')
|
||||
httpd = ScanView.create_server((options.host, port),
|
||||
options, root)
|
||||
httpd.serve_forever()
|
||||
@@ -80,9 +80,9 @@
|
||||
|
||||
|
||||
def port_is_open(port):
|
||||
- import SocketServer
|
||||
+ import socketserver
|
||||
try:
|
||||
- t = SocketServer.TCPServer((kDefaultHost, port), None)
|
||||
+ t = socketserver.TCPServer((kDefaultHost, port), None)
|
||||
except:
|
||||
return False
|
||||
t.server_close()
|
||||
@@ -135,7 +135,7 @@
|
||||
# Kick off thread to wait for server and start web browser, if
|
||||
# requested.
|
||||
if args.startBrowser:
|
||||
- t = thread.start_new_thread(start_browser, (port, args))
|
||||
+ t = _thread.start_new_thread(start_browser, (port, args))
|
||||
|
||||
run(port, args, args.root)
|
||||
|
||||
diff -r -u cfe-7.0.1.src.orig/tools/scan-view/share/Reporter.py cfe-7.0.1.src/tools/scan-view/share/Reporter.py
|
||||
--- cfe-7.0.1.src.orig/tools/scan-view/share/Reporter.py 2019-01-25 06:33:02.331385931 +0000
|
||||
+++ cfe-7.0.1.src/tools/scan-view/share/Reporter.py 2019-01-25 06:34:16.262697004 +0000
|
||||
@@ -80,7 +80,7 @@
|
||||
return 'Email'
|
||||
|
||||
def getParameters(self):
|
||||
- return map(lambda x:TextParameter(x),['To', 'From', 'SMTP Server', 'SMTP Port'])
|
||||
+ return [TextParameter(x) for x in ['To', 'From', 'SMTP Server', 'SMTP Port']]
|
||||
|
||||
# Lifted from python email module examples.
|
||||
def attachFile(self, outer, path):
|
||||
@@ -148,7 +148,7 @@
|
||||
return 'Bugzilla'
|
||||
|
||||
def getParameters(self):
|
||||
- return map(lambda x:TextParameter(x),['URL','Product'])
|
||||
+ return [TextParameter(x) for x in ['URL','Product']]
|
||||
|
||||
def fileReport(self, report, parameters):
|
||||
raise NotImplementedError
|
||||
@@ -211,7 +211,7 @@
|
||||
|
||||
script = os.path.join(os.path.dirname(__file__),'../share/scan-view/FileRadar.scpt')
|
||||
args = ['osascript', script, component, componentVersion, classification, personID, report.title,
|
||||
- report.description, diagnosis, config] + map(os.path.abspath, report.files)
|
||||
+ report.description, diagnosis, config] + list(map(os.path.abspath, report.files))
|
||||
# print >>sys.stderr, args
|
||||
try:
|
||||
p = subprocess.Popen(args, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
|
||||
diff -r -u cfe-7.0.1.src.orig/tools/scan-view/share/ScanView.py cfe-7.0.1.src/tools/scan-view/share/ScanView.py
|
||||
--- cfe-7.0.1.src.orig/tools/scan-view/share/ScanView.py 2019-01-25 06:33:02.331385931 +0000
|
||||
+++ cfe-7.0.1.src/tools/scan-view/share/ScanView.py 2019-01-25 06:34:16.423697681 +0000
|
||||
@@ -1,10 +1,10 @@
|
||||
-import BaseHTTPServer
|
||||
-import SimpleHTTPServer
|
||||
+import http.server
|
||||
+import http.server
|
||||
import os
|
||||
import sys
|
||||
-import urllib, urlparse
|
||||
+import urllib.request, urllib.parse, urllib.error, urllib.parse
|
||||
import posixpath
|
||||
-import StringIO
|
||||
+import io
|
||||
import re
|
||||
import shutil
|
||||
import threading
|
||||
@@ -13,7 +13,8 @@
|
||||
import itertools
|
||||
|
||||
import Reporter
|
||||
-import ConfigParser
|
||||
+import configparser
|
||||
+import importlib
|
||||
|
||||
###
|
||||
# Various patterns matched or replaced by server.
|
||||
@@ -96,25 +97,25 @@
|
||||
result = None
|
||||
try:
|
||||
if self.server.options.debug:
|
||||
- print >>sys.stderr, "%s: SERVER: submitting bug."%(sys.argv[0],)
|
||||
+ print("%s: SERVER: submitting bug."%(sys.argv[0],), file=sys.stderr)
|
||||
self.status = self.reporter.fileReport(self.report, self.parameters)
|
||||
self.success = True
|
||||
time.sleep(3)
|
||||
if self.server.options.debug:
|
||||
- print >>sys.stderr, "%s: SERVER: submission complete."%(sys.argv[0],)
|
||||
- except Reporter.ReportFailure,e:
|
||||
+ print("%s: SERVER: submission complete."%(sys.argv[0],), file=sys.stderr)
|
||||
+ except Reporter.ReportFailure as e:
|
||||
self.status = e.value
|
||||
- except Exception,e:
|
||||
- s = StringIO.StringIO()
|
||||
+ except Exception as e:
|
||||
+ s = io.StringIO()
|
||||
import traceback
|
||||
- print >>s,'<b>Unhandled Exception</b><br><pre>'
|
||||
+ print('<b>Unhandled Exception</b><br><pre>', file=s)
|
||||
traceback.print_exc(e,file=s)
|
||||
- print >>s,'</pre>'
|
||||
+ print('</pre>', file=s)
|
||||
self.status = s.getvalue()
|
||||
|
||||
-class ScanViewServer(BaseHTTPServer.HTTPServer):
|
||||
+class ScanViewServer(http.server.HTTPServer):
|
||||
def __init__(self, address, handler, root, reporters, options):
|
||||
- BaseHTTPServer.HTTPServer.__init__(self, address, handler)
|
||||
+ http.server.HTTPServer.__init__(self, address, handler)
|
||||
self.root = root
|
||||
self.reporters = reporters
|
||||
self.options = options
|
||||
@@ -123,7 +124,7 @@
|
||||
self.load_config()
|
||||
|
||||
def load_config(self):
|
||||
- self.config = ConfigParser.RawConfigParser()
|
||||
+ self.config = configparser.RawConfigParser()
|
||||
|
||||
# Add defaults
|
||||
self.config.add_section('ScanView')
|
||||
@@ -155,44 +156,44 @@
|
||||
def halt(self):
|
||||
self.halted = True
|
||||
if self.options.debug:
|
||||
- print >>sys.stderr, "%s: SERVER: halting." % (sys.argv[0],)
|
||||
+ print("%s: SERVER: halting." % (sys.argv[0],), file=sys.stderr)
|
||||
|
||||
def serve_forever(self):
|
||||
while not self.halted:
|
||||
if self.options.debug > 1:
|
||||
- print >>sys.stderr, "%s: SERVER: waiting..." % (sys.argv[0],)
|
||||
+ print("%s: SERVER: waiting..." % (sys.argv[0],), file=sys.stderr)
|
||||
try:
|
||||
self.handle_request()
|
||||
- except OSError,e:
|
||||
- print 'OSError',e.errno
|
||||
+ except OSError as e:
|
||||
+ print('OSError',e.errno)
|
||||
|
||||
def finish_request(self, request, client_address):
|
||||
if self.options.autoReload:
|
||||
import ScanView
|
||||
- self.RequestHandlerClass = reload(ScanView).ScanViewRequestHandler
|
||||
- BaseHTTPServer.HTTPServer.finish_request(self, request, client_address)
|
||||
+ self.RequestHandlerClass = importlib.reload(ScanView).ScanViewRequestHandler
|
||||
+ http.server.HTTPServer.finish_request(self, request, client_address)
|
||||
|
||||
def handle_error(self, request, client_address):
|
||||
# Ignore socket errors
|
||||
info = sys.exc_info()
|
||||
if info and isinstance(info[1], socket.error):
|
||||
if self.options.debug > 1:
|
||||
- print >>sys.stderr, "%s: SERVER: ignored socket error." % (sys.argv[0],)
|
||||
+ print("%s: SERVER: ignored socket error." % (sys.argv[0],), file=sys.stderr)
|
||||
return
|
||||
- BaseHTTPServer.HTTPServer.handle_error(self, request, client_address)
|
||||
+ http.server.HTTPServer.handle_error(self, request, client_address)
|
||||
|
||||
# Borrowed from Quixote, with simplifications.
|
||||
def parse_query(qs, fields=None):
|
||||
if fields is None:
|
||||
fields = {}
|
||||
- for chunk in filter(None, qs.split('&')):
|
||||
+ for chunk in [_f for _f in qs.split('&') if _f]:
|
||||
if '=' not in chunk:
|
||||
name = chunk
|
||||
value = ''
|
||||
else:
|
||||
name, value = chunk.split('=', 1)
|
||||
- name = urllib.unquote(name.replace('+', ' '))
|
||||
- value = urllib.unquote(value.replace('+', ' '))
|
||||
+ name = urllib.parse.unquote(name.replace('+', ' '))
|
||||
+ value = urllib.parse.unquote(value.replace('+', ' '))
|
||||
item = fields.get(name)
|
||||
if item is None:
|
||||
fields[name] = [value]
|
||||
@@ -200,20 +201,20 @@
|
||||
item.append(value)
|
||||
return fields
|
||||
|
||||
-class ScanViewRequestHandler(SimpleHTTPServer.SimpleHTTPRequestHandler):
|
||||
+class ScanViewRequestHandler(http.server.SimpleHTTPRequestHandler):
|
||||
server_version = "ScanViewServer/" + __version__
|
||||
dynamic_mtime = time.time()
|
||||
|
||||
def do_HEAD(self):
|
||||
try:
|
||||
- SimpleHTTPServer.SimpleHTTPRequestHandler.do_HEAD(self)
|
||||
- except Exception,e:
|
||||
+ http.server.SimpleHTTPRequestHandler.do_HEAD(self)
|
||||
+ except Exception as e:
|
||||
self.handle_exception(e)
|
||||
|
||||
def do_GET(self):
|
||||
try:
|
||||
- SimpleHTTPServer.SimpleHTTPRequestHandler.do_GET(self)
|
||||
- except Exception,e:
|
||||
+ http.server.SimpleHTTPRequestHandler.do_GET(self)
|
||||
+ except Exception as e:
|
||||
self.handle_exception(e)
|
||||
|
||||
def do_POST(self):
|
||||
@@ -230,7 +231,7 @@
|
||||
if f:
|
||||
self.copyfile(f, self.wfile)
|
||||
f.close()
|
||||
- except Exception,e:
|
||||
+ except Exception as e:
|
||||
self.handle_exception(e)
|
||||
|
||||
def log_message(self, format, *args):
|
||||
@@ -263,8 +264,8 @@
|
||||
|
||||
def handle_exception(self, exc):
|
||||
import traceback
|
||||
- s = StringIO.StringIO()
|
||||
- print >>s, "INTERNAL ERROR\n"
|
||||
+ s = io.StringIO()
|
||||
+ print("INTERNAL ERROR\n", file=s)
|
||||
traceback.print_exc(exc, s)
|
||||
f = self.send_string(s.getvalue(), 'text/plain')
|
||||
if f:
|
||||
@@ -410,8 +411,8 @@
|
||||
|
||||
import startfile
|
||||
if self.server.options.debug:
|
||||
- print >>sys.stderr, '%s: SERVER: opening "%s"'%(sys.argv[0],
|
||||
- file)
|
||||
+ print('%s: SERVER: opening "%s"'%(sys.argv[0],
|
||||
+ file), file=sys.stderr)
|
||||
|
||||
status = startfile.open(file)
|
||||
if status:
|
||||
@@ -428,7 +429,7 @@
|
||||
data = self.load_crashes()
|
||||
# Don't allow empty reports.
|
||||
if not data:
|
||||
- raise ValueError, 'No crashes detected!'
|
||||
+ raise ValueError('No crashes detected!')
|
||||
c = Context()
|
||||
c.title = 'clang static analyzer failures'
|
||||
|
||||
@@ -472,7 +473,7 @@
|
||||
# Check that this is a valid report.
|
||||
path = posixpath.join(self.server.root, 'report-%s.html' % report)
|
||||
if not posixpath.exists(path):
|
||||
- raise ValueError, 'Invalid report ID'
|
||||
+ raise ValueError('Invalid report ID')
|
||||
keys = self.load_report(report)
|
||||
c = Context()
|
||||
c.title = keys.get('DESC','clang error (unrecognized')
|
||||
@@ -501,7 +502,7 @@
|
||||
# report is None is used for crashes
|
||||
try:
|
||||
c = self.get_report_context(report)
|
||||
- except ValueError, e:
|
||||
+ except ValueError as e:
|
||||
return self.send_error(400, e.message)
|
||||
|
||||
title = c.title
|
||||
@@ -544,7 +545,7 @@
|
||||
"""%(r.getName(),display,r.getName(),options))
|
||||
reporterSelections = '\n'.join(reporterSelections)
|
||||
reporterOptionsDivs = '\n'.join(reporterOptions)
|
||||
- reportersArray = '[%s]'%(','.join([`r.getName()` for r in self.server.reporters]))
|
||||
+ reportersArray = '[%s]'%(','.join([repr(r.getName()) for r in self.server.reporters]))
|
||||
|
||||
if c.files:
|
||||
fieldSize = min(5, len(c.files))
|
||||
@@ -647,9 +648,9 @@
|
||||
fields = {}
|
||||
self.fields = fields
|
||||
|
||||
- o = urlparse.urlparse(self.path)
|
||||
+ o = urllib.parse.urlparse(self.path)
|
||||
self.fields = parse_query(o.query, fields)
|
||||
- path = posixpath.normpath(urllib.unquote(o.path))
|
||||
+ path = posixpath.normpath(urllib.parse.unquote(o.path))
|
||||
|
||||
# Split the components and strip the root prefix.
|
||||
components = path.split('/')[1:]
|
||||
@@ -690,8 +691,8 @@
|
||||
path = posixpath.join(self.server.root, relpath)
|
||||
|
||||
if self.server.options.debug > 1:
|
||||
- print >>sys.stderr, '%s: SERVER: sending path "%s"'%(sys.argv[0],
|
||||
- path)
|
||||
+ print('%s: SERVER: sending path "%s"'%(sys.argv[0],
|
||||
+ path), file=sys.stderr)
|
||||
return self.send_path(path)
|
||||
|
||||
def send_404(self):
|
||||
@@ -735,7 +736,7 @@
|
||||
mtime = self.dynamic_mtime
|
||||
self.send_header("Last-Modified", self.date_time_string(mtime))
|
||||
self.end_headers()
|
||||
- return StringIO.StringIO(s)
|
||||
+ return io.StringIO(s)
|
||||
|
||||
def send_patched_file(self, path, ctype):
|
||||
# Allow a very limited set of variables. This is pretty gross.
|
||||
diff -r -u cfe-7.0.1.src.orig/tools/scan-view/share/startfile.py cfe-7.0.1.src/tools/scan-view/share/startfile.py
|
||||
--- cfe-7.0.1.src.orig/tools/scan-view/share/startfile.py 2019-01-25 06:33:02.331385931 +0000
|
||||
+++ cfe-7.0.1.src/tools/scan-view/share/startfile.py 2019-01-25 06:34:16.457697824 +0000
|
||||
@@ -70,7 +70,7 @@
|
||||
return not returncode
|
||||
|
||||
def open(self, filename):
|
||||
- if isinstance(filename, basestring):
|
||||
+ if isinstance(filename, str):
|
||||
cmdline = self.args + [filename]
|
||||
else:
|
||||
# assume it is a sequence
|
||||
@@ -110,7 +110,7 @@
|
||||
# Platform support for Unix
|
||||
else:
|
||||
|
||||
- import commands
|
||||
+ import subprocess
|
||||
|
||||
# @WARNING: use the private API of the webbrowser module
|
||||
from webbrowser import _iscommand
|
||||
@@ -125,7 +125,7 @@
|
||||
def detect_kde_version(self):
|
||||
kde_version = None
|
||||
try:
|
||||
- info = commands.getoutput('kde-config --version')
|
||||
+ info = subprocess.getoutput('kde-config --version')
|
||||
|
||||
for line in info.splitlines():
|
||||
if line.startswith('KDE'):
|
||||
@@ -158,7 +158,7 @@
|
||||
desktop_environment = 'gnome'
|
||||
else:
|
||||
try:
|
||||
- info = commands.getoutput('xprop -root _DT_SAVE_MODE')
|
||||
+ info = subprocess.getoutput('xprop -root _DT_SAVE_MODE')
|
||||
if ' = "xfce4"' in info:
|
||||
desktop_environment = 'xfce'
|
||||
except (OSError, RuntimeError):
|
||||
@@ -189,7 +189,7 @@
|
||||
return _controllers[controller_name].open
|
||||
|
||||
except KeyError:
|
||||
- if _controllers.has_key('xdg-open'):
|
||||
+ if 'xdg-open' in _controllers:
|
||||
return _controllers['xdg-open'].open
|
||||
else:
|
||||
return webbrowser.open
|
|
@ -0,0 +1,24 @@
|
|||
From d13bd5108e3471cc6f6203ba1c0c0e67323bbb12 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Wed, 5 Sep 2018 21:43:42 -0700
|
||||
Subject: [PATCH] Don't prefer python2.7
|
||||
|
||||
---
|
||||
CMakeLists.txt | 1 -
|
||||
1 file changed, 1 deletion(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index 52b8819..6f233fd 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -109,7 +109,6 @@ if( CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR )
|
||||
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
|
||||
|
||||
if(LLVM_INCLUDE_TESTS)
|
||||
- set(Python_ADDITIONAL_VERSIONS 2.7)
|
||||
include(FindPythonInterp)
|
||||
if(NOT PYTHONINTERP_FOUND)
|
||||
message(FATAL_ERROR
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,120 @@
|
|||
From d84a971ba917569829b51fff6057e5fd0d85e402 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Thu, 18 Jan 2018 02:57:51 +0000
|
||||
Subject: [PATCH] Driver: Prefer vendor supplied gcc toolchain
|
||||
|
||||
Summary:
|
||||
This patch fixes an issue on Fedora where if you had the x86_64 cross
|
||||
compiler installed on your x86_64 system, then clang would use that compiler
|
||||
as the default toolchain. This was happening because the cross compiler
|
||||
is installed to /usr/lib/gcc/x86_64-linux-gnu/ and this directory comes before
|
||||
the default compiler directory (/usr/lib/gcc/x86_64-redhat-linux/) in the search
|
||||
list.
|
||||
|
||||
This patch re-orders the search list so that vendor supplied gcc toolchains
|
||||
are selected before toolchains with a generic target, which should prevent
|
||||
these kind of issues on other OSes too.
|
||||
|
||||
Subscribers: srhines, cfe-commits
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D42608
|
||||
---
|
||||
lib/Driver/ToolChains/Gnu.cpp | 47 ++++++++++++++++++++++---------------------
|
||||
1 file changed, 24 insertions(+), 23 deletions(-)
|
||||
|
||||
diff --git a/lib/Driver/ToolChains/Gnu.cpp b/lib/Driver/ToolChains/Gnu.cpp
|
||||
index 3755673..5a49a6e 100644
|
||||
--- a/lib/Driver/ToolChains/Gnu.cpp
|
||||
+++ b/lib/Driver/ToolChains/Gnu.cpp
|
||||
@@ -1811,18 +1811,19 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
|
||||
// lifetime or initialization issues.
|
||||
static const char *const AArch64LibDirs[] = {"/lib64", "/lib"};
|
||||
static const char *const AArch64Triples[] = {
|
||||
- "aarch64-none-linux-gnu", "aarch64-linux-gnu", "aarch64-redhat-linux",
|
||||
- "aarch64-suse-linux"};
|
||||
+ "aarch64-redhat-linux", "aarch64-suse-linux",
|
||||
+ "aarch64-none-linux-gnu", "aarch64-linux-gnu"};
|
||||
static const char *const AArch64beLibDirs[] = {"/lib"};
|
||||
static const char *const AArch64beTriples[] = {"aarch64_be-none-linux-gnu",
|
||||
"aarch64_be-linux-gnu"};
|
||||
|
||||
static const char *const ARMLibDirs[] = {"/lib"};
|
||||
static const char *const ARMTriples[] = {"arm-linux-gnueabi"};
|
||||
- static const char *const ARMHFTriples[] = {"arm-linux-gnueabihf",
|
||||
- "armv7hl-redhat-linux-gnueabi",
|
||||
+ static const char *const ARMHFTriples[] = {"armv7hl-redhat-linux-gnueabi",
|
||||
"armv6hl-suse-linux-gnueabi",
|
||||
- "armv7hl-suse-linux-gnueabi"};
|
||||
+ "armv7hl-suse-linux-gnueabi",
|
||||
+ "arm-linux-gnueabihf",
|
||||
+ };
|
||||
static const char *const ARMebLibDirs[] = {"/lib"};
|
||||
static const char *const ARMebTriples[] = {"armeb-linux-gnueabi"};
|
||||
static const char *const ARMebHFTriples[] = {
|
||||
@@ -1830,19 +1831,19 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
|
||||
|
||||
static const char *const X86_64LibDirs[] = {"/lib64", "/lib"};
|
||||
static const char *const X86_64Triples[] = {
|
||||
- "x86_64-linux-gnu", "x86_64-unknown-linux-gnu",
|
||||
- "x86_64-pc-linux-gnu", "x86_64-redhat-linux6E",
|
||||
- "x86_64-redhat-linux", "x86_64-suse-linux",
|
||||
- "x86_64-manbo-linux-gnu", "x86_64-linux-gnu",
|
||||
- "x86_64-slackware-linux", "x86_64-unknown-linux",
|
||||
- "x86_64-amazon-linux"};
|
||||
+ "x86_64-redhat-linux6E", "x86_64-redhat-linux",
|
||||
+ "x86_64-suse-linux", "x86_64-slackware-linux",
|
||||
+ "x86_64-manbo-linux-gnu", "x86_64-amazon-linux",
|
||||
+ "x86_64-linux-gnu", "x86_64-unknown-linux-gnu",
|
||||
+ "x86_64-pc-linux-gnu", "x86_64-linux-gnu",
|
||||
+ "x86_64-unknown-linux"};
|
||||
static const char *const X32LibDirs[] = {"/libx32"};
|
||||
static const char *const X86LibDirs[] = {"/lib32", "/lib"};
|
||||
static const char *const X86Triples[] = {
|
||||
- "i686-linux-gnu", "i686-pc-linux-gnu", "i486-linux-gnu",
|
||||
- "i386-linux-gnu", "i386-redhat-linux6E", "i686-redhat-linux",
|
||||
- "i586-redhat-linux", "i386-redhat-linux", "i586-suse-linux",
|
||||
- "i486-slackware-linux", "i686-montavista-linux", "i586-linux-gnu"};
|
||||
+ "i386-redhat-linux6E", "i686-redhat-linux", "i586-redhat-linux",
|
||||
+ "i386-redhat-linux", "i586-suse-linux", "i486-slackware-linux",
|
||||
+ "i686-montavista-linux", "i686-linux-gnu", "i686-pc-linux-gnu",
|
||||
+ "i486-linux-gnu", "i386-linux-gnu", "i586-linux-gnu"};
|
||||
|
||||
static const char *const MIPSLibDirs[] = {"/lib"};
|
||||
static const char *const MIPSTriples[] = {"mips-linux-gnu", "mips-mti-linux",
|
||||
@@ -1864,16 +1865,16 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
|
||||
|
||||
static const char *const PPCLibDirs[] = {"/lib32", "/lib"};
|
||||
static const char *const PPCTriples[] = {
|
||||
- "powerpc-linux-gnu", "powerpc-unknown-linux-gnu", "powerpc-linux-gnuspe",
|
||||
- "powerpc-suse-linux", "powerpc-montavista-linuxspe"};
|
||||
+ "powerpc-suse-linux", "powerpc-montavista-linuxspe",
|
||||
+ "powerpc-linux-gnu", "powerpc-unknown-linux-gnu", "powerpc-linux-gnuspe"};
|
||||
static const char *const PPC64LibDirs[] = {"/lib64", "/lib"};
|
||||
static const char *const PPC64Triples[] = {
|
||||
- "powerpc64-linux-gnu", "powerpc64-unknown-linux-gnu",
|
||||
- "powerpc64-suse-linux", "ppc64-redhat-linux"};
|
||||
+ "powerpc64-suse-linux", "ppc64-redhat-linux",
|
||||
+ "powerpc64-linux-gnu", "powerpc64-unknown-linux-gnu"};
|
||||
static const char *const PPC64LELibDirs[] = {"/lib64", "/lib"};
|
||||
static const char *const PPC64LETriples[] = {
|
||||
- "powerpc64le-linux-gnu", "powerpc64le-unknown-linux-gnu",
|
||||
- "powerpc64le-suse-linux", "ppc64le-redhat-linux"};
|
||||
+ "powerpc64le-suse-linux", "ppc64le-redhat-linux",
|
||||
+ "powerpc64le-linux-gnu", "powerpc64le-unknown-linux-gnu"};
|
||||
|
||||
static const char *const RISCV32LibDirs[] = {"/lib", "/lib32"};
|
||||
static const char *const RISCVTriples[] = {"riscv32-unknown-linux-gnu",
|
||||
@@ -1889,8 +1890,8 @@ void Generic_GCC::GCCInstallationDetector::AddDefaultGCCPrefixes(
|
||||
|
||||
static const char *const SystemZLibDirs[] = {"/lib64", "/lib"};
|
||||
static const char *const SystemZTriples[] = {
|
||||
- "s390x-linux-gnu", "s390x-unknown-linux-gnu", "s390x-ibm-linux-gnu",
|
||||
- "s390x-suse-linux", "s390x-redhat-linux"};
|
||||
+ "s390x-ibm-linux-gnu", "s390x-suse-linux", "s390x-redhat-linux",
|
||||
+ "s390x-linux-gnu", "s390x-unknown-linux-gnu"};
|
||||
|
||||
|
||||
using std::begin;
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
From 375167e36f900483c5ab28d86cb57b703f90fee2 Mon Sep 17 00:00:00 2001
|
||||
From: Serge Guelton <sguelton@redhat.com>
|
||||
Date: Fri, 1 Feb 2019 06:11:44 +0000
|
||||
Subject: [PATCH] Fix isInSystemMacro to handle pasted macros
|
||||
|
||||
Token pasted by the preprocessor (through ##) have a Spelling pointing to scratch buffer.
|
||||
As a result they are not recognized at system macro, even though the pasting happened in
|
||||
a system macro. Fix that by looking into the parent macro if the original lookup finds a
|
||||
scratch buffer.
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D55782
|
||||
|
||||
This effectively fixes https://bugs.llvm.org/show_bug.cgi?id=35268,
|
||||
|
||||
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@352838 91177308-0d34-0410-b5e6-96231b3b80d8
|
||||
---
|
||||
include/clang/Basic/SourceManager.h | 18 +++++++++++++++++-
|
||||
test/Misc/no-warn-in-system-macro.c | 13 +++++++++++++
|
||||
test/Misc/no-warn-in-system-macro.c.inc | 9 +++++++++
|
||||
test/Misc/warn-in-system-macro-def.c | 21 +++++++++++++++++++++
|
||||
test/Misc/warn-in-system-macro-def.c.inc | 4 ++++
|
||||
5 files changed, 64 insertions(+), 1 deletion(-)
|
||||
create mode 100644 test/Misc/no-warn-in-system-macro.c
|
||||
create mode 100644 test/Misc/no-warn-in-system-macro.c.inc
|
||||
create mode 100644 test/Misc/warn-in-system-macro-def.c
|
||||
create mode 100644 test/Misc/warn-in-system-macro-def.c.inc
|
||||
|
||||
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
|
||||
index ba829a8773..b45357e645 100644
|
||||
--- a/include/clang/Basic/SourceManager.h
|
||||
+++ b/include/clang/Basic/SourceManager.h
|
||||
@@ -1428,6 +1428,12 @@ public:
|
||||
return getFileID(Loc) == getMainFileID();
|
||||
}
|
||||
|
||||
+ /// Returns whether \p Loc is located in a <scratch space> file.
|
||||
+ bool isWrittenInScratchSpace(SourceLocation Loc) const {
|
||||
+ StringRef Filename(getPresumedLoc(Loc).getFilename());
|
||||
+ return Filename.equals("<scratch space>");
|
||||
+ }
|
||||
+
|
||||
/// Returns if a SourceLocation is in a system header.
|
||||
bool isInSystemHeader(SourceLocation Loc) const {
|
||||
return isSystem(getFileCharacteristic(Loc));
|
||||
@@ -1440,7 +1446,17 @@
|
||||
|
||||
/// Returns whether \p Loc is expanded from a macro in a system header.
|
||||
bool isInSystemMacro(SourceLocation loc) const {
|
||||
- return loc.isMacroID() && isInSystemHeader(getSpellingLoc(loc));
|
||||
+ if(!loc.isMacroID())
|
||||
+ return false;
|
||||
+
|
||||
+ // This happens when the macro is the result of a paste, in that case
|
||||
+ // its spelling is the scratch memory, so we take the parent context.
|
||||
+ if (isWrittenInScratchSpace(getSpellingLoc(loc))) {
|
||||
+ return isInSystemHeader(getSpellingLoc(getImmediateMacroCallerLoc(loc)));
|
||||
+ }
|
||||
+ else {
|
||||
+ return isInSystemHeader(getSpellingLoc(loc));
|
||||
+ }
|
||||
}
|
||||
|
||||
/// The size of the SLocEntry that \p FID represents.
|
||||
diff --git a/test/Misc/no-warn-in-system-macro.c b/test/Misc/no-warn-in-system-macro.c
|
||||
new file mode 100644
|
||||
index 0000000000..a319b14c9c
|
||||
--- /dev/null
|
||||
+++ b/test/Misc/no-warn-in-system-macro.c
|
||||
@@ -0,0 +1,13 @@
|
||||
+// RUN: %clang_cc1 -isystem %S -Wdouble-promotion -fsyntax-only %s 2>&1 | FileCheck -allow-empty %s
|
||||
+// CHECK-NOT: warning:
|
||||
+
|
||||
+#include <no-warn-in-system-macro.c.inc>
|
||||
+
|
||||
+int main(void)
|
||||
+{
|
||||
+ double foo = 1.0;
|
||||
+
|
||||
+ if (isnan(foo))
|
||||
+ return 1;
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/test/Misc/no-warn-in-system-macro.c.inc b/test/Misc/no-warn-in-system-macro.c.inc
|
||||
new file mode 100644
|
||||
index 0000000000..3cbe7dfc16
|
||||
--- /dev/null
|
||||
+++ b/test/Misc/no-warn-in-system-macro.c.inc
|
||||
@@ -0,0 +1,9 @@
|
||||
+extern int __isnanf(float f);
|
||||
+extern int __isnan(double f);
|
||||
+extern int __isnanl(long double f);
|
||||
+#define isnan(x) \
|
||||
+ (sizeof (x) == sizeof (float) \
|
||||
+ ? __isnanf (x) \
|
||||
+ : sizeof (x) == sizeof (double) \
|
||||
+ ? __isnan (x) : __isnanl (x))
|
||||
+
|
||||
diff --git a/test/Misc/warn-in-system-macro-def.c b/test/Misc/warn-in-system-macro-def.c
|
||||
new file mode 100644
|
||||
index 0000000000..b295130702
|
||||
--- /dev/null
|
||||
+++ b/test/Misc/warn-in-system-macro-def.c
|
||||
@@ -0,0 +1,21 @@
|
||||
+// RUN: %clang_cc1 -isystem %S -Wdouble-promotion -fsyntax-only %s 2>&1 | FileCheck -allow-empty %s
|
||||
+// CHECK: warning:
|
||||
+// CHECK: expanded from macro 'ISNAN'
|
||||
+// CHECK: expanded from macro 'isnan'
|
||||
+
|
||||
+#include <warn-in-system-macro-def.c.inc>
|
||||
+
|
||||
+#define isnan(x) \
|
||||
+ (sizeof (x) == sizeof (float) \
|
||||
+ ? __isnanf (x) \
|
||||
+ : sizeof (x) == sizeof (double) \
|
||||
+ ? __isnan (x) : __isnanl (x))
|
||||
+
|
||||
+int main(void)
|
||||
+{
|
||||
+ double foo = 1.0;
|
||||
+
|
||||
+ if (ISNAN(foo))
|
||||
+ return 1;
|
||||
+ return 0;
|
||||
+}
|
||||
diff --git a/test/Misc/warn-in-system-macro-def.c.inc b/test/Misc/warn-in-system-macro-def.c.inc
|
||||
new file mode 100644
|
||||
index 0000000000..5c7e60275a
|
||||
--- /dev/null
|
||||
+++ b/test/Misc/warn-in-system-macro-def.c.inc
|
||||
@@ -0,0 +1,4 @@
|
||||
+extern int __isnanf(float f);
|
||||
+extern int __isnan(double f);
|
||||
+extern int __isnanl(long double f);
|
||||
+#define ISNAN isnan
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
From 690373af5a5d50cf115ed6e4d2849bb786f9dc8e Mon Sep 17 00:00:00 2001
|
||||
From: serge-sans-paille <sguelton@redhat.com>
|
||||
Date: Tue, 10 Dec 2019 09:18:03 +0000
|
||||
Subject: [PATCH] Make -funwind-tables the default for all archs
|
||||
|
||||
---
|
||||
clang/lib/Driver/ToolChain.cpp | 2 +-
|
||||
clang/lib/Driver/ToolChains/Gnu.cpp | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/clang/lib/Driver/ToolChain.cpp b/clang/lib/Driver/ToolChain.cpp
|
||||
index b1fddb0af55..43af40ed0e8 100644
|
||||
--- a/clang/lib/Driver/ToolChain.cpp
|
||||
+++ b/clang/lib/Driver/ToolChain.cpp
|
||||
@@ -244,7 +244,7 @@ std::string ToolChain::getInputFilename(const InputInfo &Input) const {
|
||||
}
|
||||
|
||||
bool ToolChain::IsUnwindTablesDefault(const ArgList &Args) const {
|
||||
- return false;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
Tool *ToolChain::getClang() const {
|
||||
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp
|
||||
index 33cdd3585c2..15e82be8f3a 100644
|
||||
--- a/clang/lib/Driver/ToolChains/Gnu.cpp
|
||||
+++ b/clang/lib/Driver/ToolChains/Gnu.cpp
|
||||
@@ -2535,7 +2535,7 @@ void Generic_GCC::printVerboseInfo(raw_ostream &OS) const {
|
||||
}
|
||||
|
||||
bool Generic_GCC::IsUnwindTablesDefault(const ArgList &Args) const {
|
||||
- return getArch() == llvm::Triple::x86_64;
|
||||
+ return true;
|
||||
}
|
||||
|
||||
bool Generic_GCC::isPICDefault() const {
|
||||
--
|
||||
2.20.1
|
||||
|
|
@ -1,50 +0,0 @@
|
|||
From 09ae3ef5710a89505318ec721c65b6c838147276 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Thu, 7 Feb 2019 21:05:37 -0800
|
||||
Subject: [PATCH] ToolChain: Add -lgcc_s to the linker flags when using libc++
|
||||
|
||||
The libc++ build for Fedora does not include an implementation of
|
||||
libunwind, so we need to explicitly link against something that
|
||||
provides this implementation.
|
||||
---
|
||||
clang/lib/Driver/ToolChain.cpp | 1 +
|
||||
clang/test/Driver/netbsd.cpp | 4 ++--
|
||||
2 files changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/Driver/ToolChain.cpp b/lib/Driver/ToolChain.cpp
|
||||
index 88a627e..cb99844 100644
|
||||
--- a/lib/Driver/ToolChain.cpp
|
||||
+++ b/lib/Driver/ToolChain.cpp
|
||||
@@ -767,6 +767,7 @@ void ToolChain::AddCXXStdlibLibArgs(const ArgList &Args,
|
||||
switch (Type) {
|
||||
case ToolChain::CST_Libcxx:
|
||||
CmdArgs.push_back("-lc++");
|
||||
+ CmdArgs.push_back("-lgcc_s");
|
||||
break;
|
||||
|
||||
case ToolChain::CST_Libstdcxx:
|
||||
diff --git a/test/Driver/netbsd.cpp b/test/Driver/netbsd.cpp
|
||||
index 4af7d83..ff18c62 100644
|
||||
--- a/test/Driver/netbsd.cpp
|
||||
+++ b/test/Driver/netbsd.cpp
|
||||
@@ -131,7 +131,7 @@
|
||||
// ARM-7: clang{{.*}}" "-cc1" "-triple" "armv5e-unknown-netbsd7.0.0-eabi"
|
||||
// ARM-7: ld{{.*}}" "--eh-frame-hdr" "-dynamic-linker" "/libexec/ld.elf_so"
|
||||
// ARM-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
|
||||
-// ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++" "-lm" "-lc"
|
||||
+// ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++" "-lgcc_s" "-lm" "-lc"
|
||||
// ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
|
||||
|
||||
// AARCH64: clang{{.*}}" "-cc1" "-triple" "aarch64-unknown-netbsd"
|
||||
@@ -250,7 +250,7 @@
|
||||
// S-ARM-7: clang{{.*}}" "-cc1" "-triple" "armv5e-unknown-netbsd7.0.0-eabi"
|
||||
// S-ARM-7: ld{{.*}}" "--eh-frame-hdr" "-Bstatic"
|
||||
// S-ARM-7: "-o" "a.out" "{{.*}}/usr/lib{{/|\\\\}}crt0.o" "{{.*}}/usr/lib{{/|\\\\}}eabi{{/|\\\\}}crti.o"
|
||||
-// S-ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++" "-lm" "-lc"
|
||||
+// S-ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtbegin.o" "{{.*}}.o" "-lc++" "-lgcc_s" "-lm" "-lc"
|
||||
// S-ARM-7: "{{.*}}/usr/lib{{/|\\\\}}crtend.o" "{{.*}}/usr/lib{{/|\\\\}}crtn.o"
|
||||
|
||||
// S-AARCH64: clang{{.*}}" "-cc1" "-triple" "aarch64-unknown-netbsd"
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -1,25 +0,0 @@
|
|||
From 856b789b9de0895786ba23681c4337172676e01e Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Fri, 31 Jan 2020 11:04:57 -0800
|
||||
Subject: [PATCH] clang: Don't install static libraries
|
||||
|
||||
---
|
||||
clang/cmake/modules/AddClang.cmake | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake
|
||||
index cbd618e..9cf076a 100644
|
||||
--- a/clang/cmake/modules/AddClang.cmake
|
||||
+++ b/clang/cmake/modules/AddClang.cmake
|
||||
@@ -97,7 +97,7 @@ macro(add_clang_library name)
|
||||
if(TARGET ${name})
|
||||
target_link_libraries(${name} INTERFACE ${LLVM_COMMON_LIBS})
|
||||
|
||||
- if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ARG_INSTALL_WITH_TOOLCHAIN)
|
||||
+ if (ARG_SHARED AND (NOT LLVM_INSTALL_TOOLCHAIN_ONLY OR ARG_INSTALL_WITH_TOOLCHAIN))
|
||||
set(export_to_clangtargets)
|
||||
if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
|
||||
"clang-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -1,17 +1,17 @@
|
|||
From 1f26a0284925859b72ee520ce74452d77d822409 Mon Sep 17 00:00:00 2001
|
||||
From: serge-sans-paille <sguelton@redhat.com>
|
||||
Date: Mon, 28 Jan 2019 19:12:27 +0000
|
||||
Subject: [PATCH 2/2] [PATCH] gtest reorg
|
||||
From 3b2afecc227d652f84f883d4018d43971de6a311 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Wed, 21 Mar 2018 07:17:00 -0700
|
||||
Subject: [PATCH] gtest reorg
|
||||
|
||||
---
|
||||
CMakeLists.txt | 12 +++++-------
|
||||
1 file changed, 5 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index c2016a45ca..48ea3c3bb9 100644
|
||||
index 2eee8e6..01d290f 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -157,12 +157,6 @@ Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
|
||||
@@ -142,12 +142,6 @@ Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
|
||||
set(LLVM_UTILS_PROVIDED ON)
|
||||
set(CLANG_TEST_DEPS FileCheck count not)
|
||||
endif()
|
||||
|
@ -24,7 +24,7 @@ index c2016a45ca..48ea3c3bb9 100644
|
|||
else()
|
||||
# Seek installed Lit.
|
||||
find_program(LLVM_LIT
|
||||
@@ -507,7 +501,11 @@ endif()
|
||||
@@ -477,7 +471,11 @@ endif()
|
||||
|
||||
|
||||
if( CLANG_INCLUDE_TESTS )
|
||||
|
@ -38,5 +38,5 @@ index c2016a45ca..48ea3c3bb9 100644
|
|||
list(APPEND CLANG_TEST_DEPS ClangUnitTests)
|
||||
list(APPEND CLANG_TEST_PARAMS
|
||||
--
|
||||
2.19.2
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,27 @@
|
|||
From 06cde370a44393d65bae7f61279900b5838b4a2c Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Tue, 23 Jan 2018 18:59:20 -0800
|
||||
Subject: [PATCH] lit.cfg: Add hack so lit can find not and FileCheck
|
||||
|
||||
---
|
||||
test/lit.cfg.py | 3 +++
|
||||
1 file changed, 3 insertions(+)
|
||||
|
||||
diff --git a/test/lit.cfg.py b/test/lit.cfg.py
|
||||
index 5323cfe..5b4184e 100644
|
||||
--- a/test/lit.cfg.py
|
||||
+++ b/test/lit.cfg.py
|
||||
@@ -39,7 +39,10 @@ config.test_source_root = os.path.dirname(__file__)
|
||||
# test_exec_root: The root path where tests should be run.
|
||||
config.test_exec_root = os.path.join(config.clang_obj_root, 'test')
|
||||
|
||||
+old_llvm_tools_dir = llvm_config.config.llvm_tools_dir
|
||||
+llvm_config.config.llvm_tools_dir = '/usr/lib@FEDORA_LLVM_LIB_SUFFIX@/llvm'
|
||||
llvm_config.use_default_substitutions()
|
||||
+llvm_config.config.llvm_tools_dir = old_llvm_tools_dir
|
||||
|
||||
llvm_config.use_clang()
|
||||
|
||||
--
|
||||
1.8.3.1
|
||||
|
|
@ -0,0 +1,73 @@
|
|||
From c4d409e8481e402eb34739c6579bd9ffe383f3cd Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Fri, 16 Jun 2017 00:48:27 +0000
|
||||
Subject: [PATCH] lit.cfg: Remove substitutions for clang/llvm tools
|
||||
|
||||
We were missing some subsitutions, for example 'not with no pipe, so
|
||||
there was a mismatch where some tests would run tools using the full
|
||||
path and others would search PATH for the tool.
|
||||
|
||||
The new beahavior is that the lit tests will always search PATH for the
|
||||
tool. This should not change the current functionality, because the
|
||||
smae paths that were being used in substitutions are being added to
|
||||
PATH.
|
||||
---
|
||||
test/lit.cfg | 42 ------------------------------------------
|
||||
1 file changed, 42 deletions(-)
|
||||
|
||||
diff --git a/test/lit.cfg b/test/lit.cfg
|
||||
index 7d8bebf..9ded96c 100644
|
||||
--- a/test/lit.cfg
|
||||
+++ b/test/lit.cfg
|
||||
@@ -303,48 +303,6 @@ config.substitutions.append(
|
||||
(' %clang-cl ',
|
||||
"""*** invalid substitution, use '%clang_cl'. ***""") )
|
||||
|
||||
-# For each occurrence of a clang tool name as its own word, replace it
|
||||
-# with the full path to the build directory holding that tool. This
|
||||
-# ensures that we are testing the tools just built and not some random
|
||||
-# tools that might happen to be in the user's PATH.
|
||||
-tool_dirs = os.path.pathsep.join((clang_tools_dir, llvm_tools_dir))
|
||||
-
|
||||
-# Regex assertions to reject neighbor hyphens/dots (seen in some tests).
|
||||
-# For example, don't match 'clang-check-' or '.clang-format'.
|
||||
-NoPreHyphenDot = r"(?<!(-|\.))"
|
||||
-NoPostHyphenDot = r"(?!(-|\.))"
|
||||
-NoPostBar = r"(?!(/|\\))"
|
||||
-
|
||||
-tool_patterns = [r"\bFileCheck\b",
|
||||
- r"\bc-index-test\b",
|
||||
- NoPreHyphenDot + r"\bclang-check\b" + NoPostHyphenDot,
|
||||
- NoPreHyphenDot + r"\bclang-format\b" + NoPostHyphenDot,
|
||||
- # FIXME: Some clang test uses opt?
|
||||
- NoPreHyphenDot + r"\bopt\b" + NoPostBar + NoPostHyphenDot,
|
||||
- # Handle these specially as they are strings searched
|
||||
- # for during testing.
|
||||
- r"\| \bcount\b",
|
||||
- r"\| \bnot\b"]
|
||||
-
|
||||
-if config.clang_examples:
|
||||
- tool_patterns.append(NoPreHyphenDot + r"\bclang-interpreter\b" + NoPostHyphenDot)
|
||||
-
|
||||
-for pattern in tool_patterns:
|
||||
- # Extract the tool name from the pattern. This relies on the tool
|
||||
- # name being surrounded by \b word match operators. If the
|
||||
- # pattern starts with "| ", include it in the string to be
|
||||
- # substituted.
|
||||
- tool_match = re.match(r"^(\\)?((\| )?)\W+b([0-9A-Za-z-_]+)\\b\W*$",
|
||||
- pattern)
|
||||
- tool_pipe = tool_match.group(2)
|
||||
- tool_name = tool_match.group(4)
|
||||
- tool_path = lit.util.which(tool_name, tool_dirs)
|
||||
- if not tool_path:
|
||||
- # Warn, but still provide a substitution.
|
||||
- lit_config.note('Did not find ' + tool_name + ' in ' + tool_dirs)
|
||||
- tool_path = clang_tools_dir + '/' + tool_name
|
||||
- config.substitutions.append((pattern, tool_pipe + tool_path))
|
||||
-
|
||||
###
|
||||
|
||||
# Set available features we allow tests to conditionalize on.
|
||||
--
|
||||
2.9.3
|
||||
|
|
@ -1,99 +0,0 @@
|
|||
From 11857d49948b845dcfd7c7f78595095e3add012d Mon Sep 17 00:00:00 2001
|
||||
From: Rong Xu <xur@google.com>
|
||||
Date: Tue, 25 Feb 2020 08:04:01 -0800
|
||||
Subject: [PATCH] [remark][diagnostics] [codegen] Fix PR44896
|
||||
|
||||
This patch fixes PR44896. For IR input files, option fdiscard-value-names
|
||||
should be ignored as we need named values in loadModule().
|
||||
Commit 60d3947922 sets this option after loadModule() where valued names
|
||||
already created. This creates an inconsistent state in setNameImpl()
|
||||
that leads to a seg fault.
|
||||
This patch forces fdiscard-value-names to be false for IR input files.
|
||||
|
||||
This patch also emits a warning of "ignoring -fdiscard-value-names" if
|
||||
option fdiscard-value-names is explictly enabled in the commandline for
|
||||
IR input files.
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D74878
|
||||
---
|
||||
clang/include/clang/Basic/DiagnosticDriverKinds.td | 3 +++
|
||||
clang/lib/CodeGen/CodeGenAction.cpp | 3 +++
|
||||
clang/lib/Driver/ToolChains/Clang.cpp | 10 +++++++++-
|
||||
clang/test/CodeGen/PR44896.ll | 15 +++++++++++++++
|
||||
4 files changed, 30 insertions(+), 1 deletion(-)
|
||||
create mode 100644 clang/test/CodeGen/PR44896.ll
|
||||
|
||||
diff --git a/clang/include/clang/Basic/DiagnosticDriverKinds.td b/clang/include/clang/Basic/DiagnosticDriverKinds.td
|
||||
index ecd871e..48ece91 100644
|
||||
--- a/clang/include/clang/Basic/DiagnosticDriverKinds.td
|
||||
+++ b/clang/include/clang/Basic/DiagnosticDriverKinds.td
|
||||
@@ -271,6 +271,9 @@ def warn_drv_unsupported_debug_info_opt_for_target : Warning<
|
||||
InGroup<UnsupportedTargetOpt>;
|
||||
def warn_c_kext : Warning<
|
||||
"ignoring -fapple-kext which is valid for C++ and Objective-C++ only">;
|
||||
+def warn_ignoring_fdiscard_for_bitcode : Warning<
|
||||
+ "ignoring -fdiscard-value-names for LLVM Bitcode">,
|
||||
+ InGroup<UnusedCommandLineArgument>;
|
||||
def warn_drv_input_file_unused : Warning<
|
||||
"%0: '%1' input unused%select{ when '%3' is present|}2">,
|
||||
InGroup<UnusedCommandLineArgument>;
|
||||
diff --git a/clang/lib/CodeGen/CodeGenAction.cpp b/clang/lib/CodeGen/CodeGenAction.cpp
|
||||
index 5ebc34c..81946b1 100644
|
||||
--- a/clang/lib/CodeGen/CodeGenAction.cpp
|
||||
+++ b/clang/lib/CodeGen/CodeGenAction.cpp
|
||||
@@ -1146,6 +1146,9 @@ void CodeGenAction::ExecuteAction() {
|
||||
CI.getTargetOpts(), CI.getLangOpts(),
|
||||
CI.getFrontendOpts().ShowTimers,
|
||||
std::move(LinkModules), *VMContext, nullptr);
|
||||
+ // PR44896: Force DiscardValueNames as false. DiscardValueNames cannot be
|
||||
+ // true here because the valued names are needed for reading textual IR.
|
||||
+ Ctx.setDiscardValueNames(false);
|
||||
Ctx.setDiagnosticHandler(
|
||||
std::make_unique<ClangDiagnosticHandler>(CodeGenOpts, &Result));
|
||||
|
||||
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
|
||||
index 19a23c9..d387a1d 100644
|
||||
--- a/clang/lib/Driver/ToolChains/Clang.cpp
|
||||
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
|
||||
@@ -4332,8 +4332,16 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
||||
|
||||
// Discard value names in assert builds unless otherwise specified.
|
||||
if (Args.hasFlag(options::OPT_fdiscard_value_names,
|
||||
- options::OPT_fno_discard_value_names, !IsAssertBuild))
|
||||
+ options::OPT_fno_discard_value_names, !IsAssertBuild)) {
|
||||
+ if (Args.hasArg(options::OPT_fdiscard_value_names) &&
|
||||
+ (std::any_of(Inputs.begin(), Inputs.end(),
|
||||
+ [](const clang::driver::InputInfo &II) {
|
||||
+ return types::isLLVMIR(II.getType());
|
||||
+ }))) {
|
||||
+ D.Diag(diag::warn_ignoring_fdiscard_for_bitcode);
|
||||
+ }
|
||||
CmdArgs.push_back("-discard-value-names");
|
||||
+ }
|
||||
|
||||
// Set the main file name, so that debug info works even with
|
||||
// -save-temps.
|
||||
diff --git a/clang/test/CodeGen/PR44896.ll b/clang/test/CodeGen/PR44896.ll
|
||||
new file mode 100644
|
||||
index 0000000..a4d3445
|
||||
--- /dev/null
|
||||
+++ b/clang/test/CodeGen/PR44896.ll
|
||||
@@ -0,0 +1,15 @@
|
||||
+; RUN: %clang -fdiscard-value-names -S %s -o /dev/null 2>&1 | FileCheck --check-prefix=WARNING %s
|
||||
+; RUN: %clang -S %s -o /dev/null 2>&1 | FileCheck --check-prefix=NOWARNING %s
|
||||
+; RUN: %clang_cc1 -S -emit-llvm %s -discard-value-names -o /dev/null
|
||||
+; PR 44896
|
||||
+
|
||||
+; WARNING: ignoring -fdiscard-value-names for LLVM Bitcode
|
||||
+; NOWARNING-NOT: ignoring -fdiscard-value-names for LLVM Bitcode
|
||||
+
|
||||
+target datalayout = "e-m:e-p270:32:32-p271:32:32-p272:64:64-i64:64-f80:128-n8:16:32:64-S128"
|
||||
+target triple = "x86_64--linux-gnu"
|
||||
+
|
||||
+define linkonce i8* @b(i8* %a) {
|
||||
+ ret i8* %a
|
||||
+}
|
||||
+
|
||||
--
|
||||
1.8.3.1
|
||||
|
315
clang.spec
315
clang.spec
|
@ -1,41 +1,35 @@
|
|||
%global compat_build 0
|
||||
|
||||
%global maj_ver 10
|
||||
%global maj_ver 7
|
||||
%global min_ver 0
|
||||
%global patch_ver 0
|
||||
#%%global rc_ver 6
|
||||
%global baserelease 1
|
||||
%global patch_ver 1
|
||||
#%%global rc_ver 3
|
||||
|
||||
%global clang_tools_binaries \
|
||||
%{_bindir}/clangd \
|
||||
%{_bindir}/clang-apply-replacements \
|
||||
%{_bindir}/clang-change-namespace \
|
||||
%{_bindir}/clang-check \
|
||||
%{_bindir}/clang-doc \
|
||||
%{_bindir}/clang-extdef-mapping \
|
||||
%{_bindir}/clang-format \
|
||||
%{_bindir}/clang-import-test \
|
||||
%{_bindir}/clang-include-fixer \
|
||||
%{_bindir}/clang-move \
|
||||
%{_bindir}/clang-offload-bundler \
|
||||
%{_bindir}/clang-offload-wrapper \
|
||||
%{_bindir}/clang-query \
|
||||
%{_bindir}/clang-refactor \
|
||||
%{_bindir}/clang-rename \
|
||||
%{_bindir}/clang-reorder-fields \
|
||||
%{_bindir}/clang-scan-deps \
|
||||
%{_bindir}/clang-tidy \
|
||||
%{_bindir}/clangd \
|
||||
%{_bindir}/diagtool \
|
||||
%{_bindir}/hmaptool \
|
||||
%{_bindir}/pp-trace
|
||||
%{_bindir}/clang-rename \
|
||||
%{_bindir}/clang-tidy
|
||||
|
||||
%global clang_binaries \
|
||||
%{_bindir}/clang \
|
||||
%{_bindir}/clang++ \
|
||||
%{_bindir}/clang-%{maj_ver} \
|
||||
%{_bindir}/clang++-%{maj_ver} \
|
||||
%{_bindir}/clang-check \
|
||||
%{_bindir}/clang-cl \
|
||||
%{_bindir}/clang-cpp \
|
||||
%{_bindir}/clang-format \
|
||||
%{_bindir}/clang-func-mapping \
|
||||
%{_bindir}/clang-import-test \
|
||||
%{_bindir}/clang-offload-bundler \
|
||||
%{_bindir}/diagtool \
|
||||
%{_bindir}/hmaptool
|
||||
|
||||
%if 0%{?compat_build}
|
||||
%global pkg_name clang%{maj_ver}.%{min_ver}
|
||||
|
@ -51,7 +45,6 @@
|
|||
%global pkg_libdir %{install_libdir}
|
||||
%else
|
||||
%global pkg_name clang
|
||||
%global install_prefix /usr
|
||||
%endif
|
||||
|
||||
%if 0%{?fedora} || 0%{?rhel} > 7
|
||||
|
@ -60,58 +53,43 @@
|
|||
%bcond_with python3
|
||||
%endif
|
||||
|
||||
%global build_install_prefix %{buildroot}%{install_prefix}
|
||||
|
||||
%ifarch ppc64le
|
||||
# Too many threads on ppc64 systems causes OOM errors.
|
||||
%global _smp_mflags -j8
|
||||
%endif
|
||||
|
||||
%global clang_srcdir clang-%{version}%{?rc_ver:rc%{rc_ver}}.src
|
||||
%global clang_srcdir cfe-%{version}%{?rc_ver:rc%{rc_ver}}.src
|
||||
%global clang_tools_srcdir clang-tools-extra-%{version}%{?rc_ver:rc%{rc_ver}}.src
|
||||
|
||||
Name: %pkg_name
|
||||
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
|
||||
Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist}
|
||||
Release: 6%{?rc_ver:.rc%{rc_ver}}%{?dist}
|
||||
Summary: A C language family front-end for LLVM
|
||||
|
||||
License: NCSA
|
||||
URL: http://llvm.org
|
||||
%if 0%{?rc_ver:1}
|
||||
Source0: https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{clang_srcdir}.tar.xz
|
||||
Source3: https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{clang_srcdir}.tar.xz.sig
|
||||
%else
|
||||
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{clang_srcdir}.tar.xz
|
||||
Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{clang_srcdir}.tar.xz.sig
|
||||
%endif
|
||||
Source0: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{clang_srcdir}.tar.xz
|
||||
%if !0%{?compat_build}
|
||||
%if 0%{?rc_ver:1}
|
||||
Source1: https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{clang_tools_srcdir}.tar.xz
|
||||
Source2: https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{clang_tools_srcdir}.tar.xz.sig
|
||||
%else
|
||||
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{clang_tools_srcdir}.tar.xz
|
||||
Source2: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{clang_tools_srcdir}.tar.xz.sig
|
||||
Source1: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/%{clang_tools_srcdir}.tar.xz
|
||||
%endif
|
||||
%endif
|
||||
Source4: https://prereleases.llvm.org/%{version}/hans-gpg-key.asc
|
||||
|
||||
Patch4: 0002-gtest-reorg.patch
|
||||
Patch11: 0001-ToolChain-Add-lgcc_s-to-the-linker-flags-when-using-.patch
|
||||
Patch13: 0001-Make-funwind-tables-the-default-for-all-archs.patch
|
||||
Patch0: 0001-lit.cfg-Add-hack-so-lit-can-find-not-and-FileCheck.patch
|
||||
Patch2: 0001-Driver-Prefer-vendor-supplied-gcc-toolchain.patch
|
||||
Patch4: 0001-gtest-reorg.patch
|
||||
Patch5: 0001-Don-t-prefer-python2.7.patch
|
||||
Patch6: 0001-Convert-clang-format-diff.py-to-python3-using-2to3.patch
|
||||
Patch7: 0001-Convert-scan-view-to-python3-using-2to3.patch
|
||||
#rhbz#1657544
|
||||
Patch8: 0001-CodeGen-Handle-mixed-width-ops-in-mixed-sign-mul-wit.patch
|
||||
#rhbz#1472437
|
||||
Patch9: 0001-Fix-isInSystemMacro-to-handle-pasted-macros.patch
|
||||
|
||||
# Not Upstream
|
||||
Patch15: 0001-clang-Don-t-install-static-libraries.patch
|
||||
# clang-tools-extra patches
|
||||
Patch100: 0001-Convert-run-find-all-symbols.py-to-python3-using-2to.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
BuildRequires: cmake
|
||||
BuildRequires: ninja-build
|
||||
%if 0%{?compat_build}
|
||||
BuildRequires: llvm%{maj_ver}.%{min_ver}-devel = %{version}
|
||||
BuildRequires: llvm%{maj_ver}.%{min_ver}-static = %{version}
|
||||
%else
|
||||
BuildRequires: llvm-devel = %{version}
|
||||
BuildRequires: llvm-test = %{version}
|
||||
# llvm-static is required, because clang-tablegen needs libLLVMTableGen, which
|
||||
# is not included in libLLVM.so.
|
||||
BuildRequires: llvm-static = %{version}
|
||||
|
@ -131,15 +109,17 @@ BuildRequires: emacs
|
|||
BuildRequires: python3-lit
|
||||
%endif
|
||||
|
||||
BuildRequires: python2-rpm-macros
|
||||
BuildRequires: python3-sphinx
|
||||
BuildRequires: libatomic
|
||||
|
||||
# We need python3-devel for pathfix.py.
|
||||
BuildRequires: python3-devel
|
||||
# We still need python2-devel for python2-clang
|
||||
BuildRequires: python2-devel
|
||||
|
||||
# Needed for %%multilib_fix_c_header
|
||||
BuildRequires: multilib-rpm-config
|
||||
BuildRequires: chrpath
|
||||
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
|
@ -153,9 +133,6 @@ Requires: emacs-filesystem
|
|||
|
||||
Provides: clang(major) = %{maj_ver}
|
||||
|
||||
Conflicts: compiler-rt < %{version}
|
||||
Conflicts: compiler-rt > %{version}
|
||||
|
||||
%description
|
||||
clang: noun
|
||||
1. A loud, resonant, metallic sound.
|
||||
|
@ -169,9 +146,6 @@ as libraries and designed to be loosely-coupled and extensible.
|
|||
%package libs
|
||||
Summary: Runtime library for clang
|
||||
Recommends: compiler-rt%{?_isa} = %{version}
|
||||
# libomp-devel is required, so clang can find the omp.h header when compiling
|
||||
# with -fopenmp.
|
||||
Recommends: libomp-devel%{_isa} = %{version}
|
||||
Recommends: libomp%{_isa} = %{version}
|
||||
|
||||
%description libs
|
||||
|
@ -179,12 +153,9 @@ Runtime library for clang.
|
|||
|
||||
%package devel
|
||||
Summary: Development header files for clang
|
||||
%if !0%{?compat_build}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
# The clang CMake files reference tools from clang-tools-extra.
|
||||
Requires: %{name}-tools-extra%{?_isa} = %{version}-%{release}
|
||||
Requires: %{name}-libs = %{version}-%{release}
|
||||
%endif
|
||||
|
||||
%description devel
|
||||
Development header files for clang.
|
||||
|
@ -210,27 +181,25 @@ Requires: emacs-filesystem
|
|||
%description tools-extra
|
||||
A set of extra tools built using Clang's tooling API.
|
||||
|
||||
# Put git-clang-format in its own package, because it Requires git
|
||||
# Put git-clang-format in its own package, because it Requires git and python2
|
||||
# and we don't want to force users to install all those dependenices if they
|
||||
# just want clang.
|
||||
%package -n git-clang-format
|
||||
Summary: Integration of clang-format for git
|
||||
Requires: %{name}-tools-extra = %{version}-%{release}
|
||||
Requires: %{name}%{?_isa} = %{version}-%{release}
|
||||
Requires: git
|
||||
Requires: python3
|
||||
Requires: python2
|
||||
|
||||
%description -n git-clang-format
|
||||
clang-format integration for git.
|
||||
|
||||
|
||||
%package -n python3-clang
|
||||
Summary: Python3 bindings for clang
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
Requires: python3
|
||||
%description -n python3-clang
|
||||
%package -n python2-clang
|
||||
Summary: Python2 bindings for clang
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
Requires: python2
|
||||
%description -n python2-clang
|
||||
%{summary}.
|
||||
|
||||
|
||||
%endif
|
||||
|
||||
|
||||
|
@ -240,17 +209,22 @@ Requires: python3
|
|||
%else
|
||||
%setup -T -q -b 1 -n %{clang_tools_srcdir}
|
||||
|
||||
%patch100 -p1 -b .find-all-symbols-py3
|
||||
|
||||
pathfix.py -i %{__python3} -pn \
|
||||
clang-tidy/tool/*.py \
|
||||
clang-include-fixer/find-all-symbols/tool/run-find-all-symbols.py
|
||||
include-fixer/find-all-symbols/tool/run-find-all-symbols.py
|
||||
|
||||
%setup -q -n %{clang_srcdir}
|
||||
|
||||
%patch0 -p1 -b .lit-search-path
|
||||
%patch2 -p1 -b .vendor-gcc
|
||||
%patch4 -p1 -b .gtest
|
||||
%patch11 -p1 -b .libcxx-fix
|
||||
%patch13 -p2 -b .unwind-all
|
||||
%patch15 -p2 -b .no-install-static
|
||||
%patch5 -p1 -b .no-python2
|
||||
%patch6 -p1 -b .clang-format-diff-py3
|
||||
%patch7 -p1 -b .scan-view-py3
|
||||
%patch8 -p1 -b .mul-overflow-fix
|
||||
%patch9 -p1 -b .in-macro-fix
|
||||
|
||||
mv ../%{clang_tools_srcdir} tools/extra
|
||||
|
||||
|
@ -272,30 +246,21 @@ sed -i 's/\@FEDORA_LLVM_LIB_SUFFIX\@//g' test/lit.cfg.py
|
|||
mkdir -p _build
|
||||
cd _build
|
||||
|
||||
%ifarch s390 s390x %{arm} %ix86 ppc64le
|
||||
%ifarch %{arm}
|
||||
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
|
||||
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
||||
%endif
|
||||
|
||||
# -DCMAKE_INSTALL_RPATH=";" is a workaround for llvm manually setting the
|
||||
# rpath of libraries and binaries. llvm will skip the manual setting
|
||||
# if CAMKE_INSTALL_RPATH is set to a value, but cmake interprets this value
|
||||
# as nothing, so it sets the rpath to "" when installing.
|
||||
%cmake .. -G Ninja \
|
||||
-DLLVM_PARALLEL_LINK_JOBS=1 \
|
||||
%cmake .. \
|
||||
-DLLVM_LINK_LLVM_DYLIB:BOOL=ON \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DPYTHON_EXECUTABLE=%{__python3} \
|
||||
-DCMAKE_INSTALL_RPATH:BOOL=";" \
|
||||
%ifarch s390 s390x %{arm} %ix86 ppc64le
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||
%endif
|
||||
%if 0%{?compat_build}
|
||||
-DLLVM_CONFIG:FILEPATH=%{_bindir}/llvm-config-%{maj_ver}.%{min_ver}-%{__isa_bits} \
|
||||
-DCMAKE_INSTALL_PREFIX=%{install_prefix} \
|
||||
-DCLANG_INCLUDE_TESTS:BOOL=OFF \
|
||||
%else
|
||||
-DLLVM_CONFIG:FILEPATH=/usr/bin/llvm-config-%{__isa_bits} \
|
||||
-DCLANG_INCLUDE_TESTS:BOOL=ON \
|
||||
-DLLVM_EXTERNAL_LIT=%{_bindir}/lit \
|
||||
-DLLVM_MAIN_SRC_DIR=%{_datadir}/llvm/src \
|
||||
|
@ -306,11 +271,6 @@ cd _build
|
|||
%endif
|
||||
%endif
|
||||
\
|
||||
%if !0%{compat_build}
|
||||
-DLLVM_TABLEGEN_EXE:FILEPATH=%{_bindir}/llvm-tblgen \
|
||||
%else
|
||||
-DLLVM_TABLEGEN_EXE:FILEPATH=%{_bindir}/llvm-tblgen-%{maj_ver}.%{min_ver} \
|
||||
%endif
|
||||
-DCLANG_ENABLE_ARCMT:BOOL=ON \
|
||||
-DCLANG_ENABLE_STATIC_ANALYZER:BOOL=ON \
|
||||
-DCLANG_INCLUDE_DOCS:BOOL=ON \
|
||||
|
@ -320,17 +280,16 @@ cd _build
|
|||
-DLLVM_ENABLE_RTTI=ON \
|
||||
-DLLVM_BUILD_DOCS=ON \
|
||||
-DLLVM_ENABLE_SPHINX=ON \
|
||||
-DCLANG_LINK_CLANG_DYLIB=ON \
|
||||
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
|
||||
\
|
||||
-DCLANG_BUILD_EXAMPLES:BOOL=OFF \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCLANG_REPOSITORY_STRING="%{?fedora:Fedora}%{?rhel:Red Hat} %{version}-%{release}"
|
||||
-DCLANG_REPOSITORY_STRING="%{?fedora:Fedora}%{?rhel:Red Hat} %{version}-%{release}" \
|
||||
-DLIB_SUFFIX=
|
||||
|
||||
%ninja_build
|
||||
make %{?_smp_mflags}
|
||||
|
||||
%install
|
||||
%ninja_install -C _build
|
||||
make install DESTDIR=%{buildroot} -C _build
|
||||
|
||||
%if 0%{?compat_build}
|
||||
|
||||
|
@ -347,9 +306,8 @@ mv %{buildroot}/%{install_includedir}/clang-c %{buildroot}/%{pkg_includedir}/
|
|||
%else
|
||||
|
||||
# install clang python bindings
|
||||
mkdir -p %{buildroot}%{python3_sitelib}/clang/
|
||||
install -p -m644 bindings/python/clang/* %{buildroot}%{python3_sitelib}/clang/
|
||||
%py_byte_compile %{__python3} %{buildroot}%{python3_sitelib}/clang
|
||||
mkdir -p %{buildroot}%{python2_sitelib}/clang/
|
||||
install -p -m644 bindings/python/clang/* %{buildroot}%{python2_sitelib}/clang/
|
||||
|
||||
# multilib fix
|
||||
%multilib_fix_c_header --file %{_includedir}/clang/Config/config.h
|
||||
|
@ -366,21 +324,18 @@ rm -vf %{buildroot}%{_datadir}/clang/clang-format-sublime.py*
|
|||
|
||||
# TODO: Package html docs
|
||||
rm -Rvf %{buildroot}%{_pkgdocdir}
|
||||
rm -Rvf %{buildroot}%{install_prefix}/share/clang/clang-doc-default-stylesheet.css
|
||||
rm -Rvf %{buildroot}%{install_prefix}/share/clang/index.js
|
||||
|
||||
# TODO: What are the Fedora guidelines for packaging bash autocomplete files?
|
||||
rm -vf %{buildroot}%{_datadir}/clang/bash-autocomplete.sh
|
||||
|
||||
# Add clang++-{version} sylink
|
||||
ln -s clang++ %{buildroot}%{_bindir}/clang++-%{maj_ver}
|
||||
|
||||
# Create Manpage symlinks
|
||||
ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++.1.gz
|
||||
ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang-%{maj_ver}.1.gz
|
||||
ln -s clang.1.gz %{buildroot}%{_mandir}/man1/clang++-%{maj_ver}.1.gz
|
||||
|
||||
# Add clang++-{version} symlink
|
||||
ln -s clang++ %{buildroot}%{_bindir}/clang++-%{maj_ver}
|
||||
|
||||
|
||||
# Fix permission
|
||||
chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1*
|
||||
|
||||
|
@ -389,13 +344,13 @@ chmod u-x %{buildroot}%{_mandir}/man1/scan-build.1*
|
|||
%check
|
||||
%if !0%{?compat_build}
|
||||
# requires lit.py from LLVM utilities
|
||||
# FIXME: Fix failing ARM tests, s390x i686 and ppc64le tests
|
||||
# FIXME: Ignore test failures until rhbz#1715016 is fixed.
|
||||
LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \
|
||||
%ifarch s390x i686 ppc64le %{arm}
|
||||
cd _build
|
||||
# FIXME: Fix failing ARM tests
|
||||
PATH=%{_libdir}/llvm:$PATH make %{?_smp_mflags} check-all || \
|
||||
%ifarch %{arm}
|
||||
:
|
||||
%else
|
||||
:
|
||||
false
|
||||
%endif
|
||||
|
||||
%endif
|
||||
|
@ -404,10 +359,15 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \
|
|||
%if !0%{?compat_build}
|
||||
%files
|
||||
%{clang_binaries}
|
||||
%{_bindir}/c-index-test
|
||||
%{_mandir}/man1/clang.1.gz
|
||||
%{_mandir}/man1/clang++.1.gz
|
||||
%{_mandir}/man1/clang-%{maj_ver}.1.gz
|
||||
%{_mandir}/man1/clang++-%{maj_ver}.1.gz
|
||||
%{_mandir}/man1/diagtool.1.gz
|
||||
%{_emacs_sitestartdir}/clang-format.el
|
||||
%{_datadir}/clang/clang-format.py*
|
||||
%{_datadir}/clang/clang-format-diff.py*
|
||||
%endif
|
||||
|
||||
%files libs
|
||||
|
@ -437,6 +397,7 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \
|
|||
%files analyzer
|
||||
%{_bindir}/scan-view
|
||||
%{_bindir}/scan-build
|
||||
%{_bindir}/scan-build
|
||||
%{_libexecdir}/ccc-analyzer
|
||||
%{_libexecdir}/c++-analyzer
|
||||
%{_datadir}/scan-view/
|
||||
|
@ -445,15 +406,10 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \
|
|||
|
||||
%files tools-extra
|
||||
%{clang_tools_binaries}
|
||||
%{_bindir}/c-index-test
|
||||
%{_bindir}/find-all-symbols
|
||||
%{_bindir}/modularize
|
||||
%{_mandir}/man1/diagtool.1.gz
|
||||
%{_emacs_sitestartdir}/clang-format.el
|
||||
%{_emacs_sitestartdir}/clang-rename.el
|
||||
%{_emacs_sitestartdir}/clang-include-fixer.el
|
||||
%{_datadir}/clang/clang-format.py*
|
||||
%{_datadir}/clang/clang-format-diff.py*
|
||||
%{_datadir}/clang/clang-include-fixer.py*
|
||||
%{_datadir}/clang/clang-tidy-diff.py*
|
||||
%{_datadir}/clang/run-clang-tidy.py*
|
||||
|
@ -463,129 +419,22 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \
|
|||
%files -n git-clang-format
|
||||
%{_bindir}/git-clang-format
|
||||
|
||||
%files -n python3-clang
|
||||
%{python3_sitelib}/clang/
|
||||
|
||||
%files -n python2-clang
|
||||
%{python2_sitelib}/clang/
|
||||
|
||||
%endif
|
||||
%changelog
|
||||
* Thu Mar 26 2020 sguelton@redhat.com - 10.0.0-1
|
||||
- 10.0.0 final
|
||||
* Sun Mar 10 2019 sguelton@redhat.com - 7.0.1-6
|
||||
- Rebuild with forgotten patch
|
||||
|
||||
* Tue Mar 24 2020 sguelton@redhat.com - 10.0.0-0.11.rc6
|
||||
- 10.0.0 rc6
|
||||
* Tue Feb 26 2019 sguelton@redhat.com - 7.0.1-5
|
||||
- Fix for rhbz#1472437
|
||||
|
||||
* Sun Mar 22 2020 sguelton@redhat.com - 10.0.0-0.10.rc5
|
||||
- Update git-clang-format dependency, see rhbz#1815913
|
||||
|
||||
* Fri Mar 20 2020 Tom Stellard <tstellar@redhat.com> - 10.0.0-0.9.rc5
|
||||
- Add dependency on libomp-devel
|
||||
|
||||
* Fri Mar 20 2020 sguelton@redhat.com - 10.0.0-0.8.rc5
|
||||
- 10.0.0 rc5
|
||||
|
||||
* Sat Mar 14 2020 sguelton@redhat.com - 10.0.0-0.7.rc4
|
||||
- 10.0.0 rc4
|
||||
|
||||
* Thu Mar 12 2020 sguelton@redhat.com - 10.0.0-0.6.rc3
|
||||
- Move a few files from clang to clang-tools-extra.
|
||||
|
||||
* Thu Mar 05 2020 sguelton@redhat.com - 10.0.0-0.5.rc3
|
||||
- 10.0.0 rc3
|
||||
|
||||
* Tue Feb 25 2020 sguelton@redhat.com - 10.0.0-0.4.rc2
|
||||
- Apply -fdiscard-value-names patch.
|
||||
|
||||
* Mon Feb 17 2020 sguelton@redhat.com - 10.0.0-0.3.rc2
|
||||
- Fix NVR
|
||||
|
||||
* Fri Feb 14 2020 sguelton@redhat.com - 10.0.0-0.1.rc2
|
||||
- 10.0.0 rc2
|
||||
|
||||
* Tue Feb 11 2020 sguelton@redhat.com - 10.0.0-0.2.rc1
|
||||
- Explicitly conflicts with any different compiler-rt version, see rhbz#1800705
|
||||
|
||||
* Fri Jan 31 2020 Tom Stellard <tstellar@redhat.com> - 10.0.0-0.1.rc1
|
||||
- Stop shipping individual component libraries
|
||||
- https://fedoraproject.org/wiki/Changes/Stop-Shipping-Individual-Component-Libraries-In-clang-lib-Package
|
||||
|
||||
* Fri Jan 31 2020 sguelton@redhat.com - 10.0.0-0.1.rc1
|
||||
- 10.0.0 rc1
|
||||
|
||||
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 9.0.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||
|
||||
* Fri Jan 10 2020 Tom Stellard <tstellar@redhat.com> - 9.0.1-2
|
||||
- Fix crash with kernel bpf self-tests
|
||||
|
||||
* Thu Dec 19 2019 Tom Stellard <tstellar@redhat.com> - 9.0.1-1
|
||||
- 9.0.1 Release
|
||||
|
||||
* Wed Dec 11 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-3
|
||||
- Add explicit requires for clang-libs to fix rpmdiff errors
|
||||
|
||||
* Tue Dec 10 2019 sguelton@redhat.com - 9.0.0-2
|
||||
- Activate -funwind-tables on all arches, see rhbz#1655546.
|
||||
|
||||
* Thu Sep 19 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-1
|
||||
- 9.0.0 Release
|
||||
|
||||
* Wed Sep 11 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-0.2.rc3
|
||||
- Reduce debug info verbosity on ppc64le to avoid OOM errors in koji
|
||||
|
||||
* Thu Aug 22 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-0.1.rc3
|
||||
- 9.0.0 Release candidate 3
|
||||
|
||||
* Tue Aug 20 2019 sguelton@redhat.com - 8.0.0-4
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
* Mon Aug 19 2019 Miro Hrončok <mhroncok@redhat.com> - 8.0.0-3.2
|
||||
- Rebuilt for Python 3.8
|
||||
|
||||
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 8.0.0-3.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
|
||||
|
||||
* Thu May 16 2019 sguelton@redhat.com - 8.0.0-3
|
||||
- Fix for rhbz#1674031
|
||||
|
||||
* Fri Apr 12 2019 sguelton@redhat.com - 8.0.0-2
|
||||
- Remove useless patch thanks to GCC upgrade
|
||||
|
||||
* Wed Mar 20 2019 sguelton@redhat.com - 8.0.0-1
|
||||
- 8.0.0 final
|
||||
|
||||
* Tue Mar 12 2019 sguelton@redhat.com - 8.0.0-0.6.rc4
|
||||
- 8.0.0 Release candidate 4
|
||||
|
||||
* Mon Mar 4 2019 sguelton@redhat.com - 8.0.0-0.5.rc3
|
||||
- Cleanup specfile after llvm dependency update
|
||||
|
||||
* Mon Mar 4 2019 sguelton@redhat.com - 8.0.0-0.4.rc3
|
||||
- 8.0.0 Release candidate 3
|
||||
|
||||
* Mon Feb 25 2019 tstellar@redhat.com - 8.0.0-0.3.rc2
|
||||
- Fix compiling with -stdlib=libc++
|
||||
|
||||
* Thu Feb 21 2019 sguelton@redhat.com - 8.0.0-0.2.rc2
|
||||
- 8.0.0 Release candidate 2
|
||||
|
||||
* Sat Feb 09 2019 sguelton@redhat.com - 8.0.0-0.1.rc1
|
||||
- 8.0.0 Release candidate 1
|
||||
|
||||
* Tue Feb 05 2019 sguelton@redhat.com - 7.0.1-6
|
||||
* Mon Feb 25 2019 sguelton@redhat.com - 7.0.1-4
|
||||
- Update patch for Python3 port of scan-view
|
||||
|
||||
* Tue Feb 05 2019 sguelton@redhat.com - 7.0.1-5
|
||||
- Working CI test suite
|
||||
|
||||
* Mon Feb 04 2019 sguelton@redhat.com - 7.0.1-4
|
||||
- Workaround gcc-9 bug when compiling bitfields
|
||||
|
||||
* Fri Feb 01 2019 sguelton@redhat.com - 7.0.1-3
|
||||
- Fix uninitialized error detected by gcc-9
|
||||
|
||||
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 7.0.1-2.1
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
||||
* Tue Feb 19 2019 sguelton@redhat.com - 7.0.1-3
|
||||
- Fix for rhbz#1672798
|
||||
|
||||
* Wed Dec 19 2018 Tom Stellard <tstellar@redhat.com> - 7.0.1-2
|
||||
- Fix for rhbz#1657544
|
||||
|
@ -603,7 +452,7 @@ LD_LIBRARY_PATH=%{buildroot}%{_libdir} ninja check-all -C _build || \
|
|||
- Ensure rpmlint passes on specfile
|
||||
|
||||
* Fri Nov 30 2018 Tom Stellard <tstellar@redhat.com> - 7.0.0-7
|
||||
- Drop python2 dependency from clang-tools-extra
|
||||
- Drop python2 dependency from clang-tools-extra
|
||||
|
||||
* Wed Nov 21 2018 sguelton@redhat.com - 7.0.0-6
|
||||
- Prune unneeded reference to llvm-test-suite sub-package
|
||||
|
|
|
@ -1,52 +0,0 @@
|
|||
-----BEGIN PGP PUBLIC KEY BLOCK-----
|
||||
|
||||
mQINBFS+1SABEACnmkESkY7eZq0GhDjbkWpKmURGk9+ycsfAhA44NqUvf4tk1GPM
|
||||
5SkJ/fYedYZJaDVhIp98fHgucD0O+vjOzghtgwtITusYjiPHPFBd/MN+MQqSEAP+
|
||||
LUa/kjHLjgyXxKhFUIDGVaDWL5tKOA7/AQKl1TyJ8lz89NHQoUHFsF/hu10+qhJe
|
||||
V65d32MXFehIUSvegh8DrPuExrliSiORO4HOhuc6151dWA4YBWVg4rX5kfKrGMMT
|
||||
pTWnSSZtgoRhkKW2Ey8cmZUqPuUJIfWyeNVu1e4SFtAivLvu/Ymz2WBJcNA1ZlTr
|
||||
RCOR5SIRgZ453pQnI/Bzna2nnJ/TV1gGJIGRahj/ini0cs2x1CILfS/YJQ3rWGGo
|
||||
OxwG0BVmPk0cmLVtyTq8gUPwxcPUd6WcBKhot3TDMlrffZACnQwQjlVjk5S1dEEz
|
||||
atUfpEuNitU9WOM4jr/gjv36ZNCOWm95YwLhsuci/NddBN8HXhyvs+zYTVZEXa2W
|
||||
l/FqOdQsQqZBcJjjWckGKhESdd7934+cesGD3O8KaeSGxww7slJrS0+6QJ8oBoAB
|
||||
P/WCn/y2AiY2syEKp3wYIGJyAbsm542zMZ4nc7pYfSu49mcyhQQICmqN5QvOyYUx
|
||||
OSqwbAOUNtlOyeRLZNIKoXtTqWDEu5aEiDROTw6Rkq+dIcxPNgOLdeQ3HwARAQAB
|
||||
tCFIYW5zIFdlbm5ib3JnIDxoYW5zQGNocm9taXVtLm9yZz6JAlUEEwECAD8CGwMG
|
||||
CwkIBwMCBhUIAgkKCwQWAgMBAh4BAheAFiEEtsj5goK5ROOw1cJTD8MELjRa0F0F
|
||||
Alpd+i0FCQ8FJo0ACgkQD8MELjRa0F3X3A//dBQLm6GmXlQFjxZbukTw0lZsevFR
|
||||
M/6ljZTxp7bsC+HFzYoaCKv6rikaWzytxk//SOaLKrB4Z9HjAlpBMtyLl2Hk7tcZ
|
||||
bPpFafNmQ+4KgWNjLXCvt9se8BGrQvGQUrbE6YowbXa2YIgxIVEncFzIECAsp/+N
|
||||
xbMcZN5/X1PJxKi/N22gP4nn47muN6L3pKez3CXgWnhGYSc7BuD5ALWYH7yMYUem
|
||||
d4jlXfu5xkBIqirj1arIYC9wmF4ldbLNDPuracc8LmXcSqa5Rpao0s4iVzAD+tkX
|
||||
vE/73m3rhepwBXxrfk0McXuI9aucf5h4/KkIBzZsaJ6JM1tzlrJzzjaBKJF9OI5T
|
||||
jA0qTxdGzdPztS8gPaPcMkRFfh9ti0ZDx4VeF3s8sOtmMRHeGEWfxqUAbBUbwFsa
|
||||
JDu/+8/VO4KijfcuUi8tqJ/JHeosCuGE7TM93LwJu6ZcqMYOPDROE/hsnGm0ZU92
|
||||
xedu+07/X1ESHkSFPoaSHD5/DCNa/tXIyJZ8X7gF3eoDP5mSmrJqIqsOBR9WOVYv
|
||||
dI8i0GHTXbrZj8WXdoS+N8wlyMLLbAS2jvTe7M5RoqbLz4ABOUUnLVoEE0CiccVZ
|
||||
bW75BPxOfaD0szbinAeX6HDPI7St0MbKrRPjuDXjD0JVkLqFINtZfYLGMLss4tgn
|
||||
suefr0Bo9ISwG3u5Ag0EVL7VIAEQAOxBxrQesChjrCqKjY5PnSsSYpeb4froucrC
|
||||
898AFw2DgN/Zz+W7wtSTbtz/GRcCurjzZvN7o2rCuNk0j0+s1sgZZm2BdldlabLy
|
||||
+UF/kSW1rb5qhfXcGGubu48OMdtSfok9lOc0Q1L4HNlGE4lUBkZzmI7Ykqfl+Bwr
|
||||
m9rpi54g4ua9PIiiHIAmMoZIcbtOG1KaDr6CoXRk/3g2ZiGUwhq3jFGroiBsKEap
|
||||
2FJ1bh5NJk2Eg8pV7fMOF7hUQKBZrNOtIPu8hA5WEgku3U3VYjRSI3SDi6QXnDL+
|
||||
xHxajiWpKtF3JjZh8y/CCTD8PyP34YjfZuFmkdske5cdx6H0V2UCiH453ncgFVdQ
|
||||
DXkY4n+0MTzhy2xu0IVVnBxYDYNhi+3MjTHJd9C4xMi9t+5IuEvDAPhgfZjDpQak
|
||||
EPz6hVmgj0mlKIgRilBRK9/kOxky9utBpGk3jEJGru/hKNloFNspoYtY6zATAr8E
|
||||
cOgoCFQE0nIktcg3wF9+OCEnV28/a7XZwUZ7Gl/qfOHtdr374wo8kd8R3V8d2G9q
|
||||
5w0/uCV9NNQ0fGWZDPDoYt6wnPL6gZv/nJM8oZY+u0rC24WwScZIniaryC4JHDas
|
||||
Ahr2S2CtgCvBgslK6f3gD16KHxPZMBpX73TzOYIhMEP/vXgVJbUD6dYht+U9c4Oh
|
||||
EDJown0dABEBAAGJAjwEGAECACYCGwwWIQS2yPmCgrlE47DVwlMPwwQuNFrQXQUC
|
||||
Wl36SwUJDwUmqwAKCRAPwwQuNFrQXT1/D/9YpRDNgaJl3YVDtVZoeQwh7BQ6ULZT
|
||||
eXFPogYkF2j3VWg8s9UmAs4sg/4a+9KLSantXjX+JFsRv0lQe5Gr/Vl8VQ4LKEXB
|
||||
fiGmSivjIZ7eopdd3YP2w6G5T3SA4d2CQfsg4rnJPnXIjzKNiSOi368ybnt9fL0Y
|
||||
2r2aqLTmP6Y7issDUO+J1TW1XHm349JPR0Hl4cTuNnWm4JuX2m2CJEc5XBlDAha9
|
||||
pUVs+J5C2D0UFFkyeOzeJPwy6x5ApWHm84n8AjhQSpu1qRKxKXdwei6tkQWWMHui
|
||||
+TgSY/zCkmD9/oY15Ei5avJ4WgIbTLJUoZMi70riPmU8ThjpzA7S+Nk0g7rMPq+X
|
||||
l1whjKU/u0udlsrIJjzkh6ftqKUmIkbxYTpjhnEujNrEr5m2S6Z6x3y9E5QagBMR
|
||||
dxRhfk+HbyACcP/p9rXOzl4M291DoKeAAH70GHniGxyNs9rAoMr/hD5XW/Wrz3dc
|
||||
KMc2s555E6MZILE2ZiolcRn+bYOMPZtWlbx98t8uqMf49gY4FGQBZAwPglMrx7mr
|
||||
m7HTIiXahThQGOJg6izJDAD5RwSEGlAcL28T8KAuM6CLLkhlBfQwiKsUBNnh9r8w
|
||||
V3lB+pV0GhL+3i077gTYfZBRwLzjFdhm9xUKEaZ6rN1BX9lzix4eSNK5nln0jUq1
|
||||
67H2IH//2sf8dw==
|
||||
=ADVe
|
||||
-----END PGP PUBLIC KEY BLOCK-----
|
6
sources
6
sources
|
@ -1,4 +1,2 @@
|
|||
SHA512 (clang-10.0.0.src.tar.xz.sig) = cb46d9c616de9ba6e11602269f93a003fc24951b75844d2d62ad7c435bd9ace0357bf396141b9a3e97034f617ad8f301a1a5556a3feb94b17647f8b76c0b6236
|
||||
SHA512 (clang-tools-extra-10.0.0.src.tar.xz.sig) = f0527b315ce9f2c86a19dabd462d0d466ac0843262f06d5f2b69333f77457ec9cb99f8ce9fdaa00048dfaec3de5613fb884c4259acd4a75463ba3c6714e35423
|
||||
SHA512 (clang-tools-extra-10.0.0.src.tar.xz) = 33b6019e64e9ac94bd7c000b77a4a927602a2705baa9b370e392a56b53fe09c8dad1ff7d583892729e9eb291440433ad7d71df768a96d927e4dbc1988fc01d99
|
||||
SHA512 (clang-10.0.0.src.tar.xz) = b1cccc13c46abcda3d689f51d486fa613ecec40c581c72d8b15951715100a2b8fb24370161601e6716cdba5a784337439e99ec2f0766f988e9cce92de6d775da
|
||||
SHA512 (clang-tools-extra-7.0.1.src.tar.xz) = f0aa73217560f952261201e9049310e4a038bc5d4b4120a4c5d13a42aacfbbfe702f1891745755e1702269751d3df19237271caecba43c810a6f50d35494c798
|
||||
SHA512 (cfe-7.0.1.src.tar.xz) = df2f38153ebdc261bcfa6a569567f759bbb1a803192882a9d4eca55a47878166ac9057151a94ad341dc1281136547e4faa783a68070dfde2307b48cacd4b9194
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
// Test case from rhbz#1657544
|
||||
|
||||
#include <charconv>
|
||||
#include <iostream>
|
||||
#include <string.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
size_t r=0;
|
||||
const char *begin = argv[1];
|
||||
const char *end = begin + strlen(begin);
|
||||
from_chars(begin, end, r);
|
||||
cout << r << '\n';
|
||||
return 0;
|
||||
}
|
|
@ -0,0 +1,10 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
set -x
|
||||
|
||||
tmp_cpp=`mktemp -t XXXXX.cpp`
|
||||
tmp_dir=`mktemp -d`
|
||||
echo 'int main(int argc, char*argv[]) { while(argc--) new int(); return 0; }' > $tmp_cpp
|
||||
scan-build -o $tmp_dir clang++ -c $tmp_cpp -o /dev/null
|
||||
(scan-view --no-browser $tmp_dir/* & WPID=$! && sleep 10s && kill $WPID)
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
- hosts: localhost
|
||||
pre_tasks:
|
||||
# We want to make sure libomp is not already present on the system to ensure
|
||||
# that clang pulls in the correct libomp dependencies when it is installed.
|
||||
- name: Uninstall libomp
|
||||
package:
|
||||
name: "{{ item }}"
|
||||
state: absent
|
||||
with_items:
|
||||
- libomp
|
||||
- libomp-devel
|
||||
roles:
|
||||
- role: standard-test-basic
|
||||
tags:
|
||||
- classic
|
||||
repositories:
|
||||
- repo: "https://src.fedoraproject.org/tests/clang.git"
|
||||
dest: "clang"
|
||||
required_packages:
|
||||
- clang
|
||||
tests:
|
||||
- clang/libomp
|
|
@ -8,28 +8,17 @@
|
|||
- llvm-test-suite
|
||||
- ninja-build
|
||||
- gcc-x86_64-linux-gnu
|
||||
# FIXME: It would be nice if we could only install dependencies for a
|
||||
# single test rather than installing dependencies for all tests. This
|
||||
# will help us catch bugs with implicit package dependencies e.g.
|
||||
# package A depends on package B but does not have an explicit Requires.
|
||||
# These are required for the llvm-toolchain test:
|
||||
- clang
|
||||
- lld
|
||||
- compiler-rt
|
||||
- libcxx-devel
|
||||
- glibc-devel
|
||||
- gcc
|
||||
repositories:
|
||||
- repo: "https://src.fedoraproject.org/tests/llvm-test-suite.git"
|
||||
dest: "llvm-test-suite"
|
||||
- repo: "https://src.fedoraproject.org/tests/clang.git"
|
||||
dest: "clang"
|
||||
tests:
|
||||
- rhbz#482491:
|
||||
dir: ./
|
||||
run: echo "int main(){}" | clang -x c -
|
||||
- llvm-test-suite/test-suite
|
||||
- llvm-test-suite/abi-test-suite
|
||||
- clang/rhbz_1657544
|
||||
- clang/rhbz_1647130
|
||||
- clang/llvm-toolchain
|
||||
- llvm-test-suite:
|
||||
dir: ./
|
||||
run: cd $(mktemp -d) && cmake -G Ninja /usr/share/llvm-test-suite/ -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_C_COMPILER=clang -DTEST_SUITE_LIT_FLAGS="-svj1" && ninja -j 1 check
|
||||
- llvm-abi-test-suite:
|
||||
dir: ./
|
||||
run: cd /usr/share/llvm-test-suite/ABI-Testsuite/ && python2 linux-x86.py clang test -v --path /usr/lib64/llvm/ -j 1
|
||||
- rhbz#1657544:
|
||||
dir: ./from_chars
|
||||
run: clang++ from_chars.cpp && ./a.out 100 | grep 100
|
||||
- rhbz_1647130
|
||||
|
|
|
@ -25,4 +25,8 @@
|
|||
- gcc
|
||||
tests:
|
||||
# rhbz#1582884
|
||||
- pocl/simple-opencl-no-clang:
|
||||
- simple-opencl-no-clang:
|
||||
dir: pocl/simple-opencl-no-clang
|
||||
run: ./runtest.sh
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue