Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r61684 - trunk/tools/build/v2/tools
From: grafikrobot_at_[hidden]
Date: 2010-04-29 16:21:15


Author: grafik
Date: 2010-04-29 16:21:14 EDT (Thu, 29 Apr 2010)
New Revision: 61684
URL: http://svn.boost.org/trac/boost/changeset/61684

Log:
Add a force-load dependency feature to allow for cases where the linker removes 'unused' symbols as is common in the linking model of Apple's Objective C
Text files modified:
   trunk/tools/build/v2/tools/darwin.jam | 12 +++++++++---
   1 files changed, 9 insertions(+), 3 deletions(-)

Modified: trunk/tools/build/v2/tools/darwin.jam
==============================================================================
--- trunk/tools/build/v2/tools/darwin.jam (original)
+++ trunk/tools/build/v2/tools/darwin.jam 2010-04-29 16:21:14 EDT (Thu, 29 Apr 2010)
@@ -3,7 +3,7 @@
 # Copyright 2003, 2004, 2005, 2006 Vladimir Prus
 # Copyright 2005-2007 Mat Marcus
 # Copyright 2005-2007 Adobe Systems Incorporated
-# Copyright 2007-2009 Rene Rivera
+# Copyright 2007-2010 Rene Rivera
 # Distributed under the Boost Software License, Version 1.0.
 # (See accompanying file LICENSE_1_0.txt or http://www.boost.org/LICENSE_1_0.txt)
 
@@ -30,6 +30,9 @@
 ## The minimal MacOSX version to target.
 feature macosx-version-min : : propagated optional ;
 
+## A dependency, that is forced to be included in the link.
+feature force-load : : free dependency incidental ;
+
 #############################################################################
 
 if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
@@ -484,6 +487,9 @@
 # Add the framework names to use.
 flags darwin.link FRAMEWORK <framework> ;
 
+#
+flags darwin.link FORCE_LOAD <force-load> ;
+
 # This is flag is useful for debugging the link step
 # uncomment to see what libtool is doing under the hood
 #~ flags darwin.link.dll OPTIONS : -Wl,-v ;
@@ -519,9 +525,9 @@
 # binaries, at least on OS X 10.5.5, see:
 # http://svn.boost.org/trac/boost/ticket/2347
 # So we pass -S -x.
-actions link bind LIBRARIES
+actions link bind LIBRARIES FORCE_LOAD
 {
- "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(FRAMEWORK_PATH) -framework$(_)$(FRAMEWORK:D=:S=) $(OPTIONS) $(USER_OPTIONS)
+ "$(CONFIG_COMMAND)" -L"$(LINKPATH)" -o "$(<)" "$(>)" -Wl,-force_load$(_)"$(FORCE_LOAD)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(FRAMEWORK_PATH) -framework$(_)$(FRAMEWORK:D=:S=) $(OPTIONS) $(USER_OPTIONS)
     $(NEED_STRIP)"$(.STRIP)" $(NEED_STRIP)-S $(NEED_STRIP)-x $(NEED_STRIP)"$(<)"
 }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk