From f31980afe729b394cd8ace5fcd29026d99a49a9b Mon Sep 17 00:00:00 2001 From: Vladimir Prus Date: Tue, 22 Mar 2005 08:06:02 +0000 Subject: [PATCH] Serialize execution of gcc.link.* actions when -j option is specifying. Executing link actions in parallel hardly speeds up anything. [SVN r27764] --- v2/tools/gcc.jam | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/v2/tools/gcc.jam b/v2/tools/gcc.jam index 3355b5d55..c0ec7641c 100644 --- a/v2/tools/gcc.jam +++ b/v2/tools/gcc.jam @@ -257,6 +257,11 @@ rule init-link-flags ( toolset linker condition ) rule link ( targets * : sources * : properties * ) { SPACE on $(targets) = " " ; + # Serialize execution of the 'link' action, since + # running N links in parallel is just slower. + # For now, serialize only gcc links, it might be a good + # idea to serialize all links. + JAM_SEMAPHORE on $(targets) = gcc-link-semaphore ; } actions link bind LIBRARIES @@ -291,6 +296,7 @@ actions piecemeal archive rule link.dll ( targets * : sources * : properties * ) { SPACE on $(targets) = " " ; + JAM_SEMAPHORE on $(targets) = gcc-link-semaphore ; } # Differ from 'link' above only by -shared.