]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/src/tools/intel-vxworks.jam
import quincy beta 17.1.0
[ceph.git] / ceph / src / boost / tools / build / src / tools / intel-vxworks.jam
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
6 import intel ;
7 import feature : feature ;
8 import os ;
9 import toolset ;
10 import toolset : flags ;
11 import gcc ;
12 import common ;
13 import errors ;
14 import generators ;
15
16 feature.extend-subfeature toolset intel : platform : vxworks ;
17
18 toolset.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
26 generators.override intel-vxworks.prebuilt : builtin.lib-generator ;
27 generators.override intel-vxworks.prebuilt : builtin.prebuilt ;
28 generators.override intel-vxworks.searched-lib-generator : searched-lib-generator ;
29
30 toolset.inherit-rules intel-vxworks : gcc ;
31 toolset.inherit-flags intel-vxworks : gcc
32 : <inlining>off <inlining>on <inlining>full <optimization>space
33 <warnings>off <warnings>all <warnings>on
34 <warnings>extra <warnings>pedantic
35 <warnings-as-errors>off <warnings-as-errors>on
36 <architecture>x86/<address-model>32
37 <architecture>x86/<address-model>64
38 ;
39
40 if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
41 {
42 .debug-configuration = true ;
43 }
44
45 # Initializes the intel-vxworks toolset
46 # version in mandatory
47 # name (default icc) is used to invoke the specified intel compiler
48 # compile and link options allow you to specify addition command line options for each version
49 rule init ( version ? : command * : options * )
50 {
51 local condition = [ common.check-init-parameters intel-vxworks
52 : version $(version) ] ;
53
54 command = [ common.get-invocation-command intel-vxworks : icc
55 : $(command) : /opt/intel_cc_80/bin ] ;
56
57 common.handle-options intel-vxworks : $(condition) : $(command) : $(options) ;
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
107 SPACE = " " ;
108
109 flags intel-vxworks.compile OPTIONS <cflags> ;
110 flags intel-vxworks.compile.c++ OPTIONS <cxxflags> ;
111 flags 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 broadwell skylake skylake-avx512 cannonlake
119 icelake-client icelake-server cascadelake cooperlake
120 tigerlake ;
121 .cpu-type-amd64 = k8 opteron athlon64 athlon-fx k8-sse3 opteron-sse3
122 athlon64-sse3 amdfam10 barcelona bdver1 bdver2 bdver3 btver1 btver2
123 znver1 znver2 ;
124 .cpu-type-x86-64 = $(.cpu-type-em64t) $(.cpu-type-amd64) ;
125
126 #flags intel-vxworks.compile OPTIONS <instruction-set>$(.cpu-type-x86-64)/<address-model>32 : -m32 ; # -mcmodel=small ;
127 #flags intel-vxworks.compile OPTIONS <instruction-set>$(.cpu-type-x86-64)/<address-model>64 : -m64 ; # -mcmodel=large ;
128
129 flags intel-vxworks.compile.c OPTIONS <warnings>off : -w0 ;
130 flags intel-vxworks.compile.c OPTIONS <warnings>on : -w1 ;
131 flags intel-vxworks.compile.c OPTIONS <warnings>all : -w2 ;
132 flags intel-vxworks.compile.c OPTIONS <warnings>extra : -w3 ;
133 flags intel-vxworks.compile.c OPTIONS <warnings>pedantic : -w3 -Wcheck ;
134 flags intel-vxworks.compile.c OPTIONS <warnings-as-errors>on : -Werror-all ;
135
136 flags intel-vxworks.compile.c++ OPTIONS <warnings>off : -w0 ;
137 flags intel-vxworks.compile.c++ OPTIONS <warnings>on : -w1 ;
138 flags intel-vxworks.compile.c++ OPTIONS <warnings>all : -w2 ;
139 flags intel-vxworks.compile.c++ OPTIONS <warnings>extra : -w3 ;
140 flags intel-vxworks.compile.c++ OPTIONS <warnings>pedantic : -w3 -Wcheck ;
141 flags intel-vxworks.compile.c++ OPTIONS <warnings-as-errors>on : -Werror-all ;
142
143 actions compile.c
144 {
145 "$(CONFIG_COMMAND)" -xc $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
146 }
147
148 actions compile.c++
149 {
150 "$(CONFIG_COMMAND)" -xc++ $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -c -o "$(<)" "$(>)"
151 }
152
153 flags intel-vxworks ARFLAGS <archiveflags> ;
154
155 .AR = ar ;
156
157 rule archive ( targets * : sources * : properties * )
158 {
159 # Always remove archive and start again.
160 # of the archive.
161 #
162 local clean.a = $(targets[1])(clean) ;
163 TEMPORARY $(clean.a) ;
164 NOCARE $(clean.a) ;
165 LOCATE on $(clean.a) = [ on $(targets[1]) return $(LOCATE) ] ;
166 DEPENDS $(clean.a) : $(sources) ;
167 DEPENDS $(targets) : $(clean.a) ;
168 common.RmTemps $(clean.a) : $(targets) ;
169 }
170
171 actions piecemeal archive
172 {
173 "$(.AR)" $(AROPTIONS) rc "$(<)" "$(>)"
174 }
175
176 flags intel-vxworks.link USER_OPTIONS <linkflags> ;
177
178 # Declare actions for linking
179 rule link ( targets * : sources * : properties * )
180 {
181 SPACE on $(targets) = " " ;
182 # Serialize execution of the 'link' action, since
183 # running N links in parallel is just slower.
184 JAM_SEMAPHORE on $(targets) = <s>intel-vxworks-link-semaphore ;
185 }
186
187 actions link bind LIBRARIES
188 {
189 "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
190 }
191
192 actions link.dll bind LIBRARIES
193 {
194 "$(CONFIG_COMMAND)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" -l$(FINDLIBS-SA) -l$(FINDLIBS-ST) $(OPTIONS)
195 }