From 3675413e3c9fe261f73879bd4d4394915e5de07d Mon Sep 17 00:00:00 2001 From: Edward Diener Date: Fri, 11 Jul 2014 10:48:28 -0400 Subject: [PATCH] Updated to make the setup threading more robust. --- src/tools/clang-linux_mingw.jam | 36 ++++++++------------------------- 1 file changed, 8 insertions(+), 28 deletions(-) diff --git a/src/tools/clang-linux_mingw.jam b/src/tools/clang-linux_mingw.jam index 25153753f..088909247 100644 --- a/src/tools/clang-linux_mingw.jam +++ b/src/tools/clang-linux_mingw.jam @@ -191,35 +191,15 @@ rule link.dll ( targets * : sources * : properties * ) { rule setup-threading ( targets * : sources * : properties * ) { - local threading = [ feature.get-values threading : $(properties) ] ; - if $(threading) = multi + switch $(target) { - local target = [ feature.get-values target-os : $(properties) ] ; - local option ; - local libs ; - - switch $(target) - { - case android : # No threading options, everything is in already. -# case windows : option = -mthreads ; - case windows : option = -pthread ; - case cygwin : option = -mthreads ; - case solaris : option = -pthreads ; libs = rt ; - case beos : # No threading options. - case *bsd : option = -pthread ; # There is no -lrt on BSD. - case sgi : # gcc on IRIX does not support multi-threading. - case darwin : # No threading options. - case * : option = -pthread ; libs = rt ; - } - - if $(option) - { - OPTIONS on $(targets) += $(option) ; - } - if $(libs) - { - FINDLIBS-SA on $(targets) += $(libs) ; - } + case windows : + local threading = [ feature.get-values threading : $(properties) ] ; + if $(threading) = multi + { + OPTIONS on $(targets) += -pthread ; + } + case * : gcc.setup-threading $(targets) : $(sources) : $(properties) ; } }