[llvm] r240477 - Add "-mcpu=" option to llvm-rtdyld
Petar Jovanovic
petar.jovanovic at imgtec.com
Tue Jun 23 15:52:20 PDT 2015
Author: petarj
Date: Tue Jun 23 17:52:19 2015
New Revision: 240477
URL: http://llvm.org/viewvc/llvm-project?rev=240477&view=rev
Log:
Add "-mcpu=" option to llvm-rtdyld
This patch adds the -mcpu= option to llvm-rtdyld. With this option, one
can test relocations for different types of CPUs (e.g. Mips64r6).
Patch by Vladimir Radosavljevic.
Differential Revision: http://reviews.llvm.org/D10503
Modified:
llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp
Modified: llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp?rev=240477&r1=240476&r2=240477&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp (original)
+++ llvm/trunk/tools/llvm-rtdyld/llvm-rtdyld.cpp Tue Jun 23 17:52:19 2015
@@ -82,6 +82,12 @@ Dylibs("dylib",
static cl::opt<std::string>
TripleName("triple", cl::desc("Target triple for disassembler"));
+static cl::opt<std::string>
+MCPU("mcpu",
+ cl::desc("Target a specific cpu type (-mcpu=help for details)"),
+ cl::value_desc("cpu-name"),
+ cl::init(""));
+
static cl::list<std::string>
CheckFiles("check",
cl::desc("File containing RuntimeDyld verifier checks."),
@@ -539,7 +545,7 @@ static int linkAndVerify() {
TripleName = TheTriple.getTriple();
std::unique_ptr<MCSubtargetInfo> STI(
- TheTarget->createMCSubtargetInfo(TripleName, "", ""));
+ TheTarget->createMCSubtargetInfo(TripleName, MCPU, ""));
assert(STI && "Unable to create subtarget info!");
std::unique_ptr<MCRegisterInfo> MRI(TheTarget->createMCRegInfo(TripleName));
More information about the llvm-commits
mailing list