1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-25 20:23:11 +01:00

Provide anchor for compiler extensions

This patch is cherry-picked from 04b0a4e22e3b4549f9d241f8a9f37eebecb62a31, and
amended to prevent an undefined reference to `llvm::EnableABIBreakingChecks'
This commit is contained in:
Serge Guelton 2020-06-25 05:57:01 -04:00 committed by serge-sans-paille
parent 063c6c1b3c
commit 602a8c1ce6
2 changed files with 16 additions and 1 deletions

View File

@ -0,0 +1,15 @@
#include "llvm/Passes/PassPlugin.h"
#define HANDLE_EXTENSION(Ext) \
llvm::PassPluginLibraryInfo get##Ext##PluginInfo();
#include "llvm/Support/Extension.def"
namespace llvm {
namespace details {
void extensions_anchor() {
#define HANDLE_EXTENSION(Ext) \
static auto Ext = get##Ext##PluginInfo();
#include "llvm/Support/Extension.def"
}
}
}

View File

@ -18,4 +18,4 @@
type = Library
name = Extensions
parent = Libraries
required_libraries =
required_libraries = Support