Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/mosesdecoder.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenneth Heafield <github@kheafield.com>2012-08-06 20:21:16 +0400
committerKenneth Heafield <github@kheafield.com>2012-08-06 20:21:16 +0400
commit2556c8079a3a66bfe8139019769428f38a41c130 (patch)
treeec961ad019d19ae0af46071760395a7f9270682e /jam-files
parentb52ed110b02dff440512ee241211f7f0238e82d1 (diff)
When used with --static, also add <runtime-link>static.
Diffstat (limited to 'jam-files')
-rw-r--r--jam-files/sanity.jam17
1 files changed, 12 insertions, 5 deletions
diff --git a/jam-files/sanity.jam b/jam-files/sanity.jam
index 7c4cc0bec..fe7f21703 100644
--- a/jam-files/sanity.jam
+++ b/jam-files/sanity.jam
@@ -52,13 +52,21 @@ rule test_library ( name ) {
constant CLEANING : $(cleaning) ;
}
+requirements = ;
+
+FORCE-STATIC = [ option.get "static" : : "yes" ] ;
+if $(FORCE-STATIC) {
+ requirements += <runtime-link>static ;
+}
+
#Determine if a library can be compiled statically.
rule auto-shared ( name : additional * ) {
- if [ option.get "static" : : "yes" ] {
+ additional ?= "" ;
+ if [ test_flags $(additional)" -static -l"$(name) ] {
return ;
} else {
- additional ?= "" ;
- if [ test_flags $(additional)" -static -l"$(name) ] {
+ if $(FORCE-STATIC) {
+ echo "Could not statically link against lib $(name). Your build will probably fail." ;
return ;
} else {
return "<link>shared" ;
@@ -154,11 +162,10 @@ rule external-lib ( name : search-path * ) {
local ignored = @($(build-log):E=$(script)) ;
}
-requirements = ;
#Boost jam's static clang for Linux is buggy.
requirements += <cxxflags>$(cxxflags) <cflags>$(cflags) <linkflags>$(ldflags) <os>LINUX,<toolset>clang:<link>shared ;
-if ! [ option.get "without-libsegfault" : : "yes" ] && ! [ option.get "static" : : "yes" ] {
+if ! [ option.get "without-libsegfault" : : "yes" ] && ! $(FORCE-STATIC) {
#libSegFault prints a stack trace on segfault. Link against it if available.
if [ test_flags "-lSegFault" ] {
external-lib SegFault ;