Remove llvm as a build requirement

This commit is contained in:
nemerle
2015-08-13 20:46:54 +02:00
parent bc5784a8f2
commit 2543617930
3 changed files with 17 additions and 12 deletions

View File

@@ -19,7 +19,6 @@ ENDIF()
SET(CMAKE_MODULE_PATH ${PROJECT_SOURCE_DIR}/CMakeScripts;${CMAKE_MODULE_PATH})
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR})
include(cotire)
FIND_PACKAGE(LLVM)
FIND_PACKAGE(Boost)
IF(dcc_build_tests)
enable_testing()
@@ -27,7 +26,10 @@ enable_testing()
ENDIF()
IF(LLVM_EXPERIMENTAL)
FIND_PACKAGE(LLVM)
llvm_map_components_to_libnames(REQ_LLVM_LIBRARIES native mc support tablegen)
ENDIF()
INCLUDE_DIRECTORIES(
3rd_party/libdisasm
include

View File

@@ -8,6 +8,7 @@
#include <iostream>
#include <QtCore/QCoreApplication>
#include <QCommandLineParser>
#ifdef LLVM_EXPERIMENTAL
#include <llvm/Support/raw_os_ostream.h>
#include <llvm/Support/CommandLine.h>
#include <llvm/Support/TargetSelect.h>
@@ -19,10 +20,10 @@
#include <llvm/Target/TargetInstrInfo.h>
#include <llvm/MC/MCAsmInfo.h>
#include <llvm/CodeGen/MachineInstrBuilder.h>
#include <llvm/TableGen/Main.h>
#include <llvm/TableGen/TableGenBackend.h>
#include <llvm/TableGen/Record.h>
#endif
#include <QtCore/QFile>
#include "dcc.h"
@@ -41,6 +42,7 @@ static void displayTotalStats(void);
/****************************************************************************
* main
***************************************************************************/
#ifdef LLVM_EXPERIMENTAL
using namespace llvm;
bool TVisitor(raw_ostream &OS, RecordKeeper &Records)
{
@@ -65,10 +67,10 @@ bool TVisitor(raw_ostream &OS, RecordKeeper &Records)
// rec = Records.getDef("CCR");
// if(rec)
// rec->dump();
for(const auto &val : Records.getDefs())
{
//std::cout<< "Def "<<val.first<<"\n";
}
// for(auto val : Records.getDefs())
// {
// //std::cout<< "Def "<<val.first<<"\n";
// }
return false;
}
int testTblGen(int argc, char **argv)
@@ -112,6 +114,7 @@ int testTblGen(int argc, char **argv)
// exit(0);
}
#endif
void setupOptions(QCoreApplication &app) {
//[-a1a2cmsi]
QCommandLineParser parser;

View File

@@ -3,12 +3,12 @@
* (C) Cristina Cifuentes
****************************************************************************/
#include <llvm/Config/llvm-config.h>
#if( (LLVM_VERSION_MAJOR==3 ) && (LLVM_VERSION_MINOR>3) )
#include <llvm/IR/PatternMatch.h>
#else
#include <llvm/Support/PatternMatch.h>
#endif
//#include <llvm/Config/llvm-config.h>
//#if( (LLVM_VERSION_MAJOR==3 ) && (LLVM_VERSION_MINOR>3) )
//#include <llvm/IR/PatternMatch.h>
//#else
//#include <llvm/Support/PatternMatch.h>
//#endif
#include <boost/iterator/filter_iterator.hpp>
#include <cstring>
#include <deque>