]>
Commit | Line | Data |
---|---|---|
ff7c6d11 XL |
1 | // Licensed under the Apache License, Version 2.0 |
2 | // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license | |
3 | // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option. | |
4 | // All files in the project carrying such notice may not be copied, modified, or distributed | |
5 | // except according to those terms. | |
6 | use std::cell::Cell; | |
8faf50e0 | 7 | use std::collections::HashMap; |
ff7c6d11 XL |
8 | use std::env::var; |
9 | // (header name, &[header dependencies], &[library dependencies]) | |
10 | const DATA: &'static [(&'static str, &'static [&'static str], &'static [&'static str])] = &[ | |
11 | // km | |
60c5eb7d | 12 | ("d3dkmthk", &["basetsd", "d3dukmdt", "minwindef", "ntdef", "windef"], &[]), |
ff7c6d11 XL |
13 | // mmos |
14 | // shared | |
15 | ("basetsd", &[], &[]), | |
16 | ("bcrypt", &["minwindef", "winnt"], &["bcrypt"]), | |
60c5eb7d XL |
17 | ("bthdef", &["bthsdpdef", "guiddef", "minwindef", "ntdef"], &[]), |
18 | ("bthioctl", &["bthdef", "bthsdpdef", "minwindef", "ntdef", "winioctl"], &[]), | |
19 | ("bthsdpdef", &["guiddef", "minwindef", "ntdef"], &[]), | |
ff7c6d11 XL |
20 | ("bugcodes", &["ntdef"], &[]), |
21 | ("cderr", &["minwindef"], &[]), | |
22 | ("cfg", &["minwindef"], &[]), | |
23 | ("d3d9", &["basetsd", "d3d9caps", "d3d9types", "guiddef", "minwindef", "unknwnbase", "windef", "wingdi", "winnt"], &["d3d9"]), | |
24 | ("d3d9caps", &["d3d9types", "guiddef", "minwindef", "winnt"], &[]), | |
25 | ("d3d9types", &["basetsd", "guiddef", "minwindef", "windef", "winnt"], &[]), | |
60c5eb7d XL |
26 | ("d3dkmdt", &["basetsd", "minwindef", "ntdef"], &[]), |
27 | ("d3dukmdt", &["basetsd", "guiddef", "minwindef", "ntdef"], &[]), | |
ff7c6d11 XL |
28 | ("dcomptypes", &["dxgitype", "minwindef", "winnt"], &[]), |
29 | ("devguid", &[], &[]), | |
30 | ("devpkey", &["devpropdef"], &[]), | |
31 | ("devpropdef", &["guiddef", "minwindef", "winnt"], &[]), | |
32 | ("dinputd", &[], &[]), | |
33 | ("dxgi", &["basetsd", "dxgiformat", "dxgitype", "guiddef", "minwindef", "unknwnbase", "windef", "winnt"], &["dxgi"]), | |
34 | ("dxgi1_2", &["basetsd", "dxgi", "dxgiformat", "dxgitype", "guiddef", "minwinbase", "minwindef", "unknwnbase", "windef", "winnt"], &[]), | |
35 | ("dxgi1_3", &["dxgi", "dxgi1_2", "dxgiformat", "guiddef", "minwindef", "unknwnbase", "windef", "winnt"], &["dxgi"]), | |
36 | ("dxgi1_4", &["basetsd", "dxgi1_2", "dxgi1_3", "dxgiformat", "dxgitype", "guiddef", "minwindef", "unknwnbase", "winnt"], &[]), | |
37 | ("dxgi1_5", &["basetsd", "dxgi", "dxgi1_2", "dxgi1_3", "dxgi1_4", "dxgiformat", "minwindef", "unknwnbase", "winnt"], &[]), | |
0bf4aa26 | 38 | ("dxgi1_6", &["basetsd", "dxgi1_2", "dxgi1_4", "dxgi1_5", "dxgitype", "guiddef", "minwindef", "windef", "winnt"], &[]), |
ff7c6d11 XL |
39 | ("dxgiformat", &[], &[]), |
40 | ("dxgitype", &["d3d9types", "dxgiformat", "minwindef"], &[]), | |
60c5eb7d | 41 | ("enclaveapi", &["basetsd", "minwinbase", "minwindef", "ntdef", "winnt"], &["kernel32"]), |
8faf50e0 XL |
42 | ("evntprov", &["basetsd", "guiddef", "minwindef", "winnt"], &["advapi32"]), |
43 | ("evntrace", &["basetsd", "evntcons", "evntprov", "guiddef", "handleapi", "minwindef", "timezoneapi", "vadefs", "winnt", "wmistr"], &["advapi32"]), | |
ff7c6d11 XL |
44 | ("guiddef", &[], &[]), |
45 | ("hidclass", &["guiddef", "minwindef", "winioctl", "winnt"], &[]), | |
46 | ("hidpi", &["hidusage", "minwindef", "ntdef", "ntstatus", "winnt"], &["hid"]), | |
47 | ("hidsdi", &["guiddef", "hidpi", "minwindef", "winnt"], &["hid"]), | |
48 | ("hidusage", &["minwindef"], &[]), | |
f035d41b XL |
49 | ("ifdef", &["basetsd", "guiddef", "ntdef"], &[]), |
50 | ("ifmib", &["ifdef", "ipifcons", "minwindef", "ntdef"], &[]), | |
ff7c6d11 XL |
51 | ("in6addr", &["minwindef"], &[]), |
52 | ("inaddr", &["minwindef"], &[]), | |
53 | ("intsafe", &[], &[]), | |
f035d41b XL |
54 | ("ipifcons", &["minwindef"], &[]), |
55 | ("ipmib", &["ifdef", "ifmib", "minwindef", "nldef", "ntdef"], &[]), | |
56 | ("iprtrmib", &["ipmib", "minwindef", "ntdef"], &[]), | |
0bf4aa26 | 57 | ("ks", &[], &[]), |
60c5eb7d | 58 | ("ksmedia", &["minwindef"], &[]), |
ff7c6d11 XL |
59 | ("ktmtypes", &["guiddef", "minwindef", "winnt"], &[]), |
60 | ("lmcons", &["minwindef", "winnt"], &[]), | |
61 | ("minwindef", &["basetsd", "ntdef"], &[]), | |
62 | ("mmreg", &["guiddef", "minwindef"], &[]), | |
f035d41b | 63 | ("mprapidef", &[], &[]), |
ff7c6d11 | 64 | ("mstcpip", &["basetsd", "guiddef", "in6addr", "inaddr", "minwindef", "winnt", "ws2def"], &["ntdll"]), |
60c5eb7d | 65 | ("mswsockdef", &["minwindef", "winnt", "ws2def"], &[]), |
f035d41b XL |
66 | ("netioapi", &["basetsd", "guiddef", "ifdef", "ipifcons", "minwindef", "nldef", "ntddndis", "ntdef", "ws2def", "ws2ipdef"], &["iphlpapi"]), |
67 | ("nldef", &["basetsd", "minwindef", "ntdef"], &[]), | |
68 | ("ntddndis", &["ifdef", "minwindef"], &[]), | |
ff7c6d11 XL |
69 | ("ntddscsi", &["basetsd", "minwindef", "ntdef", "winioctl", "winnt"], &[]), |
70 | ("ntddser", &["devpropdef"], &[]), | |
71 | ("ntdef", &["basetsd", "guiddef"], &[]), | |
72 | ("ntstatus", &["ntdef"], &[]), | |
73 | ("qos", &["minwindef"], &[]), | |
74 | ("rpc", &[], &[]), | |
75 | ("rpcdce", &["guiddef", "minwindef", "rpc"], &[]), | |
76 | ("rpcndr", &[], &[]), | |
8faf50e0 | 77 | ("sddl", &["basetsd", "minwindef", "winnt"], &["advapi32"]), |
ff7c6d11 XL |
78 | ("sspi", &["basetsd", "guiddef", "minwindef", "subauth", "wincred", "winnt"], &["credui", "secur32"]), |
79 | ("stralign", &["vcruntime", "winnt"], &["kernel32"]), | |
f035d41b XL |
80 | ("tcpestats", &["basetsd", "ntdef"], &[]), |
81 | ("tcpmib", &["basetsd", "in6addr", "minwindef", "ntdef"], &[]), | |
8faf50e0 XL |
82 | ("transportsettingcommon", &["guiddef"], &[]), |
83 | ("tvout", &["guiddef", "minwindef"], &[]), | |
f035d41b | 84 | ("udpmib", &["basetsd", "in6addr", "minwindef", "ntdef"], &[]), |
ff7c6d11 | 85 | ("usb", &["minwindef", "usbspec", "winnt"], &[]), |
f035d41b | 86 | ("usbioctl", &["basetsd", "guiddef", "minwindef", "ntdef", "usb", "usbiodef", "usbspec", "winioctl"], &[]), |
ff7c6d11 | 87 | ("usbiodef", &["guiddef", "minwindef", "winioctl", "winnt"], &[]), |
f035d41b | 88 | ("usbscan", &["ntdef", "winioctl"], &[]), |
ff7c6d11 XL |
89 | ("usbspec", &["basetsd", "guiddef", "minwindef", "winnt"], &[]), |
90 | ("windef", &["minwindef", "winnt"], &[]), | |
f035d41b | 91 | ("windot11", &["basetsd", "minwindef", "ntddndis", "winnt", "wlantypes"], &[]), |
ff7c6d11 | 92 | ("windowsx", &["minwindef"], &[]), |
60c5eb7d | 93 | ("winerror", &["minwindef", "wtypesbase"], &[]), |
ff7c6d11 | 94 | ("winusbio", &["minwindef", "usb"], &[]), |
f035d41b | 95 | ("wlantypes", &["basetsd", "minwindef"], &[]), |
8faf50e0 | 96 | ("wmistr", &["basetsd", "guiddef", "minwindef", "winnt"], &[]), |
ff7c6d11 XL |
97 | ("wnnc", &["minwindef"], &[]), |
98 | ("ws2def", &["basetsd", "guiddef", "inaddr", "minwindef", "vcruntime", "winnt"], &[]), | |
99 | ("ws2ipdef", &["in6addr", "inaddr", "minwindef", "ws2def"], &[]), | |
60c5eb7d | 100 | ("wtypes", &["guiddef", "minwindef", "ntdef", "rpcndr", "wingdi", "wtypesbase"], &[]), |
ff7c6d11 XL |
101 | ("wtypesbase", &["minwindef", "rpcndr", "winnt"], &[]), |
102 | // ucrt | |
f035d41b | 103 | ("corecrt", &[], &[]), |
ff7c6d11 | 104 | // um |
8faf50e0 XL |
105 | ("accctrl", &["guiddef", "minwindef", "winbase", "winnt"], &[]), |
106 | ("aclapi", &["accctrl", "guiddef", "minwindef", "winnt"], &["advapi32"]), | |
f035d41b | 107 | ("adhoc", &["guiddef", "minwindef", "unknwnbase", "winnt"], &[]), |
8faf50e0 | 108 | ("appmgmt", &["guiddef", "minwindef", "winnt"], &["advapi32"]), |
ff7c6d11 XL |
109 | ("audioclient", &["audiosessiontypes", "basetsd", "guiddef", "minwindef", "mmreg", "strmif", "unknwnbase", "winerror", "winnt", "wtypesbase"], &[]), |
110 | ("audiosessiontypes", &["minwindef"], &[]), | |
111 | ("avrt", &["guiddef", "minwindef", "winnt"], &["avrt"]), | |
8faf50e0 XL |
112 | ("bits", &["basetsd", "guiddef", "minwindef", "unknwnbase", "winnt"], &[]), |
113 | ("bits10_1", &["basetsd", "bits", "bits2_0", "bits3_0", "bits5_0", "minwindef", "winnt"], &[]), | |
114 | ("bits1_5", &["basetsd", "bits", "rpcndr", "winnt"], &[]), | |
115 | ("bits2_0", &["basetsd", "bits", "bits1_5", "minwindef", "winnt"], &[]), | |
116 | ("bits2_5", &["minwindef", "rpcndr", "unknwnbase", "winnt"], &[]), | |
117 | ("bits3_0", &["basetsd", "bits", "bits2_0", "guiddef", "minwindef", "unknwnbase", "winnt"], &[]), | |
118 | ("bits4_0", &["basetsd", "bits3_0", "minwindef", "unknwnbase", "winnt"], &[]), | |
119 | ("bits5_0", &["basetsd", "bits1_5", "bits3_0", "bits4_0", "guiddef", "minwindef", "winnt"], &[]), | |
120 | ("bitscfg", &["guiddef", "oaidl", "unknwnbase", "winnt", "wtypes"], &["oleaut32"]), | |
121 | ("bitsmsg", &["minwindef"], &[]), | |
60c5eb7d XL |
122 | ("bluetoothapis", &["bthdef", "bthsdpdef", "guiddef", "minwinbase", "minwindef", "windef", "winnt"], &["bthprops"]), |
123 | ("bluetoothleapis", &["bthledef", "minwindef", "winerror", "winnt"], &["bluetoothapis"]), | |
124 | ("bthledef", &["basetsd", "guiddef", "minwindef", "winnt"], &[]), | |
125 | ("cfgmgr32", &["basetsd", "cfg", "devpropdef", "guiddef", "minwindef", "winnt", "winreg"], &["cfgmgr32"]), | |
ff7c6d11 XL |
126 | ("cguid", &[], &[]), |
127 | ("combaseapi", &["basetsd", "guiddef", "minwindef", "objidl", "objidlbase", "propidl", "rpcdce", "unknwnbase", "winnt", "wtypesbase"], &["ole32"]), | |
128 | ("coml2api", &["minwindef"], &[]), | |
129 | ("commapi", &["minwinbase", "minwindef", "winbase", "winnt"], &["kernel32"]), | |
130 | ("commctrl", &["basetsd", "commoncontrols", "guiddef", "minwinbase", "minwindef", "vcruntime", "windef", "winnt", "winuser"], &["comctl32"]), | |
131 | ("commdlg", &["basetsd", "minwindef", "prsht", "unknwnbase", "windef", "wingdi", "winnt", "winuser"], &["comdlg32"]), | |
132 | ("commoncontrols", &["commctrl", "guiddef", "minwindef", "unknwnbase", "windef", "winnt"], &["comctl32"]), | |
60c5eb7d | 133 | ("consoleapi", &["minwindef", "wincon", "wincontypes", "winnt"], &["kernel32"]), |
ff7c6d11 XL |
134 | ("corsym", &["basetsd", "objidlbase", "unknwnbase", "winnt"], &[]), |
135 | ("d2d1", &["basetsd", "d2dbasetypes", "d3dcommon", "dcommon", "dwrite", "dxgi", "guiddef", "minwindef", "unknwnbase", "wincodec", "windef", "winnt"], &["d2d1"]), | |
136 | ("d2d1_1", &["basetsd", "d2d1", "d2d1effectauthor", "d2dbasetypes", "dcommon", "documenttarget", "dwrite", "dxgi", "dxgiformat", "guiddef", "minwindef", "objidlbase", "unknwnbase", "wincodec", "winnt"], &["d2d1"]), | |
137 | ("d2d1_2", &["d2d1", "d2d1_1", "dxgi", "minwindef", "winnt"], &["d2d1"]), | |
8faf50e0 XL |
138 | ("d2d1_3", &["basetsd", "d2d1", "d2d1_1", "d2d1_2", "d2d1effects", "d2d1svg", "dcommon", "dwrite", "dxgi", "dxgitype", "minwindef", "ntdef", "objidlbase", "wincodec", "winerror"], &["d2d1"]), |
139 | ("d2d1effectauthor", &["basetsd", "d2d1", "d2d1_1", "d2dbasetypes", "d3dcommon", "dxgiformat", "guiddef", "minwindef", "ntdef", "unknwnbase", "wincodec"], &[]), | |
ff7c6d11 XL |
140 | ("d2d1effects", &[], &[]), |
141 | ("d2d1effects_1", &[], &[]), | |
142 | ("d2d1effects_2", &[], &[]), | |
8faf50e0 XL |
143 | ("d2d1svg", &["basetsd", "d2d1", "d2d1_1", "guiddef", "minwindef", "ntdef", "objidlbase", "winerror"], &[]), |
144 | ("d2dbasetypes", &["d3d9types", "dcommon"], &[]), | |
ff7c6d11 XL |
145 | ("d3d", &[], &[]), |
146 | ("d3d10", &["d3dcommon"], &[]), | |
147 | ("d3d10_1", &[], &[]), | |
148 | ("d3d10_1shader", &[], &[]), | |
149 | ("d3d10effect", &[], &[]), | |
150 | ("d3d10misc", &[], &[]), | |
151 | ("d3d10sdklayers", &[], &[]), | |
152 | ("d3d10shader", &["d3d10", "d3dcommon", "minwindef", "unknwnbase", "winnt"], &[]), | |
153 | ("d3d11", &["basetsd", "d3dcommon", "dxgi", "dxgiformat", "dxgitype", "guiddef", "minwindef", "unknwnbase", "windef", "winnt"], &["d3d11"]), | |
0bf4aa26 XL |
154 | ("d3d11_1", &["basetsd", "d3d11", "d3dcommon", "dxgiformat", "dxgitype", "guiddef", "minwindef", "unknwnbase", "winnt"], &[]), |
155 | ("d3d11_2", &["basetsd", "d3d11", "d3d11_1", "dxgiformat", "minwindef", "winnt"], &[]), | |
ff7c6d11 XL |
156 | ("d3d11_3", &[], &[]), |
157 | ("d3d11_4", &[], &[]), | |
158 | ("d3d11on12", &["d3d11", "d3d12", "d3dcommon", "guiddef", "minwindef", "unknwnbase", "winnt"], &["d3d11"]), | |
8faf50e0 | 159 | ("d3d11sdklayers", &["basetsd", "d3d11", "dxgi", "minwindef", "unknwnbase", "winnt"], &[]), |
ff7c6d11 | 160 | ("d3d11shader", &["basetsd", "d3dcommon", "minwindef", "unknwnbase", "winnt"], &[]), |
0bf4aa26 | 161 | ("d3d11tokenizedprogramformat", &["minwindef"], &[]), |
ff7c6d11 XL |
162 | ("d3d12", &["basetsd", "d3dcommon", "dxgiformat", "dxgitype", "guiddef", "minwinbase", "minwindef", "unknwnbase", "windef", "winnt"], &["d3d12"]), |
163 | ("d3d12sdklayers", &["basetsd", "d3d12", "minwindef", "unknwnbase", "winnt"], &[]), | |
164 | ("d3d12shader", &["basetsd", "d3dcommon", "minwindef", "unknwnbase", "winnt"], &[]), | |
165 | ("d3dcommon", &["basetsd", "minwindef", "unknwnbase", "winnt"], &[]), | |
166 | ("d3dcompiler", &["basetsd", "d3d11shader", "d3dcommon", "guiddef", "minwindef", "winnt"], &["d3dcompiler"]), | |
167 | ("d3dcsx", &[], &[]), | |
168 | ("d3dx10core", &[], &[]), | |
169 | ("d3dx10math", &[], &[]), | |
170 | ("d3dx10mesh", &[], &[]), | |
171 | ("datetimeapi", &["minwinbase", "minwindef", "winnt"], &["kernel32"]), | |
172 | ("davclnt", &["minwindef", "winnt"], &["netapi32"]), | |
173 | ("dbghelp", &["basetsd", "guiddef", "minwindef", "vcruntime", "winnt"], &["dbghelp"]), | |
0bf4aa26 | 174 | ("dbt", &["basetsd", "guiddef", "minwindef", "winnt", "winuser"], &[]), |
8faf50e0 | 175 | ("dcommon", &["basetsd", "dxgiformat", "minwindef", "windef"], &[]), |
ff7c6d11 XL |
176 | ("dcomp", &["d2d1", "d2d1_1", "d2d1effects", "d2dbasetypes", "d3d9types", "d3dcommon", "dcompanimation", "dcomptypes", "dxgi", "dxgi1_2", "dxgiformat", "guiddef", "minwinbase", "minwindef", "ntdef", "unknwnbase", "windef"], &["dcomp"]), |
177 | ("dcompanimation", &["ntdef", "unknwnbase"], &[]), | |
178 | ("dde", &["basetsd", "minwindef"], &["user32"]), | |
179 | ("ddraw", &[], &[]), | |
180 | ("ddrawi", &[], &[]), | |
181 | ("ddrawint", &[], &[]), | |
182 | ("debugapi", &["minwinbase", "minwindef", "winnt"], &["kernel32"]), | |
0bf4aa26 | 183 | ("devicetopology", &["guiddef", "minwindef", "unknwnbase", "windef", "winnt", "wtypes"], &[]), |
ff7c6d11 | 184 | ("dinput", &[], &[]), |
60c5eb7d | 185 | ("dispex", &["basetsd", "guiddef", "minwindef", "oaidl", "servprov", "unknwnbase", "winerror", "winnt", "wtypes"], &[]), |
ff7c6d11 XL |
186 | ("dmksctl", &[], &[]), |
187 | ("dmusicc", &[], &[]), | |
188 | ("docobj", &["guiddef", "minwindef", "oaidl", "unknwnbase", "winnt"], &[]), | |
189 | ("documenttarget", &["basetsd", "guiddef", "ntdef", "unknwnbase"], &[]), | |
f035d41b | 190 | ("dot1x", &["eaptypes", "guiddef", "l2cmn", "minwindef", "winnt"], &[]), |
ff7c6d11 XL |
191 | ("dpa_dsa", &["basetsd", "minwindef", "winnt"], &["comctl32"]), |
192 | ("dpapi", &["minwindef", "wincrypt", "windef", "winnt"], &["crypt32"]), | |
193 | ("dsgetdc", &["guiddef", "minwindef", "ntsecapi", "winnt", "ws2def"], &["netapi32"]), | |
194 | ("dsound", &["guiddef", "minwindef", "mmsystem", "unknwnbase", "windef", "winerror", "winnt"], &["dsound"]), | |
195 | ("dsrole", &["guiddef", "minwindef", "winnt"], &["netapi32"]), | |
196 | ("dvp", &[], &[]), | |
0bf4aa26 | 197 | ("dwmapi", &["basetsd", "minwindef", "uxtheme", "windef", "winnt"], &["dwmapi"]), |
ff7c6d11 XL |
198 | ("dwrite", &["basetsd", "d2d1", "dcommon", "guiddef", "minwindef", "unknwnbase", "windef", "winerror", "wingdi", "winnt"], &["dwrite"]), |
199 | ("dwrite_1", &["basetsd", "dcommon", "dwrite", "minwindef", "winnt"], &[]), | |
200 | ("dwrite_2", &["basetsd", "d3d9types", "dcommon", "dwrite", "dwrite_1", "minwindef", "unknwnbase", "winnt"], &[]), | |
201 | ("dwrite_3", &["basetsd", "dcommon", "dwrite", "dwrite_1", "dwrite_2", "minwindef", "unknwnbase", "wingdi", "winnt"], &[]), | |
202 | ("dxdiag", &[], &[]), | |
203 | ("dxfile", &[], &[]), | |
8faf50e0 XL |
204 | ("dxgidebug", &["basetsd", "guiddef", "minwindef", "unknwnbase", "winnt"], &["dxgi"]), |
205 | ("dxva2api", &["basetsd", "d3d9", "d3d9types", "guiddef", "minwindef", "unknwnbase", "windef", "winnt"], &["dxva2"]), | |
206 | ("dxvahd", &["d3d9", "d3d9types", "guiddef", "minwindef", "unknwnbase", "windef", "winnt"], &["dxva2"]), | |
f035d41b | 207 | ("eaptypes", &["guiddef", "minwindef", "winnt"], &[]), |
8faf50e0 | 208 | ("endpointvolume", &["basetsd", "guiddef", "minwindef", "unknwnbase", "winnt"], &[]), |
ff7c6d11 | 209 | ("errhandlingapi", &["basetsd", "minwindef", "winnt"], &["kernel32"]), |
8faf50e0 | 210 | ("evntcons", &["basetsd", "evntprov", "evntrace", "guiddef", "minwindef", "winnt"], &["advapi32"]), |
0bf4aa26 | 211 | ("exdisp", &["basetsd", "docobj", "oaidl", "ocidl", "winnt", "wtypes"], &[]), |
ff7c6d11 XL |
212 | ("fibersapi", &["minwindef", "winnt"], &["kernel32"]), |
213 | ("fileapi", &["minwinbase", "minwindef", "winnt"], &["kernel32"]), | |
60c5eb7d | 214 | ("functiondiscoverykeys_devpkey", &["wtypes"], &[]), |
ff7c6d11 XL |
215 | ("gl-gl", &[], &["opengl32"]), |
216 | ("handleapi", &["minwindef", "winnt"], &["kernel32"]), | |
217 | ("heapapi", &["basetsd", "minwinbase", "minwindef", "winnt"], &["kernel32"]), | |
8faf50e0 | 218 | ("highlevelmonitorconfigurationapi", &["minwindef", "physicalmonitorenumerationapi", "winnt"], &["dxva2"]), |
f035d41b | 219 | ("http", &["guiddef", "minwinbase", "minwindef", "sspi", "winnt", "ws2def"], &["httpapi"]), |
8faf50e0 | 220 | ("imm", &["minwindef", "windef"], &["imm32"]), |
ff7c6d11 XL |
221 | ("interlockedapi", &["minwindef", "winnt"], &["kernel32"]), |
222 | ("ioapiset", &["basetsd", "minwinbase", "minwindef", "winnt"], &["kernel32"]), | |
f035d41b XL |
223 | ("ipexport", &["basetsd", "in6addr", "ntdef"], &[]), |
224 | ("iphlpapi", &["basetsd", "ifdef", "ifmib", "ipexport", "ipmib", "iprtrmib", "iptypes", "minwinbase", "minwindef", "ntdef", "tcpestats", "tcpmib", "udpmib", "ws2def", "ws2ipdef"], &["iphlpapi"]), | |
225 | ("iptypes", &["basetsd", "corecrt", "guiddef", "ifdef", "ipifcons", "minwindef", "nldef", "ntdef", "ws2def"], &[]), | |
ff7c6d11 XL |
226 | ("jobapi", &["minwindef", "winnt"], &["kernel32"]), |
227 | ("jobapi2", &["basetsd", "minwinbase", "minwindef", "ntdef", "winnt"], &["kernel32"]), | |
228 | ("knownfolders", &[], &[]), | |
229 | ("ktmw32", &["guiddef", "minwinbase", "minwindef", "winnt"], &["ktmw32"]), | |
f035d41b | 230 | ("l2cmn", &["guiddef", "minwindef", "winnt"], &[]), |
ff7c6d11 XL |
231 | ("libloaderapi", &["basetsd", "minwindef", "winnt"], &["kernel32", "user32"]), |
232 | ("lmaccess", &["basetsd", "lmcons", "minwindef", "winnt"], &["netapi32"]), | |
233 | ("lmalert", &["lmcons", "minwindef", "winnt"], &["netapi32"]), | |
234 | ("lmapibuf", &["lmcons", "minwindef"], &["netapi32"]), | |
235 | ("lmat", &["basetsd", "lmcons", "minwindef", "winnt"], &["netapi32"]), | |
236 | ("lmdfs", &["guiddef", "lmcons", "minwindef", "winnt"], &["netapi32"]), | |
237 | ("lmerrlog", &["minwindef", "winnt"], &[]), | |
238 | ("lmjoin", &["lmcons", "minwindef", "wincrypt", "winnt"], &["netapi32"]), | |
239 | ("lmmsg", &["lmcons", "minwindef", "winnt"], &["netapi32"]), | |
240 | ("lmremutl", &["lmcons", "minwindef", "winnt"], &["netapi32"]), | |
241 | ("lmrepl", &["lmcons", "minwindef", "winnt"], &["netapi32"]), | |
242 | ("lmserver", &["guiddef", "lmcons", "minwindef", "winnt", "winsvc"], &["advapi32", "netapi32"]), | |
243 | ("lmshare", &["basetsd", "guiddef", "lmcons", "minwindef", "winnt"], &["netapi32"]), | |
244 | ("lmstats", &["lmcons", "minwindef", "winnt"], &["netapi32"]), | |
245 | ("lmsvc", &["lmcons", "minwindef", "winnt"], &["netapi32"]), | |
246 | ("lmuse", &["lmcons", "minwindef", "winnt"], &["netapi32"]), | |
247 | ("lmwksta", &["lmcons", "minwindef", "winnt"], &["netapi32"]), | |
8faf50e0 XL |
248 | ("lowlevelmonitorconfigurationapi", &["minwindef", "physicalmonitorenumerationapi", "winnt"], &["dxva2"]), |
249 | ("lsalookup", &["guiddef", "minwindef", "ntdef", "winnt"], &["advapi32"]), | |
ff7c6d11 XL |
250 | ("memoryapi", &["basetsd", "minwinbase", "minwindef", "winnt"], &["kernel32"]), |
251 | ("minschannel", &["guiddef", "minwindef", "wincrypt", "winnt"], &[]), | |
252 | ("minwinbase", &["basetsd", "minwindef", "ntstatus", "winnt"], &[]), | |
253 | ("mmdeviceapi", &["guiddef", "minwindef", "propidl", "propsys", "unknwnbase", "winnt", "wtypes"], &["mmdevapi"]), | |
254 | ("mmeapi", &["basetsd", "imm", "minwindef", "mmsystem", "winnt"], &["winmm"]), | |
255 | ("mmsystem", &["basetsd", "minwindef", "mmreg", "winnt"], &[]), | |
256 | ("msaatext", &[], &[]), | |
257 | ("mscat", &["guiddef", "minwindef", "mssip", "wincrypt", "winnt"], &[]), | |
8faf50e0 | 258 | ("mschapp", &["basetsd", "minwindef", "winnt"], &["advapi32"]), |
ff7c6d11 | 259 | ("mssip", &["guiddef", "minwindef", "mscat", "wincrypt", "winnt"], &["crypt32"]), |
60c5eb7d | 260 | ("mswsock", &["minwinbase", "minwindef", "mswsockdef", "winnt", "winsock2", "ws2def"], &["mswsock"]), |
8faf50e0 | 261 | ("namedpipeapi", &["minwinbase", "minwindef", "winnt"], &["advapi32", "kernel32"]), |
ff7c6d11 XL |
262 | ("namespaceapi", &["minwinbase", "minwindef", "ntdef", "winnt"], &["kernel32"]), |
263 | ("nb30", &["minwindef", "winnt"], &["netapi32"]), | |
0bf4aa26 | 264 | ("ncrypt", &["basetsd", "bcrypt", "minwindef", "winnt"], &["ncrypt"]), |
8faf50e0 | 265 | ("ntlsa", &["basetsd", "guiddef", "lsalookup", "minwindef", "ntdef", "ntsecapi", "subauth", "winnt"], &["advapi32"]), |
ff7c6d11 XL |
266 | ("ntsecapi", &["basetsd", "guiddef", "lsalookup", "minwindef", "ntdef", "sspi", "subauth", "winnt"], &["advapi32"]), |
267 | ("oaidl", &["basetsd", "guiddef", "minwindef", "rpcndr", "unknwnbase", "winnt", "wtypes", "wtypesbase"], &[]), | |
268 | ("objbase", &["combaseapi", "minwindef", "winnt"], &["ole32"]), | |
0bf4aa26 | 269 | ("objidl", &["basetsd", "guiddef", "minwindef", "ntdef", "objidlbase", "unknwnbase", "windef", "winnt", "wtypes", "wtypesbase"], &[]), |
ff7c6d11 XL |
270 | ("objidlbase", &["basetsd", "guiddef", "minwindef", "unknwnbase", "winnt", "wtypesbase"], &[]), |
271 | ("ocidl", &["guiddef", "minwindef", "ntdef", "oaidl", "unknwnbase", "wtypes", "wtypesbase"], &[]), | |
0bf4aa26 | 272 | ("ole2", &["minwindef", "oleidl", "windef", "winnt"], &["ole32"]), |
ff7c6d11 XL |
273 | ("oleauto", &["basetsd", "minwinbase", "minwindef", "oaidl", "winnt", "wtypes", "wtypesbase"], &["oleaut32"]), |
274 | ("olectl", &["winerror", "winnt"], &[]), | |
0bf4aa26 | 275 | ("oleidl", &["minwindef", "ntdef", "objidl", "unknwnbase", "windef"], &[]), |
8faf50e0 | 276 | ("opmapi", &["basetsd", "d3d9", "d3d9types", "dxva2api", "guiddef", "minwindef", "unknwnbase", "windef", "winnt"], &["dxva2"]), |
ff7c6d11 | 277 | ("pdh", &["basetsd", "guiddef", "minwindef", "windef", "winnt"], &["pdh"]), |
8faf50e0 XL |
278 | ("perflib", &["basetsd", "guiddef", "minwinbase", "minwindef", "winnt"], &["advapi32"]), |
279 | ("physicalmonitorenumerationapi", &["d3d9", "minwindef", "windef", "winnt"], &["dxva2"]), | |
ff7c6d11 | 280 | ("playsoundapi", &["minwindef", "winnt"], &["winmm"]), |
60c5eb7d XL |
281 | ("portabledevice", &["basetsd", "wtypes"], &[]), |
282 | ("portabledeviceapi", &["guiddef", "minwindef", "objidlbase", "portabledevicetypes", "propkeydef", "unknwnbase", "winnt"], &[]), | |
283 | ("portabledevicetypes", &["guiddef", "minwindef", "propidl", "propkeydef", "propsys", "unknwnbase", "winnt", "wtypes"], &[]), | |
ff7c6d11 XL |
284 | ("powerbase", &["minwindef", "winnt", "winuser"], &["powrprof"]), |
285 | ("powersetting", &["guiddef", "minwindef", "winnt", "winuser"], &["powrprof"]), | |
286 | ("powrprof", &["guiddef", "minwindef", "winnt", "winreg"], &["powrprof"]), | |
287 | ("processenv", &["minwindef", "winnt"], &["kernel32"]), | |
288 | ("processsnapshot", &["basetsd", "minwindef", "winnt"], &["kernel32"]), | |
289 | ("processthreadsapi", &["basetsd", "guiddef", "minwinbase", "minwindef", "winnt"], &["advapi32", "kernel32"]), | |
290 | ("processtopologyapi", &["minwindef", "winnt"], &["kernel32"]), | |
291 | ("profileapi", &["minwindef", "winnt"], &["kernel32"]), | |
60c5eb7d XL |
292 | ("propidl", &["guiddef", "minwindef", "ntdef", "oaidl", "objidlbase", "unknwnbase", "wtypes", "wtypesbase"], &["ole32"]), |
293 | ("propkey", &["minwindef", "ntdef", "wtypes"], &[]), | |
ff7c6d11 XL |
294 | ("propkeydef", &["guiddef", "wtypes"], &[]), |
295 | ("propsys", &["minwindef", "propidl", "propkeydef", "unknwnbase", "winnt", "wtypes"], &[]), | |
296 | ("prsht", &["basetsd", "minwindef", "windef", "winnt", "winuser"], &["comctl32"]), | |
297 | ("psapi", &["basetsd", "minwindef", "winnt"], &["kernel32", "psapi"]), | |
298 | ("realtimeapiset", &["basetsd", "minwindef", "winnt"], &["kernel32"]), | |
299 | ("reason", &["minwindef"], &[]), | |
8faf50e0 | 300 | ("restartmanager", &["minwindef", "winnt"], &["rstrtmgr"]), |
ff7c6d11 XL |
301 | ("restrictederrorinfo", &["unknwnbase", "winnt", "wtypes"], &[]), |
302 | ("rmxfguid", &[], &[]), | |
f035d41b | 303 | ("rtinfo", &["basetsd"], &[]), |
ff7c6d11 XL |
304 | ("sapi", &["guiddef", "minwindef", "sapi53", "unknwnbase", "winnt"], &[]), |
305 | ("sapi51", &["guiddef", "minwindef", "mmreg", "oaidl", "objidlbase", "rpcndr", "servprov", "unknwnbase", "windef", "winnt", "wtypes", "wtypesbase"], &[]), | |
306 | ("sapi53", &["guiddef", "minwindef", "oaidl", "sapi51", "unknwnbase", "urlmon", "winnt", "wtypes"], &[]), | |
307 | ("sapiddk", &["guiddef", "minwindef", "sapi", "sapiddk51", "unknwnbase", "winnt"], &[]), | |
308 | ("sapiddk51", &["guiddef", "minwindef", "mmreg", "oaidl", "objidlbase", "sapi", "unknwnbase", "windef", "winnt"], &[]), | |
309 | ("schannel", &["guiddef", "minwindef", "wincrypt", "windef", "winnt"], &[]), | |
310 | ("securityappcontainer", &["minwindef", "winnt"], &["kernel32"]), | |
8faf50e0 | 311 | ("securitybaseapi", &["guiddef", "minwinbase", "minwindef", "winnt"], &["advapi32", "kernel32"]), |
ff7c6d11 XL |
312 | ("servprov", &["guiddef", "unknwnbase", "winnt"], &[]), |
313 | ("setupapi", &["basetsd", "commctrl", "devpropdef", "guiddef", "minwindef", "prsht", "spapidef", "windef", "winnt", "winreg"], &["setupapi"]), | |
314 | ("shellapi", &["basetsd", "guiddef", "minwinbase", "minwindef", "processthreadsapi", "windef", "winnt", "winuser"], &["shell32", "shlwapi"]), | |
315 | ("shellscalingapi", &["minwindef", "windef", "winnt"], &["shcore"]), | |
316 | ("shlobj", &["guiddef", "minwinbase", "minwindef", "shtypes", "windef", "winnt"], &["shell32"]), | |
f035d41b XL |
317 | ("shobjidl", &["guiddef", "minwindef", "propsys", "shobjidl_core", "shtypes", "unknwnbase", "windef", "winnt"], &[]), |
318 | ("shobjidl_core", &["commctrl", "guiddef", "minwinbase", "minwindef", "objidl", "propkeydef", "propsys", "shtypes", "unknwnbase", "windef", "winnt"], &[]), | |
ff7c6d11 | 319 | ("shtypes", &["guiddef", "minwindef", "winnt"], &[]), |
f035d41b | 320 | ("softpub", &[], &[]), |
ff7c6d11 | 321 | ("spapidef", &["minwindef", "winnt"], &[]), |
60c5eb7d | 322 | ("spellcheck", &["minwindef", "ntdef", "objidlbase", "unknwnbase", "winerror"], &[]), |
ff7c6d11 XL |
323 | ("sporder", &["guiddef", "minwindef"], &["sporder"]), |
324 | ("sql", &["sqltypes"], &["odbc32"]), | |
325 | ("sqlext", &["sql", "sqltypes"], &[]), | |
326 | ("sqltypes", &["basetsd", "guiddef", "windef"], &[]), | |
327 | ("sqlucode", &["sqltypes"], &["odbc32"]), | |
328 | ("stringapiset", &["minwindef", "winnls", "winnt"], &["kernel32"]), | |
329 | ("strmif", &["winnt"], &[]), | |
330 | ("subauth", &["minwindef", "winnt"], &[]), | |
331 | ("synchapi", &["basetsd", "minwinbase", "minwindef", "winnt"], &["kernel32", "synchronization"]), | |
332 | ("sysinfoapi", &["basetsd", "minwinbase", "minwindef", "winnt"], &["kernel32"]), | |
333 | ("systemtopologyapi", &["minwindef", "winnt"], &["kernel32"]), | |
60c5eb7d | 334 | ("taskschd", &["minwinbase", "minwindef", "oaidl", "unknwnbase", "winnt", "wtypes"], &[]), |
ff7c6d11 XL |
335 | ("textstor", &[], &[]), |
336 | ("threadpoolapiset", &["basetsd", "minwinbase", "minwindef", "winnt"], &["kernel32"]), | |
337 | ("threadpoollegacyapiset", &["minwinbase", "minwindef", "winnt"], &["kernel32"]), | |
338 | ("timeapi", &["minwindef", "mmsystem"], &["winmm"]), | |
8faf50e0 | 339 | ("timezoneapi", &["minwinbase", "minwindef", "winnt"], &["advapi32", "kernel32"]), |
ff7c6d11 XL |
340 | ("tlhelp32", &["basetsd", "minwindef", "winnt"], &["kernel32"]), |
341 | ("unknwnbase", &["guiddef", "minwindef", "winnt"], &[]), | |
342 | ("urlhist", &["docobj", "guiddef", "minwindef", "unknwnbase", "winnt", "wtypesbase"], &[]), | |
343 | ("urlmon", &["minwindef", "unknwnbase", "winnt"], &[]), | |
8faf50e0 | 344 | ("userenv", &["minwindef", "winnt", "winreg"], &["userenv"]), |
ff7c6d11 XL |
345 | ("usp10", &["minwindef", "ntdef", "windef", "winerror", "wingdi", "winnt"], &["usp10"]), |
346 | ("utilapiset", &["minwindef", "ntdef"], &["kernel32"]), | |
0bf4aa26 | 347 | ("uxtheme", &["commctrl", "minwindef", "windef", "wingdi", "winnt"], &["uxtheme"]), |
ff7c6d11 XL |
348 | ("vsbackup", &["guiddef", "minwindef", "unknwnbase", "vss", "vswriter", "winnt", "wtypes"], &["vssapi"]), |
349 | ("vss", &["guiddef", "minwindef", "unknwnbase", "winnt"], &[]), | |
350 | ("vsserror", &["winnt"], &[]), | |
351 | ("vswriter", &["minwindef", "unknwnbase", "vss", "winnt", "wtypes"], &[]), | |
60c5eb7d XL |
352 | ("wbemads", &["oaidl", "wbemdisp", "winerror", "wtypes"], &[]), |
353 | ("wbemcli", &["minwindef", "oaidl", "rpcndr", "unknwnbase", "winerror", "winnt", "wtypes"], &[]), | |
354 | ("wbemdisp", &["oaidl", "unknwnbase", "winerror", "wtypes"], &[]), | |
355 | ("wbemprov", &["minwindef", "oaidl", "unknwnbase", "wbemcli", "winerror", "winnt", "wtypes"], &[]), | |
356 | ("wbemtran", &["guiddef", "minwindef", "unknwnbase", "wbemcli", "winerror", "winnt", "wtypes"], &[]), | |
8faf50e0 | 357 | ("wct", &["basetsd", "guiddef", "minwindef", "winnt"], &["advapi32"]), |
0bf4aa26 | 358 | ("werapi", &["minwindef", "winnt"], &["kernel32", "wer"]), |
ff7c6d11 XL |
359 | ("winbase", &["basetsd", "cfgmgr32", "fileapi", "guiddef", "libloaderapi", "minwinbase", "minwindef", "processthreadsapi", "vadefs", "windef", "winnt"], &["kernel32"]), |
360 | ("wincodec", &["basetsd", "d2d1", "d2d1_1", "dcommon", "dxgiformat", "dxgitype", "guiddef", "minwindef", "ntdef", "objidlbase", "ocidl", "propidl", "unknwnbase", "windef", "winerror", "winnt"], &["windowscodecs"]), | |
361 | ("wincodecsdk", &["guiddef", "minwindef", "oaidl", "objidl", "objidlbase", "ocidl", "propidl", "unknwnbase", "wincodec", "winnt", "wtypes"], &["ole32", "oleaut32", "windowscodecs"]), | |
60c5eb7d XL |
362 | ("wincon", &["minwinbase", "minwindef", "wincontypes", "windef", "wingdi", "winnt"], &["kernel32"]), |
363 | ("wincontypes", &["minwindef", "winnt"], &[]), | |
ff7c6d11 XL |
364 | ("wincred", &["minwindef", "sspi", "windef", "winnt"], &["advapi32", "credui"]), |
365 | ("wincrypt", &["basetsd", "bcrypt", "guiddef", "minwinbase", "minwindef", "ncrypt", "vcruntime", "winnt"], &["advapi32", "crypt32", "cryptnet"]), | |
366 | ("windowsceip", &["minwindef"], &["kernel32"]), | |
8faf50e0 | 367 | ("winefs", &["basetsd", "minwinbase", "minwindef", "wincrypt", "winnt"], &["advapi32"]), |
ff7c6d11 XL |
368 | ("winevt", &["basetsd", "guiddef", "minwinbase", "minwindef", "vcruntime", "winnt"], &["wevtapi"]), |
369 | ("wingdi", &["basetsd", "minwindef", "windef", "winnt"], &["gdi32", "msimg32", "opengl32", "winspool"]), | |
370 | ("winhttp", &["basetsd", "minwinbase", "minwindef", "winnt"], &["winhttp"]), | |
371 | ("wininet", &["basetsd", "minwinbase", "minwindef", "ntdef", "windef", "winineti", "winnt"], &["wininet"]), | |
372 | ("winineti", &["minwindef"], &[]), | |
8faf50e0 | 373 | ("winioctl", &["basetsd", "devpropdef", "guiddef", "minwindef", "winnt"], &[]), |
ff7c6d11 XL |
374 | ("winnetwk", &["basetsd", "minwindef", "windef", "winerror", "winnt"], &["mpr"]), |
375 | ("winnls", &["basetsd", "guiddef", "minwinbase", "minwindef", "winnt"], &["kernel32"]), | |
60c5eb7d | 376 | ("winnt", &["basetsd", "excpt", "guiddef", "ktmtypes", "minwindef", "ntdef", "vcruntime"], &["kernel32"]), |
f035d41b | 377 | ("winreg", &["basetsd", "minwinbase", "minwindef", "reason", "winnt"], &["advapi32"]), |
8faf50e0 | 378 | ("winsafer", &["basetsd", "guiddef", "minwindef", "wincrypt", "windef", "winnt"], &["advapi32"]), |
ff7c6d11 XL |
379 | ("winscard", &["basetsd", "guiddef", "minwindef", "rpcdce", "windef", "winnt", "winsmcrd"], &["winscard"]), |
380 | ("winsmcrd", &["minwindef", "winioctl"], &[]), | |
381 | ("winsock2", &["basetsd", "guiddef", "inaddr", "minwinbase", "minwindef", "qos", "winbase", "windef", "winerror", "winnt", "ws2def", "wtypesbase"], &["ws2_32"]), | |
382 | ("winspool", &["guiddef", "minwinbase", "minwindef", "vcruntime", "windef", "winerror", "wingdi", "winnt"], &["winspool"]), | |
383 | ("winsvc", &["minwindef", "winnt"], &["advapi32"]), | |
f035d41b | 384 | ("wintrust", &["guiddef", "minwindef", "ntdef", "wincrypt", "windef"], &["wintrust"]), |
ff7c6d11 XL |
385 | ("winusb", &["minwinbase", "minwindef", "usb", "usbspec", "winnt", "winusbio"], &["winusb"]), |
386 | ("winuser", &["basetsd", "guiddef", "limits", "minwinbase", "minwindef", "vadefs", "windef", "wingdi", "winnt"], &["user32"]), | |
387 | ("winver", &["minwindef", "winnt"], &["kernel32", "version"]), | |
f035d41b XL |
388 | ("wlanapi", &["devpropdef", "eaptypes", "guiddef", "l2cmn", "minwindef", "windef", "windot11", "winnt", "wlantypes"], &["wlanapi"]), |
389 | ("wlanihv", &["basetsd", "dot1x", "eaptypes", "guiddef", "l2cmn", "minwindef", "windot11", "winnt", "winuser", "wlanihvtypes", "wlantypes", "wlclient"], &[]), | |
390 | ("wlanihvtypes", &["eaptypes", "guiddef", "minwindef", "winnt", "wlantypes"], &[]), | |
391 | ("wlclient", &["guiddef", "minwindef", "windot11", "winnt"], &[]), | |
ff7c6d11 | 392 | ("wow64apiset", &["minwindef", "winnt"], &["kernel32"]), |
60c5eb7d XL |
393 | ("wpdmtpextensions", &["wtypes"], &[]), |
394 | ("ws2bth", &["bthdef", "bthsdpdef", "guiddef", "minwindef", "winnt", "ws2def"], &[]), | |
ff7c6d11 XL |
395 | ("ws2spi", &["basetsd", "guiddef", "minwindef", "vcruntime", "windef", "winnt", "winsock2", "ws2def", "wtypesbase"], &["ws2_32"]), |
396 | ("ws2tcpip", &["guiddef", "minwinbase", "minwindef", "mstcpip", "vcruntime", "winerror", "winnt", "winsock2", "ws2def", "wtypesbase"], &["fwpuclnt", "ws2_32"]), | |
f035d41b | 397 | ("wtsapi32", &["minwindef", "ntdef"], &["wtsapi32"]), |
ff7c6d11 XL |
398 | ("xinput", &["guiddef", "minwindef", "winnt"], &["xinput"]), |
399 | // vc | |
400 | ("excpt", &[], &[]), | |
401 | ("limits", &[], &[]), | |
402 | ("vadefs", &[], &[]), | |
403 | ("vcruntime", &[], &[]), | |
404 | // winrt | |
405 | ("activation", &["inspectable", "winnt"], &[]), | |
406 | ("hstring", &["winnt"], &[]), | |
407 | ("inspectable", &["guiddef", "hstring", "minwindef", "unknwnbase", "winnt"], &[]), | |
408 | ("roapi", &["activation", "basetsd", "guiddef", "hstring", "inspectable", "objidl", "winnt"], &["runtimeobject"]), | |
409 | ("robuffer", &["objidl", "winnt"], &["runtimeobject"]), | |
410 | ("roerrorapi", &["basetsd", "hstring", "minwindef", "restrictederrorinfo", "unknwnbase", "winnt"], &["runtimeobject"]), | |
411 | ("winstring", &["basetsd", "hstring", "minwindef", "winnt"], &["runtimeobject"]), | |
412 | ]; | |
413 | struct Header { | |
414 | required: bool, | |
415 | included: Cell<bool>, | |
416 | dependencies: &'static [&'static str], | |
417 | libraries: &'static [&'static str], | |
418 | } | |
419 | struct Graph(HashMap<&'static str, Header>); | |
420 | impl Graph { | |
421 | fn generate() -> Graph { | |
422 | Graph(DATA.iter().map(|&(name, dependencies, libraries)| { | |
423 | let header = Header { | |
424 | required: false, | |
425 | included: Cell::new(false), | |
426 | dependencies: dependencies, | |
427 | libraries: libraries, | |
428 | }; | |
429 | (name, header) | |
430 | }).collect()) | |
431 | } | |
432 | fn identify_required(&mut self) { | |
433 | for (name, header) in &mut self.0 { | |
434 | if let Ok(_) = var(&format!("CARGO_FEATURE_{}", name.to_uppercase())) { | |
435 | header.required = true; | |
436 | header.included.set(true); | |
437 | } | |
438 | } | |
439 | } | |
440 | fn check_everything(&self) { | |
441 | if let Ok(_) = var("CARGO_FEATURE_EVERYTHING") { | |
442 | for (_, header) in &self.0 { | |
443 | header.included.set(true); | |
444 | } | |
445 | } | |
446 | } | |
447 | fn resolve_dependencies(&self) { | |
448 | let mut done = false; | |
449 | while !done { | |
450 | done = true; | |
451 | for (_, header) in &self.0 { | |
452 | if header.included.get() { | |
453 | for dep in header.dependencies { | |
454 | let dep = &self.0.get(dep).expect(dep); | |
455 | if !dep.included.get() { | |
456 | done = false; | |
457 | dep.included.set(true); | |
458 | } | |
459 | } | |
460 | } | |
461 | } | |
462 | } | |
463 | } | |
464 | fn emit_features(&self) { | |
465 | for (name, header) in &self.0 { | |
466 | if header.included.get() && !header.required { | |
467 | println!("cargo:rustc-cfg=feature=\"{}\"", name); | |
468 | } | |
469 | } | |
470 | } | |
471 | fn emit_libraries(&self) { | |
8faf50e0 | 472 | let mut libs = self.0.iter().filter(|&(_, header)| { |
ff7c6d11 XL |
473 | header.included.get() |
474 | }).flat_map(|(_, header)| { | |
475 | header.libraries.iter() | |
8faf50e0 XL |
476 | }).collect::<Vec<_>>(); |
477 | libs.sort(); | |
478 | libs.dedup(); | |
60c5eb7d XL |
479 | // FIXME Temporary hacks until build script is redesigned. |
480 | libs.retain(|&&lib| match &*var("TARGET").unwrap() { | |
f035d41b | 481 | "aarch64-pc-windows-msvc" | "aarch64-uwp-windows-msvc" | "thumbv7a-pc-windows-msvc" => { |
60c5eb7d XL |
482 | if lib == "opengl32" { false } |
483 | else { true } | |
484 | }, | |
485 | _ => true, | |
486 | }); | |
ff7c6d11 XL |
487 | let prefix = library_prefix(); |
488 | let kind = library_kind(); | |
489 | for lib in libs { | |
490 | println!("cargo:rustc-link-lib={}={}{}", kind, prefix, lib); | |
491 | } | |
492 | } | |
493 | } | |
494 | fn library_prefix() -> &'static str { | |
495 | if var("TARGET").map(|target| | |
496 | target == "i686-pc-windows-gnu" || target == "x86_64-pc-windows-gnu" | |
497 | ).unwrap_or(false) && var("WINAPI_NO_BUNDLED_LIBRARIES").is_err() { | |
498 | "winapi_" | |
499 | } else { | |
500 | "" | |
501 | } | |
502 | } | |
503 | fn library_kind() -> &'static str { | |
504 | if var("WINAPI_STATIC_NOBUNDLE").is_ok() { | |
505 | "static-nobundle" | |
506 | } else { | |
507 | "dylib" | |
508 | } | |
509 | } | |
510 | fn try_everything() { | |
511 | let mut graph = Graph::generate(); | |
512 | graph.identify_required(); | |
513 | graph.check_everything(); | |
514 | graph.resolve_dependencies(); | |
515 | graph.emit_features(); | |
516 | graph.emit_libraries(); | |
517 | } | |
518 | fn main() { | |
8faf50e0 | 519 | println!("cargo:rerun-if-changed=build.rs"); |
ff7c6d11 XL |
520 | println!("cargo:rerun-if-env-changed=WINAPI_NO_BUNDLED_LIBRARIES"); |
521 | println!("cargo:rerun-if-env-changed=WINAPI_STATIC_NOBUNDLE"); | |
522 | let target = var("TARGET").unwrap(); | |
523 | let target: Vec<_> = target.split('-').collect(); | |
524 | if target.get(2) == Some(&"windows") { | |
525 | try_everything(); | |
526 | } | |
527 | } |