2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-16 13:22:11 +00:00
Files
build/v2/tools/intel-linux.jam
Vladimir Prus f66e61dec4 Suppress some warnings
[SVN r32953]
2006-02-16 08:11:35 +00:00

102 lines
3.9 KiB
Plaintext

# Copyright (c) 2003 Michael Stevens
#
# Use, modification and distribution is subject to the Boost Software
# License Version 1.0. (See accompanying file LICENSE_1_0.txt or
# http://www.boost.org/LICENSE_1_0.txt)
import toolset ;
import feature ;
import toolset : flags ;
import intel ;
import gcc ;
import common ;
import errors ;
import generators ;
feature.extend-subfeature toolset intel : platform : linux ;
toolset.inherit-generators intel-linux
<toolset>intel <toolset-intel:platform>linux : gcc ;
generators.override intel-linux.prebuilt : builtin.lib-generator ;
generators.override intel-linux.prebuilt : builtin.prebuilt ;
generators.override intel-linux.searched-lib-generator : searched-lib-generator ;
toolset.inherit-rules intel-linux : gcc ;
toolset.inherit-flags intel-linux : gcc
: <inlining>off <inlining>on <inlining>full <optimization>space ;
# Initializes the intel-linux toolset
# version in mandatory
# name (default icc) is used to invoke the specified intellinux 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) ] ;
command = [ common.get-invocation-command intel-linux : icpc
: $(command) : /opt/intel_cc_80/bin ] ;
common.handle-options intel-linux : $(condition) : $(command) : $(options) ;
gcc.init-link-flags intel-linux gnu $(condition) ;
}
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
# Disable some pointless warnings:
# 1418 is 'external definition with no prior declaration'
# This is just pointless
# 383 is 'value copied to temporary, reference to temporary used'
# Produced too often.
# 981 is 'operands are evaluated in unspecified order'
# This triggers even on chained operator "<<"
# 444 is 'destructor for base class XX is not virtual'
# Emitted on boost::noncopyable, that has no virtual
# methods to begin with and is not a "real" base class.
# 193 is 'zero used for undefined preprocessing identifier'
# This is common thing, and used in BOOST_WORKAROUND often.
# 530 is 'inline function XXX cannot be explicitly instantiated'
# Obscure warning affecting Boost. No docs can be found.
# 810 is 'conversion from X to Y may loose significant bits'
# This is emitted even for explicit conversions
# 304 is 'access control not specified, public by default'
# Emitted on "struct foo : whatever", which is used often in Boost.MPL
# 279 is 'controlling expression is constant'
# Happens, in particular, on "assert(false)"
# 1419 is 'external declaration in primary source file'
# This is just pointless
#
# It might be good idea to disable those "remark" warnings, but
# 869 (paremeter is never referenced) seems reasonable.
flags intel-linux.compile OPTIONS
: -wd1418 -wd383 -wd981 -wd444 -wd193 -wd530 -wd810 -wd304 -wd279 ;
actions compile.c++
{
"$(CONFIG_COMMAND)" -c -xc++ $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
}
actions compile.c
{
"$(CONFIG_COMMAND)" -c -xc $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
}
actions link bind LIBRARIES
{
"$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
}
# Differ from 'link' above only by -shared.
actions link.dll bind LIBRARIES
{
"$(CONFIG_COMMAND)" -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -o "$(<)" -Wl,-h$(SPACE)-Wl,$(<[1]:D=) -shared "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
}