2
0
mirror of https://github.com/boostorg/build.git synced 2026-02-14 12:42:11 +00:00
Files
build/src/tools/intel-linux.jam
Vladimir Prus d636a7174d Move 'OPTION' to the end of link action for unix toolset.
In particular, this allows to explicitly link statically to some
libs, using <linkflags> feature. In static libs are specified at
the beginning of the command line, we'll just get link errors.


[SVN r25548]
2004-10-04 07:29:49 +00:00

65 lines
2.4 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 ;
feature.extend-subfeature toolset intel : platform : linux ;
toolset.inherit-generators intel-linux
<toolset>intel <toolset-intel:platform>linux : gcc ;
toolset.inherit-flags intel-linux : gcc
: <inlining>off <inlining>on <inlining>full <optimization>space ;
toolset.inherit-rules intel-linux : gcc ;
# 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 * : compile_options * : link_options * )
{
local condition = [ common.check-init-parameters intel-linux
: version $(version) ] ;
command = [ common.get-invocation-command intel-linux : icc
: $(command) : /opt/intel_cc_80/bin ] ;
flags intel-linux CONFIG_COMMAND $(condition) : $(command) ;
flags intel-linux CONFIG_COMPILE $(condition) : $(compile_options) ;
flags intel-linux CONFIG_LINK $(condition) : $(link_options) ;
}
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
actions compile.c++
{
"$(CONFIG_COMMAND)" -c -xc++ $(CONFIG_COMPILE) $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
}
actions compile.c
{
"$(CONFIG_COMMAND)" -c -xc $(CONFIG_COMPILE) $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
}
actions link bind LIBRARIES
{
"$(CONFIG_COMMAND)" $(CONFIG_LINK) -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)" $(CONFIG_LINK) -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -o "$(<)" -Wl,-h$(SPACE)-Wl,$(<[1]:D=) -shared "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
}