commit 945e2e462da1a682f1bb47e3838b4194ebe8b5c9
parent 1b0b59bbda2e73593f4c51ceb9bc182edc1db7a1
Author: Kyle Milz <kyle@0x30.net>
Date: Tue, 19 Jul 2016 20:03:37 -0600
deduplicate clang libs
Diffstat:
M | Jamrules | | | 63 | ++++----------------------------------------------------------- |
M | src/Jamfile | | | 23 | +++++++++++++++++++++-- |
2 files changed, 25 insertions(+), 61 deletions(-)
diff --git a/Jamrules b/Jamrules
@@ -20,27 +20,8 @@ if $(OS) = OPENBSD {
C++FLAGS += -DLLVM_VER=38 ;
PKG_CONFIG_LIBS = gl glew freetype2 ;
- # Link directly against libestdc++ from ports
LINKLIBS on citrun-gl = -lestdc++ -lm -lglut ;
-
- LINKLIBS on citrun-inst =
- -lestdc++
- -Wl,--start-group
- -lclangAST
- -lclangAnalysis
- -lclangBasic
- -lclangDriver
- -lclangEdit
- -lclangFrontend
- -lclangFrontendTool
- -lclangLex
- -lclangParse
- -lclangRewrite
- -lclangRewriteFrontend
- -lclangSema
- -lclangSerialization
- -lclangTooling
- -Wl,--end-group ;
+ LINKLIBS on citrun-inst = -lestdc++ ;
}
if $(OS) = MACOSX {
@@ -48,25 +29,8 @@ if $(OS) = MACOSX {
C++FLAGS += -Wno-deprecated -DLLVM_VER=37 ;
PKG_CONFIG_LIBS = glew freetype2 ;
- LINKLIBS on citrun-gl = -framework OpenGL -framework GLUT ;
- LINKLIBS on citrun-gl += -lc++ -lm ;
-
- LINKLIBS on citrun-inst =
- -lc++
- -lclangAST
- -lclangAnalysis
- -lclangBasic
- -lclangDriver
- -lclangEdit
- -lclangFrontend
- -lclangFrontendTool
- -lclangLex
- -lclangParse
- -lclangRewrite
- -lclangRewriteFrontend
- -lclangSema
- -lclangSerialization
- -lclangTooling ;
+ LINKLIBS on citrun-gl = -framework OpenGL -framework GLUT -lc++ -lm ;
+ LINKLIBS on citrun-inst = -lc++ ;
}
if $(OS) = LINUX {
@@ -74,26 +38,7 @@ if $(OS) = LINUX {
PKG_CONFIG_LIBS = gl glew freetype2 ;
LINKLIBS on citrun-gl = -lbsd -lstdc++ -lm -lglut ;
-
- LINKLIBS on citrun-inst =
- -Wl,--start-group
- -lclangAST
- -lclangAnalysis
- -lclangBasic
- -lclangDriver
- -lclangEdit
- -lclangFrontend
- -lclangFrontendTool
- -lclangLex
- -lclangParse
- -lclangRewrite
- -lclangRewriteFrontend
- -lclangSema
- -lclangSerialization
- -lclangTooling
- -Wl,--end-group
- -lstdc++
- -lbsd ;
+ LINKLIBS on citrun-inst = -lstdc++ -lbsd ;
}
actions Test {
diff --git a/src/Jamfile b/src/Jamfile
@@ -58,12 +58,31 @@ Stringize demo_atlas_glsl.h : demo_atlas.glsl ;
Stringize demo_vshader_glsl.h : demo_vshader.glsl ;
Stringize demo_fshader_glsl.h : demo_fshader.glsl ;
-# Older llvm-config doesn't add -std=c++11
-ObjectC++Flags $(INST_SRCS) : -std=c++11 `llvm-config --cxxflags` ;
+ObjectC++Flags $(INST_SRCS) : `llvm-config --cxxflags` ;
ObjectC++Flags $(INST_SRCS) : -DCITRUN_LIB=$(CITRUN_LIB) -DCITRUN_PATH=$(CITRUN_PATH) ;
LINKFLAGS on citrun-inst = `llvm-config --ldflags` ;
+
+CLANG_LIBS =
+ -Wl,--start-group
+ -lclangAST
+ -lclangAnalysis
+ -lclangBasic
+ -lclangDriver
+ -lclangEdit
+ -lclangFrontend
+ -lclangFrontendTool
+ -lclangLex
+ -lclangParse
+ -lclangRewrite
+ -lclangRewriteFrontend
+ -lclangSema
+ -lclangSerialization
+ -lclangTooling
+ -Wl,--end-group ;
LLVM_LIBS = bitreader mcparser transformutils option ;
+
+LINKLIBS on citrun-inst += $(CLANG_LIBS) ;
LINKLIBS on citrun-inst += `llvm-config --libs $(LLVM_LIBS) --system-libs` ;
Main citrun-inst : $(INST_SRCS) ;