diff --git a/tools/build/v2/tools/clang-darwin.jam b/tools/build/v2/tools/clang-darwin.jam index e43d933..b44fbca 100644 --- a/tools/build/v2/tools/clang-darwin.jam +++ b/tools/build/v2/tools/clang-darwin.jam @@ -118,46 +118,11 @@ actions compile.c++ flags clang-darwin ARFLAGS ; -# Default value. Mostly for the sake of clang-linux -# that inherits from gcc, but does not has the same -# logic to set the .AR variable. We can put the same -# logic in clang-linux, but that's hardly worth the trouble -# as on Linux, 'ar' is always available. -.AR = ar ; - -rule archive ( targets * : sources * : properties * ) -{ - # Always remove archive and start again. Here's rationale from - # Andre Hentz: - # - # I had a file, say a1.c, that was included into liba.a. - # I moved a1.c to a2.c, updated my Jamfiles and rebuilt. - # My program was crashing with absurd errors. - # After some debugging I traced it back to the fact that a1.o was *still* - # in liba.a - # - # Rene Rivera: - # - # Originally removing the archive was done by splicing an RM - # onto the archive action. That makes archives fail to build on NT - # when they have many files because it will no longer execute the - # action directly and blow the line length limit. Instead we - # remove the file in a different action, just before the building - # of the archive. - # - local clean.a = $(targets[1])(clean) ; - TEMPORARY $(clean.a) ; - NOCARE $(clean.a) ; - LOCATE on $(clean.a) = [ on $(targets[1]) return $(LOCATE) ] ; - DEPENDS $(clean.a) : $(sources) ; - DEPENDS $(targets) : $(clean.a) ; - common.RmTemps $(clean.a) : $(targets) ; -} +.LIBTOOL = libtool ; actions piecemeal archive { - "$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)" - "ranlib" -cs "$(<)" + "$(.LIBTOOL)" -static -o "$(<:T)" $(ARFLAGS) "$(>:T)" } flags clang-darwin.link USER_OPTIONS ;