mirror of
https://github.com/boostorg/build.git
synced 2026-02-16 13:22:11 +00:00
Added the Intel toolset support.
[SVN r22966]
This commit is contained in:
57
v2/tools/intel-linux.jam
Normal file
57
v2/tools/intel-linux.jam
Normal file
@@ -0,0 +1,57 @@
|
||||
# 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 ;
|
||||
|
||||
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 : name ? : compile_options * : link_options * )
|
||||
{
|
||||
name ?= "icc" ;
|
||||
|
||||
feature.extend-subfeature toolset intel : version : $(version) ;
|
||||
flags intel-linux CONFIG_NAME <toolset>intel-linux-$(version) : $(name) ;
|
||||
flags intel-linux CONFIG_COMPILE <toolset>intel-linux-$(version) : $(compile_options) ;
|
||||
flags intel-linux CONFIG_LINK <toolset>intel-linux-$(version) : $(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_NAME) -c -xc++ $(CONFIG_COMPILE) $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
|
||||
}
|
||||
|
||||
actions compile.c
|
||||
{
|
||||
$(CONFIG_NAME) -c -xc $(CONFIG_COMPILE) $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
|
||||
}
|
||||
|
||||
actions link bind LIBRARIES
|
||||
{
|
||||
$(CONFIG_NAME) $(CONFIG_LINK) $(OPTIONS) -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -Wl,-rpath-link$(SPACE)-Wl,"$(RPATH_LINK)" -o "$(<)" "$(>)" "$(LIBRARIES)" -Wl,-Bdynamic -l$(FINDLIBS-SA) -Wl,-Bstatic -l$(FINDLIBS-ST) -Wl,-B$(LINK-RUNTIME)
|
||||
}
|
||||
|
||||
# Differ from 'link' above only by -shared.
|
||||
actions link.dll bind LIBRARIES
|
||||
{
|
||||
$(CONFIG_NAME) $(CONFIG_LINK) $(OPTIONS) -L"$(LINKPATH)" -Wl,-R$(SPACE)-Wl,"$(RPATH)" -o "$(<)" -Wl,-h$(SPACE)-Wl,$(<[1]:D=) -shared "$(>)" "$(LIBRARIES)" -Wl,-Bdynamic -l$(FINDLIBS-SA) -Wl,-Bstatic -l$(FINDLIBS-ST) "$(LIBRARIES)" -Wl,-Bdynamic -l$(FINDLIBS-SA) -Wl,-Bstatic -l$(FINDLIBS-ST) -Wl,-B$(LINK-RUNTIME)
|
||||
}
|
||||
117
v2/tools/intel-win.jam
Normal file
117
v2/tools/intel-win.jam
Normal file
@@ -0,0 +1,117 @@
|
||||
# Copyright Vladimir Prus 2004.
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt
|
||||
# or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
import toolset ;
|
||||
import feature ;
|
||||
import toolset : flags ;
|
||||
import os ;
|
||||
|
||||
# This is needed because the rule we import here depend on 'common'
|
||||
# That's nasty.
|
||||
import common ;
|
||||
|
||||
import intel ;
|
||||
|
||||
feature.extend-subfeature toolset intel : platform : win ;
|
||||
feature.subfeature toolset intel : base-vc ;
|
||||
|
||||
import msvc ;
|
||||
toolset.inherit-generators intel-win <toolset>intel <toolset-intel:platform>win : msvc ;
|
||||
toolset.inherit-flags intel-win : msvc ;
|
||||
toolset.inherit-rules intel-win : msvc ;
|
||||
|
||||
# Initializes the intel toolset for windows
|
||||
rule init ( version : # version is mandatory
|
||||
setup : # patch to the iclvars.bat script
|
||||
base-vc ? # VC version to emulate: either 'vc6', 'vc7' or 'vc7.1'
|
||||
# vc6 is used by default
|
||||
)
|
||||
{
|
||||
base-vc ?= vc6 ;
|
||||
feature.extend-subfeature toolset intel : base-vc : $(base-vc) ;
|
||||
|
||||
feature.extend-subfeature toolset intel : version : $(version) ;
|
||||
|
||||
check-setup $(version) : $(setup) ;
|
||||
|
||||
setup = "call \""$(setup)"\" > nul " ;
|
||||
|
||||
if [ os.name ] = NT
|
||||
{
|
||||
setup = $(setup)"
|
||||
" ;
|
||||
}
|
||||
else
|
||||
{
|
||||
setup = "cmd /S /C "$(setup)" \"&&\" " ;
|
||||
}
|
||||
|
||||
local condition = <toolset>intel-win-$(version)-$(base-vc) ;
|
||||
flags intel-win.compile .CC $(condition) : $(setup)icl ;
|
||||
flags intel-win.link .LD $(condition) : $(setup)xilink ;
|
||||
flags intel-win.archive .LD $(condition) : $(setup)xilink ;
|
||||
|
||||
local m = [ MATCH (.).* : $(version) ] ;
|
||||
local major = $(m[1]) ;
|
||||
|
||||
local C++FLAGS ;
|
||||
# Reduce the number of spurious error messages
|
||||
C++FLAGS += /Qwn5 /Qwd985 ;
|
||||
|
||||
# Enable ADL
|
||||
C++FLAGS += -Qoption,c,--arg_dep_lookup ; #"c" works for C++, too
|
||||
|
||||
if $(major) > 5
|
||||
{
|
||||
C++FLAGS += /Zc:forScope ; # Add support for correct for loop scoping
|
||||
}
|
||||
|
||||
# Add options recognized only by intel7
|
||||
if $(major) >= 7
|
||||
{
|
||||
C++FLAGS += /Qansi_alias ;
|
||||
}
|
||||
|
||||
if $(base-vc) = vc6
|
||||
{
|
||||
C++FLAGS +=
|
||||
# Emulate VC6
|
||||
/Qvc6
|
||||
|
||||
# no wchar_t support in vc6 dinkum library. Furthermore, in vc6
|
||||
# compatibility-mode, wchar_t is not a distinct type from unsigned
|
||||
# short
|
||||
-DBOOST_NO_INTRINSIC_WCHAR_T
|
||||
;
|
||||
}
|
||||
else
|
||||
{
|
||||
if $(major) > 5
|
||||
{
|
||||
# Add support for wchar_t
|
||||
C++FLAGS += /Zc:wchar_t
|
||||
# Tell the dinkumware library about it.
|
||||
-D_NATIVE_WCHAR_T_DEFINED
|
||||
;
|
||||
}
|
||||
}
|
||||
if $(base-vc)
|
||||
{
|
||||
C++FLAGS += /Q$(base-vc) ;
|
||||
}
|
||||
flags intel-win CFLAGS $(condition) : $(C++FLAGS) ;
|
||||
|
||||
}
|
||||
|
||||
rule check-setup ( version : setup )
|
||||
{
|
||||
if ! [ GLOB $(setup:D) : $(setup:D=) ]
|
||||
{
|
||||
ECHO warning: toolset intel-win $(version) initialization: ;
|
||||
ECHO warning: couldn't find compiler ;
|
||||
}
|
||||
}
|
||||
|
||||
flags intel-win.link LIBRARY_OPTION <toolset>intel : "" ;
|
||||
31
v2/tools/intel.jam
Normal file
31
v2/tools/intel.jam
Normal file
@@ -0,0 +1,31 @@
|
||||
# Copyright Vladimir Prus 2004.
|
||||
# Distributed under the Boost Software License, Version 1.0.
|
||||
# (See accompanying file LICENSE_1_0.txt
|
||||
# or copy at http://www.boost.org/LICENSE_1_0.txt)
|
||||
|
||||
# This is a generic 'intel' toolset. Depending on the current
|
||||
# system, it forwards either to 'intel-linux' or 'intel-win'
|
||||
# modules.
|
||||
|
||||
import feature ;
|
||||
import os ;
|
||||
import toolset ;
|
||||
|
||||
feature.extend toolset : intel ;
|
||||
feature.subfeature toolset intel : platform : : propagated link-incompatible ;
|
||||
feature.subfeature toolset intel : version : : propagated ;
|
||||
|
||||
rule init ( * : * )
|
||||
{
|
||||
if [ os.name ] = LINUX
|
||||
{
|
||||
toolset.using intel-linux :
|
||||
$(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
|
||||
}
|
||||
else
|
||||
{
|
||||
toolset.using intel-win :
|
||||
$(1) : $(2) : $(3) : $(4) : $(5) : $(6) : $(7) : $(8) : $(9) ;
|
||||
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user