mirror of
https://github.com/boostorg/build.git
synced 2026-02-13 12:22:17 +00:00
Adjust intel-linux inlining options for newer versions.
Fixes #2419. [SVN r52164]
This commit is contained in:
@@ -14,6 +14,7 @@ import common ;
|
||||
import errors ;
|
||||
import generators ;
|
||||
import type ;
|
||||
import numbers ;
|
||||
|
||||
feature.extend-subfeature toolset intel : platform : linux ;
|
||||
|
||||
@@ -62,7 +63,27 @@ rule init ( version ? : command * : options * )
|
||||
{
|
||||
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 @@ rule init ( version ? : command * : options * )
|
||||
|
||||
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 ;
|
||||
|
||||
Reference in New Issue
Block a user