[crashing] Improve crash chaining (#20018)
[mono-project.git] / mcs / class / Makefile
blob1ab7f8b5c0b1e7817a6824ef485921d7e5659355
1 thisdir = class
3 NO_FACADES_PROFILE := $(filter monodroid_tools monotouch_tools wasm_tools binary_reference_assemblies xbuild_12 xbuild_14 netcore, $(PROFILE))
5 ifndef NO_FACADES_PROFILE
6 FACADES_FOLDER := Facades
7 endif
9 -include ../build/config.make
11 ifdef MCS_MODE
12 MCS_MODE_dirs := Mono.Cecil.Mdb
13 endif
15 # Tooling dependencies of mscorlib, we build them to /tmp folder for MONO_PATH to work
16 # reliably for clean and update builds. All deps are built against stable API to run with
17 # range of boostrap versions and .NET at the same time
18 build_SUBDIRS = \
19 Mono.Cecil \
20 $(MCS_MODE_dirs) \
21 ../tools/cil-stringreplacer \
22 PEAPI \
23 ../ilasm \
24 corlib
26 build_PARALLEL_SUBDIRS = \
27 Mono.Security \
28 System \
29 System.XML \
30 System.Security \
31 Mono.Posix \
32 System.Core \
33 System.Configuration \
34 System.ComponentModel.Composition.4.5 \
35 System.Numerics \
36 System.Xml.Linq \
37 System.IO.Compression \
38 System.IO.Compression.FileSystem \
39 System.Net.Http \
40 System.Net.Http.WebRequest \
41 System.Drawing
43 ifdef MCS_MODE
45 build_SUBDIRS += \
46 Mono.Security \
47 System \
48 System.XML \
49 System.Security \
50 Mono.Posix \
51 System.Core \
52 Mono.CompilerServices.SymbolWriter
54 build_PARALLEL_SUBDIRS += ../mcs
55 endif
57 mobile_common_dirs := \
58 corlib
60 mobile_common_dirs_parallel := \
61 Mono.Security \
62 System \
63 System.Core \
64 System.XML \
65 System.Security \
66 I18N \
67 System.ServiceModel.Internals \
68 System.Runtime.Serialization \
69 System.Xml.Linq \
70 System.IdentityModel \
71 System.ServiceModel \
72 System.ServiceModel.Web \
73 System.Json \
74 System.Web.Services \
75 Mono.Data.Tds \
76 System.Transactions \
77 System.Numerics \
78 System.Numerics.Vectors \
79 System.Data \
80 System.Data.DataSetExtensions \
81 Mono.Data.Sqlite \
82 System.Data.Services.Client \
83 System.IO.Compression \
84 System.IO.Compression.FileSystem \
85 System.ComponentModel.DataAnnotations \
86 System.ComponentModel.Composition.4.5 \
87 System.Net \
88 System.Net.Http \
89 System.Windows \
90 System.Xml.Serialization \
91 Microsoft.CSharp \
92 System.Reflection.Context \
93 System.Net.Http.WinHttpHandler \
94 System.Runtime.CompilerServices.Unsafe
96 testing_aot_full_dirs_parallel := \
97 $(mobile_common_dirs_parallel) \
98 Mono.Simd \
99 Mono.CSharp
101 testing_aot_full_interp_dirs_parallel := $(testing_aot_full_dirs_parallel)
103 testing_aot_hybrid_dirs_parallel := $(testing_aot_full_dirs_parallel)
105 xammac_dirs_parallel := \
106 $(mobile_common_dirs_parallel) \
107 Mono.CompilerServices.SymbolWriter \
108 Mono.CSharp
110 monodroid_dirs_parallel := \
111 $(mobile_common_dirs_parallel) \
112 Mono.CompilerServices.SymbolWriter \
113 Mono.Btls.Interface \
114 Mono.Posix \
115 Mono.CSharp \
116 Mono.Debugger.Soft \
117 Mono.Runtime.Tests
119 monodroid_tools_dirs_parallel := \
120 Mono.Cecil \
121 Mono.Cecil.Mdb \
122 Mono.CompilerServices.SymbolWriter \
123 ICSharpCode.SharpZipLib \
124 monodoc \
125 Mono.Debugger.Soft \
126 Mono.Profiler.Log
128 monotouch_tools_dirs_parallel := \
129 Mono.Cecil \
130 Mono.Cecil.Mdb
132 monotouch_dirs_parallel := \
133 $(mobile_common_dirs_parallel) \
134 Mono.Simd \
135 Mono.CSharp \
136 Mono.Runtime.Tests
138 monotouch_watch_dirs_parallel := $(filter-out Mono.Security Mono.Data.Tds,$(monotouch_dirs_parallel))
140 monotouch_runtime_dirs_parallel := \
141 Mono.Security \
142 System \
143 System.Core \
144 System.XML \
145 Mono.CSharp
147 monotouch_tv_dirs_parallel := $(monotouch_dirs_parallel)
149 monotouch_tv_runtime_dirs_parallel := $(monotouch_runtime_dirs_parallel)
151 monotouch_watch_runtime_dirs_parallel := \
152 System \
153 System.Core \
154 System.XML \
155 Mono.CSharp
157 monotouch_tv_runtime_dirs := \
158 Mono.Security \
159 $(monotouch_watch_runtime_dirs_parallel)
161 winaot_dirs_parallel := \
162 $(mobile_common_dirs_parallel) \
163 Mono.Simd
165 testing_winaot_interp_dirs_parallel := \
166 $(mobile_common_dirs_parallel) \
167 Mono.Simd
169 unreal_dirs_parallel := \
170 $(mobile_common_dirs_parallel)
172 wasm_dirs_parallel := \
173 Mono.Security \
174 System \
175 System.Core \
176 System.XML \
177 System.Security \
178 I18N \
179 System.Transactions \
180 System.ServiceModel.Internals \
181 System.Runtime.Serialization \
182 System.Data \
183 System.Data.DataSetExtensions \
184 System.Xml.Linq \
185 System.Numerics \
186 System.Numerics.Vectors \
187 System.IO.Compression \
188 System.IO.Compression.FileSystem \
189 System.ComponentModel.DataAnnotations \
190 System.ComponentModel.Composition.4.5 \
191 System.Net.Http \
192 Microsoft.CSharp \
193 System.Runtime.CompilerServices.Unsafe
195 wasm_tools_dirs_parallel := \
196 Mono.Cecil
198 orbis_dirs_parallel := \
199 $(filter-out Microsoft.CSharp Mono.Data.Sqlite,$(mobile_common_dirs_parallel))
201 xammac_4_5_dirs_parallel := \
202 Mono.Security \
203 System \
204 System.XML \
205 System.Security \
206 Mono.Posix \
207 System.Core \
208 System.Configuration \
209 I18N \
210 System.ServiceModel.Internals \
211 SMDiagnostics \
212 System.Numerics \
213 System.Numerics.Vectors \
214 Mono.Data.Tds \
215 System.Transactions \
216 System.EnterpriseServices \
217 System.Data \
218 System.Data.DataSetExtensions \
219 System.Runtime.Serialization \
220 System.Xml.Linq \
221 Mono.Data.Sqlite \
222 System.Runtime.Serialization.Formatters.Soap \
223 System.ComponentModel.DataAnnotations \
224 System.IdentityModel \
225 System.IdentityModel.Selectors \
226 Mono.Messaging \
227 System.Configuration.Install \
228 System.Messaging \
229 System.Web.Services \
230 System.ServiceModel \
231 System.ServiceModel.Web \
232 System.Json \
233 System.Data.Services.Client \
234 System.IO.Compression \
235 System.IO.Compression.FileSystem \
236 System.ComponentModel.Composition.4.5 \
237 System.Net \
238 System.Windows \
239 System.Xml.Serialization \
240 Mono.CSharp \
241 Microsoft.CSharp \
242 Mono.CompilerServices.SymbolWriter \
243 System.Data.Linq \
244 System.Net.Http \
245 System.Net.Http.WebRequest \
246 System.Reflection.Context \
247 System.Net.Http.WinHttpHandler \
248 System.Runtime.CompilerServices.Unsafe
250 # Could be just mscorlib but we have unhandled dependency from RabbitMQ.Client.Apigen.exe
251 net_4_x_dirs := \
252 corlib \
253 Mono.Security \
254 System \
255 System.XML
257 net_4_x_parallel_dirs = \
258 System.Security \
259 Mono.Posix \
260 System.Core \
261 System.Configuration \
262 System.Drawing \
263 System.IO.Compression \
264 System.IO.Compression.FileSystem \
265 System.Transactions \
266 System.EnterpriseServices \
267 System.Numerics \
268 System.Numerics.Vectors \
269 System.Data \
270 System.ComponentModel.DataAnnotations \
271 Accessibility \
272 Mono.WebBrowser \
273 System.Runtime.Serialization.Formatters.Soap \
274 System.Windows.Forms \
275 Mono.Data.Sqlite \
276 System.Web.ApplicationServices \
277 Novell.Directory.Ldap \
278 System.DirectoryServices \
279 System.Design \
280 System.Web.Services \
281 System.Web \
282 System.Runtime.Remoting \
283 System.Configuration.Install \
284 System.Management \
285 System.Data.OracleClient \
286 Commons.Xml.Relaxng \
287 Mono.Messaging \
288 System.Messaging \
289 System.ServiceProcess \
290 System.Drawing.Design \
291 ICSharpCode.SharpZipLib \
292 Microsoft.CSharp \
293 System.ServiceModel.Internals \
294 SMDiagnostics \
295 System.Runtime.Serialization \
296 System.Xml.Linq \
297 System.Data.Linq \
298 System.Web.Abstractions \
299 System.Web.Routing \
300 System.Runtime.DurableInstancing \
301 System.IdentityModel \
302 System.IdentityModel.Selectors \
303 System.ServiceModel \
304 System.Web.Extensions \
305 System.Web.Extensions.Design \
306 System.Web.DynamicData \
307 System.Net \
308 System.Xaml \
309 WindowsBase \
310 System.ServiceModel.Activation \
311 System.ServiceModel.Routing \
312 System.ServiceModel.Discovery \
313 System.Runtime.Caching \
314 Microsoft.Web.Infrastructure \
315 System.ServiceModel.Web \
316 System.Net.Http \
317 System.Net.Http.WebRequest \
318 System.Web.Razor \
319 System.Web.WebPages.Deployment \
320 System.Web.WebPages \
321 System.Web.WebPages.Razor \
322 System.Web.Mvc3 \
323 System.Net.Http.Formatting \
324 System.Web.Http \
325 System.Web.Http.SelfHost \
326 System.Web.Http.WebHost \
327 CustomMarshalers \
328 IBM.Data.DB2 \
329 PEAPI \
330 I18N \
331 Cscompmgd \
332 Mono.CompilerServices.SymbolWriter \
333 Mono.Btls.Interface \
334 Mono.Http \
335 Mono.Cairo \
336 Mono.Cecil \
337 Mono.Cecil.Mdb \
338 Mono.CSharp \
339 Mono.Debugger.Soft \
340 Mono.C5 \
341 Mono.Management \
342 Mono.Options \
343 Mono.Simd \
344 Mono.Tasklets \
345 Mono.CodeContracts \
346 Mono.Parallel \
347 Mono.Security.Win32 \
348 Mono.Messaging.RabbitMQ \
349 Mono.Data.Tds \
350 System.Dynamic \
351 System.Windows.Forms.DataVisualization \
352 System.Reactive.Interfaces \
353 System.Reactive.Core \
354 System.Reactive.Linq \
355 System.Reactive.PlatformServices \
356 System.Reactive.Providers \
357 System.Reactive.Runtime.Remoting \
358 System.Reactive.Windows.Forms \
359 System.Reactive.Windows.Threading \
360 System.Reactive.Observable.Aliases \
361 System.Reactive.Experimental \
362 System.Reactive.Debugger \
363 System.Data.Services.Client \
364 System.Data.Services \
365 System.Data.Entity \
366 System.Data.DataSetExtensions \
367 System.Json \
368 System.Json.Microsoft \
369 System.Threading.Tasks.Dataflow \
370 System.ComponentModel.Composition.4.5 \
371 System.Windows \
372 System.Xml.Serialization \
373 System.DirectoryServices.Protocols \
374 RabbitMQ.Client \
375 Microsoft.VisualC \
376 WebMatrix.Data \
377 monodoc \
378 System.Deployment \
379 System.Web.Mobile \
380 System.Web.RegularExpressions \
381 System.Workflow.Activities \
382 System.Workflow.ComponentModel \
383 System.Workflow.Runtime \
384 System.Reflection.Context \
385 Mono.Profiler.Log \
386 Mono.Runtime.Tests \
387 System.Runtime.CompilerServices.Unsafe \
388 legacy/Mono.Cecil \
389 SystemWebTestShim \
390 $(xbuild_4_0_dirs)
392 xbuild_4_0_dirs := \
393 Microsoft.Build.Framework \
394 Microsoft.Build.Utilities \
395 Microsoft.Build.Engine \
396 Mono.XBuild.Tasks \
397 Microsoft.Build.Tasks \
398 Microsoft.Build
400 monodroid_SUBDIRS := $(mobile_common_dirs)
401 monodroid_PARALLEL_SUBDIRS := $(monodroid_dirs_parallel)
402 monodroid_tools_SUBDIRS :=
403 monodroid_tools_PARALLEL_SUBDIRS := $(monodroid_tools_dirs_parallel)
405 monotouch_SUBDIRS := $(mobile_common_dirs)
406 monotouch_PARALLEL_SUBDIRS := $(monotouch_dirs_parallel)
407 monotouch_watch_SUBDIRS := $(mobile_common_dirs)
408 monotouch_watch_PARALLEL_SUBDIRS := $(monotouch_watch_dirs_parallel)
409 monotouch_tv_SUBDIRS := $(mobile_common_dirs)
410 monotouch_tv_PARALLEL_SUBDIRS := $(monotouch_tv_dirs_parallel)
411 monotouch_runtime_SUBDIRS := $(mobile_common_dirs)
412 monotouch_runtime_PARALLEL_SUBDIRS := $(monotouch_runtime_dirs_parallel)
413 monotouch_watch_runtime_SUBDIRS := $(mobile_common_dirs)
414 monotouch_watch_runtime_PARALLEL_SUBDIRS := $(monotouch_watch_runtime_dirs_parallel)
415 monotouch_tv_runtime_SUBDIRS := $(mobile_common_dirs)
416 monotouch_tv_runtime_PARALLEL_SUBDIRS := $(monotouch_tv_runtime_dirs_parallel)
417 monotouch_tools_SUBDIRS :=
418 monotouch_tools_PARALLEL_SUBDIRS := $(monotouch_tools_dirs_parallel)
420 testing_aot_full_interp_SUBDIRS := $(mobile_common_dirs)
421 testing_aot_full_interp_PARALLEL_SUBDIRS := $(testing_aot_full_interp_dirs_parallel)
422 testing_aot_full_SUBDIRS := $(mobile_common_dirs)
423 testing_aot_full_PARALLEL_SUBDIRS := $(testing_aot_full_dirs_parallel)
424 testing_aot_hybrid_SUBDIRS := $(mobile_common_dirs)
425 testing_aot_hybrid_PARALLEL_SUBDIRS := $(testing_aot_hybrid_dirs_parallel)
427 xammac_SUBDIRS := $(mobile_common_dirs)
428 xammac_PARALLEL_SUBDIRS := $(xammac_dirs_parallel)
429 xammac_net_4_5_SUBDIRS := $(mobile_common_dirs)
430 xammac_net_4_5_PARALLEL_SUBDIRS := $(xammac_4_5_dirs_parallel)
432 binary_reference_assemblies_SUBDIRS := reference-assemblies
433 net_4_x_SUBDIRS := $(net_4_x_dirs)
434 net_4_x_PARALLEL_SUBDIRS := $(net_4_x_parallel_dirs)
435 xbuild_12_SUBDIRS := $(xbuild_4_0_dirs)
436 xbuild_14_SUBDIRS := $(xbuild_4_0_dirs) Microsoft.NuGet.Build.Tasks
438 winaot_SUBDIRS := $(mobile_common_dirs)
439 winaot_PARALLEL_SUBDIRS := $(winaot_dirs_parallel)
441 testing_winaot_interp_SUBDIRS := $(mobile_common_dirs)
442 testing_winaot_interp_PARALLEL_SUBDIRS := $(testing_winaot_interp_dirs_parallel)
444 orbis_SUBDIRS := $(mobile_common_dirs)
445 orbis_PARALLEL_SUBDIRS := $(orbis_dirs_parallel)
447 unreal_SUBDIRS := $(mobile_common_dirs)
448 unreal_PARALLEL_SUBDIRS := $(unreal_dirs_parallel)
450 wasm_SUBDIRS := $(mobile_common_dirs)
451 wasm_PARALLEL_SUBDIRS := $(wasm_dirs_parallel)
452 wasm_tools_SUBDIRS :=
453 wasm_tools_PARALLEL_SUBDIRS := $(wasm_tools_dirs_parallel)
455 netcore_SUBDIRS :=
456 netcore_PARALLEL_SUBDIRS :=
458 include ../build/rules.make
460 DIST_SUBDIRS = $(testing_aot_full_dirs_parallel) $(testing_aot_hybrid_dirs_parallel) $(monotouch_dirs_parallel) $(monotouch_tools_dirs_parallel) \
461 $(monodroid_dirs_parallel) $(monodroid_tools_dirs_parallel) $(xammac_dirs_parallel) $(net_4_x_dirs) $(net_4_x_parallel_dirs) \
462 $(xammac_4_5_dirs_parallel) $(unreal_dirs_parallel) $(wasm_dirs_parallel) $(wasm_tools_dirs_parallel) $(xbuild_14_SUBDIRS) \
463 $(testing_aot_full_interp_dirs_parallel) $(netcore_SUBDIRS) dlr aot-compiler reference-assemblies Facades
465 # No new makefiles for: System.Messaging, System.Web.Mobile,
466 # System.ServiceProcess
468 DISTFILES = \
469 ecma.pub \
470 winfx.pub \
471 winfx3.pub \
472 mono.pub \
473 msfinal.pub \
474 silverlight.pub \
475 reactive.pub \
476 mono.snk \
477 Open.snk \
478 LICENSE \
479 README \
480 doc/API-notes \
481 doc/NUnitGuidelines \
482 doc/TemplateTest.cs \
483 notes/BitVecto32.txt \
484 MicrosoftAjaxLibrary/License.htm \
485 test-helpers/AdminHelper.cs \
486 test-helpers/Configuration.Http.cs \
487 test-helpers/NetworkHelpers.cs \
488 test-helpers/NunitHelpers.cs \
489 test-helpers/PlatformDetection.cs \
490 test-helpers/RemoteExecutorTestBase.Mobile.cs \
491 test-helpers/RemoteExecutorTestBase.Mono.cs \
492 test-helpers/SocketResponder.cs \
493 test-helpers/TestResourceHelper.cs \
494 test-helpers/PathHelpers.cs \
495 $(foreach HOST_PLATFORM,macos linux win32 unix,lib/$(monolite_dir)/mcs.exe $(monolite_files))
497 .PHONY: all-local $(STD_TARGETS:=-local)
498 all-local $(STD_TARGETS:=-local):
501 all-local-aot:
503 monolite_dir = monolite-$(HOST_PLATFORM)/$(MONO_CORLIB_VERSION)
505 # Files needed to bootstrap C# compiler and cil-stringreplacer
506 build_files := mscorlib.dll System.dll System.Xml.dll Mono.Security.dll System.Core.dll System.Security.dll System.Configuration.dll \
507 System.Numerics.dll System.Xml.Linq.dll System.IO.Compression.dll \
508 Facades/System.Collections.Concurrent.dll Facades/System.Linq.dll Facades/System.Runtime.dll Facades/System.Collections.dll \
509 Facades/System.Reflection.Extensions.dll Facades/System.Text.Encoding.Extensions.dll Facades/System.Diagnostics.Debug.dll \
510 Facades/System.Reflection.Primitives.dll Facades/System.Text.Encoding.dll Facades/System.Diagnostics.Tools.dll Facades/System.Reflection.dll \
511 Facades/System.Threading.Tasks.Parallel.dll Facades/System.Dynamic.Runtime.dll Facades/System.Resources.ResourceManager.dll \
512 Facades/System.Threading.Tasks.dll Facades/System.Globalization.dll Facades/System.Runtime.Extensions.dll Facades/System.Threading.dll \
513 Facades/System.IO.dll Facades/System.Runtime.InteropServices.dll Facades/System.Xml.ReaderWriter.dll Facades/System.Linq.Expressions.dll \
514 Facades/System.Runtime.Numerics.dll Facades/System.Xml.XDocument.dll Facades/System.IO.FileSystem.Primitives.dll Facades/System.IO.FileSystem.dll \
515 Facades/System.Diagnostics.FileVersionInfo.dll Facades/System.Security.Cryptography.Primitives.dll Facades/System.Security.Cryptography.Algorithms.dll \
516 Facades/System.ValueTuple.dll Facades/System.Text.Encoding.CodePages.dll Facades/netstandard.dll \
517 Mono.Cecil.dll
519 monolite_files = $(build_files:%=lib/$(monolite_dir)/%)
521 lib/$(monolite_dir):
522 lib/$(monolite_dir)/Facades:
523 $(MKINSTALLDIRS) $@
525 $(monolite_files): | lib/$(monolite_dir)
526 $(monolite_files): | lib/$(monolite_dir)/Facades
527 $(monolite_files): lib/$(monolite_dir)/%: lib/build-$(HOST_PLATFORM)/%
528 cp -p $< $@
530 lib/$(monolite_dir)/mcs.exe:
531 $(MAKE) -C ../mcs PROFILE=build
532 cp -p lib/build-$(HOST_PLATFORM)/mcs.exe lib/$(monolite_dir)
534 $(build_files:%=lib/build-$(HOST_PLATFORM)/%):
535 cd $(topdir) && $(MAKE) profile-do--build--all NO_DIR_CHECK=1 SKIP_AOT=1
537 dist-monolite: $(monolite_files) lib/$(monolite_dir)/mcs.exe
539 dist-monolite-all-platforms:
540 $(MAKE) dist-monolite HOST_PLATFORM=macos
541 $(MAKE) dist-monolite HOST_PLATFORM=linux
542 $(MAKE) dist-monolite HOST_PLATFORM=win32
543 $(MAKE) dist-monolite HOST_PLATFORM=unix
545 package-monolite-latest:
546 MONOLITE=monolite-$(HOST_PLATFORM)-$(MONO_CORLIB_VERSION)-latest; \
547 $(MAKE) dist-monolite monolite_dir=$$MONOLITE; \
548 tar zcvpf $$MONOLITE.tar.gz --directory=lib $$MONOLITE/
550 package-monolite-latest-all-platforms:
551 $(MAKE) package-monolite-latest HOST_PLATFORM=macos
552 $(MAKE) package-monolite-latest HOST_PLATFORM=linux
553 $(MAKE) package-monolite-latest HOST_PLATFORM=win32
554 $(MAKE) package-monolite-latest HOST_PLATFORM=unix
556 monolite_url = https://download.mono-project.com/monolite/monolite-$(BUILD_PLATFORM)-$(MONO_CORLIB_VERSION)-latest.tar.gz
558 get-monolite-latest:
559 -rm -fr lib/monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)
560 -mkdir -p lib/monolite-$(BUILD_PLATFORM)
561 cd lib && { (wget -O- $(monolite_url) || curl -L $(monolite_url)) | gzip -d | tar xf - ; }
562 cd lib && mv -f monolite-$(BUILD_PLATFORM)-$(MONO_CORLIB_VERSION)-latest monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)
564 dist-default: dist-monolite-all-platforms
566 dist-local: dist-default
568 csproj-local:
570 do-clean:
571 $(RM) -rf $(topdir)/class/lib/$(PROFILE)
573 ## Aliases for .dep_dirs-* tracker
574 .PHONY: Microsoft.Build.Utilities.v4.0 System.ComponentModel.Composition System.Xml
575 Microsoft.Build.Utilities.v4.0: Microsoft.Build.Utilities
576 System.ComponentModel.Composition: System.ComponentModel.Composition.4.5
577 System.Xml: System.XML