import llvm-9.0.0-5.module+el8.2.0+4674+8ef15741
This commit is contained in:
parent
409ff6adc4
commit
e691927b4f
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/llvm-8.0.0.src.tar.xz
|
||||
SOURCES/llvm-9.0.0.src.tar.xz
|
||||
|
@ -1 +1 @@
|
||||
0689345d73911e24a07b24cc82dab4fb46b8c323 SOURCES/llvm-8.0.0.src.tar.xz
|
||||
7ef2527ba3da7603a41ce3592a8cd890f8d27ffa SOURCES/llvm-9.0.0.src.tar.xz
|
||||
|
@ -0,0 +1,66 @@
|
||||
From 8f6917ea11bd1bfbfe07f3577756d1c4abfdb916 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Fri, 6 Sep 2019 11:03:18 -0700
|
||||
Subject: [PATCH] CMake: Split static library exports into their own export
|
||||
file
|
||||
|
||||
---
|
||||
llvm/cmake/modules/AddLLVM.cmake | 6 +++++-
|
||||
llvm/cmake/modules/CMakeLists.txt | 3 +++
|
||||
llvm/cmake/modules/LLVMConfig.cmake.in | 2 ++
|
||||
3 files changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
|
||||
index 619e986..200fc45 100644
|
||||
--- a/llvm/cmake/modules/AddLLVM.cmake
|
||||
+++ b/llvm/cmake/modules/AddLLVM.cmake
|
||||
@@ -691,7 +691,11 @@ macro(add_llvm_library name)
|
||||
if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
|
||||
(in_llvm_libs AND "llvm-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS) OR
|
||||
NOT LLVM_DISTRIBUTION_COMPONENTS)
|
||||
- set(export_to_llvmexports EXPORT LLVMExports)
|
||||
+ if (ARG_SHARED)
|
||||
+ set(export_to_llvmexports EXPORT LLVMExports)
|
||||
+ else()
|
||||
+ set(export_to_llvmexports EXPORT LLVMStaticExports)
|
||||
+ endif()
|
||||
set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
|
||||
endif()
|
||||
|
||||
diff --git a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt
|
||||
index 9cf22b4..dc982d2 100644
|
||||
--- a/llvm/cmake/modules/CMakeLists.txt
|
||||
+++ b/llvm/cmake/modules/CMakeLists.txt
|
||||
@@ -105,6 +105,7 @@ set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}")
|
||||
set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
|
||||
set(LLVM_CONFIG_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMExports.cmake")
|
||||
set(LLVM_CONFIG_EXPORTS "${LLVM_EXPORTS}")
|
||||
+set(LLVM_CONFIG_STATIC_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMStaticExports.cmake")
|
||||
configure_file(
|
||||
LLVMConfig.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/LLVMConfig.cmake
|
||||
@@ -121,6 +122,8 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
if(llvm_has_exports)
|
||||
install(EXPORT LLVMExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
|
||||
COMPONENT cmake-exports)
|
||||
+ install(EXPORT LLVMStaticExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
|
||||
+ COMPONENT cmake-exports)
|
||||
endif()
|
||||
|
||||
install(FILES
|
||||
diff --git a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in
|
||||
index 536031f..6ef54a0 100644
|
||||
--- a/llvm/cmake/modules/LLVMConfig.cmake.in
|
||||
+++ b/llvm/cmake/modules/LLVMConfig.cmake.in
|
||||
@@ -89,6 +89,8 @@ if(NOT TARGET LLVMSupport)
|
||||
set(LLVM_EXPORTED_TARGETS "@LLVM_CONFIG_EXPORTS@")
|
||||
include("@LLVM_CONFIG_EXPORTS_FILE@")
|
||||
@llvm_config_include_buildtree_only_exports@
|
||||
+
|
||||
+ include("@LLVM_CONFIG_STATIC_EXPORTS_FILE@" OPTIONAL)
|
||||
endif()
|
||||
|
||||
# By creating intrinsics_gen here, subprojects that depend on LLVM's
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,65 @@
|
||||
From 9d496e978f59e153bb76e92229d5a524d92dee04 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Tue, 10 Sep 2019 13:33:48 -0700
|
||||
Subject: [PATCH] CMake: Split test binary exports into their own export file
|
||||
|
||||
---
|
||||
llvm/cmake/modules/AddLLVM.cmake | 7 ++++++-
|
||||
llvm/cmake/modules/CMakeLists.txt | 3 +++
|
||||
llvm/cmake/modules/LLVMConfig.cmake.in | 1 +
|
||||
3 files changed, 10 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
|
||||
index 200fc45..9eec7a7 100644
|
||||
--- a/llvm/cmake/modules/AddLLVM.cmake
|
||||
+++ b/llvm/cmake/modules/AddLLVM.cmake
|
||||
@@ -953,7 +953,12 @@ macro(add_llvm_utility name)
|
||||
set(export_to_llvmexports)
|
||||
if (${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
|
||||
NOT LLVM_DISTRIBUTION_COMPONENTS)
|
||||
- set(export_to_llvmexports EXPORT LLVMExports)
|
||||
+ if (${name} STREQUAL "not" OR ${name} STREQUAL "count" OR
|
||||
+ ${name} STREQUAL "yaml-bench" OR ${name} STREQUAL "lli-child-target")
|
||||
+ set(export_to_llvmexports EXPORT LLVMTestExports)
|
||||
+ else()
|
||||
+ set(export_to_llvmexports EXPORT LLVMExports)
|
||||
+ endif()
|
||||
set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
|
||||
endif()
|
||||
|
||||
diff --git a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt
|
||||
index dc982d2..c861f45 100644
|
||||
--- a/llvm/cmake/modules/CMakeLists.txt
|
||||
+++ b/llvm/cmake/modules/CMakeLists.txt
|
||||
@@ -106,6 +106,7 @@ set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
|
||||
set(LLVM_CONFIG_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMExports.cmake")
|
||||
set(LLVM_CONFIG_EXPORTS "${LLVM_EXPORTS}")
|
||||
set(LLVM_CONFIG_STATIC_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMStaticExports.cmake")
|
||||
+set(LLVM_CONFIG_TEST_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMTestExports.cmake")
|
||||
configure_file(
|
||||
LLVMConfig.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/LLVMConfig.cmake
|
||||
@@ -124,6 +125,8 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
COMPONENT cmake-exports)
|
||||
install(EXPORT LLVMStaticExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
|
||||
COMPONENT cmake-exports)
|
||||
+ install(EXPORT LLVMTestExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
|
||||
+ COMPONENT cmake-exports)
|
||||
endif()
|
||||
|
||||
install(FILES
|
||||
diff --git a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in
|
||||
index 6ef54a0..d81b09a 100644
|
||||
--- a/llvm/cmake/modules/LLVMConfig.cmake.in
|
||||
+++ b/llvm/cmake/modules/LLVMConfig.cmake.in
|
||||
@@ -91,6 +91,7 @@ if(NOT TARGET LLVMSupport)
|
||||
@llvm_config_include_buildtree_only_exports@
|
||||
|
||||
include("@LLVM_CONFIG_STATIC_EXPORTS_FILE@" OPTIONAL)
|
||||
+ include("@LLVM_CONFIG_TEST_EXPORTS_FILE@" OPTIONAL)
|
||||
endif()
|
||||
|
||||
# By creating intrinsics_gen here, subprojects that depend on LLVM's
|
||||
--
|
||||
1.8.3.1
|
||||
|
28
SOURCES/0001-Deactivate-markdown-doc.patch
Normal file
28
SOURCES/0001-Deactivate-markdown-doc.patch
Normal file
@ -0,0 +1,28 @@
|
||||
From e7bc515182199764b17ab3f5e22047342f9c7514 Mon Sep 17 00:00:00 2001
|
||||
From: serge-sans-paille <sguelton@redhat.com>
|
||||
Date: Thu, 13 Jun 2019 07:58:59 +0000
|
||||
Subject: [PATCH] Deactivate markdown doc
|
||||
|
||||
---
|
||||
llvm/docs/conf.py | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/llvm/docs/conf.py b/llvm/docs/conf.py
|
||||
index 4a52df8..340cd07 100644
|
||||
--- a/llvm/docs/conf.py
|
||||
+++ b/llvm/docs/conf.py
|
||||
@@ -32,9 +32,9 @@ extensions = ['sphinx.ext.intersphinx', 'sphinx.ext.todo']
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
-source_suffix = ['.rst', '.md']
|
||||
+source_suffix = ['.rst']
|
||||
|
||||
-source_parsers = {'.md': 'recommonmark.parser.CommonMarkParser'}
|
||||
+source_parsers = {}
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,81 +0,0 @@
|
||||
diff -ru llvm-8.0.0.src/lib/LTO/LTOBackend.cpp llvm-8.0.0.src.new/lib/LTO/LTOBackend.cpp
|
||||
--- llvm-8.0.0.src/lib/LTO/LTOBackend.cpp 2018-11-08 20:10:07.000000000 +0000
|
||||
+++ llvm-8.0.0.src.new/lib/LTO/LTOBackend.cpp 2019-05-13 18:29:18.904405949 +0000
|
||||
@@ -336,49 +336,7 @@
|
||||
void splitCodeGen(Config &C, TargetMachine *TM, AddStreamFn AddStream,
|
||||
unsigned ParallelCodeGenParallelismLevel,
|
||||
std::unique_ptr<Module> Mod) {
|
||||
- ThreadPool CodegenThreadPool(ParallelCodeGenParallelismLevel);
|
||||
- unsigned ThreadCount = 0;
|
||||
- const Target *T = &TM->getTarget();
|
||||
-
|
||||
- SplitModule(
|
||||
- std::move(Mod), ParallelCodeGenParallelismLevel,
|
||||
- [&](std::unique_ptr<Module> MPart) {
|
||||
- // We want to clone the module in a new context to multi-thread the
|
||||
- // codegen. We do it by serializing partition modules to bitcode
|
||||
- // (while still on the main thread, in order to avoid data races) and
|
||||
- // spinning up new threads which deserialize the partitions into
|
||||
- // separate contexts.
|
||||
- // FIXME: Provide a more direct way to do this in LLVM.
|
||||
- SmallString<0> BC;
|
||||
- raw_svector_ostream BCOS(BC);
|
||||
- WriteBitcodeToFile(*MPart, BCOS);
|
||||
-
|
||||
- // Enqueue the task
|
||||
- CodegenThreadPool.async(
|
||||
- [&](const SmallString<0> &BC, unsigned ThreadId) {
|
||||
- LTOLLVMContext Ctx(C);
|
||||
- Expected<std::unique_ptr<Module>> MOrErr = parseBitcodeFile(
|
||||
- MemoryBufferRef(StringRef(BC.data(), BC.size()), "ld-temp.o"),
|
||||
- Ctx);
|
||||
- if (!MOrErr)
|
||||
- report_fatal_error("Failed to read bitcode");
|
||||
- std::unique_ptr<Module> MPartInCtx = std::move(MOrErr.get());
|
||||
-
|
||||
- std::unique_ptr<TargetMachine> TM =
|
||||
- createTargetMachine(C, T, *MPartInCtx);
|
||||
-
|
||||
- codegen(C, TM.get(), AddStream, ThreadId, *MPartInCtx);
|
||||
- },
|
||||
- // Pass BC using std::move to ensure that it get moved rather than
|
||||
- // copied into the thread's context.
|
||||
- std::move(BC), ThreadCount++);
|
||||
- },
|
||||
- false);
|
||||
-
|
||||
- // Because the inner lambda (which runs in a worker thread) captures our local
|
||||
- // variables, we need to wait for the worker threads to terminate before we
|
||||
- // can leave the function scope.
|
||||
- CodegenThreadPool.wait();
|
||||
+ codegen(C, TM, AddStream, 0, *Mod);
|
||||
}
|
||||
|
||||
Expected<const Target *> initAndLookupTarget(Config &C, Module &Mod) {
|
||||
diff -ru llvm-8.0.0.src/test/tools/gold/X86/emit-asm.ll llvm-8.0.0.src.new/test/tools/gold/X86/emit-asm.ll
|
||||
--- llvm-8.0.0.src/test/tools/gold/X86/emit-asm.ll 2019-01-02 23:48:00.000000000 +0000
|
||||
+++ llvm-8.0.0.src.new/test/tools/gold/X86/emit-asm.ll 2019-05-14 07:23:17.826288558 +0000
|
||||
@@ -7,8 +7,7 @@
|
||||
|
||||
; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
|
||||
; RUN: -m elf_x86_64 --plugin-opt=emit-asm --plugin-opt=lto-partitions=2\
|
||||
-; RUN: -shared %t.o -o %t2.s
|
||||
-; RUN: cat %t2.s %t2.s1 > %t3.s
|
||||
+; RUN: -shared %t.o -o %t3.s
|
||||
; RUN: FileCheck --input-file %t3.s %s
|
||||
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
diff -ru llvm-8.0.0.src/test/tools/gold/X86/parallel.ll llvm-8.0.0.src.new/test/tools/gold/X86/parallel.ll
|
||||
--- llvm-8.0.0.src/test/tools/gold/X86/parallel.ll 2017-12-14 15:59:05.000000000 +0000
|
||||
+++ llvm-8.0.0.src.new/test/tools/gold/X86/parallel.ll 2019-05-14 08:01:45.147862168 +0000
|
||||
@@ -1,10 +1,6 @@
|
||||
; RUN: llvm-as -o %t.bc %s
|
||||
; RUN: rm -f %t.0.5.precodegen.bc %t.1.5.precodegen.bc %t.o %t.o1
|
||||
; RUN: env LD_PRELOAD=%llvmshlibdir/LLVMgold%shlibext %gold -plugin %llvmshlibdir/LLVMgold%shlibext -u foo -u bar -plugin-opt lto-partitions=2 -plugin-opt save-temps -m elf_x86_64 -o %t %t.bc
|
||||
-; RUN: llvm-dis %t.0.5.precodegen.bc -o - | FileCheck --check-prefix=CHECK-BC0 %s
|
||||
-; RUN: llvm-dis %t.1.5.precodegen.bc -o - | FileCheck --check-prefix=CHECK-BC1 %s
|
||||
-; RUN: llvm-nm %t.o | FileCheck --check-prefix=CHECK0 %s
|
||||
-; RUN: llvm-nm %t.o1 | FileCheck --check-prefix=CHECK1 %s
|
||||
|
||||
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
|
||||
target triple = "x86_64-unknown-linux-gnu"
|
@ -1,53 +0,0 @@
|
||||
diff -ru llvm-8.0.0.src.orig/lib/LTO/LTO.cpp llvm-8.0.0.src/lib/LTO/LTO.cpp
|
||||
--- llvm-8.0.0.src.orig/lib/LTO/LTO.cpp 2019-04-12 09:08:36.531911405 +0000
|
||||
+++ llvm-8.0.0.src/lib/LTO/LTO.cpp 2019-04-12 09:11:23.783949538 +0000
|
||||
@@ -953,7 +953,6 @@
|
||||
|
||||
namespace {
|
||||
class InProcessThinBackend : public ThinBackendProc {
|
||||
- ThreadPool BackendThreadPool;
|
||||
AddStreamFn AddStream;
|
||||
NativeObjectCache Cache;
|
||||
std::set<GlobalValue::GUID> CfiFunctionDefs;
|
||||
@@ -969,7 +968,6 @@
|
||||
const StringMap<GVSummaryMapTy> &ModuleToDefinedGVSummaries,
|
||||
AddStreamFn AddStream, NativeObjectCache Cache)
|
||||
: ThinBackendProc(Conf, CombinedIndex, ModuleToDefinedGVSummaries),
|
||||
- BackendThreadPool(ThinLTOParallelismLevel),
|
||||
AddStream(std::move(AddStream)), Cache(std::move(Cache)) {
|
||||
for (auto &Name : CombinedIndex.cfiFunctionDefs())
|
||||
CfiFunctionDefs.insert(
|
||||
@@ -1027,32 +1025,12 @@
|
||||
assert(ModuleToDefinedGVSummaries.count(ModulePath));
|
||||
const GVSummaryMapTy &DefinedGlobals =
|
||||
ModuleToDefinedGVSummaries.find(ModulePath)->second;
|
||||
- BackendThreadPool.async(
|
||||
- [=](BitcodeModule BM, ModuleSummaryIndex &CombinedIndex,
|
||||
- const FunctionImporter::ImportMapTy &ImportList,
|
||||
- const FunctionImporter::ExportSetTy &ExportList,
|
||||
- const std::map<GlobalValue::GUID, GlobalValue::LinkageTypes>
|
||||
- &ResolvedODR,
|
||||
- const GVSummaryMapTy &DefinedGlobals,
|
||||
- MapVector<StringRef, BitcodeModule> &ModuleMap) {
|
||||
- Error E = runThinLTOBackendThread(
|
||||
+ return runThinLTOBackendThread(
|
||||
AddStream, Cache, Task, BM, CombinedIndex, ImportList, ExportList,
|
||||
ResolvedODR, DefinedGlobals, ModuleMap);
|
||||
- if (E) {
|
||||
- std::unique_lock<std::mutex> L(ErrMu);
|
||||
- if (Err)
|
||||
- Err = joinErrors(std::move(*Err), std::move(E));
|
||||
- else
|
||||
- Err = std::move(E);
|
||||
- }
|
||||
- },
|
||||
- BM, std::ref(CombinedIndex), std::ref(ImportList), std::ref(ExportList),
|
||||
- std::ref(ResolvedODR), std::ref(DefinedGlobals), std::ref(ModuleMap));
|
||||
- return Error::success();
|
||||
}
|
||||
|
||||
Error wait() override {
|
||||
- BackendThreadPool.wait();
|
||||
if (Err)
|
||||
return std::move(*Err);
|
||||
else
|
@ -0,0 +1,223 @@
|
||||
From 8987da9a2cac6c5bd39ba100ffd1aaede94dc6a0 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Pozulp <pozulp.llvm@gmail.com>
|
||||
Date: Fri, 9 Aug 2019 19:10:55 +0000
|
||||
Subject: [PATCH] [Docs][llvm-strip] Add help text to llvm-strip rst doc
|
||||
|
||||
Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=42383
|
||||
|
||||
Reviewers: jhenderson, alexshap, rupprecht
|
||||
|
||||
Reviewed By: jhenderson
|
||||
|
||||
Subscribers: wolfgangp, jakehehrlich, llvm-commits
|
||||
|
||||
Tags: #llvm
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D65384
|
||||
|
||||
llvm-svn: 368464
|
||||
---
|
||||
llvm/docs/CommandGuide/llvm-strip.md | 16 ----
|
||||
llvm/docs/CommandGuide/llvm-strip.rst | 167 ++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 167 insertions(+), 16 deletions(-)
|
||||
delete mode 100644 llvm/docs/CommandGuide/llvm-strip.md
|
||||
create mode 100644 llvm/docs/CommandGuide/llvm-strip.rst
|
||||
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-strip.md b/llvm/docs/CommandGuide/llvm-strip.md
|
||||
deleted file mode 100644
|
||||
index dd6e859..0000000
|
||||
--- a/llvm/docs/CommandGuide/llvm-strip.md
|
||||
+++ /dev/null
|
||||
@@ -1,16 +0,0 @@
|
||||
-# llvm-strip - object stripping tool
|
||||
-
|
||||
-## SYNOPSIS
|
||||
-
|
||||
-**llvm-strip** [*options*]
|
||||
-
|
||||
-## DESCRIPTION
|
||||
-
|
||||
-**llvm-strip** is a tool to strip sections and symbols from object files.
|
||||
-
|
||||
-The tool is still in active development, but in most scenarios it works as a
|
||||
-drop-in replacement for GNU's **strip**.
|
||||
-
|
||||
-## SEE ALSO
|
||||
-
|
||||
-[llvm-objcopy](llvm-objcopy.html)
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-strip.rst b/llvm/docs/CommandGuide/llvm-strip.rst
|
||||
new file mode 100644
|
||||
index 0000000..6e02482
|
||||
--- /dev/null
|
||||
+++ b/llvm/docs/CommandGuide/llvm-strip.rst
|
||||
@@ -0,0 +1,167 @@
|
||||
+llvm-strip - object stripping tool
|
||||
+==================================
|
||||
+
|
||||
+.. program:: llvm-strip
|
||||
+
|
||||
+SYNOPSIS
|
||||
+--------
|
||||
+
|
||||
+:program:`llvm-strip` [*options*] *inputs...*
|
||||
+
|
||||
+DESCRIPTION
|
||||
+-----------
|
||||
+
|
||||
+:program:`llvm-strip` is a tool to strip sections and symbols from object files.
|
||||
+If no other stripping or remove options are specified, :option:`--strip-all`
|
||||
+will be enabled by default.
|
||||
+
|
||||
+The input files are modified in-place. If "-" is specified for the input file,
|
||||
+the input is read from the program's standard input stream.
|
||||
+
|
||||
+If the input is an archive, any requested operations will be applied to each
|
||||
+archive member individually.
|
||||
+
|
||||
+The tool is still in active development, but in most scenarios it works as a
|
||||
+drop-in replacement for GNU's :program:`strip`.
|
||||
+
|
||||
+GENERIC AND CROSS-PLATFORM OPTIONS
|
||||
+----------------------------------
|
||||
+
|
||||
+The following options are either agnostic of the file format, or apply to
|
||||
+multiple file formats.
|
||||
+
|
||||
+.. option:: --disable-deterministic-archives, -U
|
||||
+
|
||||
+ Use real values for UIDs, GIDs and timestamps when updating archive member
|
||||
+ headers.
|
||||
+
|
||||
+.. option:: --discard-all, -x
|
||||
+
|
||||
+ Remove most local symbols from the output. Different file formats may limit
|
||||
+ this to a subset of the local symbols. For example, file and section symbols in
|
||||
+ ELF objects will not be discarded.
|
||||
+
|
||||
+.. option:: --enable-deterministic-archives, -D
|
||||
+
|
||||
+ Enable deterministic mode when stripping archives, i.e. use 0 for archive member
|
||||
+ header UIDs, GIDs and timestamp fields. On by default.
|
||||
+
|
||||
+.. option:: --help, -h
|
||||
+
|
||||
+ Print a summary of command line options.
|
||||
+
|
||||
+.. option:: --no-strip-all
|
||||
+
|
||||
+ Disable --strip-all.
|
||||
+
|
||||
+.. option:: -o <file>
|
||||
+
|
||||
+ Write output to <file>. Multiple input files cannot be used in combination
|
||||
+ with -o.
|
||||
+
|
||||
+.. option:: --regex
|
||||
+
|
||||
+ If specified, symbol and section names specified by other switches are treated
|
||||
+ as extended POSIX regular expression patterns.
|
||||
+
|
||||
+.. option:: --remove-section <section>, -R
|
||||
+
|
||||
+ Remove the specified section from the output. Can be specified multiple times
|
||||
+ to remove multiple sections simultaneously.
|
||||
+
|
||||
+.. option:: --strip-all-gnu
|
||||
+
|
||||
+ Remove all symbols, debug sections and relocations from the output. This option
|
||||
+ is equivalent to GNU :program:`strip`'s ``--strip-all`` switch.
|
||||
+
|
||||
+.. option:: --strip-all, -S
|
||||
+
|
||||
+ For ELF objects, remove from the output all symbols and non-alloc sections not
|
||||
+ within segments, except for .gnu.warning sections and the section name table.
|
||||
+
|
||||
+ For COFF objects, remove all symbols, debug sections, and relocations from the
|
||||
+ output.
|
||||
+
|
||||
+.. option:: --strip-debug, -g
|
||||
+
|
||||
+ Remove all debug sections.
|
||||
+
|
||||
+.. option:: --strip-sections
|
||||
+
|
||||
+ Remove all section headers and all sections not in segments.
|
||||
+
|
||||
+.. option:: --strip-symbol <symbol>, -N
|
||||
+
|
||||
+ Remove all symbols named ``<symbol>`` from the output. Can be specified
|
||||
+ multiple times to remove multiple symbols.
|
||||
+
|
||||
+.. option:: --strip-unneeded
|
||||
+
|
||||
+ Remove all local or undefined symbols that are not required by relocations.
|
||||
+
|
||||
+.. option:: --version, -V
|
||||
+
|
||||
+ Display the version of this program.
|
||||
+
|
||||
+COFF-SPECIFIC OPTIONS
|
||||
+---------------------
|
||||
+
|
||||
+The following options are implemented only for COFF objects. If used with other
|
||||
+objects, :program:`llvm-strip` will either emit an error or silently ignore
|
||||
+them.
|
||||
+
|
||||
+.. option:: --only-keep-debug
|
||||
+
|
||||
+ Remove the contents of non-debug sections from the output, but keep the section
|
||||
+ headers.
|
||||
+
|
||||
+ELF-SPECIFIC OPTIONS
|
||||
+--------------------
|
||||
+
|
||||
+The following options are implemented only for ELF objects. If used with other
|
||||
+objects, :program:`llvm-strip` will either emit an error or silently ignore
|
||||
+them.
|
||||
+
|
||||
+.. option:: --allow-broken-links
|
||||
+
|
||||
+ Allow llvm-strip to remove sections even if it would leave invalid section
|
||||
+ references. Any invalid sh_link fields will be set to zero.
|
||||
+
|
||||
+.. option:: --discard-locals, -X
|
||||
+
|
||||
+ Remove local symbols starting with ".L" from the output.
|
||||
+
|
||||
+.. option:: --keep-file-symbols
|
||||
+
|
||||
+ Keep symbols of type `STT_FILE`, even if they would otherwise be stripped.
|
||||
+
|
||||
+ .. option:: --keep-section <section>
|
||||
+
|
||||
+ When removing sections from the output, do not remove sections named
|
||||
+ ``<section>``. Can be specified multiple times to keep multiple sections.
|
||||
+
|
||||
+.. option:: --keep-symbol <symbol>, -K
|
||||
+
|
||||
+ Do not remove symbols named ``<symbol>``. Can be specified multiple times to
|
||||
+ keep multiple symbols.
|
||||
+
|
||||
+.. option:: --preserve-dates, -p
|
||||
+
|
||||
+ Preserve access and modification timestamps.
|
||||
+
|
||||
+
|
||||
+EXIT STATUS
|
||||
+-----------
|
||||
+
|
||||
+:program:`llvm-strip` exits with a non-zero exit code if there is an error.
|
||||
+Otherwise, it exits with code 0.
|
||||
+
|
||||
+BUGS
|
||||
+----
|
||||
+
|
||||
+To report bugs, please visit <http://llvm.org/bugs/>.
|
||||
+
|
||||
+SEE ALSO
|
||||
+--------
|
||||
+
|
||||
+:manpage:`llvm-objcopy(1)`
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,28 @@
|
||||
From d15c835028bcc72a8695d047f0acaa530aa54716 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Wed, 31 Jul 2019 20:43:42 -0700
|
||||
Subject: [PATCH] Filter out cxxflags not supported by clang
|
||||
|
||||
---
|
||||
llvm/tools/llvm-config/CMakeLists.txt | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/llvm/tools/llvm-config/CMakeLists.txt b/llvm/tools/llvm-config/CMakeLists.txt
|
||||
index 8e97a10..9b9b7d1 100644
|
||||
--- a/llvm/tools/llvm-config/CMakeLists.txt
|
||||
+++ b/llvm/tools/llvm-config/CMakeLists.txt
|
||||
@@ -43,7 +43,11 @@ set(LLVM_SRC_ROOT ${LLVM_MAIN_SRC_DIR})
|
||||
set(LLVM_OBJ_ROOT ${LLVM_BINARY_DIR})
|
||||
set(LLVM_CPPFLAGS "${LLVM_DEFINITIONS}")
|
||||
set(LLVM_CFLAGS "${LLVM_C_STD_FLAG} ${LLVM_DEFINITIONS}")
|
||||
+STRING(REGEX REPLACE "-mcet" "" LLVM_CFLAGS ${LLVM_CFLAGS})
|
||||
+STRING(REGEX REPLACE "-fcf-protection" "" LLVM_CFLAGS ${LLVM_CFLAGS})
|
||||
set(LLVM_CXXFLAGS "${LLVM_CXX_STD_FLAG} ${LLVM_CXX_STDLIB_FLAG} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}")
|
||||
+STRING(REGEX REPLACE "-mcet" "" LLVM_CXXFLAGS ${LLVM_CXXFLAGS})
|
||||
+STRING(REGEX REPLACE "-fcf-protection" "" LLVM_CXXFLAGS ${LLVM_CXXFLAGS})
|
||||
set(LLVM_BUILD_SYSTEM cmake)
|
||||
set(LLVM_HAS_RTTI ${LLVM_CONFIG_HAS_RTTI})
|
||||
set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX}")
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,29 +0,0 @@
|
||||
From eaa421d1f9c3748c550e2a91fcb134a3d2a8ebff Mon Sep 17 00:00:00 2001
|
||||
From: Sanjin Sijaric <ssijaric@codeaurora.org>
|
||||
Date: Fri, 18 Jan 2019 19:34:20 +0000
|
||||
Subject: [PATCH] Fix the buildbot issue introduced by r351421
|
||||
|
||||
The EXPENSIVE_CHECK x86_64 Windows buildbot is failing due to this change. Fix
|
||||
the map access.
|
||||
|
||||
llvm-svn: 351577
|
||||
---
|
||||
lib/MC/MCWin64EH.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/lib/MC/MCWin64EH.cpp b/lib/MC/MCWin64EH.cpp
|
||||
index 8bc1f08..3ef1514 100644
|
||||
--- a/lib/MC/MCWin64EH.cpp
|
||||
+++ b/lib/MC/MCWin64EH.cpp
|
||||
@@ -522,7 +522,7 @@ static void ARM64EmitUnwindInfo(MCStreamer &streamer, WinEH::FrameInfo *info) {
|
||||
if (MatchingEpilog) {
|
||||
assert(EpilogInfo.find(MatchingEpilog) != EpilogInfo.end() &&
|
||||
"Duplicate epilog not found");
|
||||
- EpilogInfo[EpilogStart] = EpilogInfo[MatchingEpilog];
|
||||
+ EpilogInfo[EpilogStart] = EpilogInfo.lookup(MatchingEpilog);
|
||||
// Clear the unwind codes in the EpilogMap, so that they don't get output
|
||||
// in the logic below.
|
||||
EpilogInstrs.clear();
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,82 +0,0 @@
|
||||
From 59c38a2216f4467b53970bb6b010bc4fe0b8d1d3 Mon Sep 17 00:00:00 2001
|
||||
From: serge-sans-paille <sguelton@redhat.com>
|
||||
Date: Fri, 25 Jan 2019 17:32:54 +0000
|
||||
Subject: [PATCH 1/2] [PATCH] Filter out cxxflags not supported by clang
|
||||
|
||||
---
|
||||
cmake/modules/AddLLVM.cmake | 6 +++++-
|
||||
cmake/modules/CMakeLists.txt | 3 +++
|
||||
cmake/modules/LLVMConfig.cmake.in | 2 ++
|
||||
tools/llvm-config/CMakeLists.txt | 4 ++++
|
||||
4 files changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake
|
||||
index 4dbc0ddaf4f..c408377cd2e 100644
|
||||
--- a/cmake/modules/AddLLVM.cmake
|
||||
+++ b/cmake/modules/AddLLVM.cmake
|
||||
@@ -664,7 +664,11 @@ macro(add_llvm_library name)
|
||||
|
||||
if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
|
||||
NOT LLVM_DISTRIBUTION_COMPONENTS)
|
||||
- set(export_to_llvmexports EXPORT LLVMExports)
|
||||
+ if (ARG_SHARED)
|
||||
+ set(export_to_llvmexports EXPORT LLVMExports)
|
||||
+ else()
|
||||
+ set(export_to_llvmexports EXPORT LLVMStaticExports)
|
||||
+ endif()
|
||||
set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
|
||||
endif()
|
||||
|
||||
diff --git a/cmake/modules/CMakeLists.txt b/cmake/modules/CMakeLists.txt
|
||||
index f5cc0006fa0..6605dc729c2 100644
|
||||
--- a/cmake/modules/CMakeLists.txt
|
||||
+++ b/cmake/modules/CMakeLists.txt
|
||||
@@ -97,6 +97,7 @@ set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}")
|
||||
set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_TOOLS_INSTALL_DIR}")
|
||||
set(LLVM_CONFIG_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMExports.cmake")
|
||||
set(LLVM_CONFIG_EXPORTS "${LLVM_EXPORTS}")
|
||||
+set(LLVM_CONFIG_STATIC_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMStaticExports.cmake")
|
||||
configure_file(
|
||||
LLVMConfig.cmake.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/CMakeFiles/LLVMConfig.cmake
|
||||
@@ -113,6 +114,8 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
if(llvm_has_exports)
|
||||
install(EXPORT LLVMExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
|
||||
COMPONENT cmake-exports)
|
||||
+ install(EXPORT LLVMStaticExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
|
||||
+ COMPONENT cmake-exports)
|
||||
endif()
|
||||
|
||||
install(FILES
|
||||
diff --git a/cmake/modules/LLVMConfig.cmake.in b/cmake/modules/LLVMConfig.cmake.in
|
||||
index 7ca06381d90..44d042c9b11 100644
|
||||
--- a/cmake/modules/LLVMConfig.cmake.in
|
||||
+++ b/cmake/modules/LLVMConfig.cmake.in
|
||||
@@ -84,6 +84,8 @@ if(NOT TARGET LLVMSupport)
|
||||
set(LLVM_EXPORTED_TARGETS "@LLVM_CONFIG_EXPORTS@")
|
||||
include("@LLVM_CONFIG_EXPORTS_FILE@")
|
||||
@llvm_config_include_buildtree_only_exports@
|
||||
+
|
||||
+ include("@LLVM_CONFIG_STATIC_EXPORTS_FILE@" OPTIONAL)
|
||||
endif()
|
||||
|
||||
# By creating intrinsics_gen here, subprojects that depend on LLVM's
|
||||
diff --git a/tools/llvm-config/CMakeLists.txt b/tools/llvm-config/CMakeLists.txt
|
||||
index a7db17386fb..8a796d03b5a 100644
|
||||
--- a/tools/llvm-config/CMakeLists.txt
|
||||
+++ b/tools/llvm-config/CMakeLists.txt
|
||||
@@ -42,7 +42,11 @@ set(LLVM_SRC_ROOT ${LLVM_MAIN_SRC_DIR})
|
||||
set(LLVM_OBJ_ROOT ${LLVM_BINARY_DIR})
|
||||
set(LLVM_CPPFLAGS "${LLVM_DEFINITIONS}")
|
||||
set(LLVM_CFLAGS "${LLVM_C_STD_FLAG} ${LLVM_DEFINITIONS}")
|
||||
+STRING(REGEX REPLACE "-mcet" "" LLVM_CFLAGS ${LLVM_CFLAGS})
|
||||
+STRING(REGEX REPLACE "-fcf-protection" "" LLVM_CFLAGS ${LLVM_CFLAGS})
|
||||
set(LLVM_CXXFLAGS "${LLVM_CXX_STD_FLAG} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}")
|
||||
+STRING(REGEX REPLACE "-mcet" "" LLVM_CXXFLAGS ${LLVM_CXXFLAGS})
|
||||
+STRING(REGEX REPLACE "-fcf-protection" "" LLVM_CXXFLAGS ${LLVM_CXXFLAGS})
|
||||
set(LLVM_BUILD_SYSTEM cmake)
|
||||
set(LLVM_HAS_RTTI ${LLVM_CONFIG_HAS_RTTI})
|
||||
set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX}")
|
||||
--
|
||||
2.19.2
|
||||
|
@ -1,44 +0,0 @@
|
||||
diff -ru llvm-8.0.0rc1.src.orig/cmake/modules/CMakeLists.txt llvm-8.0.0rc1.src/cmake/modules/CMakeLists.txt
|
||||
--- llvm-8.0.0rc1.src.orig/cmake/modules/CMakeLists.txt 2019-02-12 11:32:02.370238762 +0000
|
||||
+++ llvm-8.0.0rc1.src/cmake/modules/CMakeLists.txt 2019-02-13 08:40:39.263265812 +0000
|
||||
@@ -94,7 +94,7 @@
|
||||
set(LLVM_CONFIG_LIBRARY_DIRS "\${LLVM_INSTALL_PREFIX}/lib\${LLVM_LIBDIR_SUFFIX}")
|
||||
set(LLVM_CONFIG_CMAKE_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_INSTALL_PACKAGE_DIR}")
|
||||
set(LLVM_CONFIG_BINARY_DIR "\${LLVM_INSTALL_PREFIX}")
|
||||
-set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/bin")
|
||||
+set(LLVM_CONFIG_TOOLS_BINARY_DIR "\${LLVM_INSTALL_PREFIX}/${LLVM_TOOLS_INSTALL_DIR}")
|
||||
set(LLVM_CONFIG_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMExports.cmake")
|
||||
set(LLVM_CONFIG_EXPORTS "${LLVM_EXPORTS}")
|
||||
configure_file(
|
||||
diff -ru llvm-8.0.0rc1.src.orig/tools/llvm-config/llvm-config.cpp llvm-8.0.0rc1.src/tools/llvm-config/llvm-config.cpp
|
||||
--- llvm-8.0.0rc1.src.orig/tools/llvm-config/llvm-config.cpp 2019-02-12 11:32:00.617221180 +0000
|
||||
+++ llvm-8.0.0rc1.src/tools/llvm-config/llvm-config.cpp 2019-02-12 11:34:27.817599362 +0000
|
||||
@@ -269,7 +269,6 @@
|
||||
// tree.
|
||||
bool IsInDevelopmentTree;
|
||||
enum { CMakeStyle, CMakeBuildModeStyle } DevelopmentTreeLayout;
|
||||
- llvm::SmallString<256> CurrentPath(GetExecutablePath(argv[0]));
|
||||
std::string CurrentExecPrefix;
|
||||
std::string ActiveObjRoot;
|
||||
|
||||
@@ -280,11 +279,15 @@
|
||||
build_mode = CMAKE_CFG_INTDIR;
|
||||
#endif
|
||||
|
||||
- // Create an absolute path, and pop up one directory (we expect to be inside a
|
||||
- // bin dir).
|
||||
- sys::fs::make_absolute(CurrentPath);
|
||||
- CurrentExecPrefix =
|
||||
- sys::path::parent_path(sys::path::parent_path(CurrentPath)).str();
|
||||
+ // Create an absolute path, and pop up as much directory as in LLVM_TOOLS_INSTALL_DIR
|
||||
+ {
|
||||
+ llvm::SmallString<256> CurrentPath(GetExecutablePath(argv[0]));
|
||||
+ sys::fs::make_absolute(CurrentPath);
|
||||
+ for (auto iter = sys::path::begin(LLVM_TOOLS_INSTALL_DIR), end = sys::path::end(LLVM_TOOLS_INSTALL_DIR); iter != end; ++iter) {
|
||||
+ CurrentPath = sys::path::parent_path(CurrentPath).str();
|
||||
+ }
|
||||
+ CurrentExecPrefix = sys::path::parent_path(CurrentPath).str();
|
||||
+ }
|
||||
|
||||
// Check to see if we are inside a development tree by comparing to possible
|
||||
// locations (prefix style or CMake style).
|
@ -0,0 +1,34 @@
|
||||
From f0762684457a883b6813b48c98a1e94e377bc06b Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Wed, 28 Aug 2019 19:31:21 -0700
|
||||
Subject: [PATCH] Pass target to gold linker to avoid faliures on i686
|
||||
|
||||
---
|
||||
llvm/test/tools/gold/X86/linkonce_odr_unnamed_addr.ll | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/llvm/test/tools/gold/X86/linkonce_odr_unnamed_addr.ll b/llvm/test/tools/gold/X86/linkonce_odr_unnamed_addr.ll
|
||||
index 525bf2d..01291bd 100644
|
||||
--- a/llvm/test/tools/gold/X86/linkonce_odr_unnamed_addr.ll
|
||||
+++ b/llvm/test/tools/gold/X86/linkonce_odr_unnamed_addr.ll
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
; RUN: opt -module-summary %s -o %t.o
|
||||
; RUN: opt -module-summary %p/Inputs/linkonce_odr_unnamed_addr.ll -o %t2.o
|
||||
-; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
|
||||
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
|
||||
; RUN: --plugin-opt=save-temps \
|
||||
; RUN: %t.o %t2.o -o %t3.o
|
||||
; RUN: llvm-dis %t.o.1.promote.bc -o - | FileCheck %s
|
||||
@@ -11,7 +11,7 @@
|
||||
; Now test when one module is a native object. In that case we must be
|
||||
; conservative and not auto hide.
|
||||
; RUN: llc %p/Inputs/linkonce_odr_unnamed_addr.ll -o %t2native.o -filetype=obj
|
||||
-; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
|
||||
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
|
||||
; RUN: --plugin-opt=save-temps \
|
||||
; RUN: %t.o %t2native.o -o %t3.o
|
||||
; RUN: llvm-dis %t.o.1.promote.bc -o - | FileCheck %s --check-prefix=NOSUMMARY
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,248 @@
|
||||
From e4e77bb8bf741f52b43b90987646f1c118914848 Mon Sep 17 00:00:00 2001
|
||||
From: Jordan Rupprecht <rupprecht@google.com>
|
||||
Date: Wed, 21 Aug 2019 18:00:17 +0000
|
||||
Subject: [PATCH] [docs] Convert remaining command guide entries from md to
|
||||
rst.
|
||||
|
||||
Summary:
|
||||
Linking between markdown and rst files is currently not supported very well, e.g. the current llvm-addr2line docs [1] link to "llvm-symbolizer" instead of "llvm-symbolizer.html". This is weirdly broken in different ways depending on which versions of sphinx and recommonmark are being used, so workaround the bug by using rst everywhere.
|
||||
|
||||
[1] http://llvm.org/docs/CommandGuide/llvm-addr2line.html
|
||||
|
||||
Reviewers: jhenderson
|
||||
|
||||
Reviewed By: jhenderson
|
||||
|
||||
Subscribers: lebedev.ri, llvm-commits
|
||||
|
||||
Tags: #llvm
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D66305
|
||||
|
||||
llvm-svn: 369553
|
||||
---
|
||||
llvm/docs/CommandGuide/llvm-addr2line.md | 28 -----------------------
|
||||
llvm/docs/CommandGuide/llvm-addr2line.rst | 38 +++++++++++++++++++++++++++++++
|
||||
llvm/docs/CommandGuide/llvm-ranlib.md | 17 --------------
|
||||
llvm/docs/CommandGuide/llvm-ranlib.rst | 23 +++++++++++++++++++
|
||||
llvm/docs/CommandGuide/llvm-size.md | 10 --------
|
||||
llvm/docs/CommandGuide/llvm-size.rst | 15 ++++++++++++
|
||||
llvm/docs/CommandGuide/llvm-strings.md | 10 --------
|
||||
llvm/docs/CommandGuide/llvm-strings.rst | 15 ++++++++++++
|
||||
8 files changed, 91 insertions(+), 65 deletions(-)
|
||||
delete mode 100644 llvm/docs/CommandGuide/llvm-addr2line.md
|
||||
create mode 100644 llvm/docs/CommandGuide/llvm-addr2line.rst
|
||||
delete mode 100644 llvm/docs/CommandGuide/llvm-ranlib.md
|
||||
create mode 100644 llvm/docs/CommandGuide/llvm-ranlib.rst
|
||||
delete mode 100644 llvm/docs/CommandGuide/llvm-size.md
|
||||
create mode 100644 llvm/docs/CommandGuide/llvm-size.rst
|
||||
delete mode 100644 llvm/docs/CommandGuide/llvm-strings.md
|
||||
create mode 100644 llvm/docs/CommandGuide/llvm-strings.rst
|
||||
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-addr2line.md b/llvm/docs/CommandGuide/llvm-addr2line.md
|
||||
deleted file mode 100644
|
||||
index 03224c4..0000000
|
||||
--- a/llvm/docs/CommandGuide/llvm-addr2line.md
|
||||
+++ /dev/null
|
||||
@@ -1,28 +0,0 @@
|
||||
-# llvm-addr2line - a drop-in replacement for addr2line
|
||||
-
|
||||
-## SYNOPSIS
|
||||
-
|
||||
-**llvm-addr2line** [*options*]
|
||||
-
|
||||
-## DESCRIPTION
|
||||
-
|
||||
-**llvm-addr2line** is an alias for the [llvm-symbolizer](llvm-symbolizer) tool
|
||||
-with different defaults. The goal is to make it a drop-in replacement for
|
||||
-GNU's **addr2line**.
|
||||
-
|
||||
-Here are some of those differences:
|
||||
-
|
||||
-* Defaults not to print function names. Use [-f](llvm-symbolizer-opt-f)
|
||||
- to enable that.
|
||||
-
|
||||
-* Defaults not to demangle function names. Use [-C](llvm-symbolizer-opt-C)
|
||||
- to switch the demangling on.
|
||||
-
|
||||
-* Defaults not to print inlined frames. Use [-i](llvm-symbolizer-opt-i)
|
||||
- to show inlined frames for a source code location in an inlined function.
|
||||
-
|
||||
-* Uses [--output-style=GNU](llvm-symbolizer-opt-output-style) by default.
|
||||
-
|
||||
-## SEE ALSO
|
||||
-
|
||||
-Refer to [llvm-symbolizer](llvm-symbolizer) for additional information.
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-addr2line.rst b/llvm/docs/CommandGuide/llvm-addr2line.rst
|
||||
new file mode 100644
|
||||
index 0000000..08f1b69
|
||||
--- /dev/null
|
||||
+++ b/llvm/docs/CommandGuide/llvm-addr2line.rst
|
||||
@@ -0,0 +1,38 @@
|
||||
+llvm-addr2line - a drop-in replacement for addr2line
|
||||
+====================================================
|
||||
+
|
||||
+.. program:: llvm-addr2line
|
||||
+
|
||||
+SYNOPSIS
|
||||
+--------
|
||||
+
|
||||
+:program:`llvm-addr2line` [*options*]
|
||||
+
|
||||
+DESCRIPTION
|
||||
+-----------
|
||||
+
|
||||
+:program:`llvm-addr2line` is an alias for the :manpage:`llvm-symbolizer(1)`
|
||||
+tool with different defaults. The goal is to make it a drop-in replacement for
|
||||
+GNU's :program:`addr2line`.
|
||||
+
|
||||
+Here are some of those differences:
|
||||
+
|
||||
+- Defaults not to print function names. Use `-f`_ to enable that.
|
||||
+
|
||||
+- Defaults not to demangle function names. Use `-C`_ to switch the
|
||||
+ demangling on.
|
||||
+
|
||||
+- Defaults not to print inlined frames. Use `-i`_ to show inlined
|
||||
+ frames for a source code location in an inlined function.
|
||||
+
|
||||
+- Uses `--output-style=GNU`_ by default.
|
||||
+
|
||||
+SEE ALSO
|
||||
+--------
|
||||
+
|
||||
+:manpage:`llvm-symbolizer(1)`
|
||||
+
|
||||
+.. _-f: llvm-symbolizer.html#llvm-symbolizer-opt-f
|
||||
+.. _-C: llvm-symbolizer.html#llvm-symbolizer-opt-c
|
||||
+.. _-i: llvm-symbolizer.html#llvm-symbolizer-opt-i
|
||||
+.. _--output-style=GNU: llvm-symbolizer.html#llvm-symbolizer-opt-output-style
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-ranlib.md b/llvm/docs/CommandGuide/llvm-ranlib.md
|
||||
deleted file mode 100644
|
||||
index 4377364..0000000
|
||||
--- a/llvm/docs/CommandGuide/llvm-ranlib.md
|
||||
+++ /dev/null
|
||||
@@ -1,17 +0,0 @@
|
||||
-# llvm-ranlib - generates an archive index
|
||||
-
|
||||
-## SYNOPSIS
|
||||
-
|
||||
-**llvm-ranlib** [*options*]
|
||||
-
|
||||
-## DESCRIPTION
|
||||
-
|
||||
-**llvm-ranlib** is an alias for the [llvm-ar](llvm-ar.html) tool that generates
|
||||
-an index for an archive. It can be used as a replacement for GNU's **ranlib**
|
||||
-tool.
|
||||
-
|
||||
-Running **llvm-ranlib** is equivalent to running **llvm-ar s**.
|
||||
-
|
||||
-## SEE ALSO
|
||||
-
|
||||
-Refer to [llvm-ar](llvm-ar.html) for additional information.
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-ranlib.rst b/llvm/docs/CommandGuide/llvm-ranlib.rst
|
||||
new file mode 100644
|
||||
index 0000000..314a330
|
||||
--- /dev/null
|
||||
+++ b/llvm/docs/CommandGuide/llvm-ranlib.rst
|
||||
@@ -0,0 +1,23 @@
|
||||
+llvm-ranlib - generates an archive index
|
||||
+========================================
|
||||
+
|
||||
+.. program:: llvm-ranlib
|
||||
+
|
||||
+SYNOPSIS
|
||||
+--------
|
||||
+
|
||||
+:program:`llvm-ranlib` [*options*]
|
||||
+
|
||||
+DESCRIPTION
|
||||
+-----------
|
||||
+
|
||||
+:program:`llvm-ranlib` is an alias for the :doc:`llvm-ar <llvm-ar>` tool that
|
||||
+generates an index for an archive. It can be used as a replacement for GNU’s
|
||||
+:program:`ranlib` tool.
|
||||
+
|
||||
+Running :program:`llvm-ranlib` is equivalent to running ``llvm-ar s``.
|
||||
+
|
||||
+SEE ALSO
|
||||
+--------
|
||||
+
|
||||
+:manpage:`llvm-ar(1)`
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-size.md b/llvm/docs/CommandGuide/llvm-size.md
|
||||
deleted file mode 100644
|
||||
index 3952708..0000000
|
||||
--- a/llvm/docs/CommandGuide/llvm-size.md
|
||||
+++ /dev/null
|
||||
@@ -1,10 +0,0 @@
|
||||
-# llvm-size - print segment sizes
|
||||
-
|
||||
-## SYNOPSIS
|
||||
-
|
||||
-**llvm-size** [*options*]
|
||||
-
|
||||
-## DESCRIPTION
|
||||
-
|
||||
-**llvm-size** is a tool that prints segment sizes in object files. The goal is
|
||||
-to make it a drop-in replacement for GNU's **size**.
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-size.rst b/llvm/docs/CommandGuide/llvm-size.rst
|
||||
new file mode 100644
|
||||
index 0000000..0dce15c
|
||||
--- /dev/null
|
||||
+++ b/llvm/docs/CommandGuide/llvm-size.rst
|
||||
@@ -0,0 +1,15 @@
|
||||
+llvm-size - print size information
|
||||
+==================================
|
||||
+
|
||||
+.. program:: llvm-size
|
||||
+
|
||||
+SYNOPSIS
|
||||
+--------
|
||||
+
|
||||
+:program:`llvm-size` [*options*]
|
||||
+
|
||||
+DESCRIPTION
|
||||
+-----------
|
||||
+
|
||||
+:program:`llvm-size` is a tool that prints size information for object files.
|
||||
+The goal is to make it a drop-in replacement for GNU’s :program:`size`.
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-strings.md b/llvm/docs/CommandGuide/llvm-strings.md
|
||||
deleted file mode 100644
|
||||
index b5871c4..0000000
|
||||
--- a/llvm/docs/CommandGuide/llvm-strings.md
|
||||
+++ /dev/null
|
||||
@@ -1,10 +0,0 @@
|
||||
-# llvm-strings - print strings
|
||||
-
|
||||
-## SYNOPSIS
|
||||
-
|
||||
-**llvm-strings** [*options*]
|
||||
-
|
||||
-## DESCRIPTION
|
||||
-
|
||||
-**llvm-strings** is a tool that prints strings in object files. The goal is to
|
||||
-make it a drop-in replacement for GNU's **size**.
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-strings.rst b/llvm/docs/CommandGuide/llvm-strings.rst
|
||||
new file mode 100644
|
||||
index 0000000..d8ab9cb
|
||||
--- /dev/null
|
||||
+++ b/llvm/docs/CommandGuide/llvm-strings.rst
|
||||
@@ -0,0 +1,15 @@
|
||||
+llvm-strings - print strings
|
||||
+============================
|
||||
+
|
||||
+.. program:: llvm-strings
|
||||
+
|
||||
+SYNOPSIS
|
||||
+--------
|
||||
+
|
||||
+:program:`llvm-strings` [*options*]
|
||||
+
|
||||
+DESCRIPTION
|
||||
+-----------
|
||||
+
|
||||
+:program:`llvm-strings` is a tool that prints strings in files. The goal is to
|
||||
+make it a drop-in replacement for GNU’s :program:`strings`.
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,15 +0,0 @@
|
||||
diff -ru llvm-8.0.0.src.orig/docs/conf.py llvm-8.0.0.src/docs/conf.py
|
||||
--- llvm-8.0.0.src.orig/docs/conf.py 2019-04-05 06:01:35.805784090 +0000
|
||||
+++ llvm-8.0.0.src/docs/conf.py 2019-04-05 06:05:01.780223097 +0000
|
||||
@@ -32,9 +32,9 @@
|
||||
templates_path = ['_templates']
|
||||
|
||||
# The suffix of source filenames.
|
||||
-source_suffix = ['.rst', '.md']
|
||||
+source_suffix = ['.rst']
|
||||
|
||||
-source_parsers = {'.md': 'recommonmark.parser.CommonMarkParser'}
|
||||
+source_parsers = {}
|
||||
|
||||
# The encoding of source files.
|
||||
#source_encoding = 'utf-8-sig'
|
@ -51,8 +51,14 @@ ln -s /usr/include include
|
||||
tar -xzf /usr/share/llvm/src/test.tar.gz
|
||||
ln -s $ARCH.site.cfg.py test/lit.site.cfg.py
|
||||
ln -s $ARCH.site.cfg.py test/Unit/lit.site.cfg.py
|
||||
|
||||
# llvm_obj_root is used to determine the directory the tests will run in.
|
||||
# test/MC/MachO/gen-dwarf.s fails if llvm_obj_root is a parent directory
|
||||
# of the source file. To workaround this, we set llvm_obj_root to a
|
||||
# different directory than the one used to store the test sources.
|
||||
# This also matches better how tests are run from the llvm source tree.
|
||||
lit -v -s $threads_arg test \
|
||||
-Dllvm_obj_root=`pwd` \
|
||||
-Dllvm_obj_root=$(mktemp -d) \
|
||||
-Dllvm_test_root=`pwd`/test \
|
||||
-Dllvm_unittest_bindir=$LIB_DIR/llvm \
|
||||
-Dllvm_shlib_dir=$LIB_DIR
|
||||
|
263
SPECS/llvm.spec
263
SPECS/llvm.spec
@ -6,27 +6,36 @@
|
||||
%bcond_with gold
|
||||
%endif
|
||||
|
||||
%global build_llvm_bindir %{buildroot}%{_bindir}
|
||||
%bcond_with compat_build
|
||||
|
||||
%global llvm_libdir %{_libdir}/%{name}
|
||||
%global build_llvm_libdir %{buildroot}%{llvm_libdir}
|
||||
%global maj_ver 8
|
||||
%global maj_ver 9
|
||||
%global min_ver 0
|
||||
%global patch_ver 0
|
||||
#%%global rc_ver 4
|
||||
#%%global compat_version 7.0.1
|
||||
#%%global rc_ver 3
|
||||
%global baserelease 5
|
||||
|
||||
|
||||
%if %{with compat_build}
|
||||
%global pkg_name llvm%{maj_ver}.%{min_ver}
|
||||
%global exec_suffix -%{maj_ver}.%{min_ver}
|
||||
%global install_prefix %{_libdir}/%{name}
|
||||
%global install_bindir %{install_prefix}/bin
|
||||
%global install_includedir %{install_prefix}/include
|
||||
%global install_libdir %{install_prefix}/lib
|
||||
|
||||
%global pkg_bindir %{install_bindir}
|
||||
%global pkg_includedir %{_includedir}/%{name}
|
||||
%global pkg_libdir %{install_libdir}
|
||||
%else
|
||||
%global pkg_name llvm
|
||||
%global install_prefix /usr
|
||||
%global install_libdir %{_libdir}
|
||||
%global pkg_libdir %{install_libdir}
|
||||
%endif
|
||||
|
||||
%global build_install_prefix %{buildroot}%{install_prefix}
|
||||
%global build_pkgdocdir %{buildroot}%{_pkgdocdir}
|
||||
|
||||
#%%ifnarch i686
|
||||
%global enable_test_pkg 1
|
||||
#%%endif
|
||||
|
||||
%if !0%{?rhel}
|
||||
# libedit-devel is a buildroot-only package in RHEL8, so we can't have a
|
||||
@ -36,24 +45,29 @@
|
||||
|
||||
Name: %{pkg_name}
|
||||
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
|
||||
Release: 3%{?rc_ver:.rc%{rc_ver}}%{?dist}
|
||||
Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist}
|
||||
Summary: The Low Level Virtual Machine
|
||||
|
||||
License: NCSA
|
||||
URL: http://llvm.org
|
||||
Source0: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src.tar.xz
|
||||
%if %{without compat_build}
|
||||
Source1: run-lit-tests
|
||||
Source2: lit.fedora.cfg.py
|
||||
%if %{defined compat_version}
|
||||
Source100: http://llvm.org/releases/%{compat_version}/%{name}-%{compat_version}.src.tar.xz
|
||||
%endif
|
||||
|
||||
Patch5: 0001-PATCH-llvm-config.patch
|
||||
Patch7: 0001-PATCH-Filter-out-cxxflags-not-supported-by-clang.patch
|
||||
Patch8: doc.patch
|
||||
Patch9: 0001-Disable-threading-in-thinLTO.patch
|
||||
Patch10: 0001-Disable-threading-in-LTO.patch
|
||||
Patch11: 0001-Fix-the-buildbot-issue-introduced-by-r351421.patch
|
||||
Patch0: 0001-Filter-out-cxxflags-not-supported-by-clang.patch
|
||||
# TODO: I'm not sure why this is needed. Could be a change in newer version
|
||||
# of gold.
|
||||
Patch1: 0001-Pass-target-to-gold-linker-to-avoid-faliures-on-i686.patch
|
||||
Patch2: 0001-CMake-Split-static-library-exports-into-their-own-ex.patch
|
||||
Patch3: 0001-CMake-Split-test-binary-exports-into-their-own-expor.patch
|
||||
|
||||
# RHEL-specific patches.
|
||||
Patch101: 0001-Deactivate-markdown-doc.patch
|
||||
# Patches to convert md files to rst since we don't have the md parser in RHEL.
|
||||
Patch102: 0001-Docs-llvm-strip-Add-help-text-to-llvm-strip-rst-doc.patch
|
||||
Patch103: 0001-docs-Convert-remaining-command-guide-entries-from-md.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
@ -63,7 +77,9 @@ BuildRequires: zlib-devel
|
||||
BuildRequires: libffi-devel
|
||||
BuildRequires: ncurses-devel
|
||||
BuildRequires: python3-sphinx
|
||||
#BuildRequires: python3-recommonmark
|
||||
%if !0%{?rhel}
|
||||
BuildRequires: python3-recommonmark
|
||||
%endif
|
||||
BuildRequires: multilib-rpm-config
|
||||
%if %{with gold}
|
||||
BuildRequires: binutils-devel
|
||||
@ -81,6 +97,8 @@ BuildRequires: python3-devel
|
||||
|
||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||
|
||||
Provides: llvm(major) = %{maj_ver}
|
||||
|
||||
%description
|
||||
LLVM is a compiler infrastructure designed for compile-time, link-time,
|
||||
runtime, and idle-time optimization of programs from arbitrary programming
|
||||
@ -99,6 +117,8 @@ Requires: libedit-devel
|
||||
Requires(post): %{_sbindir}/alternatives
|
||||
Requires(postun): %{_sbindir}/alternatives
|
||||
|
||||
Provides: llvm-devel(major) = %{maj_ver}
|
||||
|
||||
%description devel
|
||||
This package contains library and header files needed to develop new native
|
||||
programs that use the LLVM infrastructure.
|
||||
@ -124,7 +144,7 @@ Conflicts: %{name}-devel < 8
|
||||
%description static
|
||||
Static libraries for the LLVM compiler infrastructure.
|
||||
|
||||
%if 0%{?enable_test_pkg}
|
||||
%if %{without compat_build}
|
||||
|
||||
%package test
|
||||
Summary: LLVM regression tests
|
||||
@ -138,32 +158,22 @@ Requires: %{name}-devel%{?_isa} = %{version}-%{release}
|
||||
Requires: gcc
|
||||
Requires: findutils
|
||||
|
||||
Provides: llvm-test(major) = %{maj_ver}
|
||||
|
||||
%description test
|
||||
LLVM regression tests.
|
||||
|
||||
%endif
|
||||
|
||||
%package googletest
|
||||
Summary: LLVM's modified googletest sources
|
||||
|
||||
%description googletest
|
||||
LLVM's modified googletest sources.
|
||||
|
||||
%prep
|
||||
%if %{defined compat_version}
|
||||
%setup -T -q -b 100 -n llvm-%{compat_version}.src
|
||||
|
||||
%setup -q -n llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src
|
||||
%patch5 -p1
|
||||
%patch7 -p1
|
||||
%patch8 -p1
|
||||
%patch9 -p1
|
||||
%patch10 -p1
|
||||
|
||||
%else
|
||||
%autosetup -n llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src -p1
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -n llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src -p2
|
||||
|
||||
pathfix.py -i %{__python3} -pn \
|
||||
test/BugPoint/compile-custom.ll.py \
|
||||
tools/opt-viewer/*.py
|
||||
@ -188,14 +198,16 @@ cd _build
|
||||
-DLLVM_PARALLEL_LINK_JOBS=1 \
|
||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||
-DCMAKE_INSTALL_RPATH=";" \
|
||||
%ifarch s390 s390x %{arm} %ix86
|
||||
%ifarch s390 %{arm} %ix86
|
||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||
%endif
|
||||
%if %{without compat_build}
|
||||
%if 0%{?__isa_bits} == 64
|
||||
-DLLVM_LIBDIR_SUFFIX=64 \
|
||||
%else
|
||||
-DLLVM_LIBDIR_SUFFIX= \
|
||||
%endif
|
||||
%endif
|
||||
\
|
||||
-DLLVM_TARGETS_TO_BUILD="X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF" \
|
||||
@ -219,9 +231,13 @@ cd _build
|
||||
-DLLVM_BUILD_EXAMPLES:BOOL=OFF \
|
||||
\
|
||||
-DLLVM_INCLUDE_UTILS:BOOL=ON \
|
||||
%if %{with compat_build}
|
||||
-DLLVM_INSTALL_UTILS:BOOL=OFF \
|
||||
%else
|
||||
-DLLVM_INSTALL_UTILS:BOOL=ON \
|
||||
-DLLVM_UTILS_INSTALL_DIR:PATH=%{build_llvm_bindir} \
|
||||
-DLLVM_UTILS_INSTALL_DIR:PATH=%{_bindir} \
|
||||
-DLLVM_TOOLS_INSTALL_DIR:PATH=bin \
|
||||
%endif
|
||||
\
|
||||
-DLLVM_INCLUDE_DOCS:BOOL=ON \
|
||||
-DLLVM_BUILD_DOCS:BOOL=ON \
|
||||
@ -235,54 +251,35 @@ cd _build
|
||||
-DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF \
|
||||
\
|
||||
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
|
||||
-DCMAKE_INSTALL_PREFIX=%{build_install_prefix} \
|
||||
-DLLVM_INSTALL_SPHINX_HTML_DIR=%{build_pkgdocdir}/html \
|
||||
-DLLVM_INSTALL_SPHINX_HTML_DIR=%{_pkgdocdir}/html \
|
||||
-DSPHINX_EXECUTABLE=%{_bindir}/sphinx-build-3
|
||||
|
||||
ninja -v -j2
|
||||
|
||||
%if %{defined compat_version}
|
||||
mkdir ../compat-build
|
||||
cd ../compat-build
|
||||
%cmake ../../%{name}-%{compat_version}.src \
|
||||
-G Ninja \
|
||||
-DBUILD_SHARED_LIBS=OFF \
|
||||
-DCMAKE_BUILD_TYPE=Release \
|
||||
-DLLVM_TARGETS_TO_BUILD="X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF" \
|
||||
-DLLVM_ENABLE_RTTI:BOOL=ON \
|
||||
-DLLVM_ENABLE_ZLIB:BOOL=ON \
|
||||
-DLLVM_ENABLE_FFI:BOOL=ON \
|
||||
-DLLVM_BUILD_LLVM_DYLIB=ON
|
||||
ninja -v LLVM
|
||||
|
||||
# Remove files we don't need to save disk space
|
||||
mv lib/libLLVM-`echo %{compat_version} | cut -f1 -d .`.so ..
|
||||
rm -Rf *
|
||||
%endif
|
||||
# Build libLLVM.so first. This ensures that when libLLVM.so is linking, there
|
||||
# are no other compile jobs running. This will help reduce OOM errors on the
|
||||
# builders without having to artificially limit the number of concurrent jobs.
|
||||
%ninja_build LLVM
|
||||
%ninja_build
|
||||
|
||||
%install
|
||||
ninja -C _build -v install
|
||||
%ninja_install -C _build
|
||||
|
||||
|
||||
%if %{without compat_build}
|
||||
mkdir -p %{buildroot}/%{_bindir}
|
||||
mv %{buildroot}/%{_bindir}/llvm-config %{buildroot}/%{_bindir}/llvm-config-%{__isa_bits}
|
||||
ln -s llvm-config-%{__isa_bits} %{buildroot}/%{_bindir}/llvm-config
|
||||
|
||||
# Fix some man pages
|
||||
ln -s llvm-config.1 %{buildroot}%{_mandir}/man1/llvm-config-%{__isa_bits}.1
|
||||
mv %{buildroot}%{_mandir}/man1/tblgen.1 %{buildroot}%{_mandir}/man1/llvm-tblgen.1
|
||||
|
||||
# Install binaries needed for lit tests
|
||||
%if 0%{?enable_test_pkg}
|
||||
%global test_binaries FileCheck count lli-child-target llvm-PerfectShuffle llvm-isel-fuzzer llvm-opt-fuzzer not yaml-bench
|
||||
%global test_binaries llvm-isel-fuzzer llvm-opt-fuzzer
|
||||
|
||||
for f in %{test_binaries}
|
||||
do
|
||||
install -m 0755 ./_build/bin/$f %{build_llvm_bindir}
|
||||
install -m 0755 ./_build/bin/$f %{buildroot}%{_bindir}
|
||||
done
|
||||
|
||||
%endif
|
||||
|
||||
|
||||
%multilib_fix_c_header --file %{_includedir}/llvm/Config/llvm-config.h
|
||||
|
||||
@ -305,7 +302,6 @@ install -d %{install_srcdir}
|
||||
install -d %{install_srcdir}/utils/
|
||||
cp -R utils/unittest %{install_srcdir}/utils/
|
||||
|
||||
%if 0%{?enable_test_pkg}
|
||||
# Generate lit config files. Strip off the last line that initiates the
|
||||
# test run, so we can customize the configuration.
|
||||
head -n -1 _build/test/lit.site.cfg.py >> %{lit_cfg}
|
||||
@ -340,81 +336,142 @@ install -m 0755 %{build_libdir}/LLVMHello.so %{buildroot}%{_libdir}
|
||||
echo "%{_datadir}/llvm/src/unittests/DebugInfo/PDB" > %{build_llvm_libdir}/unittests/DebugInfo/PDB/llvm.srcdir.txt
|
||||
mkdir -p %{buildroot}%{_datadir}/llvm/src/unittests/DebugInfo/PDB/
|
||||
cp -R unittests/DebugInfo/PDB/Inputs %{buildroot}%{_datadir}/llvm/src/unittests/DebugInfo/PDB/
|
||||
|
||||
%else
|
||||
|
||||
# Add version suffix to binaries
|
||||
mkdir -p %{buildroot}/%{_bindir}
|
||||
for f in %{buildroot}/%{install_bindir}/*; do
|
||||
filename=`basename $f`
|
||||
ln -s %{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix}
|
||||
done
|
||||
|
||||
# Move header files
|
||||
mkdir -p %{buildroot}/%{pkg_includedir}
|
||||
ln -s ../../../%{install_includedir}/llvm %{buildroot}/%{pkg_includedir}/llvm
|
||||
ln -s ../../../%{install_includedir}/llvm-c %{buildroot}/%{pkg_includedir}/llvm-c
|
||||
|
||||
# Fix multi-lib
|
||||
mv %{buildroot}%{_bindir}/llvm-config{%{exec_suffix},%{exec_suffix}-%{__isa_bits}}
|
||||
%multilib_fix_c_header --file %{install_includedir}/llvm/Config/llvm-config.h
|
||||
|
||||
# Create ld.so.conf.d entry
|
||||
mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d
|
||||
cat >> %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf << EOF
|
||||
%{pkg_libdir}
|
||||
EOF
|
||||
|
||||
# Add version suffix to man pages and move them to mandir.
|
||||
mkdir -p %{buildroot}/%{_mandir}/man1
|
||||
for f in `ls %{build_install_prefix}/share/man/man1/*`; do
|
||||
filename=`basename $f | cut -f 1 -d '.'`
|
||||
mv $f %{buildroot}%{_mandir}/man1/$filename%{exec_suffix}.1
|
||||
done
|
||||
|
||||
# Remove opt-viewer, since this is just a compatibility package.
|
||||
rm -Rf %{build_install_prefix}/share/opt-viewer
|
||||
|
||||
%endif
|
||||
|
||||
|
||||
%if %{defined compat_version}
|
||||
cd compat-build
|
||||
install ../libLLVM-`echo %{compat_version} | cut -f1 -d .`.so %{buildroot}%{_libdir}
|
||||
%endif
|
||||
|
||||
%check
|
||||
|
||||
# TODO: Fix arm
|
||||
# TODO: Fix test failures on arm
|
||||
ninja check-all -C _build || \
|
||||
%ifarch %{arm}
|
||||
:
|
||||
:
|
||||
%else
|
||||
false
|
||||
%endif
|
||||
|
||||
|
||||
%ldconfig_scriptlets libs
|
||||
|
||||
%if %{without compat_build}
|
||||
|
||||
%post devel
|
||||
%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config llvm-config %{_bindir}/llvm-config-%{__isa_bits} %{__isa_bits}
|
||||
|
||||
%postun devel
|
||||
if [ $1 -eq 0 ]; then
|
||||
%{_sbindir}/update-alternatives --remove llvm-config %{_bindir}/llvm-config-%{__isa_bits}
|
||||
%{_sbindir}/update-alternatives --remove llvm-config %{_bindir}/llvm-config
|
||||
fi
|
||||
|
||||
%endif
|
||||
|
||||
%files
|
||||
%exclude %{_bindir}/llvm-config*
|
||||
%exclude %{_mandir}/man1/llvm-config*
|
||||
%{_mandir}/man1/*
|
||||
%{_bindir}/*
|
||||
|
||||
%if %{without compat_build}
|
||||
%exclude %{_bindir}/llvm-config-%{__isa_bits}
|
||||
%exclude %{_bindir}/not
|
||||
%exclude %{_bindir}/count
|
||||
%exclude %{_bindir}/yaml-bench
|
||||
%exclude %{_bindir}/lli-child-target
|
||||
%exclude %{_bindir}/llvm-isel-fuzzer
|
||||
%exclude %{_bindir}/llvm-opt-fuzzer
|
||||
%{_bindir}/*
|
||||
|
||||
%exclude %{_mandir}/man1/llvm-config*
|
||||
%{_mandir}/man1/*
|
||||
|
||||
%{_datadir}/opt-viewer
|
||||
%else
|
||||
%exclude %{pkg_bindir}/llvm-config
|
||||
%{pkg_bindir}
|
||||
%endif
|
||||
|
||||
%files libs
|
||||
%{pkg_libdir}/libLLVM-%{maj_ver}.so
|
||||
%if %{without compat_build}
|
||||
%if %{with gold}
|
||||
%{_libdir}/LLVMgold.so
|
||||
%endif
|
||||
%{_libdir}/libLLVM-%{maj_ver}.%{min_ver}*.so
|
||||
%{_libdir}/libLTO.so*
|
||||
%{pkg_libdir}/libOptRemarks.so*
|
||||
%if %{defined compat_version}
|
||||
%{_libdir}/libLLVM-7.so
|
||||
%else
|
||||
%config(noreplace) %{_sysconfdir}/ld.so.conf.d/%{name}-%{_arch}.conf
|
||||
%if %{with gold}
|
||||
%{_libdir}/%{name}/lib/LLVMgold.so
|
||||
%endif
|
||||
%{pkg_libdir}/libLLVM-%{maj_ver}.%{min_ver}*.so
|
||||
%{pkg_libdir}/libLTO.so*
|
||||
%exclude %{pkg_libdir}/libLTO.so
|
||||
%endif
|
||||
%{pkg_libdir}/libRemarks.so*
|
||||
|
||||
%files devel
|
||||
%{_bindir}/llvm-config*
|
||||
%if %{without compat_build}
|
||||
%{_bindir}/llvm-config-%{__isa_bits}
|
||||
%{_mandir}/man1/llvm-config*
|
||||
%{_includedir}/llvm
|
||||
%{_includedir}/llvm-c
|
||||
%{_libdir}/libLLVM.so
|
||||
%{_libdir}/cmake/llvm
|
||||
%exclude %{_libdir}/cmake/llvm/LLVMStaticExports.cmake
|
||||
%exclude %{_libdir}/cmake/llvm/LLVMTestExports.cmake
|
||||
%else
|
||||
%{_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
|
||||
%{pkg_bindir}/llvm-config
|
||||
%{_mandir}/man1/llvm-config%{exec_suffix}.1.gz
|
||||
%{install_includedir}/llvm
|
||||
%{install_includedir}/llvm-c
|
||||
%{pkg_includedir}/llvm
|
||||
%{pkg_includedir}/llvm-c
|
||||
%{pkg_libdir}/libLTO.so
|
||||
%{pkg_libdir}/libLLVM.so
|
||||
%{pkg_libdir}/cmake/llvm
|
||||
%endif
|
||||
|
||||
%files doc
|
||||
%doc %{_pkgdocdir}/html
|
||||
|
||||
%files static
|
||||
%if %{without compat_build}
|
||||
%{_libdir}/*.a
|
||||
%exclude %{_libdir}/libLLVMTestingSupport.a
|
||||
%{_libdir}/cmake/llvm/LLVMStaticExports.cmake
|
||||
%else
|
||||
%{_libdir}/%{name}/lib/*.a
|
||||
%endif
|
||||
|
||||
%if %{without compat_build}
|
||||
|
||||
%if 0%{?enable_test_pkg}
|
||||
%files test
|
||||
%{_libexecdir}/tests/llvm/
|
||||
%{llvm_libdir}/unittests/
|
||||
@ -429,14 +486,42 @@ fi
|
||||
%{_bindir}/llvm-opt-fuzzer
|
||||
%{_libdir}/BugpointPasses.so
|
||||
%{_libdir}/LLVMHello.so
|
||||
%endif
|
||||
%{_libdir}/cmake/llvm/LLVMTestExports.cmake
|
||||
|
||||
%files googletest
|
||||
%{_datadir}/llvm/src/utils
|
||||
%{_libdir}/libLLVMTestingSupport.a
|
||||
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Wed Oct 30 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-5
|
||||
- Remove work-around for threading issue in gold
|
||||
|
||||
* Wed Oct 30 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-4
|
||||
- Build libLLVM.so first to avoid OOM errors
|
||||
|
||||
* Tue Oct 01 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-3
|
||||
- Adjust run-lit-tests script to better match in tree testing
|
||||
|
||||
* Mon Sep 30 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-2
|
||||
- Limit number of build threads using -l option for ninja
|
||||
|
||||
* Thu Sep 26 2019 Tom Stellard <tstellar@redhat.com> - 9.0.0-1
|
||||
- 9.0.0 Release
|
||||
|
||||
* Thu Aug 1 2019 sguelton@redhat.com - 8.0.1-1
|
||||
- 8.0.1 release
|
||||
|
||||
* Tue Jul 2 2019 sguelton@redhat.com - 8.0.1-0.3.rc2
|
||||
- Deactivate multithreading for gold plugin only to fix rhbz#1636479
|
||||
|
||||
* Mon Jun 17 2019 sguelton@redhat.com - 8.0.1-0.2.rc2
|
||||
- Deactivate multithreading instead of patching to fix rhbz#1636479
|
||||
|
||||
* Thu Jun 13 2019 sguelton@redhat.com - 8.0.1-0.1.rc2
|
||||
- 8.0.1rc2 Release
|
||||
|
||||
* Tue May 14 2019 sguelton@redhat.com - 8.0.0-3
|
||||
- Disable threading in LTO
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user