]> git.proxmox.com Git - ceph.git/blame - ceph/src/boost/tools/build/src/tools/intel-vxworks.jam
update sources to v12.2.3
[ceph.git] / ceph / src / boost / tools / build / src / tools / intel-vxworks.jam
CommitLineData
b32b8144
FG
1# Copyright Wind River 2017.
2# Distributed under the Boost Software License, Version 1.0.
3# (See accompanying file LICENSE_1_0.txt
4# or copy at http://www.boost.org/LICENSE_1_0.txt)
5
6import intel ;
7import feature : feature ;
8import os ;
9import toolset ;
10import toolset : flags ;
11import gcc ;
12import common ;
13import errors ;
14import generators ;
15
16feature.extend-subfeature toolset intel : platform : vxworks ;
17
18toolset.inherit-generators intel-vxworks
19 <toolset>intel <toolset-intel:platform>vxworks
20 : gcc
21 # Don't inherit PCH generators. They were not tested, and probably
22 # don't work for this compiler.
23 : gcc.mingw.link gcc.mingw.link.dll gcc.compile.c.pch gcc.compile.c++.pch
24 ;
25
26generators.override intel-vxworks.prebuilt : builtin.lib-generator ;
27generators.override intel-vxworks.prebuilt : builtin.prebuilt ;
28generators.override intel-vxworks.searched-lib-generator : searched-lib-generator ;
29
30toolset.inherit-rules intel-vxworks : gcc ;
31toolset.inherit-flags intel-vxworks : gcc
32 : <inlining>off <inlining>on <inlining>full <optimization>space
33 <warnings>off <warnings>all <warnings>on
34 <architecture>x86/<address-model>32
35 <architecture>x86/<address-model>64
36 ;
37
38if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
39{
40 .debug-configuration = true ;
41}
42
43# Initializes the intel-vxworks toolset
44# version in mandatory
45# name (default icc) is used to invoke the specified intel complier
46# compile and link options allow you to specify addition command line options for each version
47rule init ( version ? : command * : options * )
48{
49 local condition = [ common.check-init-parameters intel-vxworks
50 : version $(version) ] ;
51
52 command = [ common.get-invocation-command intel-vxworks : icc
53 : $(command) : /opt/intel_cc_80/bin ] ;
54
55 common.handle-options intel-vxworks : $(condition) : $(command) : $(options) ;
56
57 gcc.init-link-flags intel-vxworks vxworks $(condition) ;
58
59 # handle <library-path>
60 # local library-path = [ feature.get-values <library-path> : $(options) ] ;
61 # flags intel-vxworks.link USER_OPTIONS $(condition) : [ feature.get-values <dll-path> : $(options) ] ;
62
63 local root = [ feature.get-values <root> : $(options) ] ;
64 local bin ;
65 if $(command) || $(root)
66 {
67 bin ?= [ common.get-absolute-tool-path $(command[-1]) ] ;
68 root ?= $(bin:D) ;
69
70 if $(root)
71 {
72 # Libraries required to run the executable may be in either
73 # $(root)/lib (10.1 and earlier)
74 # or
75 # $(root)/lib/architecture-name (11.0 and later:
76 local lib_path = $(root)/lib $(root:P)/lib/$(bin:B) ;
77 if $(.debug-configuration)
78 {
79 ECHO notice: using intel libraries :: $(condition) :: $(lib_path) ;
80 }
81 flags intel-vxworks.link RUN_PATH $(condition) : $(lib_path) ;
82 }
83 }
84
85 local m = [ MATCH (..).* : $(version) ] ;
86 local n = [ MATCH (.)\\. : $(m) ] ;
87 if $(n) {
88 m = $(n) ;
89 }
90
91 local major = $(m) ;
92
93
94 flags intel-vxworks.compile OPTIONS $(condition)/<inlining>off : -inline-level=0 ;
95 flags intel-vxworks.compile OPTIONS $(condition)/<inlining>on : -inline-level=1 ;
96 flags intel-vxworks.compile OPTIONS $(condition)/<inlining>full : -inline-level=2 ;
97
98 flags intel-vxworks.link OPTIONS $(condition)/<runtime-link>static : [ os.environ LDFLAGS_STATIC ] ;
99 flags intel-vxworks.link OPTIONS $(condition)/<runtime-link>shared : [ os.environ LDFLAGS_DYNAMIC ] ;
100 flags intel-vxworks.compile OPTIONS $(condition)/<link>shared : -fPIC ;
101
102 local minor = [ MATCH ".*\\.(.).*" : $(version) ] ;
103
104
105}
106
107SPACE = " " ;
108
109flags intel-vxworks.compile OPTIONS <cflags> ;
110flags intel-vxworks.compile.c++ OPTIONS <cxxflags> ;
111flags intel-vxworks.compile INCLUDES <include> ;
112
113
114.cpu-type-em64t = prescott nocona core2 corei7 corei7-avx core-avx-i
115 conroe conroe-xe conroe-l allendale merom
116 merom-xe kentsfield kentsfield-xe penryn wolfdale
117 yorksfield nehalem sandy-bridge ivy-bridge haswell ;
118.cpu-type-amd64 = k8 opteron athlon64 athlon-fx k8-sse3 opteron-sse3
119 athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3 btver1 btver2 ;
120.cpu-type-x86-64 = $(.cpu-type-em64t) $(.cpu-type-amd64) ;
121
122#flags intel-vxworks.compile OPTIONS <instruction-set>$(.cpu-type-x86-64)/<address-model>32 : -m32 ; # -mcmodel=small ;
123#flags intel-vxworks.compile OPTIONS <instruction-set>$(.cpu-type-x86-64)/<address-model>64 : -m64 ; # -mcmodel=large ;
124
125flags intel-vxworks.compile.c OPTIONS <warnings>off : -w0 ;
126flags intel-vxworks.compile.c OPTIONS <warnings>on : -w1 ;
127flags intel-vxworks.compile.c OPTIONS <warnings>all : -w2 ;
128
129flags intel-vxworks.compile.c++ OPTIONS <warnings>off : -w0 ;
130flags intel-vxworks.compile.c++ OPTIONS <warnings>on : -w1 ;
131flags intel-vxworks.compile.c++ OPTIONS <warnings>all : -w2 ;
132
133actions compile.c
134{
135 "$(CONFIG_COMMAND)" -xc $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
136}
137
138actions compile.c++
139{
140 "$(CONFIG_COMMAND)" -xc++ $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
141}
142
143flags intel-vxworks ARFLAGS <archiveflags> ;
144
145.AR = ar ;
146
147rule archive ( targets * : sources * : properties * )
148{
149 # Always remove archive and start again.
150 # of the archive.
151 #
152 local clean.a = $(targets[1])(clean) ;
153 TEMPORARY $(clean.a) ;
154 NOCARE $(clean.a) ;
155 LOCATE on $(clean.a) = [ on $(targets[1]) return $(LOCATE) ] ;
156 DEPENDS $(clean.a) : $(sources) ;
157 DEPENDS $(targets) : $(clean.a) ;
158 common.RmTemps $(clean.a) : $(targets) ;
159}
160
161actions piecemeal archive
162{
163 "$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)"
164}
165
166flags intel-vxworks.link USER_OPTIONS <linkflags> ;
167
168# Declare actions for linking
169rule link ( targets * : sources * : properties * )
170{
171 SPACE on $(targets) = " " ;
172 # Serialize execution of the 'link' action, since
173 # running N links in parallel is just slower.
174 JAM_SEMAPHORE on $(targets) = <s>intel-vxworks-link-semaphore ;
175}
176
177actions link bind LIBRARIES
178{
179 "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
180}
181
182actions link.dll bind LIBRARIES
183{
184 "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
185}