2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-13 12:22:17 +00:00

Updates to the intel-linux toolset for newer version of the compiler; namely,

fix the default search paths for intel-linux 8.1, 9.0, 9.1, 10.1, 11.0, 11.1
and 12.0. Also, use the -Os flag for intel 11 and intel 12 - previously this 
flag was not available.



[SVN r68826]
This commit is contained in:
Bryce Adelstein-Lelbach
2011-02-13 09:43:49 +00:00
parent e174bde510
commit 6bb250d632

View File

@@ -1,4 +1,5 @@
# Copyright (c) 2003 Michael Stevens
# Copyright (c) 2011 Bryce Lelbach
#
# Use, modification and distribution is subject to the Boost Software
# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
@@ -44,15 +45,55 @@ if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
# Initializes the intel-linux toolset
# version in mandatory
# name (default icc) is used to invoke the specified intellinux complier
# name (default icpc) is used to invoke the specified intel-linux complier
# compile and link options allow you to specify addition command line options for each version
rule init ( version ? : command * : options * )
{
local condition = [ common.check-init-parameters intel-linux
: version $(version) ] ;
if $(.debug-configuration)
{
ECHO "notice: intel-linux version is" $(version) ;
}
local default_path ;
# Intel C++ Composer XE 2011 for Linux, aka Intel C++ Compiler XE 12.0,
# aka intel-linux-12.0. In this version, Intel thankfully decides to install
# to a sane 'intel' folder in /opt.
if [ MATCH "(12[.]0|12)" : $(version) ]
{ default_path = /opt/intel/bin ; }
# Intel C++ Compiler 11.1.
else if [ MATCH "(11[.]1)" : $(version) ]
{ default_path = /opt/intel_cce_11.1.064.x86_64/bin ; }
# Intel C++ Compiler 11.0.
else if [ MATCH "(11[.]0|11)" : $(version) ]
{ default_path = /opt/intel_cce_11.0.074.x86_64/bin ; }
# Intel C++ Compiler 10.1.
else if [ MATCH "(10[.]1)" : $(version) ]
{ default_path = /opt/intel_cce_10.1.013_x64/bin ; }
# Intel C++ Compiler 9.1.
else if [ MATCH "(9[.]1)" : $(version) ]
{ default_path = /opt/intel_cc_91/bin ; }
# Intel C++ Compiler 9.0.
else if [ MATCH "(9[.]0|9)" : $(version) ]
{ default_path = /opt/intel_cc_90/bin ; }
# Intel C++ Compiler 8.1.
else if [ MATCH "(8[.]1)" : $(version) ]
{ default_path = /opt/intel_cc_81/bin ; }
# Intel C++ Compiler 8.0 - this used to be the default, so now it's the
# fallback.
else
{ default_path = /opt/intel_cc_80/bin ; }
if $(.debug-configuration)
{
ECHO "notice: default search path for intel-linux is" $(default_path) ;
}
command = [ common.get-invocation-command intel-linux : icpc
: $(command) : /opt/intel_cc_80/bin ] ;
: $(command) : $(default_path) ] ;
common.handle-options intel-linux : $(condition) : $(command) : $(options) ;
@@ -77,12 +118,24 @@ rule init ( version ? : command * : options * )
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" ;
flags intel-linux.compile OPTIONS $(condition)/<optimization>space : "-O1" ;
flags intel-linux.compile OPTIONS $(condition)/<optimization>speed : "-O3 -ip" ;
}
else
else if $(major) && [ numbers.less $(major) 11 ]
{
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" ;
flags intel-linux.compile OPTIONS $(condition)/<optimization>space : "-O1" ;
flags intel-linux.compile OPTIONS $(condition)/<optimization>speed : "-O3 -ip" ;
}
else # newer version of intel do have -Os (at least 11+, don't know about 10)
{
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" ;
flags intel-linux.compile OPTIONS $(condition)/<optimization>space : "-Os" ;
flags intel-linux.compile OPTIONS $(condition)/<optimization>speed : "-O3 -ip" ;
}
if $(root)
@@ -103,9 +156,6 @@ rule init ( version ? : command * : options * )
SPACE = " " ;
flags intel-linux.compile OPTIONS <optimization>space : "-O1" ; # no specific space optimization flag in icc
flags intel-linux.compile OPTIONS <optimization>speed : "-O3 -ip" ; # no specific space optimization flag in icc
flags intel-linux.compile OPTIONS <warnings>off : -w0 ;
flags intel-linux.compile OPTIONS <warnings>on : -w1 ;
flags intel-linux.compile OPTIONS <warnings>all : -w2 ;