llvm: update to 15.0.0
This commit is contained in:
committed by
مهدي شينون (Mehdi Chinoune)
parent
29b3b6e31e
commit
babbba3822
@@ -1,6 +1,6 @@
|
||||
--- a/cmake/modules/LLVMInstallSymlink.cmake
|
||||
+++ b/cmake/modules/LLVMInstallSymlink.cmake
|
||||
@@ -6,17 +6,18 @@
|
||||
@@ -6,6 +6,12 @@
|
||||
|
||||
function(install_symlink name target outdir)
|
||||
set(DESTDIR $ENV{DESTDIR})
|
||||
@@ -10,19 +10,21 @@
|
||||
+ set(LINK_OR_COPY copy)
|
||||
+ endif()
|
||||
+
|
||||
set(bindir "${DESTDIR}${CMAKE_INSTALL_PREFIX}/${outdir}")
|
||||
|
||||
if(NOT IS_ABSOLUTE "${outdir}")
|
||||
set(outdir "${CMAKE_INSTALL_PREFIX}/${outdir}")
|
||||
endif()
|
||||
@@ -14,12 +20,7 @@
|
||||
message(STATUS "Creating ${name}")
|
||||
|
||||
execute_process(
|
||||
- COMMAND "${CMAKE_COMMAND}" -E create_symlink "${target}" "${name}"
|
||||
- WORKING_DIRECTORY "${bindir}" ERROR_VARIABLE has_err)
|
||||
- WORKING_DIRECTORY "${outdir}" ERROR_VARIABLE has_err)
|
||||
- if(CMAKE_HOST_WIN32 AND has_err)
|
||||
- execute_process(
|
||||
- COMMAND "${CMAKE_COMMAND}" -E copy "${target}" "${name}"
|
||||
- WORKING_DIRECTORY "${bindir}")
|
||||
- WORKING_DIRECTORY "${outdir}")
|
||||
- endif()
|
||||
+ COMMAND "${CMAKE_COMMAND}" -E ${LINK_OR_COPY} "${target}" "${name}"
|
||||
+ WORKING_DIRECTORY "${bindir}")
|
||||
+ WORKING_DIRECTORY "${outdir}")
|
||||
|
||||
endfunction()
|
||||
|
||||
@@ -1,22 +0,0 @@
|
||||
--- a/include/llvm/Config/config.h.cmake
|
||||
+++ b/include/llvm/Config/config.h.cmake
|
||||
@@ -50,9 +50,6 @@
|
||||
don't. */
|
||||
#cmakedefine01 HAVE_DECL_STRERROR_S
|
||||
|
||||
-/* Define to 1 if you have the DIA SDK installed, and to 0 if you don't. */
|
||||
-#cmakedefine01 LLVM_ENABLE_DIA_SDK
|
||||
-
|
||||
/* Define to 1 if you have the <dlfcn.h> header file. */
|
||||
#cmakedefine HAVE_DLFCN_H ${HAVE_DLFCN_H}
|
||||
|
||||
--- a/include/llvm/Config/llvm-config.h.cmake
|
||||
+++ b/include/llvm/Config/llvm-config.h.cmake
|
||||
@@ -116,4 +116,7 @@
|
||||
* in non assert builds */
|
||||
#cmakedefine01 LLVM_UNREACHABLE_OPTIMIZE
|
||||
|
||||
+/* Define to 1 if you have the DIA SDK installed, and to 0 if you don't. */
|
||||
+#cmakedefine01 LLVM_ENABLE_DIA_SDK
|
||||
+
|
||||
#endif
|
||||
@@ -1,40 +0,0 @@
|
||||
From 606348cc72389de481c014afb0f15af7360fc950 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
|
||||
Date: Wed, 20 Jul 2022 13:39:33 +0300
|
||||
Subject: [PATCH] [MinGW] Don't currently set visibility=hidden when building
|
||||
for MinGW
|
||||
|
||||
If we build the Target libraries with -fvisibility=hidden, then
|
||||
LLVM_EXTERNAL_VISIBILITY must also be able to override it back
|
||||
to default visibility.
|
||||
|
||||
Currently, the LLVM_EXTERNAL_VISIBILITY define is a no-op for
|
||||
mingw targets, thus set CMAKE_CXX_VISIBILITY_PRESET correspondingly.
|
||||
|
||||
This unbreaks the mingw dylib build, if the compiler actually
|
||||
takes hidden visiblity into account (e.g. after D130121).
|
||||
|
||||
(Later, once hidden visiblity can be used for MinGW targets, we
|
||||
can make LLVM_EXTERNAL_VISIBILITY and LLVM_LIBRARY_VISIBILITY expand
|
||||
to actual attributes, and reverse this commit.)
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D130200
|
||||
---
|
||||
lib/Target/CMakeLists.txt | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/lib/Target/CMakeLists.txt b/lib/Target/CMakeLists.txt
|
||||
index 35a8e9ae0f70..c0c2bc36a6e4 100644
|
||||
--- a/lib/Target/CMakeLists.txt
|
||||
+++ b/lib/Target/CMakeLists.txt
|
||||
@@ -22,6 +22,7 @@ add_llvm_component_library(LLVMTarget
|
||||
# When building shared objects for each target there are some internal APIs
|
||||
# that are used across shared objects which we can't hide.
|
||||
if (NOT BUILD_SHARED_LIBS AND NOT APPLE AND
|
||||
+ NOT MINGW AND
|
||||
NOT (${CMAKE_SYSTEM_NAME} MATCHES "AIX") AND
|
||||
NOT DEFINED CMAKE_CXX_VISIBILITY_PRESET)
|
||||
# Set default visibility to hidden, so we don't export all the Target classes
|
||||
--
|
||||
2.37.1.windows.1
|
||||
|
||||
@@ -1,176 +0,0 @@
|
||||
From 5d513ef6cf4646e64bbb1d5f8610afd530964588 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
|
||||
Date: Mon, 18 Jul 2022 00:11:37 +0300
|
||||
Subject: [PATCH] [LLD] [COFF] Add support for a new, mingw specific embedded
|
||||
directive -exclude-symbols:
|
||||
|
||||
This is an entirely new embedded directive - extending the GNU ld
|
||||
command line option --exclude-symbols to be usable in embedded
|
||||
directives too.
|
||||
|
||||
(GNU ld.bfd also got support for the same new directive, currently in
|
||||
the latest git version, after the 2.39 branch.)
|
||||
|
||||
This works as an inverse to the regular embedded dllexport directives,
|
||||
for cases when autoexport of all eligible symbols is performed.
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D130120
|
||||
---
|
||||
COFF/Driver.cpp | 10 +++++++++-
|
||||
COFF/Driver.h | 2 ++
|
||||
COFF/DriverUtils.cpp | 3 +++
|
||||
COFF/MinGW.cpp | 6 ++++--
|
||||
COFF/MinGW.h | 5 ++++-
|
||||
test/COFF/exclude-symbols-embedded.s | 24 ++++++++++++++++++++++++
|
||||
6 files changed, 46 insertions(+), 4 deletions(-)
|
||||
create mode 100644 test/COFF/exclude-symbols-embedded.s
|
||||
|
||||
diff --git a/COFF/Driver.cpp b/COFF/Driver.cpp
|
||||
index 44406346dcec..11248d2faada 100644
|
||||
--- a/COFF/Driver.cpp
|
||||
+++ b/COFF/Driver.cpp
|
||||
@@ -375,6 +375,14 @@ void LinkerDriver::parseDirectives(InputFile *file) {
|
||||
for (StringRef inc : directives.includes)
|
||||
addUndefined(inc);
|
||||
|
||||
+ // Handle /exclude-symbols: in bulk.
|
||||
+ for (StringRef e : directives.excludes) {
|
||||
+ SmallVector<StringRef, 2> vec;
|
||||
+ e.split(vec, ',');
|
||||
+ for (StringRef sym : vec)
|
||||
+ excludedSymbols.insert(mangle(sym));
|
||||
+ }
|
||||
+
|
||||
// https://docs.microsoft.com/en-us/cpp/preprocessor/comment-c-cpp?view=msvc-160
|
||||
for (auto *arg : directives.args) {
|
||||
switch (arg->getOption().getID()) {
|
||||
@@ -1309,7 +1317,7 @@ void LinkerDriver::maybeExportMinGWSymbols(const opt::InputArgList &args) {
|
||||
return;
|
||||
}
|
||||
|
||||
- AutoExporter exporter;
|
||||
+ AutoExporter exporter(excludedSymbols);
|
||||
|
||||
for (auto *arg : args.filtered(OPT_wholearchive_file))
|
||||
if (Optional<StringRef> path = doFindFile(arg->getValue()))
|
||||
diff --git a/COFF/Driver.h b/COFF/Driver.h
|
||||
index 902f122d4ade..3f6f98d1a060 100644
|
||||
--- a/COFF/Driver.h
|
||||
+++ b/COFF/Driver.h
|
||||
@@ -53,6 +53,7 @@ extern COFFOptTable optTable;
|
||||
struct ParsedDirectives {
|
||||
std::vector<StringRef> exports;
|
||||
std::vector<StringRef> includes;
|
||||
+ std::vector<StringRef> excludes;
|
||||
llvm::opt::InputArgList args;
|
||||
};
|
||||
|
||||
@@ -159,6 +160,7 @@ private:
|
||||
std::vector<MemoryBufferRef> resources;
|
||||
|
||||
llvm::StringSet<> directivesExports;
|
||||
+ llvm::DenseSet<StringRef> excludedSymbols;
|
||||
|
||||
COFFLinkerContext &ctx;
|
||||
|
||||
diff --git a/COFF/DriverUtils.cpp b/COFF/DriverUtils.cpp
|
||||
index 505967f09115..ab69551034b9 100644
|
||||
--- a/COFF/DriverUtils.cpp
|
||||
+++ b/COFF/DriverUtils.cpp
|
||||
@@ -899,6 +899,9 @@ ParsedDirectives ArgParser::parseDirectives(StringRef s) {
|
||||
else if (tok.startswith_insensitive("/include:") ||
|
||||
tok.startswith_insensitive("-include:"))
|
||||
result.includes.push_back(tok.substr(strlen("/include:")));
|
||||
+ else if (tok.startswith_insensitive("/exclude-symbols:") ||
|
||||
+ tok.startswith_insensitive("-exclude-symbols:"))
|
||||
+ result.excludes.push_back(tok.substr(strlen("/exclude-symbols:")));
|
||||
else {
|
||||
// Copy substrings that are not valid C strings. The tokenizer may have
|
||||
// already copied quoted arguments for us, so those do not need to be
|
||||
diff --git a/COFF/MinGW.cpp b/COFF/MinGW.cpp
|
||||
index 190f4388902e..0689e44cc363 100644
|
||||
--- a/COFF/MinGW.cpp
|
||||
+++ b/COFF/MinGW.cpp
|
||||
@@ -23,7 +23,9 @@ using namespace llvm::COFF;
|
||||
using namespace lld;
|
||||
using namespace lld::coff;
|
||||
|
||||
-AutoExporter::AutoExporter() {
|
||||
+AutoExporter::AutoExporter(
|
||||
+ const llvm::DenseSet<StringRef> &manualExcludeSymbols)
|
||||
+ : manualExcludeSymbols(manualExcludeSymbols) {
|
||||
excludeLibs = {
|
||||
"libgcc",
|
||||
"libgcc_s",
|
||||
@@ -135,7 +137,7 @@ bool AutoExporter::shouldExport(const COFFLinkerContext &ctx,
|
||||
// disallow import symbols.
|
||||
if (!isa<DefinedRegular>(sym) && !isa<DefinedCommon>(sym))
|
||||
return false;
|
||||
- if (excludeSymbols.count(sym->getName()))
|
||||
+ if (excludeSymbols.count(sym->getName()) || manualExcludeSymbols.count(sym->getName()))
|
||||
return false;
|
||||
|
||||
for (StringRef prefix : excludeSymbolPrefixes.keys())
|
||||
diff --git a/COFF/MinGW.h b/COFF/MinGW.h
|
||||
index af40d1b5a6ec..113cd8327d28 100644
|
||||
--- a/COFF/MinGW.h
|
||||
+++ b/COFF/MinGW.h
|
||||
@@ -13,6 +13,7 @@
|
||||
#include "Symbols.h"
|
||||
#include "lld/Common/LLVM.h"
|
||||
#include "llvm/ADT/ArrayRef.h"
|
||||
+#include "llvm/ADT/DenseSet.h"
|
||||
#include "llvm/ADT/StringSet.h"
|
||||
#include "llvm/Option/ArgList.h"
|
||||
#include <vector>
|
||||
@@ -24,7 +25,7 @@ class COFFLinkerContext;
|
||||
// symbols for MinGW.
|
||||
class AutoExporter {
|
||||
public:
|
||||
- AutoExporter();
|
||||
+ AutoExporter(const llvm::DenseSet<StringRef> &manualExcludeSymbols);
|
||||
|
||||
void addWholeArchive(StringRef path);
|
||||
void addExcludedSymbol(StringRef symbol);
|
||||
@@ -35,6 +36,8 @@ public:
|
||||
llvm::StringSet<> excludeLibs;
|
||||
llvm::StringSet<> excludeObjects;
|
||||
|
||||
+ const llvm::DenseSet<StringRef> &manualExcludeSymbols;
|
||||
+
|
||||
bool shouldExport(const COFFLinkerContext &ctx, Defined *sym) const;
|
||||
};
|
||||
|
||||
diff --git a/test/COFF/exclude-symbols-embedded.s b/test/COFF/exclude-symbols-embedded.s
|
||||
new file mode 100644
|
||||
index 000000000000..9ea8ed479d20
|
||||
--- /dev/null
|
||||
+++ b/test/COFF/exclude-symbols-embedded.s
|
||||
@@ -0,0 +1,24 @@
|
||||
+// REQUIRES: x86
|
||||
+// RUN: llvm-mc -filetype=obj -triple=i686-win32-gnu %s -o %t.o
|
||||
+
|
||||
+// RUN: lld-link -lldmingw -dll -out:%t.dll %t.o -noentry
|
||||
+// RUN: llvm-readobj --coff-exports %t.dll | FileCheck --implicit-check-not=Name: %s
|
||||
+
|
||||
+// CHECK: Name:
|
||||
+// CHECK: Name: sym1
|
||||
+
|
||||
+.global _sym1
|
||||
+_sym1:
|
||||
+ ret
|
||||
+
|
||||
+.global _sym2
|
||||
+_sym2:
|
||||
+ ret
|
||||
+
|
||||
+.global _sym3
|
||||
+_sym3:
|
||||
+ ret
|
||||
+
|
||||
+.section .drectve,"yn"
|
||||
+.ascii " -exclude-symbols:sym2,unknownsym"
|
||||
+.ascii " -exclude-symbols:unkonwnsym,sym3"
|
||||
--
|
||||
2.37.1.windows.1
|
||||
|
||||
@@ -1,150 +0,0 @@
|
||||
From d1da6469f9ea9b078276ee2e098241f0440468be Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
|
||||
Date: Mon, 18 Jul 2022 23:43:02 +0300
|
||||
Subject: [PATCH] [LLD] [MinGW] Implement the --exclude-symbols option
|
||||
|
||||
This adds support for the existing GNU ld command line option, which
|
||||
allows excluding individual symbols from autoexport (when linking a
|
||||
DLL and no symbols are marked explicitly as dllexported).
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D130118
|
||||
---
|
||||
COFF/Driver.cpp | 7 +++++++
|
||||
COFF/MinGW.cpp | 4 ++++
|
||||
COFF/MinGW.h | 1 +
|
||||
COFF/Options.td | 2 ++
|
||||
MinGW/Driver.cpp | 2 ++
|
||||
MinGW/Options.td | 2 ++
|
||||
test/COFF/exclude-symbols.s | 20 ++++++++++++++++++++
|
||||
test/MinGW/driver.test | 4 ++++
|
||||
8 files changed, 42 insertions(+)
|
||||
create mode 100644 test/COFF/exclude-symbols.s
|
||||
|
||||
diff --git a/COFF/Driver.cpp b/COFF/Driver.cpp
|
||||
index 4f7b9e469668..44406346dcec 100644
|
||||
--- a/COFF/Driver.cpp
|
||||
+++ b/COFF/Driver.cpp
|
||||
@@ -1315,6 +1315,13 @@ void LinkerDriver::maybeExportMinGWSymbols(const opt::InputArgList &args) {
|
||||
if (Optional<StringRef> path = doFindFile(arg->getValue()))
|
||||
exporter.addWholeArchive(*path);
|
||||
|
||||
+ for (auto *arg : args.filtered(OPT_exclude_symbols)) {
|
||||
+ SmallVector<StringRef, 2> vec;
|
||||
+ StringRef(arg->getValue()).split(vec, ',');
|
||||
+ for (StringRef sym : vec)
|
||||
+ exporter.addExcludedSymbol(mangle(sym));
|
||||
+ }
|
||||
+
|
||||
ctx.symtab.forEachSymbol([&](Symbol *s) {
|
||||
auto *def = dyn_cast<Defined>(s);
|
||||
if (!exporter.shouldExport(ctx, def))
|
||||
diff --git a/COFF/MinGW.cpp b/COFF/MinGW.cpp
|
||||
index 7a3a3853572f..190f4388902e 100644
|
||||
--- a/COFF/MinGW.cpp
|
||||
+++ b/COFF/MinGW.cpp
|
||||
@@ -122,6 +122,10 @@ void AutoExporter::addWholeArchive(StringRef path) {
|
||||
excludeLibs.erase(libName);
|
||||
}
|
||||
|
||||
+void AutoExporter::addExcludedSymbol(StringRef symbol) {
|
||||
+ excludeSymbols.insert(symbol);
|
||||
+}
|
||||
+
|
||||
bool AutoExporter::shouldExport(const COFFLinkerContext &ctx,
|
||||
Defined *sym) const {
|
||||
if (!sym || !sym->getChunk())
|
||||
diff --git a/COFF/MinGW.h b/COFF/MinGW.h
|
||||
index 59c2581f661d..af40d1b5a6ec 100644
|
||||
--- a/COFF/MinGW.h
|
||||
+++ b/COFF/MinGW.h
|
||||
@@ -27,6 +27,7 @@ public:
|
||||
AutoExporter();
|
||||
|
||||
void addWholeArchive(StringRef path);
|
||||
+ void addExcludedSymbol(StringRef symbol);
|
||||
|
||||
llvm::StringSet<> excludeSymbols;
|
||||
llvm::StringSet<> excludeSymbolPrefixes;
|
||||
diff --git a/COFF/Options.td b/COFF/Options.td
|
||||
index 5135f4ea34af..c728279ef5cc 100644
|
||||
--- a/COFF/Options.td
|
||||
+++ b/COFF/Options.td
|
||||
@@ -45,6 +45,8 @@ def diasdkdir : P<"diasdkdir", "Set the location of the DIA SDK">;
|
||||
def entry : P<"entry", "Name of entry point symbol">;
|
||||
def errorlimit : P<"errorlimit",
|
||||
"Maximum number of errors to emit before stopping (0 = no limit)">;
|
||||
+def exclude_symbols : P<"exclude-symbols", "Exclude symbols from automatic export">,
|
||||
+ MetaVarName<"<symbol[,symbol,...]>">;
|
||||
def export : P<"export", "Export a function">;
|
||||
// No help text because /failifmismatch is not intended to be used by the user.
|
||||
def failifmismatch : P<"failifmismatch", "">;
|
||||
diff --git a/MinGW/Driver.cpp b/MinGW/Driver.cpp
|
||||
index 5920a5061d9c..37d2439c3925 100644
|
||||
--- a/MinGW/Driver.cpp
|
||||
+++ b/MinGW/Driver.cpp
|
||||
@@ -398,6 +398,8 @@ bool mingw::link(ArrayRef<const char *> argsArr, llvm::raw_ostream &stdoutOS,
|
||||
add("-delayload:" + StringRef(a->getValue()));
|
||||
for (auto *a : args.filtered(OPT_wrap))
|
||||
add("-wrap:" + StringRef(a->getValue()));
|
||||
+ for (auto *a : args.filtered(OPT_exclude_symbols))
|
||||
+ add("-exclude-symbols:" + StringRef(a->getValue()));
|
||||
|
||||
std::vector<StringRef> searchPaths;
|
||||
for (auto *a : args.filtered(OPT_L)) {
|
||||
diff --git a/MinGW/Options.td b/MinGW/Options.td
|
||||
index bfdd4af28800..cc94b93e388a 100644
|
||||
--- a/MinGW/Options.td
|
||||
+++ b/MinGW/Options.td
|
||||
@@ -62,6 +62,8 @@ def enable_stdcall_fixup: F<"enable-stdcall-fixup">,
|
||||
defm entry: Eq<"entry", "Name of entry point symbol">, MetaVarName<"<entry>">;
|
||||
def exclude_all_symbols: F<"exclude-all-symbols">,
|
||||
HelpText<"Don't automatically export any symbols">;
|
||||
+defm exclude_symbols: Eq<"exclude-symbols",
|
||||
+ "Exclude symbols from automatic export">, MetaVarName<"<symbol[,symbol,...]>">;
|
||||
def export_all_symbols: F<"export-all-symbols">,
|
||||
HelpText<"Export all symbols even if a def file or dllexport attributes are used">;
|
||||
defm fatal_warnings: B<"fatal-warnings",
|
||||
diff --git a/test/COFF/exclude-symbols.s b/test/COFF/exclude-symbols.s
|
||||
new file mode 100644
|
||||
index 000000000000..cd358712382d
|
||||
--- /dev/null
|
||||
+++ b/test/COFF/exclude-symbols.s
|
||||
@@ -0,0 +1,20 @@
|
||||
+// REQUIRES: x86
|
||||
+// RUN: llvm-mc -filetype=obj -triple=i686-win32-gnu %s -o %t.o
|
||||
+
|
||||
+// RUN: lld-link -lldmingw -dll -out:%t.dll %t.o -noentry -exclude-symbols:sym2,unknownsym -exclude-symbols:unknownsym,sym3
|
||||
+// RUN: llvm-readobj --coff-exports %t.dll | FileCheck --implicit-check-not=Name: %s
|
||||
+
|
||||
+// CHECK: Name:
|
||||
+// CHECK: Name: sym1
|
||||
+
|
||||
+.global _sym1
|
||||
+_sym1:
|
||||
+ ret
|
||||
+
|
||||
+.global _sym2
|
||||
+_sym2:
|
||||
+ ret
|
||||
+
|
||||
+.global _sym3
|
||||
+_sym3:
|
||||
+ ret
|
||||
diff --git a/test/MinGW/driver.test b/test/MinGW/driver.test
|
||||
index c67717d1a000..9c56bfa42f6b 100644
|
||||
--- a/test/MinGW/driver.test
|
||||
+++ b/test/MinGW/driver.test
|
||||
@@ -321,6 +321,10 @@ RUN: ld.lld -### -m i386pep foo.o -wrap foo1 --wrap foo2 2>&1 | FileCheck -check
|
||||
RUN: ld.lld -### -m i386pep foo.o -wrap=foo1 --wrap=foo2 2>&1 | FileCheck -check-prefix WRAP %s
|
||||
WRAP: -wrap:foo1 -wrap:foo2
|
||||
|
||||
+RUN: ld.lld -### -m i386pep foo.o -exclude-symbols sym1,sym2 --exclude-symbols sym3 2>&1 | FileCheck -check-prefix EXCLUDE_SYMBOLS %s
|
||||
+RUN: ld.lld -### -m i386pep foo.o -exclude-symbols=sym1,sym2 --exclude-symbols=sym3 2>&1 | FileCheck -check-prefix EXCLUDE_SYMBOLS %s
|
||||
+EXCLUDE_SYMBOLS: -exclude-symbols:sym1,sym2 -exclude-symbols:sym3
|
||||
+
|
||||
RUN: ld.lld -### -m i386pep foo.o 2>&1 | FileCheck -check-prefix DEMANGLE %s
|
||||
RUN: ld.lld -### -m i386pep foo.o -demangle 2>&1 | FileCheck -check-prefix DEMANGLE %s
|
||||
RUN: ld.lld -### -m i386pep foo.o --demangle 2>&1 | FileCheck -check-prefix DEMANGLE %s
|
||||
--
|
||||
2.37.1.windows.1
|
||||
|
||||
@@ -1,49 +0,0 @@
|
||||
From 3e7a8aab759a9bdf90f35a60ea6e96ec64e36cb9 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
|
||||
Date: Tue, 15 Mar 2022 13:30:35 +0200
|
||||
Subject: [PATCH] [clang-tidy] Don't try to build CTTestTidyModule for Windows
|
||||
with dylibs
|
||||
|
||||
In MinGW mode, it's possible to build LLVM/Clang with
|
||||
LLVM_LINK_LLVM_DYLIB (which implicitly enables plugins too). Other
|
||||
existing ways of building plugins on Windows is to build with
|
||||
LLVM_EXPORT_SYMBOLS_FOR_PLUGINS, where each executable exports its
|
||||
symbols.
|
||||
|
||||
With LLVM_LINK_LLVM_DYLIB, we can't generally skip building plugins
|
||||
even if they are set up with PLUGIN_TOOL, as some plugins (e.g.
|
||||
under clang/examples) set up that way do build properly (as
|
||||
they manually call clang_target_link_libraries, which links in the
|
||||
libclang-cpp.dll dylib).
|
||||
|
||||
For CTTestTidyModule, there's no corresponding dylib that would
|
||||
provide the same exports.
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D121687
|
||||
---
|
||||
test/CMakeLists.txt | 12 +++++++-----
|
||||
1 file changed, 7 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
|
||||
index 170e5f8bd197d..26aece9cf337e 100644
|
||||
--- a/test/CMakeLists.txt
|
||||
+++ b/test/CMakeLists.txt
|
||||
@@ -81,11 +81,13 @@ foreach(dep ${LLVM_UTILS_DEPS})
|
||||
endforeach()
|
||||
|
||||
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
|
||||
- llvm_add_library(
|
||||
- CTTestTidyModule
|
||||
- MODULE clang-tidy/CTTestTidyModule.cpp
|
||||
- PLUGIN_TOOL clang-tidy
|
||||
- DEPENDS clang-tidy-headers)
|
||||
+ if (NOT WIN32 AND NOT LLVM_LINK_LLVM_DYLIB)
|
||||
+ llvm_add_library(
|
||||
+ CTTestTidyModule
|
||||
+ MODULE clang-tidy/CTTestTidyModule.cpp
|
||||
+ PLUGIN_TOOL clang-tidy
|
||||
+ DEPENDS clang-tidy-headers)
|
||||
+ endif()
|
||||
|
||||
if(CLANG_BUILT_STANDALONE)
|
||||
# LLVMHello library is needed below
|
||||
@@ -22,8 +22,11 @@ pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
$( (( _clangprefix )) && echo "${MINGW_PACKAGE_PREFIX}-gcc-compat" )
|
||||
"${MINGW_PACKAGE_PREFIX}-lld"
|
||||
"${MINGW_PACKAGE_PREFIX}-llvm")
|
||||
pkgver=14.0.6
|
||||
pkgrel=6
|
||||
_version=15.0.0
|
||||
_rc=""
|
||||
_tag=llvmorg-${_version}${_rc}
|
||||
pkgver=${_version}${_rc/-/}
|
||||
pkgrel=1
|
||||
pkgdesc="C language family frontend for LLVM (mingw-w64)"
|
||||
arch=('any')
|
||||
mingw_arch=('mingw32' 'mingw64' 'ucrt64' 'clang64' 'clang32' 'clangarm64')
|
||||
@@ -41,70 +44,65 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
"${MINGW_PACKAGE_PREFIX}-clang")
|
||||
$((( _clangprefix )) && echo \
|
||||
"${MINGW_PACKAGE_PREFIX}-compiler-rt" \
|
||||
"${MINGW_PACKAGE_PREFIX}-libc++")
|
||||
"${MINGW_PACKAGE_PREFIX}-libc++" \
|
||||
"${MINGW_PACKAGE_PREFIX}-libc++abi")
|
||||
$([[ "$_compiler" == "gcc" ]] && echo \
|
||||
"${MINGW_PACKAGE_PREFIX}-gcc")
|
||||
"git"
|
||||
)
|
||||
options=('!debug' 'strip')
|
||||
_url=https://github.com/llvm/llvm-project/releases/download/llvmorg-${pkgver}
|
||||
# libunwind: # https://bugs.llvm.org/show_bug.cgi?id=49228
|
||||
_url=https://github.com/llvm/llvm-project/releases/download/${_tag}
|
||||
# libunwind: https://github.com/llvm/llvm-project/issues/48572
|
||||
source=("${_url}/llvm-${pkgver}.src.tar.xz"{,.sig}
|
||||
"${_url}/clang-${pkgver}.src.tar.xz"{,.sig}
|
||||
"${_url}/clang-tools-extra-${pkgver}.src.tar.xz"{,.sig}
|
||||
"${_url}/compiler-rt-${pkgver}.src.tar.xz"{,.sig}
|
||||
"${_url}/lld-${pkgver}.src.tar.xz"{,.sig}
|
||||
"${_url}/libunwind-${pkgver}.src.tar.xz"{,.sig}
|
||||
"${_url}/cmake-${pkgver}.src.tar.xz"{,.sig}
|
||||
"0001-Fix-GetHostTriple-for-mingw-w64-in-msys.patch"
|
||||
"0002-Revert-CMake-try-creating-symlink-first-on-windows.patch"
|
||||
"0003-add-pthread-as-system-lib-for-mingw.patch"
|
||||
"0004-enable-emutls-for-mingw.patch"
|
||||
"0005-export-out-of-tree-mlir-targets.patch"
|
||||
"0006-lldb-Fix-building-standalone-LLDB-on-Windows.patch"
|
||||
"0007-MinGW-Don-t-currently-set-visibility-hidden-when-bui.patch"
|
||||
"0008-COFF-Emit-embedded-exclude-symbols-directives-for-hi.patch"
|
||||
"0009-Use-hidden-visibility-when-building-for-MinGW-with-Clang.patch"
|
||||
"0101-link-pthread-with-mingw.patch"
|
||||
"0102-fix-emulated-tls.patch"
|
||||
"0301-LLD-COFF-Add-support-for-a-new-mingw-specific-embedd.patch"
|
||||
"0302-LLD-MinGW-Implement-the-exclude-symbols-option.patch"
|
||||
"0303-ignore-new-bfd-options.patch"
|
||||
"0401-Do-not-try-to-build-CTTestTidyModule-for-Windows-with-dylibs.patch")
|
||||
"0303-ignore-new-bfd-options.patch")
|
||||
# Some patch notes :)
|
||||
#0001-0099 -> llvm
|
||||
#0101-0199 -> clang
|
||||
#0201-0299 -> rt
|
||||
#0301-0399 -> lld
|
||||
#0401-0499 -> clang-tools-extra
|
||||
sha256sums=('050922ecaaca5781fdf6631ea92bc715183f202f9d2f15147226f023414f619a'
|
||||
sha256sums=('4cd035b665f3be72382b978543d897238c7faa13d13cdd7d573c2e93f23c10d0'
|
||||
'SKIP'
|
||||
'2b5847b6a63118b9efe5c85548363c81ffe096b66c3b3675e953e26342ae4031'
|
||||
'd29689aea6c2f882618442c74fc89a8f131dbb1cc318921fa962a82c9f70ff65'
|
||||
'SKIP'
|
||||
'7cf3b8ff56c65c4d1eae3c56883fc4a6cbc3ff9f3a1530a74d66e45d27271866'
|
||||
'a0905b2dde93d07376081ee65e3b86ce7193210e0ac20d67c58c69ce933f0944'
|
||||
'SKIP'
|
||||
'88df303840ca8fbff944e15e61c141226fe79f5d2b8e89fb024264d77841a02e'
|
||||
'9111ca0407d9e32ecf4aff4f85d9ee300e0179ab64ba7ab6db4e49b0a8a2ea3d'
|
||||
'SKIP'
|
||||
'0c28ce0496934d37d20fec96591032dd66af8d10178a45762e0e75e85cf95ad3'
|
||||
'79a5ca7e1ddf226720fae6ea83da027e365fcd91d333c87c8dc31860c8c3735a'
|
||||
'SKIP'
|
||||
'3bbe9c23c73259fe39c045dc87d0b283236ba6e00750a226b2c2aeac4a51d86b'
|
||||
'1c6fbc35ebe6a1c31a938c22fcd6b5a08e4b2ca9eaac12279010e50e3c91560c'
|
||||
'SKIP'
|
||||
'2a3096c6d00f8d2fc588243db1b6a8c283a31e28a02f7e4c435a9a27ccf88e8f'
|
||||
'SKIP'
|
||||
'eb03df53671df6627768141b3aaa76abe176a14e5e47911c97bec544387c4aff'
|
||||
'efed1bd36c0d4295d4e4439987771e004ef5d232ce6e6f345d535baab945fd23'
|
||||
'5754c357cfc17769e80d95b673d41b1e54616e2487e037d761a1ac8bb28a2849'
|
||||
'7f0c64cd87b61e894be632f180ae5291e1aa9f1d9d382608f659067eeeda7146'
|
||||
'3837bd707d3d99a742e874d5c59a1e7d5502811d6926319974c5d9db86020039'
|
||||
'cb96582194ef80a37cc184e95287920b2df5369e2e5798a64adf6f8bf1c52985'
|
||||
'51936b1a1d2a48b19cdc108944fe61cd5f1724a3312a1d2d37f3e3e841b78bc2'
|
||||
'5f57f340d398b69421f6f94de45ff45f99dc4e686bcb7e8d2a7dc85529ed5ba7'
|
||||
'5bb5e31eea8ea2c4eea56f2aae161dfde35caa9800459ae3c785a94654628e57'
|
||||
'f3bce25ac7d339cbe7a94bd1cfd2d634450c261c7a32103aba4ed5f773fd2cfc'
|
||||
'715cb8862753854b2d9256e0b70003e2d1f57083d83eaeaf5a095fc72b8a4e26'
|
||||
'3a58bd5243fb082df64c90bd9a4f00c698317f20365d11bbe30fac5dfccd215e'
|
||||
'e6c3b97f733920b0a32e889cd180dd86507bddea09e9c217cd1445c047cd4976'
|
||||
'bd40b6c84d25de5ac5877f2c83ac61d872838bc034df62e98ad16116d23744e0'
|
||||
'778e0db0a5b0657ab05e2a81d83241347a4a41af2b0f9903422f651fa58e8d40'
|
||||
'a10e5192889501c75db6a41e29df44b2af8502b3ef34c2315789563a5c8e9b85')
|
||||
'778e0db0a5b0657ab05e2a81d83241347a4a41af2b0f9903422f651fa58e8d40')
|
||||
validpgpkeys=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D' # Hans Wennborg, Google.
|
||||
'474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard
|
||||
'474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard
|
||||
'D574BD5D1D0E98895E3BF90044F2485E45D59042') # Tobias Hieta
|
||||
noextract=(clang-${pkgver}.src.tar.xz)
|
||||
|
||||
apply_patch_with_msg() {
|
||||
@@ -129,7 +127,7 @@ prepare() {
|
||||
tar -xJf ${srcdir}/clang-${pkgver}.src.tar.xz -C ${srcdir} || true
|
||||
|
||||
# Rename Directories
|
||||
for pkg in llvm clang clang-tools-extra compiler-rt lld libunwind; do
|
||||
for pkg in llvm clang clang-tools-extra compiler-rt lld libunwind cmake; do
|
||||
mv ${pkg}-$pkgver.src ${pkg}
|
||||
done
|
||||
|
||||
@@ -147,8 +145,6 @@ prepare() {
|
||||
|
||||
apply_patch_with_msg \
|
||||
"0005-export-out-of-tree-mlir-targets.patch" \
|
||||
"0006-lldb-Fix-building-standalone-LLDB-on-Windows.patch" \
|
||||
"0007-MinGW-Don-t-currently-set-visibility-hidden-when-bui.patch" \
|
||||
"0008-COFF-Emit-embedded-exclude-symbols-directives-for-hi.patch" \
|
||||
"0009-Use-hidden-visibility-when-building-for-MinGW-with-Clang.patch"
|
||||
|
||||
@@ -167,14 +163,10 @@ prepare() {
|
||||
# Patch lld
|
||||
cd "${srcdir}/lld"
|
||||
apply_patch_with_msg \
|
||||
"0301-LLD-COFF-Add-support-for-a-new-mingw-specific-embedd.patch" \
|
||||
"0302-LLD-MinGW-Implement-the-exclude-symbols-option.patch" \
|
||||
"0303-ignore-new-bfd-options.patch"
|
||||
|
||||
# Patch clang-tools-extra
|
||||
cd "${srcdir}/clang-tools-extra"
|
||||
apply_patch_with_msg \
|
||||
"0401-Do-not-try-to-build-CTTestTidyModule-for-Windows-with-dylibs.patch"
|
||||
}
|
||||
|
||||
build() {
|
||||
@@ -342,7 +334,7 @@ package_compiler-rt() {
|
||||
|
||||
DESTDIR="${pkgdir}" cmake --install "${srcdir}/build-${MSYSTEM}/projects/compiler-rt"
|
||||
mkdir -p "${pkgdir}${MINGW_PREFIX}/bin/"
|
||||
find "${pkgdir}${MINGW_PREFIX}/lib/clang/${pkgver}/lib/windows/" \
|
||||
find "${pkgdir}${MINGW_PREFIX}/lib/clang/${_version}/lib/windows/" \
|
||||
-name '*.dll' -exec mv '{}' "${pkgdir}${MINGW_PREFIX}/bin/" \;
|
||||
# remove bin dir we created if it is still empty
|
||||
rmdir "${pkgdir}${MINGW_PREFIX}/bin/" 2>/dev/null || true
|
||||
@@ -381,7 +373,8 @@ package_llvm() {
|
||||
depends=("${MINGW_PACKAGE_PREFIX}-libffi"
|
||||
"${MINGW_PACKAGE_PREFIX}-gcc-libs"
|
||||
"${MINGW_PACKAGE_PREFIX}-zlib"
|
||||
"${MINGW_PACKAGE_PREFIX}-libxml2")
|
||||
"${MINGW_PACKAGE_PREFIX}-libxml2"
|
||||
"${MINGW_PACKAGE_PREFIX}-zstd")
|
||||
|
||||
cd "${srcdir}"/llvm
|
||||
|
||||
|
||||
@@ -15,12 +15,7 @@ Legend:
|
||||
- `"0003-add-pthread-as-system-lib-for-mingw.patch"` :grey_exclamation:
|
||||
- `"0004-enable-emutls-for-mingw.patch"` :grey_exclamation:
|
||||
- `"0005-export-out-of-tree-mlir-targets.patch"` :x:
|
||||
- `"0006-lldb-Fix-building-standalone-LLDB-on-Windows.patch"` :arrow_down_small: - [https://reviews.llvm.org/D122523]
|
||||
- `"0007-MinGW-Don-t-currently-set-visibility-hidden-when-bui.patch"` :arrow_down_small:
|
||||
- `"0008-COFF-Emit-embedded-exclude-symbols-directives-for-hi.patch"` :arrow_down_small:
|
||||
- `"0009-Use-hidden-visibility-when-building-for-MinGW-with-Clang.patch"` :arrow_down_small:
|
||||
- `"0101-link-pthread-with-mingw.patch"` :grey_exclamation:
|
||||
- `"0301-LLD-COFF-Add-support-for-a-new-mingw-specific-embedd.patch"` :arrow_down_small:
|
||||
- `"0302-LLD-MinGW-Implement-the-exclude-symbols-option.patch"` :arrow_down_small:
|
||||
- `"0303-ignore-new-bfd-options.patch"` :x:
|
||||
- `"0405-Do-not-try-to-build-CTTestTidyModule-for-Windows-with-dylibs.patch"` :arrow_down_small:
|
||||
|
||||
@@ -9,7 +9,10 @@ pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}"
|
||||
"${MINGW_PACKAGE_PREFIX}-${_realname}abi"
|
||||
"${MINGW_PACKAGE_PREFIX}-libunwind")
|
||||
pkgver=14.0.6
|
||||
_version=15.0.0
|
||||
_rc=""
|
||||
_tag=llvmorg-${_version}${_rc}
|
||||
pkgver=${_version}${_rc/-/}
|
||||
pkgrel=1
|
||||
url="https://libcxx.llvm.org/"
|
||||
arch=(any)
|
||||
@@ -27,25 +30,29 @@ if [[ ${MINGW_PACKAGE_PREFIX} != *-clang-* ]]; then
|
||||
# GNU's strip breaks the library #11553
|
||||
options+=('!strip')
|
||||
fi
|
||||
_url=https://github.com/llvm/llvm-project/releases/download/llvmorg-${pkgver}
|
||||
_url=https://github.com/llvm/llvm-project/releases/download/${_tag}
|
||||
source=("${_url}/llvm-${pkgver}.src.tar.xz"{,.sig}
|
||||
"${_url}/cmake-${pkgver}.src.tar.xz"{,.sig}
|
||||
"${_url}/libcxx-${pkgver}.src.tar.xz"{,.sig}
|
||||
"${_url}/libcxxabi-${pkgver}.src.tar.xz"{,.sig}
|
||||
"${_url}/libunwind-${pkgver}.src.tar.xz"{,.sig}
|
||||
"https://raw.githubusercontent.com/llvm/llvm-project/llvmorg-${pkgver}/runtimes/CMakeLists.txt"
|
||||
"https://raw.githubusercontent.com/llvm/llvm-project/llvmorg-${pkgver}/runtimes/Components.cmake.in")
|
||||
sha256sums=('050922ecaaca5781fdf6631ea92bc715183f202f9d2f15147226f023414f619a'
|
||||
"https://raw.githubusercontent.com/llvm/llvm-project/${_tag}/runtimes/CMakeLists.txt"
|
||||
"https://raw.githubusercontent.com/llvm/llvm-project/${_tag}/runtimes/Components.cmake.in")
|
||||
sha256sums=('4cd035b665f3be72382b978543d897238c7faa13d13cdd7d573c2e93f23c10d0'
|
||||
'SKIP'
|
||||
'f7a9865e25a6c5175549e31609605767bf3478e8cdf8428be2c911838e7b683d'
|
||||
'2a3096c6d00f8d2fc588243db1b6a8c283a31e28a02f7e4c435a9a27ccf88e8f'
|
||||
'SKIP'
|
||||
'82fbe9033da986f6ff3092a9df31049b4b19cbe59a46c6ab54e0523b31550794'
|
||||
'd448b21c8994dd9f373b884651df30c367646f773c046f0538c571c95ed46b6e'
|
||||
'SKIP'
|
||||
'3bbe9c23c73259fe39c045dc87d0b283236ba6e00750a226b2c2aeac4a51d86b'
|
||||
'd07c5cf5ced4204ea607e0e0c062d7e12da70c438e94d57a491b749975f381eb'
|
||||
'SKIP'
|
||||
'37cf555e4b808a3279aeecc875154c410e3db02eb5307b43030f88f1b8ce1545'
|
||||
'1c6fbc35ebe6a1c31a938c22fcd6b5a08e4b2ca9eaac12279010e50e3c91560c'
|
||||
'SKIP'
|
||||
'a1c9ef5ee90191b64524528703de8000ee66c6f0a5bb7fe02f760e3073d32fde'
|
||||
'bc0974b6555874d3c24295fe8b99b25aea8086158ee4ab87e9a8709191cc7824')
|
||||
validpgpkeys=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D' # Hans Wennborg, Google.
|
||||
'474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard
|
||||
'474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard
|
||||
'D574BD5D1D0E98895E3BF90044F2485E45D59042') # Tobias Hieta
|
||||
noextract=(libcxx-${pkgver}.src.tar.xz)
|
||||
|
||||
prepare() {
|
||||
@@ -53,7 +60,7 @@ prepare() {
|
||||
cd "${srcdir}"
|
||||
tar -xJf ${srcdir}/libcxx-${pkgver}.src.tar.xz -C ${srcdir} || true
|
||||
# Rename Directories
|
||||
for pkg in llvm libcxx libcxxabi libunwind; do
|
||||
for pkg in llvm cmake libcxx libcxxabi libunwind; do
|
||||
mv ${pkg}-$pkgver.src ${pkg}
|
||||
done
|
||||
rm -rf runtimes && mkdir -p runtimes
|
||||
@@ -91,36 +98,9 @@ build() {
|
||||
-DLLVM_ENABLE_LLD=ON
|
||||
-DLLVM_ENABLE_RUNTIMES="libcxx;libcxxabi;libunwind")
|
||||
|
||||
# Shared
|
||||
cd ${srcdir}
|
||||
[[ -d build-shared-${MSYSTEM} ]] && rm -rf build-shared-${MSYSTEM}
|
||||
mkdir build-shared-${MSYSTEM} && cd build-shared-${MSYSTEM}
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
|
||||
cmake \
|
||||
-GNinja \
|
||||
-DCMAKE_BUILD_TYPE=${_build_type} \
|
||||
-DCMAKE_INSTALL_PREFIX=${MINGW_PREFIX} \
|
||||
-DCMAKE_SYSTEM_IGNORE_PATH=/usr/lib \
|
||||
-DLLVM_HOST_TRIPLE="${CARCH}-w64-windows-gnu" \
|
||||
-DPython3_EXECUTABLE=${MINGW_PREFIX}/bin/python.exe \
|
||||
-DPython3_FIND_REGISTRY=NEVER \
|
||||
-DPython3_ROOT_DIR=${MINGW_PREFIX} \
|
||||
-DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=OFF \
|
||||
-DLIBCXX_ENABLE_SHARED=ON \
|
||||
-DLIBCXX_ENABLE_STATIC=OFF \
|
||||
-DLIBUNWIND_ENABLE_SHARED=ON \
|
||||
-DLIBUNWIND_ENABLE_STATIC=OFF \
|
||||
"${libcxx_config[@]}" \
|
||||
-Wno-dev \
|
||||
../runtimes
|
||||
|
||||
cmake --build . -- unwind cxx
|
||||
|
||||
# Static
|
||||
cd "${srcdir}"
|
||||
[[ -d build-static-${MSYSTEM} ]] && rm -rf build-static-${MSYSTEM}
|
||||
mkdir build-static-${MSYSTEM} && cd build-static-${MSYSTEM}
|
||||
[[ -d build-${MSYSTEM} ]] && rm -rf build-${MSYSTEM}
|
||||
mkdir build-${MSYSTEM} && cd build-${MSYSTEM}
|
||||
|
||||
MSYS2_ARG_CONV_EXCL="-DCMAKE_INSTALL_PREFIX=" \
|
||||
${MINGW_PREFIX}/bin/cmake.exe \
|
||||
@@ -132,10 +112,10 @@ build() {
|
||||
-DPython3_EXECUTABLE=${MINGW_PREFIX}/bin/python.exe \
|
||||
-DPython3_FIND_REGISTRY=NEVER \
|
||||
-DPython3_ROOT_DIR=${MINGW_PREFIX} \
|
||||
-DLIBCXX_ENABLE_SHARED=OFF \
|
||||
-DLIBCXX_ENABLE_SHARED=ON \
|
||||
-DLIBCXX_ENABLE_STATIC=ON \
|
||||
-DLIBCXXABI_ENABLE_STATIC_UNWINDER=ON \
|
||||
-DLIBUNWIND_ENABLE_SHARED=OFF \
|
||||
-DLIBUNWIND_ENABLE_SHARED=ON \
|
||||
-DLIBUNWIND_ENABLE_STATIC=ON \
|
||||
"${libcxx_config[@]}" \
|
||||
-Wno-dev \
|
||||
@@ -154,8 +134,7 @@ package_libc++() {
|
||||
"${MINGW_PACKAGE_PREFIX}-libunwind" \
|
||||
|| echo "${MINGW_PACKAGE_PREFIX}-gcc-libs"))
|
||||
|
||||
DESTDIR="${pkgdir}" cmake --build "${srcdir}/build-shared-${MSYSTEM}" --target install-cxx
|
||||
DESTDIR="${pkgdir}" cmake --build "${srcdir}/build-static-${MSYSTEM}" --target install-cxx
|
||||
DESTDIR="${pkgdir}" cmake --build "${srcdir}/build-${MSYSTEM}" --target install-cxx
|
||||
}
|
||||
|
||||
package_libc++abi() {
|
||||
@@ -164,7 +143,7 @@ package_libc++abi() {
|
||||
depends=($( (( _clangprefix )) || echo \
|
||||
"${MINGW_PACKAGE_PREFIX}-gcc-libs"))
|
||||
|
||||
DESTDIR="${pkgdir}" cmake --build "${srcdir}/build-static-${MSYSTEM}" --target install-cxxabi
|
||||
DESTDIR="${pkgdir}" cmake --build "${srcdir}/build-${MSYSTEM}" --target install-cxxabi
|
||||
}
|
||||
|
||||
package_libunwind() {
|
||||
@@ -172,8 +151,7 @@ package_libunwind() {
|
||||
url='https://llvm.org/'
|
||||
depends=($( (( _clangprefix )) || echo "${MINGW_PACKAGE_PREFIX}-gcc-libs"))
|
||||
|
||||
DESTDIR="${pkgdir}" cmake --build "${srcdir}/build-shared-${MSYSTEM}" --target install-unwind
|
||||
DESTDIR="${pkgdir}" cmake --build "${srcdir}/build-static-${MSYSTEM}" --target install-unwind
|
||||
DESTDIR="${pkgdir}" cmake --build "${srcdir}/build-${MSYSTEM}" --target install-unwind
|
||||
}
|
||||
|
||||
# template start; name=mingw-w64-splitpkg-wrappers; version=1.0;
|
||||
|
||||
@@ -1,11 +0,0 @@
|
||||
--- a/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
|
||||
+++ b/source/Plugins/SymbolFile/PDB/SymbolFilePDB.cpp
|
||||
@@ -57,7 +57,7 @@
|
||||
#include "Plugins/SymbolFile/NativePDB/SymbolFileNativePDB.h"
|
||||
|
||||
#if defined(_WIN32)
|
||||
-#include "llvm/Config/config.h"
|
||||
+#include "llvm/Config/llvm-config.h"
|
||||
#endif
|
||||
|
||||
using namespace lldb;
|
||||
@@ -7,7 +7,10 @@ fi
|
||||
_realname=lldb
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=14.0.6
|
||||
_version=15.0.0
|
||||
_rc=""
|
||||
_tag=llvmorg-${_version}${_rc}
|
||||
pkgver=${_version}${_rc/-/}
|
||||
pkgrel=1
|
||||
pkgdesc="Next generation, high-performance debugger (mingw-w64)"
|
||||
url="https://lldb.llvm.org/"
|
||||
@@ -28,17 +31,16 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
"${MINGW_PACKAGE_PREFIX}-clang-tools-extra"
|
||||
"${MINGW_PACKAGE_PREFIX}-cc")
|
||||
options=('!debug' 'strip')
|
||||
_url=https://github.com/llvm/llvm-project/releases/download/llvmorg-${pkgver}
|
||||
_url=https://github.com/llvm/llvm-project/releases/download/${_tag}
|
||||
_pkgfn=$_realname-$pkgver.src
|
||||
source=($_url/$_pkgfn.tar.xz{,.sig}
|
||||
001-lldb-Fix-building-standalone-LLDB-on-Windows.patch
|
||||
002-fix-api-generator-expression.patch)
|
||||
sha256sums=('2ac41160b0bdc74bf72d4f9a3702f290f7c09998da6fb73281cc497f4ddbe130'
|
||||
sha256sums=('1086b5fae04472a006e1be620bba851ee17b9722cd2cf2ce5b557fc9d9699f11'
|
||||
'SKIP'
|
||||
'068fe864d788e5c23a6eea581478aa3060852a3ac4e8b36cb5962613add87d61'
|
||||
'ca897429775137be3d0ccaffb95010e4995aa9003c243ff795645ebac2f61fe1')
|
||||
validpgpkeys=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D' # Hans Wennborg, Google.
|
||||
'474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard
|
||||
'474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard
|
||||
'D574BD5D1D0E98895E3BF90044F2485E45D59042') # Tobias Hieta
|
||||
|
||||
apply_patch_with_msg() {
|
||||
for _patch in "$@"
|
||||
@@ -52,7 +54,6 @@ prepare() {
|
||||
cd ${srcdir}/$_pkgfn
|
||||
|
||||
apply_patch_with_msg \
|
||||
001-lldb-Fix-building-standalone-LLDB-on-Windows.patch \
|
||||
002-fix-api-generator-expression.patch
|
||||
}
|
||||
|
||||
|
||||
@@ -7,7 +7,10 @@ fi
|
||||
_realname=openmp
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=14.0.6
|
||||
_version=15.0.0
|
||||
_rc=""
|
||||
_tag=llvmorg-${_version}${_rc}
|
||||
pkgver=${_version}${_rc/-/}
|
||||
pkgrel=1
|
||||
pkgdesc="LLVM OpenMP Library (mingw-w64)"
|
||||
url="https://openmp.llvm.org/"
|
||||
@@ -22,17 +25,21 @@ makedepends=("${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
$( (( _clangprefix )) || echo "${MINGW_PACKAGE_PREFIX}-gcc-fortran")
|
||||
"${MINGW_PACKAGE_PREFIX}-uasm")
|
||||
options=('!debug' 'strip')
|
||||
_url=https://github.com/llvm/llvm-project/releases/download/llvmorg-${pkgver}
|
||||
_url=https://github.com/llvm/llvm-project/releases/download/${_tag}
|
||||
_pkgfn=$_realname-$pkgver.src
|
||||
source=($_url/$_pkgfn.tar.xz{,.sig}
|
||||
${_url}/cmake-${pkgver}.src.tar.xz{,.sig}
|
||||
"001-cast-to-make-gcc-happy.patch"
|
||||
"002-hacks-for-static-linking.patch")
|
||||
sha256sums=('4f731ff202add030d9d68d4c6daabd91d3aeed9812e6a5b4968815cfdff0eb1f'
|
||||
sha256sums=('7ee0d1c6a0426a34f102aa5c3a2c307807a4885ce347cb51fbc7e5effd6891c6'
|
||||
'SKIP'
|
||||
'2a3096c6d00f8d2fc588243db1b6a8c283a31e28a02f7e4c435a9a27ccf88e8f'
|
||||
'SKIP'
|
||||
'11352ffbe7559a7170f2abd52b3552c877fbcf8fc82cff77b421e8b130a4dd66'
|
||||
'7238f009264bc1b162b73ca3a2a0b224b65ec3ed384304f3e5464032c4c026f4')
|
||||
validpgpkeys=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D' # Hans Wennborg, Google.
|
||||
'474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard
|
||||
'474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard
|
||||
'D574BD5D1D0E98895E3BF90044F2485E45D59042') # Tobias Hieta
|
||||
|
||||
apply_patch_with_msg() {
|
||||
for _patch in "$@"
|
||||
@@ -43,8 +50,10 @@ apply_patch_with_msg() {
|
||||
}
|
||||
|
||||
prepare() {
|
||||
cd ${srcdir}/$_pkgfn
|
||||
cd "${srcdir}"
|
||||
mv cmake-$pkgver.src cmake
|
||||
|
||||
cd ${srcdir}/$_pkgfn
|
||||
if (( ! _clangprefix )); then
|
||||
apply_patch_with_msg \
|
||||
"001-cast-to-make-gcc-happy.patch"
|
||||
|
||||
@@ -7,7 +7,10 @@ fi
|
||||
_realname=polly
|
||||
pkgbase=mingw-w64-${_realname}
|
||||
pkgname=("${MINGW_PACKAGE_PREFIX}-${_realname}")
|
||||
pkgver=14.0.6
|
||||
_version=15.0.0
|
||||
_rc=""
|
||||
_tag=llvmorg-${_version}${_rc}
|
||||
pkgver=${_version}${_rc/-/}
|
||||
pkgrel=1
|
||||
pkgdesc="Polly - Polyhedral optimizations for LLVM (mingw-w64)"
|
||||
url="https://polly.llvm.org/"
|
||||
@@ -19,15 +22,25 @@ depends=("${MINGW_PACKAGE_PREFIX}-llvm")
|
||||
makedepends=("${MINGW_PACKAGE_PREFIX}-cc"
|
||||
"${MINGW_PACKAGE_PREFIX}-cmake"
|
||||
"${MINGW_PACKAGE_PREFIX}-ninja"
|
||||
"${MINGW_PACKAGE_PREFIX}-python-sphinx")
|
||||
"${MINGW_PACKAGE_PREFIX}-python-sphinx"
|
||||
$( (( _clangprefix )) && echo "${MINGW_PACKAGE_PREFIX}-libc++abi"))
|
||||
options=('!debug' 'strip')
|
||||
_url=https://github.com/llvm/llvm-project/releases/download/llvmorg-${pkgver}
|
||||
_url=https://github.com/llvm/llvm-project/releases/download/${_tag}
|
||||
_pkgfn=$_realname-$pkgver.src
|
||||
source=($_url/$_pkgfn.tar.xz{,.sig})
|
||||
sha256sums=('d4e6f58e54c0418d7b8debef0c09b77bdff6f435012be94c3edf270b89314fdd'
|
||||
source=($_url/$_pkgfn.tar.xz{,.sig}
|
||||
${_url}/cmake-${pkgver}.src.tar.xz{,.sig})
|
||||
sha256sums=('7ea79e690615475a87beb5fb99c7b7aea89dc7914cc575c3a1950da623247f44'
|
||||
'SKIP'
|
||||
'2a3096c6d00f8d2fc588243db1b6a8c283a31e28a02f7e4c435a9a27ccf88e8f'
|
||||
'SKIP')
|
||||
validpgpkeys=('B6C8F98282B944E3B0D5C2530FC3042E345AD05D' # Hans Wennborg, Google.
|
||||
'474E22316ABF4785A88C6E8EA2C794A986419D8A') # Tom Stellard
|
||||
'474E22316ABF4785A88C6E8EA2C794A986419D8A' # Tom Stellard
|
||||
'D574BD5D1D0E98895E3BF90044F2485E45D59042') # Tobias Hieta
|
||||
|
||||
prepare() {
|
||||
cd "${srcdir}"
|
||||
mv cmake-$pkgver.src cmake
|
||||
}
|
||||
|
||||
build() {
|
||||
cd ${srcdir}
|
||||
|
||||
Reference in New Issue
Block a user