]> git.proxmox.com Git - ceph.git/blob - ceph/src/boost/tools/build/src/tools/clang-vxworks.jam
update ceph source to reef 18.1.2
[ceph.git] / ceph / src / boost / tools / build / src / tools / clang-vxworks.jam
1 # Copyright Brian Kuhl 2017.
2 # Distributed under the Boost Software License, Version 1.0.
3 # (See accompanying file LICENSE.txt
4 # or copy at https://www.bfgroup.xyz/b2/LICENSE.txt)
5
6 import clang ;
7 import feature : feature get-values ;
8 import os ;
9 import toolset ;
10 import toolset : flags ;
11 import gcc ;
12 import common ;
13 import errors ;
14 import generators ;
15
16
17 feature.extend-subfeature toolset clang : platform : vxworks ;
18
19 toolset.inherit-generators clang-vxworks
20 <toolset>clang <toolset-clang:platform>vxworks
21 : gcc
22 # Don't inherit PCH generators. They were not tested, and probably
23 # don't work for this compiler.
24 : gcc.mingw.link gcc.mingw.link.dll gcc.compile.c.pch gcc.compile.c++.pch
25 ;
26
27 generators.override clang-vxworks.prebuilt : builtin.lib-generator ;
28 generators.override clang-vxworks.prebuilt : builtin.prebuilt ;
29 generators.override clang-vxworks.searched-lib-generator : searched-lib-generator ;
30
31
32 toolset.inherit-rules clang-vxworks : gcc ;
33 toolset.inherit-flags clang-vxworks : gcc
34 : <inlining>full
35 <architecture>x86/<address-model>32
36 <architecture>x86/<address-model>64
37 ;
38
39 if [ MATCH (--debug-configuration) : [ modules.peek : ARGV ] ]
40 {
41 .debug-configuration = true ;
42 }
43 # Initializes the clang-vxworks toolset
44 # version in optional
45 # compile and link options allow you to specify addition command line options for each version
46 rule init ( version ? : command * : options * )
47 {
48 command = [ common.get-invocation-command clang-vxworks : ccllvm
49 : $(command) ] ;
50
51 linker = [ get-values <linker> : $(options) ] ;
52 linker ?= ld ;
53
54 # Determine the version
55 local command-string = $(command:J=" ") ;
56 if $(command)
57 {
58 version ?= [ MATCH "^([0-9.]+)"
59 : [ SHELL "$(command-string) -dumpversion" ] ] ;
60 }
61
62 local condition = [ common.check-init-parameters clang-vxworks
63 : version $(version) ] ;
64
65 common.handle-options clang-vxworks : $(condition) : $(command) : $(options) ;
66
67 toolset.flags clang-vxworks.link .LD : $(linker) ;
68
69 # - Archive builder.
70 local archiver = [ feature.get-values <archiver> : $(options) ] ;
71 toolset.flags clang-vxworks.archive .AR $(condition) : $(archiver[1]) ;
72 }
73
74 SPACE = " " ;
75
76 toolset.flags clang-vxworks.compile OPTIONS <cflags> ;
77 toolset.flags clang-vxworks.compile.c++ OPTIONS <cxxflags> ;
78 toolset.flags clang-vxworks.compile INCLUDES <include> ;
79
80 # For clang, 'on' and 'full' are identical
81 toolset.flags clang-vxworks.compile OPTIONS <inlining>full : -Wno-inline ;
82
83
84 actions compile.c
85 {
86 "$(CONFIG_COMMAND)" -x c $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -include"$(FORCE_INCLUDES)" -c -o "$(<)" "$(>)"
87 }
88
89 actions compile.c++
90 {
91 "$(CONFIG_COMMAND)" -x c++ $(OPTIONS) -D$(DEFINES) -I"$(INCLUDES)" -include"$(FORCE_INCLUDES)" -c -o "$(<)" "$(>)"
92 }
93
94
95
96 # Default value. Mostly for the sake of clang-linux
97 # that inherits from gcc, but does not has the same
98 # logic to set the .AR variable. We can put the same
99 # logic in clang-linux, but that's hardly worth the trouble
100 # as on Linux, 'ar' is always available.
101 .AR = ar ;
102
103
104 actions piecemeal archive
105 {
106 "$(.AR)" $(AROPTIONS) rcu "$(<)" "$(>)"
107 }
108
109 # Declare actions for linking
110 rule link ( targets * : sources * : properties * )
111 {
112 SPACE on $(targets) = " " ;
113 }
114
115 actions link bind LIBRARIES
116 {
117 "$(.LD)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" $(START-GROUP) $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS)
118 }
119
120 actions link.dll bind LIBRARIES
121 {
122 "$(.LD)" $(USER_OPTIONS) -L"$(LINKPATH)" -o "$(<)" "$(>)" "$(LIBRARIES)" $(START-GROUP) $(FINDLIBS-ST-PFX) -l$(FINDLIBS-ST) $(FINDLIBS-SA-PFX) -l$(FINDLIBS-SA) $(END-GROUP) $(OPTIONS) -fpic -shared -non-static
123 }