2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-12 12:02:24 +00:00

Add Darwin toolset, from Christopher Currie.

[SVN r19851]
This commit is contained in:
Vladimir Prus
2003-08-29 07:33:28 +00:00
parent 6d645322e1
commit 8193ea28e2

40
src/tools/darwin.jam Normal file
View File

@@ -0,0 +1,40 @@
# Copyright (C) Christopher Currie 2003. Permission to copy, use,
# modify, sell and distribute this software is granted provided this
# copyright notice appears in all copies. This software is provided
# "as is" without express or implied warranty, and with no claim as to
# its suitability for any purpose.
# Please see http://article.gmane.org/gmane.comp.lib.boost.build/3389/
# for explanation why it's a separate toolset.
import toolset : flags ;
toolset.register darwin ;
toolset.inherit darwin : gcc ;
rule init ( )
{
}
flags darwin.link.dll OPTIONS : -Wl,-dynamic -nostartfiles -Wl,-dylib -Wl,-ldylib1.o ;
actions link bind LIBRARIES
{
$(NAME:E=g++) $(OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST)
}
actions link.dll bind LIBRARIES
{
ld -dynamic -m -r -d -o "$(<:S=.lo)" "$(>)" \
&& \
$(NAME:E=g++) $(OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(<:S=.lo)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) \
&& \
rm -f "$(<:S=.lo)"
}
actions piecemeal archive
{
ar -r -s $(ARFLAGS) "$(<:T)" "$(>:T)"
}