mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-24 03:33:20 +01:00
Adds extern "C" ints to the .cpp files that use RegisterTarget, as
well as 2 files that use "Registrator"s. These are to be used by the MSVC builds, as the Win32 linker does not include libs that are otherwise unreferenced, even if global constructors in the lib have side-effects. Patch by Scott Graham! llvm-svn: 59378
This commit is contained in:
parent
bc0f4b6c9a
commit
42942c0bc5
@ -28,6 +28,13 @@ static cl::opt<bool> DisableLdStOpti("disable-arm-loadstore-opti", cl::Hidden,
|
||||
static cl::opt<bool> DisableIfConversion("disable-arm-if-conversion",cl::Hidden,
|
||||
cl::desc("Disable if-conversion pass"));
|
||||
|
||||
/// ARMTargetMachineModule - Note that this is used on hosts that cannot link
|
||||
/// in a library unless there are references into the library. In particular,
|
||||
/// it seems that it is not possible to get things to work on Win32 without
|
||||
/// this. Though it is unused, do not remove it.
|
||||
extern "C" int ARMTargetMachineModule;
|
||||
int ARMTargetMachineModule = 0;
|
||||
|
||||
// Register the target.
|
||||
static RegisterTarget<ARMTargetMachine> X("arm", "ARM");
|
||||
static RegisterTarget<ThumbTargetMachine> Y("thumb", "Thumb");
|
||||
|
@ -21,6 +21,13 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
/// AlphaTargetMachineModule - Note that this is used on hosts that cannot link
|
||||
/// in a library unless there are references into the library. In particular,
|
||||
/// it seems that it is not possible to get things to work on Win32 without
|
||||
/// this. Though it is unused, do not remove it.
|
||||
extern "C" int AlphaTargetMachineModule;
|
||||
int AlphaTargetMachineModule = 0;
|
||||
|
||||
// Register the targets
|
||||
static RegisterTarget<AlphaTargetMachine> X("alpha", "Alpha [experimental]");
|
||||
|
||||
|
@ -48,6 +48,14 @@
|
||||
#include <sstream>
|
||||
using namespace llvm;
|
||||
|
||||
/// CBackendTargetMachineModule - Note that this is used on hosts that
|
||||
/// cannot link in a library unless there are references into the
|
||||
/// library. In particular, it seems that it is not possible to get
|
||||
/// things to work on Win32 without this. Though it is unused, do not
|
||||
/// remove it.
|
||||
extern "C" int CBackendTargetMachineModule;
|
||||
int CBackendTargetMachineModule = 0;
|
||||
|
||||
// Register the target.
|
||||
static RegisterTarget<CTargetMachine> X("c", "C backend");
|
||||
|
||||
|
@ -21,6 +21,14 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
/// CellSPUTargetMachineModule - Note that this is used on hosts that
|
||||
/// cannot link in a library unless there are references into the
|
||||
/// library. In particular, it seems that it is not possible to get
|
||||
/// things to work on Win32 without this. Though it is unused, do not
|
||||
/// remove it.
|
||||
extern "C" int CellSPUTargetMachineModule;
|
||||
int CellSPUTargetMachineModule = 0;
|
||||
|
||||
namespace {
|
||||
// Register the targets
|
||||
RegisterTarget<SPUTargetMachine>
|
||||
|
@ -71,6 +71,14 @@ static cl::opt<std::string> NameToGenerate("cppfor", cl::Optional,
|
||||
cl::desc("Specify the name of the thing to generate"),
|
||||
cl::init("!bad!"));
|
||||
|
||||
/// CppBackendTargetMachineModule - Note that this is used on hosts
|
||||
/// that cannot link in a library unless there are references into the
|
||||
/// library. In particular, it seems that it is not possible to get
|
||||
/// things to work on Win32 without this. Though it is unused, do not
|
||||
/// remove it.
|
||||
extern "C" int CppBackendTargetMachineModule;
|
||||
int CppBackendTargetMachineModule = 0;
|
||||
|
||||
// Register the target.
|
||||
static RegisterTarget<CPPTargetMachine> X("cpp", "C++ backend");
|
||||
|
||||
|
@ -44,6 +44,13 @@ namespace {
|
||||
};
|
||||
}
|
||||
|
||||
/// MSILTargetMachineModule - Note that this is used on hosts that
|
||||
/// cannot link in a library unless there are references into the
|
||||
/// library. In particular, it seems that it is not possible to get
|
||||
/// things to work on Win32 without this. Though it is unused, do not
|
||||
/// remove it.
|
||||
extern "C" int MSILTargetMachineModule;
|
||||
int MSILTargetMachineModule = 0;
|
||||
|
||||
static RegisterTarget<MSILTarget> X("msil", "MSIL backend");
|
||||
|
||||
|
@ -19,6 +19,14 @@
|
||||
#include "llvm/Target/TargetMachineRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
/// MipsTargetMachineModule - Note that this is used on hosts that
|
||||
/// cannot link in a library unless there are references into the
|
||||
/// library. In particular, it seems that it is not possible to get
|
||||
/// things to work on Win32 without this. Though it is unused, do not
|
||||
/// remove it.
|
||||
extern "C" int MipsTargetMachineModule;
|
||||
int MipsTargetMachineModule = 0;
|
||||
|
||||
// Register the target.
|
||||
static RegisterTarget<MipsTargetMachine> X("mips", "Mips");
|
||||
static RegisterTarget<MipselTargetMachine> Y("mipsel", "Mipsel");
|
||||
|
@ -21,6 +21,14 @@
|
||||
|
||||
using namespace llvm;
|
||||
|
||||
/// PIC16TargetMachineModule - Note that this is used on hosts that
|
||||
/// cannot link in a library unless there are references into the
|
||||
/// library. In particular, it seems that it is not possible to get
|
||||
/// things to work on Win32 without this. Though it is unused, do not
|
||||
/// remove it.
|
||||
extern "C" int PIC16TargetMachineModule;
|
||||
int PIC16TargetMachineModule = 0;
|
||||
|
||||
namespace {
|
||||
// Register the targets
|
||||
RegisterTarget<PIC16TargetMachine> X("pic16", "PIC16 14-bit [experimental]");
|
||||
|
@ -1112,3 +1112,6 @@ namespace {
|
||||
}
|
||||
} Registrator;
|
||||
}
|
||||
|
||||
extern "C" int PowerPCAsmPrinterForceLink;
|
||||
int PowerPCAsmPrinterForceLink = 0;
|
||||
|
@ -21,6 +21,14 @@
|
||||
#include "llvm/Support/raw_ostream.h"
|
||||
using namespace llvm;
|
||||
|
||||
/// PowerPCTargetMachineModule - Note that this is used on hosts that
|
||||
/// cannot link in a library unless there are references into the
|
||||
/// library. In particular, it seems that it is not possible to get
|
||||
/// things to work on Win32 without this. Though it is unused, do not
|
||||
/// remove it.
|
||||
extern "C" int PowerPCTargetMachineModule;
|
||||
int PowerPCTargetMachineModule = 0;
|
||||
|
||||
// Register the targets
|
||||
static RegisterTarget<PPC32TargetMachine>
|
||||
X("ppc32", "PowerPC 32");
|
||||
|
@ -18,6 +18,14 @@
|
||||
#include "llvm/Target/TargetMachineRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
/// SparcTargetMachineModule - Note that this is used on hosts that
|
||||
/// cannot link in a library unless there are references into the
|
||||
/// library. In particular, it seems that it is not possible to get
|
||||
/// things to work on Win32 without this. Though it is unused, do not
|
||||
/// remove it.
|
||||
extern "C" int SparcTargetMachineModule;
|
||||
int SparcTargetMachineModule = 0;
|
||||
|
||||
// Register the target.
|
||||
static RegisterTarget<SparcTargetMachine> X("sparc", "SPARC");
|
||||
|
||||
|
@ -41,3 +41,6 @@ namespace {
|
||||
}
|
||||
} Registrator;
|
||||
}
|
||||
|
||||
extern "C" int X86AsmPrinterForceLink;
|
||||
int X86AsmPrinterForceLink = 0;
|
||||
|
@ -18,6 +18,14 @@
|
||||
#include "llvm/Target/TargetMachineRegistry.h"
|
||||
using namespace llvm;
|
||||
|
||||
/// XCoreTargetMachineModule - Note that this is used on hosts that
|
||||
/// cannot link in a library unless there are references into the
|
||||
/// library. In particular, it seems that it is not possible to get
|
||||
/// things to work on Win32 without this. Though it is unused, do not
|
||||
/// remove it.
|
||||
extern "C" int XCoreTargetMachineModule;
|
||||
int XCoreTargetMachineModule = 0;
|
||||
|
||||
namespace {
|
||||
// Register the target.
|
||||
RegisterTarget<XCoreTargetMachine> X("xcore", "XCore");
|
||||
|
Loading…
Reference in New Issue
Block a user