1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 10:42:39 +01:00

Provide anchor for compiler extensions

This patch is cherry-picked from 04b0a4e22e3b4549f9d241f8a9f37eebecb62a31, and
amended to prevent an undefined reference to `llvm::EnableABIBreakingChecks'

(cherry picked from commit 38778e1087b2825e91b07ce4570c70815b49dcdc)
This commit is contained in:
Serge Guelton 2020-06-25 05:57:01 -04:00 committed by Hans Wennborg
parent 2a92db2e3e
commit df4269f308
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