commit 3404ea7c7583c1eeeca14261a096c27a87f3252e
parent 2821c94e15e6fa1a7ebdf8615c8e15a74a548d03
Author: Kyle Milz <kyle@0x30.net>
Date: Thu, 4 Aug 2016 22:39:00 -0600
src: use different linker opts per platform
Diffstat:
2 files changed, 19 insertions(+), 17 deletions(-)
diff --git a/Jamrules b/Jamrules
@@ -15,9 +15,26 @@ OPTIM = $(CFLAGS) ;
C++FLAGS += -std=c++11 ;
+_CLANG_LIBS =
+ -lclangAST
+ -lclangAnalysis
+ -lclangBasic
+ -lclangDriver
+ -lclangEdit
+ -lclangFrontend
+ -lclangFrontendTool
+ -lclangLex
+ -lclangParse
+ -lclangRewrite
+ -lclangRewriteFrontend
+ -lclangSema
+ -lclangSerialization
+ -lclangTooling ;
+
if $(OS) = OPENBSD {
C++ = eg++ ;
+ CLANG_LIBS = -Wl,--start-group $(_CLANG_LIBS) -Wl,--end-group ;
PKG_CONFIG_LIBS = gl glew freetype2 ;
LINKLIBS on citrun-gl = -lestdc++ -lm -lglut ;
LINKLIBS on citrun-inst = -lestdc++ ;
@@ -26,6 +43,7 @@ if $(OS) = OPENBSD {
if $(OS) = MACOSX {
PKG_CONFIG_LIBS = glew freetype2 ;
+ CLANG_LIBS = $(_CLANG_LIBS) ;
LINKLIBS on citrun-gl = -framework OpenGL -framework GLUT -lc++ -lm ;
LINKLIBS on citrun-inst = -lc++ ;
LINKLIBS on citrun-term = -lc++ ;
@@ -33,6 +51,7 @@ if $(OS) = MACOSX {
if $(OS) = LINUX {
# llvm version is 3.5 on Debian, which is too old.
+ CLANG_LIBS = -Wl,--start-group $(_CLANG_LIBS) -Wl,--end-group ;
PKG_CONFIG_LIBS = gl glew freetype2 ;
LINKLIBS on citrun-gl = -lbsd -lstdc++ -lm -lglut ;
LINKLIBS on citrun-inst = -lstdc++ -lbsd ;
diff --git a/src/Jamfile b/src/Jamfile
@@ -66,23 +66,6 @@ ObjectC++Flags $(INST_SRCS) : -DCITRUN_LIB=$(CITRUN_LIB)
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) ;