Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r52164 - trunk/tools/build/v2/tools
From: ghost_at_[hidden]
Date: 2009-04-04 03:29:32


Author: vladimir_prus
Date: 2009-04-04 03:29:30 EDT (Sat, 04 Apr 2009)
New Revision: 52164
URL: http://svn.boost.org/trac/boost/changeset/52164

Log:
Adjust intel-linux inlining options for newer versions.
Fixes #2419.

Text files modified:
   trunk/tools/build/v2/tools/intel-linux.jam | 26 ++++++++++++++++++++++----
   1 files changed, 22 insertions(+), 4 deletions(-)

Modified: trunk/tools/build/v2/tools/intel-linux.jam
==============================================================================
--- trunk/tools/build/v2/tools/intel-linux.jam (original)
+++ trunk/tools/build/v2/tools/intel-linux.jam 2009-04-04 03:29:30 EDT (Sat, 04 Apr 2009)
@@ -14,6 +14,7 @@
 import errors ;
 import generators ;
 import type ;
+import numbers ;
 
 feature.extend-subfeature toolset intel : platform : linux ;
 
@@ -62,7 +63,27 @@
     {
         bin ?= [ common.get-absolute-tool-path $(command[-1]) ] ;
         root ?= $(bin:D) ;
-
+
+ local command-string = $(command:J=" ") ;
+ local version-output = [ SHELL "$(command-string) --version" ] ;
+ local real-version = [ MATCH "([0-9.]+)" : $(version-output) ] ;
+ local major = [ MATCH "([0-9]+).*" : $(real-version) ] ;
+
+ # If we failed to determine major version, use the behaviour for
+ # the current compiler.
+ if $(major) && [ numbers.less $(major) 10 ]
+ {
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>off : "-Ob0" ;
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>on : "-Ob1" ;
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>full : "-Ob2" ;
+ }
+ else
+ {
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>off : "-inline-level=0" ;
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>on : "-inline-level=1" ;
+ flags intel-linux.compile OPTIONS $(condition)/<inlining>full : "-inline-level=2" ;
+ }
+
         if $(root)
         {
             # Libraries required to run the executable may be in either
@@ -81,9 +102,6 @@
 
 SPACE = " " ;
 
-flags intel-linux.compile OPTIONS <inlining>off : "-Ob0" ;
-flags intel-linux.compile OPTIONS <inlining>on : "-Ob1" ;
-flags intel-linux.compile OPTIONS <inlining>full : "-Ob2" ;
 flags intel-linux.compile OPTIONS <optimization>space : "-O1" ; # no specific space optimization flag in icc
 
 flags intel-linux.compile OPTIONS <warnings>off : -w0 ;


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