commit ada9fa281b7163e65fce713d82124c99265fef41
parent 2e03ab70931ecb3ed13a678a2487a8d97d1c6460
Author: Kyle Milz <kyle@getaddrinfo.net>
Date: Tue, 29 Mar 2016 22:58:40 -0600
support linux
Diffstat:
2 files changed, 30 insertions(+), 1 deletion(-)
diff --git a/Jamrules b/Jamrules
@@ -57,3 +57,32 @@ if $(OS) = MACOSX {
-lclangSerialization
-lclangTooling ;
}
+
+if $(OS) = LINUX {
+ SHLIB_SUF = so ;
+
+ C++FLAGS = -DLLVM_VER=35 ;
+
+ PKG_CONFIG_LIBS = gl glew freetype2 ;
+ # Link directly against libestdc++ from ports
+ LINKLIBS on scv_viewer = -lstdc++ -lm -lglut ;
+
+ LINKLIBS on scv_instrument =
+ -Wl,--start-group
+ -lclangAST
+ -lclangAnalysis
+ -lclangBasic
+ -lclangDriver
+ -lclangEdit
+ -lclangFrontend
+ -lclangFrontendTool
+ -lclangLex -lclangParse
+ -lclangRewrite
+ -lclangRewriteFrontend
+ -lclangSema
+ -lclangSerialization
+ -lclangTooling
+ -Wl,--end-group
+ -lstdc++
+ -lbsd ;
+}
diff --git a/instrument/main.cc b/instrument/main.cc
@@ -81,7 +81,7 @@ instrument(int argc, char *argv[], std::vector<std::string> const &source_files)
// that will return a new MyFrontendAction object every time. To
// further customize this, we could create our own factory class.
// int ret = Tool.run(new MFAF(inst_files));
-#if LLVM_VER > 35
+#if LLVM_VER > 34
int ret = Tool.run(&(*clang::tooling::newFrontendActionFactory<InstrumentAction>()));
#else
int ret = Tool.run(clang::tooling::newFrontendActionFactory<InstrumentAction>());