Compare commits

..
314 Commits
Author SHA1 Message Date
monojenkins d01276bb36 Bump API snapshot submodule 2018-10-07 15:25:44 +02:00
Marek Safar 7f1768441c Bump corefx 2018-10-07 15:25:44 +02:00
Alexander Köplinger 39d89a335c Fix build of mono-merp.c
It was missing the format arguments that were in a later iteration of https://github.com/mono/mono/pull/10823
2018-09-27 10:45:44 +02:00
monojenkins a533cb343b [merp] Fix return value handling of posix_spawn (#10824) 2018-09-26 11:46:09 -04:00
Ludovic Henry c5b8988d22 [sdb] Disable an assert to avoid breaking debugging. (#10315)
Fixes https://github.com/mono/mono/issues/8848.
Fixes https://github.com/mono/mono/issues/9262.
Fixes https://github.com/mono/mono/issues/8627.
2018-08-27 17:42:24 -04:00
Alexander Kyte 15eab7066c [2018-02] Add pipeline to convert managed exception into telemetry format (#10249) 2018-08-27 15:56:04 -04:00
Alexander Köplinger e0e035e3b1 Bump xunit-binaries
Gets in fix for invalid NUnit xml output generated by xunit

(cherry picked from commit 0955dd2307)
2018-08-22 14:03:40 +02:00
monojenkins 4e0a2ac0dd [llvm] Avoid using the preserveall calling convention on watchos, xcode10 asserts on it. (#9325)
Fixes https://github.com/mono/mono/issues/9318.
2018-08-20 21:33:45 +02:00
Alexander Köplinger 02928166e5 Bump nunitlite to get NUnit2 xml output fix and failure on file not found fix (#10188)
See mono/NUnitLite#11 and mono/NUnitLite#12

(cherry picked from commit 8f67fb9fb1)
2018-08-20 14:43:14 +02:00
monojenkins 6c1f4b9746 [System.Xml.Linq] Fix namespace conflict with new Xamarin.Mac namespace in test code. (#10185)
macOS 10.14 introduces a Network framework, which means Xamarin.Mac now has a Network namespace.

This conflicts with 'using Network = System.Net':

> mono/mcs/class/System.Xml.Linq/Test/System.Xml.Schema/ExtensionsTest.cs(97,27): error CS0576: Namespace '<global namespace>' contains a definition conflicting with alias 'Network'

so just remove the using and use the full 'System.Net' namespace instead.
2018-08-20 12:11:43 +02:00
Marek Safar 4fe3280bba Revert "[sdk] Do not fix android platform-tools version. Make it configurable. (#9508)"
This reverts commit 077307fce4.
2018-07-20 13:56:50 +02:00
Marek Safar 12ae4f9b0c Revert "[runtime] Fix the --enable-minimal=aot build. (#9394)"
This reverts commit 1bdbf71a8b.
2018-07-20 13:56:50 +02:00
Marek Safar a2b95fbb4b Revert "[2018-02] Backport /bin/bash shell set for wasm"
This reverts commit 97aa066389.
2018-07-20 13:56:50 +02:00
monojenkins f795aa5d2d [llvm] Avoid using the preserveall calling convention in another place on watchos. (#9578)
Fixes https://github.com/mono/mono/issues/9318.
2018-07-19 12:49:21 +02:00
monojenkins 04493d2224 Fix LogcatTextWriter_Log interpreting messages it logs, potentially writing random garbage and/or crashing (introduced by https://github.com/mono/mono/commit/984f6484666c2ee6fefec949c81fdff1189c9488) (Fixes https://github.com/xamarin/xamarin-android/issues/1951) (#9612) 2018-07-18 11:41:09 -04:00
Alexander Kyte 35284c340c [runtime] Make sigterm dumper send file to merp (#9586) 2018-07-18 11:38:20 -04:00
monojenkins 077307fce4 [sdk] Do not fix android platform-tools version. Make it configurable. (#9508) 2018-07-14 10:48:31 +02:00
monojenkins 1ad118647c [arm64] Make OP_CHECK_THIS read only a byte, to prevent unaligned access errors. (#9546) 2018-07-14 10:45:50 +02:00
Alexander Köplinger 86f99d31bd Merge pull request #9483 from alexanderkyte/2018-02-merp_params
[Backport 2018-02] Add merp parameters
2018-07-12 21:15:53 +02:00
Alexander Kyte 97aa066389 [2018-02] Backport /bin/bash shell set for wasm 2018-07-11 14:43:56 -04:00
Alexander Kyte 37091f00c2 [runtime] Enable application to register path for MERP restart 2018-07-10 15:28:40 -04:00
Alexander Kyte 955ad4538e [runtime] Make merp eventType icall argument 2018-07-10 15:28:20 -04:00
Jay Krell fc0c12f768 [Coop] Convert Mono.Runtime to coop. (#8599) 2018-07-10 15:27:49 -04:00
Bernhard Urban c495285cac [debugger] more locking and avoid race around mono_threads_join_lock & loader lock 2018-07-10 10:12:39 +02:00
Alexander Kyte d18b8941ab [debugger] Add locking around tls->frames usage/freeing 2018-07-10 10:12:39 +02:00
monojenkins 1bdbf71a8b [runtime] Fix the --enable-minimal=aot build. (#9394)
[2018-02] [runtime] Fix the --enable-minimal=aot build.

Backport of #8952.

/cc @lewurm
2018-07-09 15:25:40 -04:00
monojenkins cae8c54884 [mini] add workaround for AMD Ryzen Threadripper issue (#9358)
[2018-02] [mini] add workaround for AMD Ryzen Threadripper issue

Backport of #9321.

/cc @lewurm
2018-06-30 03:40:24 -04:00
Aleksey Kliger 8b479398bb [loader] LoadFrom of problematic images should reprobe (correctly)
This reverts commit 569bd3bc52
which itself reverted efe1fdeb9d.

Additionally, cherrypick 60f06e6ca2: refonly load
of problematic image is allowed.
2018-06-29 16:43:08 +02:00
monojenkins 9ef7249458 [2018-02] [sdks] Only rebuild MXE when it doesn't exist, not when we just cloned the sources (#9364)
* [sdks] Only rebuild MXE when it doesn't exist, not when we just cloned the sources

* [sdks] Default to ~/android-toolchain and ~/android-archives to better share with XA
2018-06-29 14:15:52 +02:00
Alexander Kyte cd5d306ea0 Merge pull request #9330 from monojenkins/backport-pr-9274-to-2018-02
[2018-02] Make requested MERP file format changes
2018-06-28 11:29:36 -04:00
Alexander Kyte 8b628bb532 [merp] Change XML file output path 2018-06-27 10:21:41 +00:00
Alexander Kyte 671db7c46d [merp] Change and emit event type 2018-06-27 10:21:41 +00:00
monojenkins a57665c315 [2018-02] [runtime] Package merp params in 3 ways needed (#9270)
* [runtime] Package merp params in 3 ways needed

* [runtime] Use GUID rather than assembly name in json
2018-06-25 21:31:50 +02:00
monojenkins f552ff99a1 [runtime] Make mono-state dumper abandon stuck threads (#9271)
Threads which do things with signals and locks may end up unresponsive
to our signals. I cannot get threads that crash in a lock to respond to
SIGTERM on Darwin even if I explicitly unmask SIGTERM on those threads.

In order to defensively program against platform bugs around signals and
stubborn threads, we need to be able to abandon these threads and
continue, dumping other threads.
2018-06-25 21:29:50 +02:00
Bernhard Urban 4e1474e9e3 [interp] check existence of InterpMethod before removing it from interp code hastable
when creating dynamic methods, we put those in a queue so they can be
collected later via `mono_jit_free_method ()`. the interpreter part was
assuming, as soon as we allocate a dynamic method, it will be executed
eventually and therefore an InterpMethod must exist in
`info.interp_code_hash`, but this isn't necessarily the case.
2018-06-18 11:24:55 +02:00
monojenkins f3235f3d03 [Linux,XA build] Fix building of Windows cross-compilers on Ubuntu Linux (#9172)
Ubuntu Linux (possibly others too, but only Ubuntu is tested thus the
limitation) don't need to build or use `mxe`, they instead use mingw packaged
for the distribution, thus making the build faster.

This commit detects the Linux flavor in use and, if it's Ubuntu, configures the
build so that system mingw is used instead of mxe.
2018-06-16 15:16:36 +02:00
monojenkins 3467e374ba [SDKS,Android] Install cmake when provisioning Android SDK (#9140)
Android NDK supports cmake in addition to the older make-based ndk-build as the
build system and Xamarin.Android is in the process of switching the build of its
native bits to cmake. The reason for this switch is that certain parts of
Xamarin.Android (libmonodroid) are built for both the host system and
the Android target. The host system build currently uses hand-crafted code
directly in .csproj to build the native bits while the Android build uses
ndk-build. This results in duplication of code, compiler parameters are
specified in two locations - it is easy to introduce incompatibilities, bug
fixes may be applied only in one scenario etc.

Using cmake allows us to use a single build "script" for all the targets, thus
making the build more reliable. Android SDK has a cmake package which contains
full support for NDK builds and allows us to easily use cmake across all the
supported platforms without having to install cmake on the host system.

This commit adds the cmake package to the Android SDK provisiong process and,
alas, at the same time adds a workaround to properly unpack the package. Unlike
other Android SDK packages, cmake doesn't unpack to a single subdirectory of the
zip root, instead all its files and directories are placed directly in the zip
root. This requires yet another workaround to install the package properly.
2018-06-16 15:14:33 +02:00
Ankit Jain f353dc4db0 Bump msbuild to track mono-2018-02 (#9129) 2018-06-14 14:29:07 -04:00
Rodrigo Kumpera f59eac4c0f [profiler] Don't raise events until the profiler transitions to the ready state. Fixes #8866.
We can't raise event before that as the profiler depends on too much runtime
infrastructure at this point for it to reliably work.

For example, we need the threading infrastructure to be init'd so we can access the
thread-local profiler state to store events there.
2018-06-14 15:02:19 +02:00
Marek Safar a37e6e5739 Bump corefx to fix System.Data windows build 2018-06-13 18:20:52 +02:00
monojenkins 6f9bef3bdb update to Android P final API. (#9078) 2018-06-07 16:22:46 -07:00
Zoltan Varga 1c24c158b0 [bitcode] Fix the generation of invalid llvm IR for some Span code. 2018-06-01 12:22:18 +02:00
monojenkins a49a68c6d7 [interp] Fix native to interp transition (#8957)
When using the interp_wrapper to enter interp from native we don't need to save the lmf since it doesn't make sense to unwind to native. Also make sure we have the interp context set up if we weren't attached at interp transition time.
2018-05-31 09:37:55 +02:00
Marek Safar 92e11812f4 [System.Runtime.Serialization] Makes more APIs work for mobile 2018-05-30 23:54:22 +02:00
monojenkins 260676f948 Bump API snapshot submodule 2018-05-30 23:53:47 +02:00
Matt Sylvia eefdf4ed31 Bump external/cecil to b6c50e3 2018-05-30 23:53:47 +02:00
Alexander Kyte 0754926394 [2018-02] Finalize merp integration (#8869) 2018-05-29 15:19:34 -04:00
monojenkins 7bdb7dd765 Bump API snapshot submodule 2018-05-29 09:52:20 +02:00
Marek Safar 65d719d16e [Facades] Removes System.Memory 2018-05-29 09:52:20 +02:00
Rodrigo Kumpera 88262b52d2 [profiler] Switch tls storage to use mono_thread_info_get/set_tools_data. Fixes #7683
External threads are detached using TLS destructors and this leads to non-determinism around to cleanup ordering of keys.
This causes the profiler to see the profiler tls key null'd even though it was not detached yet.
2018-05-28 10:19:02 +02:00
Rodrigo Kumpera aaed1f77ce [mono-threads] Introduce mono_thread_info_get/set_tools_data so they can store data sanely.
The tools_data is a helper to bind tls data lifecycle to MonoThreadInfo.
This is needed to make it sane to deal with posix TLS destructors.
2018-05-28 10:19:02 +02:00
Alexander Kyte 58637d0ee7 [runtime] Gracefully handle crashes before mono-state dependencies initialized (#8842) 2018-05-24 12:38:14 -04:00
EgorBo c22f532871 don't fail on unsupported ipv6 in BeginConnect 2018-05-24 11:28:56 +02:00
monojenkins d2a4141475 Bump API snapshot submodule 2018-05-24 09:59:48 +02:00
Marek Safar 5db90bde0c Update failing mcs tests 2018-05-24 09:59:48 +02:00
Marek Safar 21716f8b68 [corlib] Hide types which could conflict with System.Memory 2018-05-24 09:59:48 +02:00
monojenkins f2381f329a [monitor] Fix abort of synchronisation wrapper (#8827)
Backport of #8812.

/cc @marek-safar
2018-05-23 10:57:06 -04:00
Alexis Christoforides 4afcb37eca Merge pull request #8837 from monojenkins/backport-pr-7412-to-2018-02
[2018-02] [MacSDK] Update Nuget to 4.7.0
2018-05-23 10:00:17 -04:00
Alexis Christoforides 139d2a441b [MacSDK] Update Nuget to 4.7.0
This update includes (should include) https://github.com/NuGet/NuGet.Client/commit/eca1a8d23a54818c116eef63875de6a554227ea7 which we need in Mono.
2018-05-23 13:58:41 +00:00
Alexander Kyte 76c1c1baec [runtime] Add missing va_start (#8807) 2018-05-22 18:07:07 -04:00
monojenkins 9529b37b69 [android] Fix truncating of messages longer than 4096 characters (#8763)
Backport of #8735.

/cc @marek-safar
2018-05-22 16:57:59 -04:00
Ankit Jain f80aeb547f Bump msbuild to track mono-2018-02 (#8728) 2018-05-22 20:49:52 +02:00
Alexander Kyte cbbe573e20 Merge pull request #8687 from alexanderkyte/2018-02-freeform
Backport "Implement Freeform Unmanaged Error" to 2018-02
2018-05-21 22:05:30 -04:00
Alexander Kyte f80ae8146f [runtime] Fixup freeform unmanaged exception handler 2018-05-21 16:46:00 -04:00
Zoltan Varga 5152e84055 [aot] Fix encoding/decoding of types with custom modifiers. (#8729)
* [aot] Fix encoding/decoding of types with custom modifiers.

Fixes https://github.com/mono/mono/issues/8701.

* [aot] Add a test, disabling for now because it depends on c# 7.2.

* [aot] Bump AOT file format version.

* [aot] Only disable the test with mcs.

* [aot] Fix compilation of test.
2018-05-21 18:39:45 +02:00
Alexander Köplinger 35d4d7e8e6 [ci] Fix URL for apidiff/csprojdiff report
The upgraded HTML publisher plugin on Jenkins now generates a different URL.

(cherry picked from commit fa9579a8fa)
2018-05-18 14:27:16 +02:00
monojenkins d3fa0e12d0 [Mono.CSharp] Mimic the settings from System to track the feature flags, fixes GitHub #8698 (#8705) 2018-05-14 21:04:16 +02:00
Ankit Jain 2c0121911d Bump msbuild to track mono-2018-02 (#8682) 2018-05-14 12:46:41 +02:00
Alexander Kyte fc45400caa [runtime] Make unhandled state dumper OSX-specific
Since this needs to be backported, we're going to make this osx-specific
for now, and then I'll backport this. This is fully working on linux,
including the android SDK at the time of this commit
2018-05-11 19:33:27 -04:00
Alexander Kyte baf8448122 [runtime] Fix windows build 2018-05-11 19:32:41 -04:00
Alexander Kyte e6b6562cdc [runtime] Fix merp reference in mono-state code 2018-05-11 19:32:40 -04:00
Alexander Kyte c0bf542e2a [runtime] Add freeform dumper preprocessor symbols to autogen 2018-05-11 19:32:40 -04:00
Alexander Kyte 4f23989316 [runtime] Add CI dumper using mono-state 2018-05-11 19:32:39 -04:00
Alexander Kyte 514c06b12f [runtime] Integrate signal-based state machine with merp forking 2018-05-11 19:30:43 -04:00
Alexander Kyte d785f7d7f0 [runtime] Write unmanaged exception dumper 2018-05-11 19:30:42 -04:00
Alexander Kyte b7ea31a324 [runtime] Add helper to get portable IP value 2018-05-11 19:28:28 -04:00
Alexander Kyte 8d2dc95494 [runtime] Make assertion message fetchable 2018-05-11 19:28:28 -04:00
Ankit Jain 93e3dafc38 [msbuild] Bump to track mono-2018-02 branch which tracks vs15.7 (#8596)
* Bump msbuild to track mono-2018-02

.. and track changes in the build scripts.

* [msbuild] Zip test results and log files for surfacing in jenkins (#8523)

(cherry picked from commit 0b8f0d2f83)
2018-05-08 19:25:20 +02:00
Alexander Köplinger 965c939531 Merge pull request #8580 from radical/nuget-hash-updates-2018-02
nuget-hash-extractor: updates
2018-05-05 18:28:50 +02:00
monojenkins 7c317d0af3 [native types] fix nfloat:NaN on arm64 JIT and interp (#8564)
interp: If one of the operands is NaN, we have a default result: It is false (0)
when doing a compare (`ceq_r8`), but must be true (1) on `cne_r8`.

JIT: match behaviour what C# compiler would generate for float/double.
2018-05-04 17:08:21 -07:00
Ankit Jain 6ec37b18d9 nuget-hash-extractor: Add msbuild extensions nuget version from
.. mono-2018-02 branch, which tracks vs15.7:

    Microsoft.NET.Build.Extensions:         2.1.200-preview-62827-05

Version from:
https://github.com/dotnet/cli/blob/b390c9805e6730886129e424f9ce23ee4604266c/build/DependencyVersions.props

None of the assemblies were newer, so none of the lists have any
changes.
2018-05-04 17:34:34 -04:00
Ankit Jain 2a90cd598d nuget-hash-extractor: Add msbuild extensions nuget version from
.. xplat-master msbuild branch.

	Microsoft.NET.Build.Extensions:         2.1.300-preview3-62804-06

Version from:
https://github.com/dotnet/cli/blob/8c937a0db08e56660aca456ac088f2d0e70735ab/build/DependencyVersions.props

None of the assemblies were newer, so none of the lists have any
changes.

(cherry picked from commit 7d68b33343)
2018-05-04 17:11:37 -04:00
Ankit Jain 48fcc7e350 nuget-hash-extractor: Add all option to emit all 3 lists
This is faster than invoking the extractor thrice.

(cherry picked from commit 34d79079d2)
2018-05-04 16:57:07 -04:00
Ankit Jain 90b0ea99cd nuget-hash-extractor: Improvements for better, deterministic output
- Ensure the various lists we emit have unique entries, are sorted to be
deterministic
- Ignore ref assemblies

(cherry picked from commit de7a1ec01b)
2018-05-04 16:57:01 -04:00
Ankit Jain 217d0c7ab7 nuget-hash-extractor: Sort the lists for easier reviews
mcs/tools/xbuild/data/deniedAssembliesList.txt:
	- sorted by name and assembly version
	- This file had one duplicate line
		System.Text.Encoding.CodePages.dll,FD178CD4-EF4F-44D5-9C3F-812B1E25126B,4,0,2,0

mono/metadata/image.c:
	- sorted by hashcode
	- This had one duplicate line
		IGNORED_ASSEMBLY (0xFA686A38, SYS_TEXT_ENC_CODEPAGES, "FD178CD4-EF4F-44D5-9C3F-812B1E25126B", "4.3.0 net46"),

(cherry picked from commit 376050c2bc)
2018-05-04 16:56:48 -04:00
Rolf Bjarne Kvinge 9824e260f5 Only show config.log when running on bots. 2018-04-30 23:20:20 +01:00
Rolf Bjarne Kvinge a085951264 [sdks] Wrap configure to provide better output.
Wrap configure in a script that:

* Captures stdout/stderr and only shows it in case of errors.
* If configure fails, and a cache file was used, deletes the cache file and
  tries again.
* If configure really fails, then print config.log in addition to
  stdout/stderr, since a lot of valuable diagnostic output is in that file
  (and it's annoying to track down configure failures on bots when the file
  with the important output has already been deleted).
2018-04-30 23:20:20 +01:00
monojenkins b4a42e6e4b [sdks] fix $(mktemp) usage on older versions of macOS (#8520)
Context: https://unix.stackexchange.com/questions/30091/fix-or-alternative-for-mktemp-in-os-x

When making the bumps to use the `mono-sdks` upstream in Xamarin.Android,
we were getting build errors such as:

    usage: mktemp [-d] [-q] [-t prefix] [-u] template ... (TaskId:404)

The build bot is running Mavericks (10.9), so it must be an issue with older
versions of macOS.

When reading the Unix StackExchange post, it appears that the `-t` option
without a template should work more reliably on older macOS versions.

Then I tested it locally via `make -C sdks/builds provision-android`.

The command:

    mktemp -d unzip_android_archive_XXXXXXXX

Resulted in paths such as:

    creating: unzip_android_archive_Nt1XzgS5/android-P/

And sure enough, looking into `sdks/builds` it had created a directory in
the working directory, so it isn't using a path inside of `$TMPDIR`.

Changing the command to:

    mktemp -d -t unzip_android_archive_XXXXXXXX

Resulted in paths such as:

    creating: /var/folders/nx/rzr6lcqj6j3_vp7vtp28v2cw0000gn/T/unzip_android_archive_W247QkyW/android-P/

The StackExchange post mentions `-t` is a "prefix" that gets expanded to
`$TMPDIR/{prefix}.XXXXXXXX`, so I think it is better to use this option as
long as it works on all platforms.
2018-04-30 17:24:43 -04:00
Vlad Brezae a0228295dc [2018-02][interp] Backport interp entry changes (#8464)
* [interp] Enter in the interp through a single generic trampoline (#8056)

* [arm] Create trampoline for passing fixed arguments

It is the same as static rgctx trampoline, but it clobbers ARMREG_IP

* [arm] Create trampoline for native to interp transition

* [arm] Add interp entry from trampoline

Tweak CallContext methods to work in opposite direction

* [interp] Create wrapper that saves lmf for m2i transitions

If we want to unwind from interpreter directly into managed code we need to have a wrapper whose purpose is to save the lmf, so we can start unwinding frame by frame.

* [arm] Add unwind info for interp entry trampoline

We need to unwind through this trampoline since it sits between jitted code and the interp lmf wrapper.

* [interp] Let the unwinder unwind through trampolines

These frames are still ignored (by EH and stack walking), they are only used for unwiding further to the caller.

* [interp] Interp entry trampoline for arm64

* [interp] Include lmf wrapper in aot image

* [arm64] Add unwind info for native to interp trampoline

* [arm64] Set correct frame type for trampoline frames
2018-04-26 14:18:11 -04:00
Ludovic Henry 91509419f5 [2018-02] [mini] Don't verify types if you store to a pointer byref. (#8424)
* [mini] Don't verify types if you store to a pointer byref. Workarounds #8403.

* [mini] Add regression test for punting a type system check.
2018-04-24 13:46:29 -04:00
monojenkins 07ba54237d [arm] Fix a regression introduced by: (#8416)
[watch] Align cinfo->stack_usage to 16 on watchos. (#8354)

Fixes https://github.com/mono/mono/issues/8409.
2018-04-24 03:55:48 -04:00
monojenkins 5130d89a0d [watch] Align cinfo->stack_usage to 16 on watchos. (#8376)
Fixes https://github.com/mono/mono/issues/7685.
2018-04-23 12:57:15 -04:00
Ludovic Henry 78740e252b [2018-02] [runtime] Add a signal handler for sigterm (#8383)
* [runtime] Add a signal handler for sigterm

* [runtime] Register sigtramp when merp handler enabled

* [runtime] Limit sigterm handler symbol definition to OSX
2018-04-23 08:49:27 -04:00
monojenkins 0d37a86d2c [sdks] Match more closely the pre-SDKs configure flags passed to LLVM (#8380) 2018-04-20 16:07:37 -04:00
monojenkins 9061f77e7f [System.Net] do not use Thread for SocketTest.TestSelect1 (#8369)
it makes the test less reliable. Potentially helps with
https://github.com/mono/mono/issues/8360
2018-04-20 13:49:00 -04:00
monojenkins 700f316825 Fix mono_perfcounter_instance_exists to match prototype when #ifndef DISABLE_PERFCOUNTERS. (#8335) 2018-04-20 11:24:58 -04:00
Niklas Therning 12d764f5a0 Remove unused signal.h include in interp.c
This include breaks compiling the interpreter on platforms which don't have a
signal.h. The code in interp.c doesn't seem to need it to be included anyway.
2018-04-19 22:55:43 +02:00
monojenkins 638a7ed3b0 [corlib] Disable failing test on XA (#8352)
This follows https://github.com/mono/mono/commit/64ec2dd3eb1309b84819b34c4279d946acacd082.
2018-04-19 15:39:09 -04:00
monojenkins 6c5b8bcc39 [sdks] Fix mktemp parameters (#8324) 2018-04-18 19:20:10 -04:00
monojenkins b1dda64bda [corlib] Fix TimeZoneInfo.Local when /usr/share/zoneinfo is a symlink (#8304)
We'd be using the path verbatim to compare with the resolved value of
/etc/localtime but if it's a symlink (like on OSX 10.13+) the comparison failed.

The fix is to resolve any symlinks for /usr/share/zoneinfo too.

Fixes https://github.com/mono/mono/issues/8267 and https://github.com/xamarin/maccore/issues/628
2018-04-18 21:14:38 +02:00
monojenkins 64ec2dd3eb [corlib] SynchronizationContext does not work on non-root AppDomain on Android (#8296)
AndroidEnvironment.GetDefaultSyncContext just crashes when called on an AppDomain which is not the root AppDomain. This started appearing with the mono:2018-02 integration during which https://github.com/mono/mono/commit/252d61d0558b0bfa3461f3339ce617e2e4c285bb was introduced.

Fixes https://github.com/xamarin/xamarin-android/issues/1561\#issuecomment-381736716
2018-04-18 11:09:24 -04:00
monojenkins 9bbc930d62 [w32file-unix] fix mistake in 8430155946 (#8299)
commit message said
> [w32file-unix] convert nano seconds to microseconds properly, by using
> TICKS_PER_MILLISECOND (which has L suffix in its definition)

first it talks about microseconds, but then uses constant for _milli_
seconds
2018-04-18 13:44:28 +02:00
Rolf Bjarne Kvinge 891c01eb6e [2018-02] [runtime] Add public API to set the pending exception. (#8280)
* [runtime] Add public API to set the pending exception.

Xamarin.iOS and Xamarin.Mac need a public API to set the pending exception
when converting Objective-C exceptions to managed exceptions.

This adds a public API to support this scenario.

Partially fixes https://bugzilla.xamarin.com/show_bug.cgi?id=60065.

* [runtime] Document that pending exceptions should not be overwritten when the runtime is handling a thread abort request.
2018-04-17 22:31:41 -04:00
Marek Safar e03516d11f [mcs] Implements C# 7 digits separators 2018-04-18 03:08:17 +02:00
monojenkins 4a00c501b2 [2018-02] Harden JIT job control against cctors deadlocking. (#8235)
* [mini] Don't wait for other threads to finish JITing if the current thread is running a cctor.

This eliminates a possible source of deadlocks found during AOT runs of Roslyn.

* [mini] Introduce a 1s timeout to JIT job control to ensure we don't simply deadlock in case of execution dependency bugs.

* [mini] fix spelling5DD
2018-04-15 13:26:13 -04:00
monojenkins 34b31f05f5 [2018-02] Fix timestamp for file copy (#8247)
* [FileTest] regression for https://github.com/xamarin/xamarin-macios/issues/3929

* [w32file-unix] fix File.Copy timestamps

4a8d840d6f introduced that the destination
file of a copy operation has the same modification and access timestamps
as the source file.

With e0e185d70a this behaviour regresses,
since getting timestamps provides more precise information. Fixing this
by being more accurate when applying timestamps to destination file.

* [w32file-unix] convert nano seconds to microseconds properly, by using TICKS_PER_MILLISECOND (which has L suffix in its definition)

* [w32file-unix] introduce constant for ns->qs conversion with proper suffix

fixes problem on 32bit.
2018-04-15 13:24:29 -04:00
monojenkins 8e08947e1c [sdks] Fix typo + Fix verbosity of unzip-android-archive.sh (#8243) 2018-04-13 19:37:04 -04:00
Ludovic Henry d96186b5e8 [w32handle] Lower minimum memory usage (2nd attempt) (#8154)
Adopts a linked list of MonoW32HandleSlot (based on feedback from Rolf Kvinge). This allows for an unlimited amount of handles to be allocated, as well as for a lower cost to allocate only 1 handle across the process.

Fixes https://github.com/mono/mono/issues/7460
2018-04-13 18:15:07 -04:00
monojenkins 763e7f9d78 [system.net] disable some tests to unblock XI integration (#8205)
regression tracked here: https://github.com/xamarin/xamarin-macios/issues/3827
2018-04-12 21:59:31 -04:00
Rolf Bjarne Kvinge 35cb6bda95 [System.Net.Http] Use '*' as the host instead of '+' in the tests. Fixes xamarin/maccore#673.
Use '*' as the host instead of '+' in the tests.

The behavior should be the same, just faster, because '+' will fail to resolve
("Could not resolve host '+'"), and we'll fall back to the same behavior as
'*': https://github.com/mono/mono/blob/5128cce2dcd097aa4e7b86dd3b56e833c15a9ff0/mcs/class/System/System.Net/EndPointManager.cs#L83-L96

The problem arises when failing to resolve '+' takes a long time: on some of
our bots it takes 5-10 seconds. This adds up quickly since the tests try many
times, effectively increasing a test run from 1-2 seconds to 30+ minutes.

Fixes https://github.com/xamarin/maccore/issues/673.
2018-04-12 17:48:55 +02:00
Aleksey Kliger 61da4c7a5f [eglib] GMarkup: allow all ASCII NameStartChar and NameChar except ':'
Follow https://www.w3.org/TR/xml/#sec-common-syn except don't allow ':' and
non-ASCII.

Element and attribute names must start with a letter or '_'.
Element and attribute names may contain letters, numbers, '.', '-', '_'.

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=19436
2018-04-12 01:25:44 +02:00
monojenkins 2710e67296 [sdks] Add ANDROID_BUILD_TOOLS_DIR to differentiate it from ANDROID_BUILD_TOOLS_VERSION (#8192) 2018-04-11 19:10:21 -04:00
monojenkins dbf27d49ad [sdks] Fix typo (#8187) 2018-04-11 18:18:23 -04:00
Ludovic Henry 02390a7414 [sdks] Fix build (#8183) 2018-04-11 15:34:38 -04:00
Marek Safar cea4294912 [corlib] Make more crypto oids work on mobile profiles when not linked out 2018-04-11 17:14:21 +02:00
Marek Safar 9e7efad7be [mcs] Fixes parameter check for interface types used with default parameters 2018-04-11 11:04:20 +02:00
Zoltan Varga d0562a9e6f [sdks] Add support for building llvm unless the USE_PREBUILT_LLVM Make.config var is set. (#8017) (#8150)
* [sdks] Add support for building llvm unless the USE_PREBUILT_LLVM Make.config var is set.

* [sdks] Use prebuilt llvm binaries on ios CI.

* [sdks] Use the IGNORE_PACKAGE_LLVM variable to enable the building of llvm.
2018-04-10 15:26:31 -04:00
Alexander Köplinger 887d3ad27e [System] Don't use http://www.mono-project.com for test (#8147)
When we tried switching mono-project.com to enforce HTTPS these tests
started failing on systems without working SSL configuration.

Use a different domain which is guaranteed to be available over HTTP instead.

(cherry picked from commit a748bad303)
2018-04-10 15:07:25 +02:00
Marek Safar 363790b1ec [corlib] Implements CryptoConfig::AddAlgorithm on all profiles 2018-04-10 11:17:49 +02:00
monojenkins bf838da659 [w32file] Fix memory leak (#8114)
Fixes https://github.com/mono/mono/issues/7655
2018-04-10 02:43:20 +02:00
monojenkins c530c5182f [2018-02] Implement C#7 binary literals (#8119)
* C# 7.0 binary literal support

* [mcs] Add another negative error test
2018-04-10 02:41:59 +02:00
monojenkins e310966925 [2018-02] [Facades] Add System.Drawing.Common on mobile only (#8128)
* [Facades] Add System.Drawing.Common on mobile only

Fixes https://github.com/mono/mono/issues/8089

* Bump API snapshot submodule
2018-04-10 02:36:09 +02:00
Marek Safar 5c2ab44dec [mcs] Adds private protected modifier to the parser only 2018-04-09 19:38:59 +02:00
monojenkins 0fac09cf89 [sdks] Fix arguments passed to llvm on Linux (#8109) 2018-04-09 08:48:01 -04:00
monojenkins 02d69477dd [mcs] Fixes codegen when probing reference type expression is known to pass and pattern variable has to be created (#8085) 2018-04-07 22:23:10 -04:00
Bernhard Urban 54f51bf701 [interp] use same domain as transform phase to register debug data for a method 2018-04-06 19:58:38 -04:00
monojenkins 0ca09346e3 [SDKS] fix Linux (and possibly other OSes) build for Android (#8044)
OS: Ubuntu 18.03
CMake: 3.10

For some reason cmake fails to detect any make program (be it ninja or make)
when cross-compiling for Android in XA. It happens despite the programs being in
$PATH and working correctly. The effect is that CMAKE_MAKE_PROGRAM is set to
"not found" in CMakeCache.txt and configuration fails as follows:

 Call Stack (most recent call first):
   external/mono/external/boringssl/util/android-cmake/android.toolchain.cmake:1140 (CMAKE_FORCE_CXX_COMPILER)
   external/mono/sdks/builds/android-armeabi-v7a-debug/mono/btls/build-shared/CMakeFiles/3.10.2/CMakeSystem.cmake:6 (include)
      CMakeLists.txt:3 (project)
   CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
      -- Configuring incomplete, errors occurred!

This commit does not fix the issue, per se, but it works around it by finding
the first ninja/make (as configured) executable in $PATH and setting the
CMAKE_MAKE_PROGRAM to full path of the executable. I haven't spent too much time
investigating *why* cmake fails to find the executable (I merely ran it with
--trace-expand --debug-output which revealed nothing of consequence) but this
workaround should be safe for any version of CMake and any OS we use makefiles
on.
2018-04-06 16:16:08 -04:00
Marek Safar f5989de3b4 [mcs] Implements C# 7.2 stackalloc span conversion in conditional expression 2018-04-06 20:58:53 +02:00
Bernhard Urban 8ad8623646 [interp] workaround undefined behaviour in r8 to u1 cast
This fixes `test_0_simple_double_casts` on iOS/arm64.
According to the C standard (section [conv.fpint]), the behaviour of
such a cast is undefined if the truncated value doesn't fit into the
destination type.

```c
unsigned char __attribute__ ((noinline)) convr8u1 (double i)
{
        return (unsigned char) i;
}
```

for arm64, `clang -O0` produces:

```
_convr8u1:
100006848:  ff 43 00 d1     sub sp, sp, #16
10000684c:  e0 07 00 fd     str d0, [sp, #8]
100006850:  e0 07 40 fd     ldr d0, [sp, #8]
100006854:  08 00 78 1e     fcvtzs  w8, d0
100006858:  00 1d 00 53     uxtb    w0, w8
10000685c:  ff 43 00 91     add sp, sp, #16
100006860:  c0 03 5f d6     ret
```

while `clang -O2` produces:

```
_convr8u1:
100006ae8:  00 00 78 1e     fcvtzs  w0, d0
100006aec:  c0 03 5f d6     ret
```

which is fine according the standard: Any value < 256 gets casted just
fine, but for example `convr8u1 ((double) 0xffff)` would end up with
`0xffff` in `w0`.

We workaround this behaviour by casting to a 32bit int first, the
resulting code looks like this then:

```
_convr8u1:
100006ae4:  08 00 78 1e     fcvtzs  w8, d0
100006ae8:  00 1d 00 12     and w0, w8, #0xff
100006aec:  c0 03 5f d6     ret
```
2018-04-06 08:25:35 -04:00
Zoltan Varga 19cc4c427a [runtime] Fix --disable-btls. 2018-04-06 11:45:19 +02:00
Marek Safar e88bfbcbce [mcs] Implements C# 7.2 conditional ref expression 2018-04-06 08:19:56 +02:00
monojenkins 7048fb45ab [sdks] Use wget in place of curl, it's installed by default on Linux (#8058)
[2018-02] [sdks] Use wget in place of curl, it's installed by default on Linux
2018-04-05 19:23:00 -04:00
Martin Baulig 2c564f83f2 [System]Fix memory leak in the web stack related to Task.Delay (partial fix of #7356).
Using `Task.Delay (timeout)` has the potential of possibly allocating and holding large
chunks of memory throughout the timeout period.  While this is not strictly speaking a
memory leak because those objects will eventually be disposed and garbage collected, it
can cause memory usage of apps to grow quite significantly in the short run.

The default timeout values are as follows:

* `HttpWebRequest.ReadWriteTimeout`: 5 minutes.

* `HttpWebRequest.Timeout`: 100 seconds.

* `ServicePointManager.MaxServicePointIdleTime`: 100 seconds.

And these values can be increased by the user.  This means that we're potentially holding
hundreds, maybe even thousands of timeout objects in memory for 5+ minutes.

This has now been fixed by using the `Task.Delay(int,CancellationToken)` constructor.

Note that disposing a `CancellationTokenSource` will not cancel it, so the following code
will still leak:

	using (var cts = new CancellationTokenSource ()) {
		Task.Delay (TimeSpan.FromDays (3), cts.Token);
		// Work
	}

To actually make the `Task.Delay` instance go away when we're done with it, we need to
use this pattern:

	var cts = new CancellationTokenSource ();
	try {
		Task.Delay (TimeSpan.FromDays (3), cts.Token);
		// Work
	} finally {
		cts.Cancel ();
		cts.Dispose ();
	}

We also cannot use `CancellationToken.CancelAfter()` for timeouts because unfortunately
some of the underlying framework code that we're using does not honor cancellation
requests - like for instance `NetworkStream`.

This is a partial fix for #7356.  While this commit significantly improves the problem,
there may be other unrelated issues left that needs to be investigated.
2018-04-05 14:05:57 -04:00
monojenkins 3c52f0a4a9 [SDKS] Fix Android SDK build on Linux (#8023)
Current build uses `tar` to extract ZIP archives. This works with BSD
tar but not with GNU tar, alas. Tar was used in order to strip the root
directory of Android archive while moving files into place. This commit
replaces `tar` with a call to a shell script (because doing what it does
using Make defines is an exercise in pain) which works both on macOS/BSD
and on Linux.
2018-04-05 11:38:56 -04:00
Bernhard Urban c5f99aa4dc [interp] do not bake object reference into code stream
it won't be scanned by the GC, defer string allocation to
execution-time instead.
2018-04-05 17:33:02 +02:00
monojenkins 1e35db0ae2 [interp] fix i4<>i8 conversion for builtin types, it was inverted (#7986) 2018-04-04 18:23:13 -04:00
monojenkins 88f5058a33 [sdks] Fix MXE_PREFIX for XA (#8010)
It should take 7 characters from the hash, not 6.
2018-04-04 15:28:58 -04:00
monojenkins 0d5eb5c9bb [sdb] Add reference counting for single step requests, they can be accessed concurrently by the single step processing code and the event request clearing code. Fixes #7137. (#7972) 2018-04-04 13:38:43 -04:00
Ludovic Henry 723f194cdc [2018-02] [sdks] Add provisioning for Android SDK and NDK (#7979)
* [sdks] Add provisioning for Android SDK and NDK

This will also be used by XA

* Add missing backslash to mxe.mk

* Only grab bin/autopoint

* [sdks] Use provisioning for MXE

We want to treat MXE the same way we do Android SDK and NDK because it only rarely changes, and it's very long to build it.
2018-04-04 13:48:52 +02:00
monojenkins a5e4482376 [System] Disable SocketTest.AcceptBlockingStatus (#7977)
It frequently fails on ARM: https://github.com/mono/mono/issues/6513
2018-04-04 03:06:36 +02:00
monojenkins 95cc49a65c [2018-02] [Facades] Add System.Memory facade to mobile profiles (#7967)
* [Facades] Add System.Memory facade to mobile profiles

Contains only the types we have right now.

Fixes https://github.com/mono/mono/issues/7610

* Bump API snapshot submodule
2018-04-03 18:56:17 +02:00
Zoltan Varga dea448aa83 Disable building btls/ and support/ on the bcl build, they are not needed. 2018-04-03 14:13:44 +02:00
Zoltan Varga 21cef8b793 [runtime] Add a --disable-btl-lib configure option to disable the building of the btls lib, but compile the managed code with btls support. 2018-04-03 14:13:44 +02:00
Bernhard Urban 0ba54d6bdd [ppc] use ucontext_t
`struct ucontext` has been removed from glibc and `ucontext_t` has been
around for a while now.

Fixes a build failure on Ubuntu 18.04

Related glibc change
https://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=251287734e89a52da3db682a8241eb6bccc050c9;hp=c86ed71d633c22d6f638576f7660c52a5f783d66
2018-04-02 21:55:17 -04:00
Rodrigo Kumpera c3e00ab9bc [runtime] Add regression test for nested famility visibility. 2018-03-31 23:54:55 +02:00
Rodrigo Kumpera 30b5b2b188 [runtime] Fix class visibility check for protected nested classes. Fixes #7657.
A nested class that has protected access must be checked using the same inheritance based rules as members.
The existing code ignores that and does a plain visibility check that is only amendable for public/internal nested types.
2018-03-31 23:54:55 +02:00
monojenkins 29adf3012f Bump API snapshot submodule 2018-03-30 13:42:46 +02:00
Marek Safar d6fde73640 [corlib] Update linker descriptor with missing types 2018-03-30 13:42:46 +02:00
Marek Safar 572c33ae18 [corlib] Enable machine.config dependant version of CryptoConfig for net_4_x profile only 2018-03-30 13:42:46 +02:00
Bernhard Urban dcdd956e1b [perfcounters] fix alignment issue on 32bit
clang fails to properly align 64bit members of the `MonoPerfCounters` struct on
32bit builds:

```
* thread #1, name = 'tid_403', queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=EXC_ARM_DA_ALIGN, address=0x16933124)
    frame #0: 0x0066f4b2 mini`mono_atomic_cas_i64(dest=0x16933124, exch=<unavailable>, comp=<unavailable>) at atomic.c:519 [opt]
   516 	gint64
   517 	mono_atomic_cas_i64(volatile gint64 *dest, gint64 exch, gint64 comp)
   518 	{
-> 519 		return  __sync_val_compare_and_swap (dest, comp, exch);
   520 	}
   521
   522 	#elif defined (TARGET_ANDROID)
(lldb) up
frame #1: 0x006292ea mini`ves_icall_System_Threading_ThreadPool_NotifyWorkItemQueued [inlined] mono_atomic_inc_i64 at atomic.h:397 [opt]
   394 		do {
   395 			get = *val;
   396 			set = get + 1;
-> 397 		} while (mono_atomic_cas_i64 (val, set, get) != get);
   398 		return set;
   399 	}
   400
(lldb) up
frame #2: 0x006292d6 mini`ves_icall_System_Threading_ThreadPool_NotifyWorkItemQueued at threadpool.c:743 [opt]
   740 	ves_icall_System_Threading_ThreadPool_NotifyWorkItemQueued (void)
   741 	{
   742 	#ifndef DISABLE_PERFCOUNTERS
-> 743 		mono_atomic_inc_i64 (&mono_perfcounters->threadpool_workitems);
   744 	#endif
   745 	}
   746
```

Note that the member `threadpool_workitems` is on an unnatural alignment
(`0x16933124`) regarding to its type `gint64`.

related https://github.com/xamarin/xamarin-macios/issues/3826
2018-03-30 05:05:07 -04:00
monojenkins 811e3b4dcd [sdks] Fix LLVM build for XA (#7919) 2018-03-29 20:48:45 -04:00
monojenkins 25aba4e86e [2018-02] [sdks] Fix LLVM build on Linux for XA + Fix MXE usage on non-Darwin platforms (#7912)
* [sdks] Fix LLVM build on Linux for XA

* [sdks] Fix MXE usage on non-Darwin platforms
2018-03-29 13:06:52 -04:00
monojenkins ae7f365c06 [sdks] Fix usage of MXE for XA (#7898) 2018-03-28 22:05:25 -04:00
monojenkins cda8574a88 [jit] Add signature checking for CALLI. (#7880)
Fixes #7792.
2018-03-28 21:45:47 -04:00
monojenkins a6b0e1ccbe [2018-02] [sdks] Pass LLVM_SRC from XA to use xamarin-android/external/llvm + Pass IGNORE_PACKAGE_MXE from XA + Only checkout specific MXE and LLVM commit when cloning (#7895)
* [sdks] Pass LLVM_SRC from XA to use `xamarin-android/external/llvm`

We do not clone to `$(LLVM_SRC)` because this is up to XA.

* [sdks] Pass IGNORE_PACKAGE_MXE from XA

This is to avoid rebuilding MXE while XA already took care of it.

* [sdks] Only checkout specific MXE and LLVM commit when cloning
2018-03-28 21:44:19 -04:00
monojenkins 7ee378c904 [sdks] Pass MXE_SRC from XA to use xamarin-android/external/mxe (#7890)
We do not clone to or remove `$(MXE_SRC)` because this is up to XA.
2018-03-28 18:27:28 -04:00
monojenkins 511ca9f507 Whitelist illinkanalyzer in macOS package (#7862)
Fixes #7860
2018-03-28 15:09:39 +02:00
Alexis Christoforides 88b5266376 Merge pull request #7851 from monojenkins/backport-pr-7849-to-2018-02
[2018-02] [corlib] Restores ConcurrentDictionary serialization support.
2018-03-27 17:30:12 -04:00
Ankit Jain 4aa9fd41b8 [msbuild] Bump to pick up updates (#7846) 2018-03-27 21:04:54 +02:00
Marek Safar 4bf541a969 [System] Makes TLS providers linker friendly 2018-03-27 19:26:04 +02:00
Bernhard Urban b250b4a657 [2018-02] [sdk] sync ios and android changes from master into 2018-02 (#7831)
* [sdks] Add targets for the watch cross compiler. (#7061)

* [offsets-tool] Add an '--output' argument to specify the output file directly instead of generating it from the target triple.

* [sdks] Add targets for the watch cross compiler.

* Ios sdk changes (#7258)

* [sdks] Add armv7s device build.

* [sdks] Disable dtrace on the cross compiler builds.

* [sdks] Avoid building mono-dtrace.h for the cross compilers, its not needed anymore.

* [sdks] Add a configure-mono target.

* [sdks] Put back the call to CheckXcodeDir.

* [sdks] Enable ccache if possible.

* [sdks] Generalize iosDeviceTemplate so it can build the tvos runtime as well. Add tvos device build.

* [sdks] Add tv simulator build.

* [sdks] Add watch simulator build.

* [sdks] Add watch device build.

* [sdks] Unify targets to build runtimes (#7394)

* [sdks] Move common targets

* [sdks] Have RELEASE be empty when CONFIGURATION != 'release'

* [sdks] Create common runtime compilation template

* [sdks] Use runtime template for Android

* [sdks] Use runtime template for iOS

* [sdks] IOS fixes. (#7617)

* [sdks] Fix ios build.

* [sdks] Pass -DMONOTOUCH to the ios cross compiler builds. Compile monotouch/tvos/watchos profiles for the bcl build.

* [sdk] missing diffs for ios and android

* [ci] sync run-jenkins.sh regarding sdks android

* [ci] remove package-android-host-Linux
2018-03-27 09:36:26 -04:00
Marek Safar 6c324b91b2 [corlib] Restores ConcurrentDictionary serialization support.
Fixes #7822
2018-03-27 12:59:14 +00:00
Ludovic Henry 77fc4cfa2e Remove suspicious mono_gchandle_free
Fixes https://github.com/mono/mono/issues/7786
2018-03-26 17:58:56 +02:00
Bernhard Urban 3984508a04 [icall] remove DISABLE_PROCESS_HANDLING (#7827)
The only user was Xamarin.iOS in a weird way: The define is only set for
device builds where the icall table is excluded anyway. For the cross
compiler however, the define isn't set, and therefore those icalls can
be resolved by the AOT compiler.

With the interpreter now, this define actually had an effect: The
guarded icalls weren't inclueded in `libmono-icall-table.a`.
2018-03-26 10:25:48 -04:00
monojenkins 67a2468db9 support increment and decrement of nint/nuint (#7790)
update definition to be in sync with XI
2018-03-25 23:13:01 -04:00
monojenkins da0e172ae5 improve error message and add another interp_in signature (#7789) 2018-03-25 23:12:45 -04:00
Zoltan Varga 1c9d8aad07 [sdks] Fix the ios sdk build. (#7801) (#7824) 2018-03-25 19:06:32 -04:00
monojenkins c6fc176f5c Fix Android build for toolchain (#7818) 2018-03-23 21:20:44 -04:00
monojenkins c9bf7a3878 Disable the interpreter on ios device builds. (#7795) 2018-03-23 14:22:50 -04:00
Marek Safar d37075a949 [System] Disable a test file to resolve compilation error 2018-03-23 14:08:19 +01:00
Marek Safar 42fc0bd51f Bump corefx to bring a fix for #7696 2018-03-23 14:08:19 +01:00
monojenkins 2487301faf Fix Android build for mxe (#7782) 2018-03-22 20:49:43 -04:00
Ludovic Henry 0d6be4da5e [sdks] Fix Android build on Linux (#7777) 2018-03-22 18:40:22 -04:00
monojenkins ebbed2bb87 Revert "Swap Close/Dispose calls so that the receiver_thread_main loop will be properly interrupted (#7390)" (#7751)
This reverts commit e7ba41d14c.
2018-03-22 17:51:57 -04:00
monojenkins e5bad88ebb Fix Android build (#7769) 2018-03-22 16:55:46 -04:00
Martin Baulig 238c21cf77 Fix a race condition that was exposed by #7358 (see #7668).
The latest `WebCompletionSource<T>` changes (PR #7358) exposed and
intensified the side-effects of a race condition between `WebOperation`
and `ServicePointScheduler`.

* WebCompletionSource<T> now contains new `CurrentResult` and `CurrentStatus`
  properties, which allow completion status to be checked in a non-blocking way.

* WebOperation.CompleteResponseRead() has been renamed into Finish() and
  contains the continuation that was previouly known as FinishReading().
  Calling this new Finish() method will now complete the `finishedTask`
  completion, which has a new accessor called `Finished`.

* The ServicePointScheduler's main-loop is still woken up by completion of
  `WebOperation.Finished.Task`, but we use the new `CurrentResult` property
  to check state in a non-blocking way.  This ensures the the clean-up and
  bookkeeping work that's necessary after `WebCompletion.Finish()` always
  happens prior to starting new connections.
2018-03-22 19:40:02 +01:00
Alexander Kyte 2fbd5a16a3 [runtime] Fix file handle leak with dedup+aot (#7721) 2018-03-21 16:01:47 -04:00
monojenkins a13c12ac99 [2018-02] [loader] Don't load framework Facade assemblies that are older than expected. (#7708)
* Don't load framework Facade assemblies that are older than expected.

If there is an older framework Facade assembly in the search order before the
one that we want, don't load it.

"older" here means just compare the major components of the version.

Fixes https://github.com/mono/mono/issues/7624
2018-03-21 11:47:37 -04:00
Alexis Christoforides bdf405fae4 Merge pull request #7726 from mono/backport-new-boottime-2018-02
Backport new boottime
2018-03-21 11:12:00 -04:00
Zoltan Varga ce612bb49e Fix partially shared constrained calls in llvmonly mode.
Fixes https://github.com/mono/mono/issues/7535.
2018-03-21 12:55:55 +01:00
Zoltan Varga 0a3d40ac60 Avoid aot-ing the bcl libs twice in make fullaotcheck/llvmonlycheck. 2018-03-21 12:55:55 +01:00
Bernhard Urban c17d8c6dcd remove WildcardConnect () on WatchOS 2018-03-21 10:39:49 +01:00
Alexis Christoforides 07d5a031d4 [runtime] Don't use clock_gettime on WatchOS and tvOS. 2018-03-20 18:35:18 -04:00
Alexis Christoforides ff546b9d8b [runtime] Don't use clock_gettime in MacOS.
Even though it's found during configure when targetting 10.7, it's not "really" available before versions 10.12 and it would crash with "lazy symbol binding failed".
2018-03-20 18:35:16 -04:00
Zoltan Varga 9922d1af20 [runtime] Fix mono_msec_boottime () so it compiles on older ios versions, clock_gettime () is only available from ios 10. (#7671) 2018-03-20 18:35:01 -04:00
Alexis Christoforides 875240538e [mono-time] Replace mono_msec_boottime() with CoreCLR implementation. Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=58413 2018-03-20 18:32:45 -04:00
monojenkins e29f146ab3 [2018-02] [sgen] Use current nursery size when computing allowance (#7648)
* Use current nursery size when computing allowance

The allowance is the minimum heap growth that we allow between two majors (which is 4 * nursery_size). We need to use the current nursery size instead of the 4MB default, in order to facilitate low memory uses.

* Account for soft heap limit in allowance calculation

This is relevant in cases where the nursery size and soft heap limit are comparable in size.
2018-03-20 15:07:50 -04:00
Marek Safar 535bfc5d84 Add csc-dim as a prototype if default interface implementation 2018-03-20 17:46:56 +01:00
Ludovic Henry 5b66de0bf0 [2018-02] [sdks] Fix concurrent building of MonoAotOffsetsDumper.exe + Simplify building of support library (#7688)
* [sdks] Simply building of support library

* [sdks] Fix ios targets

* [sdks] Cleanup of some targets
2018-03-20 10:14:59 -04:00
Ankit Jain a6c7b9eca4 [msbuild] Bump msbuild to pick up fix for issue #7184 (#7666)
MSBuild always recompiles project if it has a resx with a windows path.
https://github.com/mono/mono/issues/7184
2018-03-20 13:59:27 +01:00
Bernhard Urban 3577465fcd add LL suffix to constant in order to prevent overflowing on 32bit systems 2018-03-20 06:45:12 -04:00
Bernhard Urban 7d9e106c03 1000ns = 1us and 1us = 10ticks 2018-03-20 06:45:12 -04:00
Bernhard Urban 3931767dca reduce compiler warnings 2018-03-20 06:45:12 -04:00
Bernhard Urban deb3474e7c add regression test for github issue 7646 2018-03-20 06:45:12 -04:00
Bernhard Urban 27c7a4b01e use utimes if available in order to set subsecond information on access and write time 2018-03-20 06:45:12 -04:00
Bernhard Urban da5b39d785 factor setfiletime 2018-03-20 06:45:12 -04:00
Bernhard Urban 7f69ff87b5 use CONVERT_BASE in more places 2018-03-20 06:45:12 -04:00
Bernhard Urban e33bf27c9a replace SECMULT with TICKS_PER_SECOND 2018-03-20 06:45:12 -04:00
Bernhard Urban 79030a3284 remove unused mono_w32file_get_times () 2018-03-20 06:45:12 -04:00
Alexis Christoforides e74d4a6e31 Merge pull request #7686 from mono/backport-gh-7584
[System.Net] Replace use of obsolete `SupportsIPv6` property.
2018-03-19 23:02:01 -04:00
Alexis Christoforides c2fe39f13e Revert "Replace mono_msec_boottime() with CoreCLR implementation. Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=58413"
This reverts commit cb89a1575c.

The commit breaks iOS and needs testing on earlier MacOS versions.
2018-03-19 22:58:50 -04:00
Alexis Christoforides 0d8de253cb [System.Net] Replace use of obsolete SupportsIPv6 property.
The obsolete property was always set to false. Fixes https://github.com/mono/mono/issues/6940
2018-03-19 11:53:23 -04:00
Zoltan Varga e9c512092d Increase the buffer size in emit_exception_debug_info ().
Fixes https://github.com/mono/mono/issues/7637.
2018-03-16 13:10:57 +01:00
monojenkins 08a7043b66 [2018-02] [System]: Introduce WebCompletionSource\u003cT\u003e and use it in WebOperation. (#7641)
* Introduce `WebCompletionSource<T>` and use it in `WebOperation`.

* Fix issue in ServicePointScheduler with collection being modified in foreach.

* Update WebOperation.cs

* Work around mcs limitations.

* Use TaskCreationOptions.RunContinuationsAsynchronously in WebCompletionSource.

* Add the test from #7355.

* Put back the 'foreach' loop in ServicePointScheduler.

With the WebCompletionSource changes, this should no longer cause
any problems.
2018-03-16 13:10:31 +01:00
Alexis Christoforides cb89a1575c Replace mono_msec_boottime() with CoreCLR implementation. Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=58413 2018-03-15 18:25:58 +01:00
Rodrigo Kumpera 1a0508a58c Handle multiple segments in IsolatedStored::GetFileNames. Fixes bxc #11771 2018-03-15 11:16:27 +01:00
Zoltan Varga d67d75a4f3 Disable delegate-15.exe in the full-aot profile. 2018-03-14 22:32:37 +01:00
Zoltan Varga 6036b45bce Avoid calling mono_class_vtable () for open constructed types. 2018-03-14 22:32:37 +01:00
Bernhard Urban 9136f4c1a0 only target macOS, HOST_DARWIN includes iOS etc. as well 2018-03-14 09:14:04 +01:00
monojenkins abb82546d7 [2018-02] [Facades] Make System.Net.Http.Rtc.dll a net_4_x only facade (#7595)
Backport of #7590.
2018-03-14 00:10:17 +01:00
Alexander Kyte 6af13f6e83 Add icall to configure MERP options / enable it 2018-03-13 11:30:33 +01:00
Alexander Kyte c684567bd7 Add optional Microsoft Telemetry unmanaged dumper 2018-03-13 11:30:33 +01:00
Marek Safar 4ab5e8a495 Update source file location from commit d4816ef1ab 2018-03-13 08:49:13 +01:00
monojenkins ed56e90aca [2018-02] [Facades] Add missing Facades that exist in .NET 4.7.1 (#7551)
* Add missing Facades that exist in .NET 4.7.1

Some of them we had on mobile only, others were missing completely.

Fixes https://github.com/mono/mono/issues/7536

* Bump API snapshot submodule
2018-03-12 13:26:16 +01:00
Zoltan Varga 57e18b15d0 [sgen] Fix the clearing of bits in the gc descriptor bitmap when using weak fields. Fixes #7378. 2018-03-12 09:15:07 +01:00
monojenkins 279d7e230f [2018-02] [threads] Fix race between abort socket syscall and thread shutdown (#7521)
* Fix race between abort socket syscall and thread shutdown

The race happens when we call mono_thread_info_abort_socket_sycall_for_close on
a thread that's about to shut down.

We lookup the MonoThreadInfo for that thread outside the
mono_thread_info_suspend_lock, and then use it to send the signal once we've
taken the lock.

In between those two actions, the other thread already finished
unregister_thread and pthreads may already have destroyed its TLS keys and
otherwise started to dismantle the thread.

The fix is to do a second mono_thread_info_lookup once we have the lock and
only signal the other thread if it still around.

Fixes https://github.com/mono/mono/issues/6998

* Simplify mono_thread_info_abort_socket_syscall_for_close

Call mono_thread_info_lookup while holding the thread info suspend lock.
We no longer need to check for STATE_DETACHED because removing MonoThreadInfo on
detach is done while holding the suspend lock.
2018-03-09 17:54:16 -05:00
Zoltan Varga 2ce1d5f3d5 Comment/stub out some unused icalls to prevent problems with AOT. 2018-03-09 16:36:55 +01:00
Alexander Köplinger 668baf1915 [acceptance-tests] Actually disable gcsuppressfinalize.exe test
d1ed53624b wasn't enough, it needs to be removed from the CORECLR_COREMANGLIB_TEST_CS_SRC list.

(cherry picked from commit 85b605042b)
2018-03-09 14:36:59 +01:00
Martin Baulig 2201952d9a WebRequestStream now throws correct exception on cancellation (#7074). 2018-03-09 13:42:35 +01:00
Alexis Christoforides 4d3e9d53b2 Fix resolution of interfaces in classes implementing IEnumerator. Fixes #59400
Assume a class implementing multiple generic I`1 interfaces. If a virtual call invocation is trying to resolve the correct interface using object O implementing I`1 also , the interface is resolved using a set of rules (not fully implemented in Mono), but a requirement is that the chosen interface is "variant-compatible" with object O, that is its generic parameters are set to the same types.

This last requirement is relaxed as an implementation-specific detail when I`1 is IEnumerator`1, in which case e.g. a virtual call on a class implementing IEnumerator<byte> can happen with an object of type IEnumerator<sbyte> by way of sharing IEnumerator`1 as a generic interface they define. Here, clearly the interfaces are not "variant-compatible", and this is allowed.

Resolution of classes implementing IEnumerator should still attempt to select a compatible interface using the standard rules before attempting to apply this special rule.
2018-03-09 13:41:14 +01:00
monojenkins 2476d2ac06 Move the check for open constructed types later in mono_jit_compile_method_with_opt (), this function can receive gshared methods in llvmonly mode. (#7504)
Fixes https://github.com/mono/mono/issues/7364.
2018-03-08 19:08:17 -05:00
monojenkins 91fe1eb5f5 Fix generated file when passing --bundled-header (#7510)
There would be a compilation error in the XA build as follow:

```
obj/Release/bundles/armeabi-v7a/temp.c: In function 'install_aot_modules':
obj/Release/bundles/armeabi-v7a/temp.c:49:25: error: 'MONO_AOT_MODE_NORMAL' undeclared (first use in this function)
  mono_jit_set_aot_mode (MONO_AOT_MODE_NORMAL);
                         ^
obj/Release/bundles/armeabi-v7a/temp.c:49:25: note: each undeclared identifier is reported only once for each function it appears in
```
2018-03-08 17:23:34 -05:00
Ludovic Henry bb0c123e74 Use runtime template for iOS 2018-03-08 14:28:51 +01:00
Ludovic Henry e965e1647d Use runtime template for Android 2018-03-08 14:28:51 +01:00
Ludovic Henry a652297384 Create common runtime compilation template 2018-03-08 14:28:51 +01:00
Ludovic Henry 685d39238a Have RELEASE be empty when CONFIGURATION != 'release' 2018-03-08 14:28:51 +01:00
Ludovic Henry 3648ace2b9 Move common targets 2018-03-08 14:28:51 +01:00
Aleksey Kliger b62bfdcb55 An array is not an IEnumerator`1
Address https://github.com/mono/mono/issues/7093 in kind of an adhoc way.

The correct fix is to make
```
    ((IEnumerable<U>) (new T[] {...})).GetEnumerator()
```
return an `IEnumerator<U>` (like .NET does) instead of `IEnumerator<T>`
and to stop marking IEnumerator as an array special interface.
2018-03-08 10:51:22 +01:00
Aleksey Kliger 9f2841c3a0 An array is not an IEnumerator`1
regression test for Regression test for https://github.com/mono/mono/issues/7093
2018-03-08 10:51:22 +01:00
Aleksey Kliger 6f90188e9f Add IEnumerator`1 to MonoDefaults struct 2018-03-08 10:51:22 +01:00
Marek Safar 84027bddaa Remove compiler config sections for types which cannot be instantiated
Fixes #7389
2018-03-08 10:32:14 +01:00
Sebastien Lebreton 66f19a974a Swap Close/Dispose calls so that the receiver_thread_main loop will be properly interrupted 2018-03-07 16:03:44 +01:00
monojenkins 99b7f59ddc [2018-02] Fix for gcc 4.4; nominal support for older. (#7435)
Backport of #7419.
2018-03-07 00:50:43 +01:00
Marek Safar f28abdbebd Fixes decoding of CMS/PKCS #7 messages with an explicit cryptographic object identifier 2018-03-06 15:53:36 +01:00
Rolf Bjarne Kvinge 2dc56b5a60 [2018-02] [corlib] Ignore TimeZoneTest.TestCtors on iOS under certain conditions due to an Apple bug. (#7428)
Fixes https://github.com/xamarin/maccore/issues/629.
2018-03-06 14:31:38 +01:00
Alexander Köplinger 58d02a9603 [acceptance-tests] Disable gcsuppressfinalize.exe test that started failing
See https://github.com/mono/mono/issues/7432

(cherry picked from commit d1ed53624b)
2018-03-06 14:07:26 +01:00
Alexander Köplinger fa1ec4ac4d [packaging] Support setting the FULL_VERSION number via env vars (#7414)
The Linux build currently just displays "tarball" since we don't
have the .git directory when building the Linux packages.

This allows us to pass environment variables that contain the
branch+commit to the build for generating version.h so we can
show the more detailed info like on OSX.

(cherry picked from commit 7c34f0c746)
2018-03-05 20:17:34 +01:00
Bernhard Urban 30aadcaa3a [2018-02] [metadata] split IL generation code into seperate compilation units. (#7375)
* [metadata] move ENABLE_ILGEN definition to configure

* [metadata] split IL generation code into seperate compilation units.

By adding callbacks for IL generating runtime code, we can link in code
later into the runtime that does such for configurations which do not
need IL generation initially. This is the case if you configure the
runtime with `--enable-minimal=jit,interpreter`.

In such configuration, the build will produce an additional library,
called `libmono-ilgen`.

An embedded can choose to link this library to the final binary and
initialize IL generation with the following three, newly added, API
calls:

* `void mono_marshal_ilgen_init (void)`
* `void mono_method_builder_ilgen_init (void)`
* `void mono_sgen_mono_ilgen_init (void)`

This change is mostly moving code around, but there are minor changes
like introducing the enum `MarshalTypeCheckPositions`, so we avoid
copy/paste constants accross compilation units.

* [windows] add IL gen files to windows build and set ENABLE_ILGEN

* [fixup!] fix windows build
2018-03-05 13:41:42 -05:00
Ankit Jain 214321dee5 [msbuild] Bump to track msbuild's mono-2018-02 branch (#7395) 2018-03-05 13:18:57 -05:00
monojenkins 413f2fb976 Reenable HttpRequestIgnoreBadCookies in monotouch. (#7391)
The test was ran in the current xamarin-macions and works as expected.
2018-03-03 00:19:07 +01:00
monojenkins 020ac2de89 Problem building on Arch linux #7200 https://github.com/mono/mono/issues/7200 Three styles: 1. LIBS="$LIBS -lfoo" -- common and probably works 2. LIBS+="-lfoo" -- was here and does not work 3. LIBS+=" -lfoo" -- should work (#7383) 2018-03-02 17:28:17 +01:00
Ankit Jain 769bf9ef25 nuget-hash-extractor: Add msbuild extensions nuget version from vs15.6 msbuild branch
Version `2.1.100-preview-62617-01` from:

https://github.com/dotnet/cli/blob/b9e74c65201ef39c74b6d75cedbb605a88cd26ec/build/DependencyVersions.props

Also, update the list in the runtime and deniedAssembliesList.txt
installed for use by msbuild.

(cherry picked from commit 95e48771d0eb30e92c3d9006ba0cd66b5a8b0c91)
2018-03-02 08:46:29 +01:00
Ankit Jain 878a54030a nuget-hash-extractor: Change the nuget repo name to use for
fetching Microsoft.NET.Build.Extensions nuget from `cli-deps` to
`dotnet-core`. Both of these should have the same nugets but sometimes
seem to be off by one.

(cherry picked from commit 89182050a769013e68d1d90d5fbca90415425aec)
2018-03-02 08:46:29 +01:00
Aleksey Kliger a849f9a6e8 Fix path clobbering when trying to shadow copy siblings
The original version of this code overwrote the same string over and over
again.  Because of the order of operations, when looking for siblings of
Test.dll, we would probe for Test.dll.mdb, then Test.pdb, then Test.pdb.config
(note the last one - should be Test.dll.config).

New version of the code uses fresh strings for each sibling.

Fixes https://github.com/mono/mono/issues/7262
2018-03-02 08:43:13 +01:00
monojenkins d9aa6f4083 Use attribute(deprecated) instead of attribute(error). (#7369)
Backport of #7362.
2018-03-01 22:30:35 +01:00
Alexander Köplinger c0b76ff9ae Don't throw NotImplementedException in Dispose()
We had a few stubs that threw not implemented exceptions in Dispose()
which causes the finalizer thread to abort.

Since those classes throw in the constructor already there's no way
to create a valid object and we can remove the throw in Dispose().

Fixes https://github.com/mono/mono/issues/7338
2018-03-01 17:39:08 +01:00
Aleksey Kliger (λgeek) 5cef19dcd2 [2018-02][runtime] Don't assert in mono_class_is_assignable_from on iface gtd (#7290)
* [test] System.Type.IsAssignableFrom of gtd array special interfaces.

Regression test for https://github.com/mono/mono/issues/7095

* [runtime] Don't assert in mono_class_is_assignable_from on iface gtd

Don't assert when comparing if an "array special interface" is assignable from
an array.

The code assumed that the special interface is some sort of generic instance
like ``IList`1<string>``, but it could be a generic type definition
``IList`1``.

There is a case where we would be obligated to return TRUE:
If someone used reflection to get the generic param of ``IList`1`` and then made an
array:
```
   var i = typeof (IList<>);
   var iparam = i.GetTypeInfo().GenericTypeParameters [0]; // returns gparam T
   var a = iparam.MakeArrayType (); // T[]

   Console.WriteLine (i.IsAssignableFrom (a));
```

But that case is handled by the `MONO_CLASS_IMPLEMENTED_INTERFACE` check,
earlier in mono_class_is_assignable_from.

So we can return FALSE here.

Fixes https://github.com/mono/mono/issues/7095
2018-03-01 11:32:24 -05:00
Martin Baulig ffe180c47f Make it build. 2018-03-01 15:30:24 +01:00
Martin Baulig c627c1b4b6 Bump linker. 2018-03-01 15:30:24 +01:00
Martin Baulig d0e7df4717 [System]: Enable some System.Net.Requests tests from CoreFX. (#7339)
Backport of #7080
2018-02-28 21:32:03 +01:00
monojenkins 28c171a337 [2018-02] [System]: Use new WebCompletionSource instead of TaskCompletionSource. (#7298)
Backport of #7293.
2018-02-28 16:52:10 +01:00
Alexis Christoforides 0c8f0774ce Merge pull request #7336 from monojenkins/backport-pr-7321-to-2018-02
[2018-02] Fix gdb not being used for native stacktraces in some cases
2018-02-28 09:30:32 -05:00
Alexis Christoforides 6a1b416592 Fix gdb not being used for native stacktraces in some cases 2018-02-28 14:23:09 +00:00
monojenkins 078760db9b [2018-02] [TermInfo] support new file format terminfo2 introduced with ncurses6.1 (#7308)
[2018-02] [TermInfo] support new file format terminfo2 introduced with ncurses6.1

Backport of #6960.

/cc @lewurm
2018-02-27 15:15:15 -05:00
Zoltan Varga ffc643d10c Fix VirtualMachine.CreateEnumMirror () so it works with types from non-root domains.
Fixes https://github.com/mono/mono/issues/7289.
2018-02-27 11:42:10 +01:00
Vlad Brezae 6ed6a1b568 Check if we are exceeding the worker count limit 2018-02-27 09:28:12 +01:00
Bernhard Urban 33b47292c3 bump nunitlite
Commit list for mono/NUnitLite:

* mono/NUnitLite@70bb70b [FinallyDelegate] rely on PlatformNotSupportedException in order to determine remoting support (#10)
* mono/NUnitLite@09ad9cf [FinallyDelegate] add comments for why CallContext is used (#9)
* mono/NUnitLite@ab5cc9c [FinallyDelegate] Make this work with platforms without remoting. (#8)

Diff: https://github.com/mono/NUnitLite/compare/b7776829bb7b2f9c58db045a6f40be40bcd96761...70bb70b0ffd0109aadaa6e4ea178972d4fb63ea3
2018-02-27 07:38:19 +01:00
Ludovic Henry df0a29e779 Merge mxe-Win32 and mxe-Win64 targets since we are building both in XA anyway 2018-02-26 18:05:51 +01:00
Zoltan Varga 6ccf73c8c8 Pass only the imt argument if both imt and rgctx arguments are required.
Fixes https://github.com/mono/mono/issues/7240
2018-02-26 18:04:21 +01:00
Alexander Köplinger d6b6fc61f1 Bump bockbuild to get curl error changes 2018-02-23 17:35:54 +01:00
Rodrigo Kumpera 8249522f23 Fix the test name. 2018-02-23 09:47:11 +01:00
Rodrigo Kumpera 2623bc3045 Magic interfaces requires the complex stelemref to handle arrays. Fixes gh #6266 2018-02-23 09:47:11 +01:00
Bernhard Urban 3be3714b6e add another signature for interp_in wrappers 2018-02-22 18:44:02 -05:00
Bernhard Urban daace66339 [2018-02] [xbuild] add property that is available in msbuild (#7202)
They fsharp team decided to remove a `#if MONO` with the assumption that
`xbuild` is dead and everything has switched over to `msbuild`:
https://github.com/Microsoft/visualfsharp/pull/3969/files#diff-bcb4028a918d13bbab2d0c1c15c97e6aL181
https://github.com/Microsoft/visualfsharp/pull/3969/commits/5e17e3111f88b1a1f025ac54c8147052e12f347f#r151844561

which, alas, is not true yet.

With this PR we started to ship above modifications in the MDK:
https://github.com/mono/mono/pull/7018

* Bump API snapshot submodule
2018-02-23 00:06:47 +01:00
Alexis Christoforides fd18515516 Bump bockbuild for https://github.com/mono/bockbuild/pull/62 (#7206) 2018-02-22 15:40:18 +01:00
Zoltan Varga c68cc6a4f4 Emit the same instances in hybrid aot mode as in full aot mode.
Fixes https://github.com/mono/mono/issues/7086.
2018-02-22 14:54:11 +01:00
Zoltan Varga 4169af750b Disable partial sharing during JITting, its only been tested in full aot mode, and doesn't seem to work with JITted methods. Fixes https://github.com/mono/mono/issues/7085. 2018-02-22 14:45:53 +01:00
Zoltan Varga ed22f9fa84 Add hybrid aot tests. 2018-02-22 14:45:53 +01:00
Marek Safar d389ff9ff6 Remove reflection calls for value has to be set 2018-02-22 08:40:23 +01:00
monojenkins d1f461c5a3 Expand "ignore" functionality (#7154) (#7176)
Context: https://github.com/xamarin/xamarin-android/pull/1078

xamarin-android uses `mono-api-html` and `mono-api-info` in order to
perform API comparisons; see e.g. 4e459045.

A recent problem has arisen regarding "inter-API-level diffs": there
are many API changes which we consider to be acceptable, and thus
would like to ignore. Unfortunately, `mono-api-html` doesn't support
ignoring many of these constructs, e.g. base class changes:

	<h3>Type Changed: Android.Preferences.CheckBoxPreference</h3>
	Modified base type: <span class='removed removed-inline removed-breaking-inline'>Android.Preferences.Preference</span> <span class='added '>Android.Preferences.TwoStatePreference</span>

and property type changes:

	<h3>Type Changed: Android.Views.InputEvent</h3>
	<p>Modified properties:</p>
	<pre>
	<div data-is-breaking>	public <span class='added added-breaking-inline'>abstract</span> int DeviceId { get; }
	</div><div data-is-breaking>	public <span class='added added-breaking-inline'>abstract</span> InputSourceType Source { get; }

Overhaul the `mono-api-html` "ignore" infrastructure:

  * Introduce ignore "scoping". Previously, the ignore options would
    only match the *member* text against any provided regular
    expression. Thus, `mono-api-html -r ToString` would ignore *all*
    members containing `ToString`. Furthermore, there was no way to
    restrict the ignore to a particular type. Expand the regex
    semantics so that the declaring type is used as a "prefix" for the
    to-be-matched text. For example, if a class `Example` is removed,
    `mono-api-html` will now match the following value against any
    `-r` regular expressions:

        Example: Removed type

  * Add a `mono-api-html -v` option, to control output verbosity.
    When specified, `mono-api-html` will print out available `-r`/etc.
    option values:

        $ mono-api-html expected.xml new.xml -v
        Possible -a value: Android.Resource: Added fields: public static const int AccessibilityEventTypes;
        Possible -r value: Android.Preferences.CheckBoxPreference: Modified base type: 'Android.Preferences.Preference' to 'Android.Preferences.TwoStatePreference'
        Possible -r value: Android.Views.InputEvent: Modified properties: public int DeviceId { get; }
        Possible -n value: Android.Views.UnavailableException: Added type
        ...

Additionally, allow `mono-api-html` to take a
`Mono.Options.ResponseFileSource`, which allows `@response-files` to
be used as command-line options.
2018-02-22 01:31:33 +01:00
Zoltan Varga 4e29f2ef9a [jit] Handle more cases for gsharedvt constrained calls.
Hopefully fixes https://github.com/mono/mono/issues/7016.
2018-02-21 23:12:19 +01:00
monojenkins b242e82ba4 Add ldflags for bitcode (#7144)
Backport of #7141.
2018-02-21 16:10:50 +01:00
monojenkins 9c9d5d9e22 Fix the Android xattr check to not disable it on all other platforms. (#7146)
Backport of #6798.
2018-02-21 00:30:01 +01:00
monojenkins f8ed9bcd12 [2018-02] [corlib] Fix RuntimeFeatureTest.NoNewFeaturesAdded on mobile (#7151)
Backport of #7149.
2018-02-21 00:13:42 +01:00
monojenkins 578cfcd146 [2018-02] [sdks] Fix for XA integration (#7109) 2018-02-20 12:11:02 -05:00
Bernhard Urban 93705443b6 bump nunit-lite
Commit list for mono/NUnitLite:

* mono/NUnitLite@b777682 [FinallyDelegate] only call it if available, on some platforms (e.g. iOS) it can be set to null (#7)

Diff: https://github.com/mono/NUnitLite/compare/0dc7716771023274074160d1816c2fa610e23d2f...b7776829bb7b2f9c58db045a6f40be40bcd96761
2018-02-20 16:15:29 +01:00
Bernhard Urban 5f626db882 [debugger] disable StepOutAsync test because it's flaky
(cherry picked from commit 8f35227b88)
2018-02-19 11:49:31 +01:00
monojenkins 6cb693c4b5 Bug 60088 - Assertion at ../../../../external/mono/mono/mini/debugger-agent.c:4765, condition array->len == 1' not met Problem was that I didn't consider async void` method when adding that assert (#7105) 2018-02-18 23:06:03 -05:00
monojenkins e96f9fbb4a [2018-02] [sdks] Fix for XA integration (#7104) 2018-02-18 21:13:22 -05:00
Alexander Köplinger 6559a504ed [ci] Disable monodoc tests on Windows for now
They fail: https://github.com/mono/mono/issues/6956

(cherry picked from commit 939d720770)
2018-02-16 21:49:17 +01:00
Alexis Christoforides c62864c98e Disable some PngCodecTest that have trouble on CI right now
(cherry picked from commit dcda4c77bc)

See https://github.com/mono/mono/issues/6908
2018-02-16 21:25:53 +01:00
monojenkins c5accf5ebc Bump aot file format version because of 7cac757e60. (#7082) 2018-02-16 03:01:17 -05:00
Ankit Jain 470256aca5 Add denied assembly versions from previous ms extensions nugets
Extracted from Microsoft.NET.Build.Extensions

	2.1.0-preview1-62414-02   # https://github.com/dotnet/cli/blob/501e11d928c21608999c934f0a7078570b688c6c/build/DependencyVersions.props
	15.5.0-preview-20171027-2 # https://github.com/dotnet/cli/blob/ed916bb13e798a470855fb4f60acd3cabb2765fc/build/DependencyVersions.props
	2.0.0-preview3-20170622-1 # https://github.com/dotnet/cli/blob/7c928a9f18f81001e586e5bf0411f9bfa92e30d4/build/DependencyVersions.props

And also remove incorrect entries from earlier version
2.1.0-preview1-62516-03 , which were not committed to mono's msbuild.

A future commit will sort and de-dedup the lists, but this one avoids
removing any existing duplicates, to make review easier.
2018-02-15 10:54:03 +01:00
Zoltan Varga f0f76abc30 Emit the weak field indexes table using the MONO_AOT_TABLE code, so it works with separate aot data files/bitcode.
Fixes https://github.com/mono/mono/issues/6948.
2018-02-14 18:15:06 +01:00
Ludovic Henry e7e28f4b9d Pass null-terminated string for logging 2018-02-14 11:52:12 +01:00
Zoltan Varga 00dec1f0c0 [2018-02] Fix ios sdk. (#7027)
* [sdks] Bring back download of llvm for iOS (#6818)

Revert part of https://github.com/mono/mono/commit/605cadfb09d6c79723763b8afd09480a5941eabf

* [sdks] Fix execution permission of download-llvm.sh

* [sdks] Fix download-llvm.sh

* [sdks] Fix build for iOS (#6878)

* [sdks] Fix ios+llvm. (#6939)
2018-02-13 22:43:52 -05:00
monojenkins e0c46d9114 Bump mono/NUnitLite (#7006)
Commit list for mono/NUnitLite:

* mono/NUnitLite@0dc7716 [FinallyDelegate] make key for `lookupTable` actually unique (#6)

Diff: https://github.com/mono/NUnitLite/compare/a8bef89392920dd0ef5d74ef3563d97083246414...0dc7716771023274074160d1816c2fa610e23d2f
2018-02-14 02:42:38 +01:00
Alexander Köplinger ba542c0b1e [2018-02] Update F# to 4.1.33
Backport of #7003
2018-02-14 02:35:24 +01:00
Alexander Kyte 72aea0056b Revert mkbundle defaulting behavior made in ca8b8bd346
Fixes https://github.com/mono/mono/issues/6187
2018-02-13 19:07:29 +01:00
Aleksey Kliger 0dfa4f85a9 Unlock loader lock on error paths 2018-02-13 12:51:49 -05:00
Alexander Köplinger d956447d56 [System.Data] Add missing api
Backport of https://github.com/mono/mono/pull/6913
2018-02-13 15:34:02 +01:00
monojenkins 4aa717dc82 [2018-02] [runtime] Make icall tables loadable. (#6944)
* Make icall tables loadable.

Move the icall table code into a separate icall-table.c file, which is either linked into libmono or compiled into a
separate libmono-icall-table.a archive which can be linked into an app, and installed by calling mono_icall_table_init ().

* Change ClCompile to ClInclude for new .h file.

* [runtime] Fix the --enable-icall-symbol-map build. (#6943)
2018-02-12 20:45:40 -05:00
Rodrigo Kumpera d8e28e14a5 Merge pull request #6952 from monojenkins/backport-pr-6890-to-2018-02
[2018-02] [interp] disable test_42_arm64_dyncall_vtypebyval
2018-02-12 17:28:33 -05:00
Bernhard Urban 176f127c1b disable test_42_arm64_dyncall_vtypebyval
regression test introduced by https://github.com/mono/mono/pull/6826
fails on ARM64 with interp
2018-02-12 19:29:43 +00:00
Ankit Jain 764b03fcab nuget-hash-extractor: Add msbuild extensions nuget to list of nugets to
.. process. Version from:

https://github.com/dotnet/cli/blob/501e11d928c21608999c934f0a7078570b688c6c/build/DependencyVersions.props

```
    <MicrosoftNETSdkPackageVersion>2.1.0-preview1-62414-02</MicrosoftNETSdkPackageVersion>
    <MicrosoftNETBuildExtensionsPackageVersion>$(MicrosoftNETSdkPackageVersion)</MicrosoftNETBuildExtensionsPackageVersion>
```

Also, update the list in the runtime and deniedAssembliesList.txt
installed for use by msbuild.
2018-02-12 17:31:57 +01:00
Ankit Jain 1df45be2e9 nuget-hash-extractor: Add support for handling nuget with multiple
.. assemblies.

This is specifically required for handling .net assemblies in
`Microsoft.NET.Build.Extensions` nuget which don't work on mono. These
assemblies are bundled with msbuild and we want to be able to deny these
at runtime.
2018-02-12 17:31:57 +01:00
Martin Baulig e9fa8a306d WebConnection.Connect() needs to probe all IP addresses.
Fix a regression introduced in the new web stack - when connecting
to a DNS host name that resolves to multiple IP addresses, we need
to probe them all.

On iOS, "localhost" will resolve to both "::1" and "127.0.0.1".
2018-02-12 17:00:29 +01:00
Martin Baulig 7126712f86 [System]: Set NetworkStream.ReadTimeout in WebConnection.InitConnection(). (#6898)
Setting ReadTimeout in WebResponseStream.ctor throws System.Net.Sockets.SocketException : Invalid arguments on iOS.

Set it in WebConnection.InitConnection() immediately after establishing a connection, before we read/write anything.
2018-02-09 21:21:36 +01:00
Zoltan Varga 07a5c686e0 Handle arguments of type ArgVtypeOnStack in the dyn call code. Part of the fix for #59184. 2018-02-08 16:54:32 -05:00
Alexander Köplinger bc64a17db8 [bcl] Fix more assembly identity mismatches (#6870)
As a follow up to https://github.com/mono/mono/issues/6848 I checked
all the assemblies and found some more identity mismatches with .NET

(cherry picked from commit c84e6c81a2,
minus the Microsoft.VisualC.dll version fix)
2018-02-08 22:32:51 +01:00
Martin Baulig f3c1fcd7c9 [System]: Revert my latest WebResponseStream changes. (#6887)
This reverts PR #6662 (commit 18a1a25) and #6771 (commit da03780).

These two changes introduced a regression:
https://github.com/mono/mono/issues/6788

(cherry picked from commit 8bfcb27147)
2018-02-08 21:33:37 +01:00
Alexander Köplinger 268f2ac419 Bump bockbuild to get new gtk+ repo location 2018-02-08 19:48:58 +01:00
Marius Ungureanu ebb26ab546 Bump bockbuild to add gtk# generator fix (#6883)
Bug 61202 - Fatal error when adding aspect ratio constraint
2018-02-08 15:32:58 +01:00
Bernhard Urban 01e35bc383 ignore LocalId test on XAMMAC_4_5 too
https://github.com/xamarin/maccore/issues/628
2018-02-08 10:41:39 +01:00
monojenkins 4e374e8cea [2018-02] [reference-assemblies] Fix public key for some newer v4.7.1 facades (#6865)
Fixes https://github.com/mono/mono/issues/6848
2018-02-08 01:08:23 +01:00
Egor Bogatov 94a8a589c8 Add stubs for Interop.NetSecurityNative 2018-02-07 12:51:15 -05:00
monojenkins fd7c5cdac6 [2018-02] [System.Data] Add missing API (fixes 6767) (#6825)
* Add missing api to System.Data (fixes 6767)

* Bump API snapshot submodule
2018-02-07 14:41:50 +01:00
Alexander Köplinger 942dd07c65 [ci] Add setting artifacts.json status
Needed for QA automation.

(cherry picked from commit f8a4bbd357)
2018-02-07 00:42:22 +01:00
Alexander Köplinger f403697225 [ci] Add Windows .msi PR build (#6815)
Use the trigger `@monojenkins build pkg and msi`.

(cherry picked from commit 687dc212dc)
2018-02-07 00:33:20 +01:00
monojenkins 20ada1bc3b [2018-02] [runtime] Add a 'frame_addr' field to MonoStackFrameInfo, which is equal to either interp_frame or ctx->sp. (#6813)
* Add a 'frame_addr' field to MonoStackFrameInfo, which is equal to either interp_frame or ctx->sp.

Use this field to compare frames with each other or with stack addresses instead of setting ctx->sp to
the interp frame address, which breaks mixed mode, since mixed mode assumes ctx->sp is the real
sp of the last native interpreter frame.

* Reenable mixed mode tests.
2018-02-06 13:13:44 -05:00
Alexander Köplinger 3320f45d98 [ci] Make sure packageFileName is a string
It was the file object before and just got turned into string
by coincidence in most places.

(cherry picked from commit c7f89e7837)
2018-02-05 21:35:43 +01:00
Ludovic Henry f804385745 Bump version to 5.12 (#6791) 2018-02-05 15:13:33 -05:00
Alexander Köplinger 8f16dd35ba [ci] Report pending/failed status on GitHub for pkg/msi
(cherry picked from commit 0bfda265b7)
2018-02-05 18:35:23 +01:00
Alexander Köplinger fe918745d5 [ci] Include commit hash in blob URL of pkg/msi
This makes it easier to infer the commit just based on the URL.

(cherry picked from commit 4682391599)
2018-02-05 18:35:15 +01:00
4248 changed files with 258823 additions and 322702 deletions

No files matched your search

-152
View File
@@ -1,152 +0,0 @@
# Mono Code Owners File
#
# GitHub uses this file to determine who to assign for reviews
# on pull requests. Please keep this file alphabetically sorted.
#
# References:
#
# https://github.com/blog/2392-introducing-code-owners
# https://help.github.com/articles/about-codeowners
# These owners will be the default owners for everything in the repo.
* @luhenry @marek-safar
# Order is important. The last matching pattern has the most precedence.
/acceptance-tests @akoeplinger @kg
/acceptance-tests/profiler-stress* @alexrp @akoeplinger
/data @marek-safar @akoeplinger @luhenry
/data/gdb @vargaz @luhenry
/data/lldb @lewurm @vargaz
/docs @luhenry @marek-safar @akoeplinger
/docs/riscv.md @alexrp @lewurm
/docs/sources/mono-api-profiler.html @alexrp
/external @akoeplinger @marek-safar
/external/api-snapshot @marek-safar @akoeplinger
/external/binary-reference-assemblies @marek-safar @akoeplinger
/external/bockbuild @akoeplinger @alexischr
/external/boringssl @baulig
/external/cecil @marek-safar @akoeplinger
/external/corefx @akoeplinger @marek-safar @egorbo @alexischr
/external/corert @akoeplinger @marek-safar @egorbo @alexischr
/external/linker @marek-safar
/external/llvm @luhenry @vargaz
/external/nuget-buildtasks @radical @akoeplinger
/external/roslyn-binaries @kg @marek-safar @akoeplinger
/libgc @BrzVlad @vargaz @luhenry
/llvm @vargaz @luhenry
/man @marek-safar @miguel @luhenry
/man/*prof* @alexrp
/mcs @marek-safar @luhenry
/mcs/build @marek-safar @akoeplinger
/mcs/class @marek-safar @akoeplinger
/mcs/class/corlib/System.Reflection*/ @vargaz @lambdageek
/mcs/class/corlib/System.Security.Cryptography.X509Certificates @baulig @marek-safar
/mcs/class/Mono.Btls.Interface @bauligg @marek-safar
/mcs/class/Mono.Data.Tds @egorbo
/mcs/class/Mono.Debugger.Soft @vargaz
/mcs/class/Mono.Options @jonpryor @marek-safar
/mcs/class/Mono.Profiler.Log @alexrp @luhenry
/mcs/class/Mono.Security/Mono.Security/Interface @baulig @marek-safar
/mcs/class/System/Mono.AppleTls @baulig @rolf
/mcs/class/System/Mono.Btls @baulig @marek-safar
/mcs/class/System/Mono.Net.Security @baulig @marek-safar
/mcs/class/System/Mono.Security.Interface @baulig @marek-safar
/mcs/class/System/System.Security.Cryptography.X509Certificates @baulig @marek-safar
/mcs/class/System.Data* @egorbo @marek-safar
/mcs/errors @marek-safar @lewurm
/mcs/ilasm @marek-safar @lewurm
/mcs/jay @marek-safar @lewurm
/mcs/mcs @marek-safar @lewurm
/mcs/tests @marek-safar @lewurm
/mcs/tools @marek-safar @akoeplinger
/mcs/tools/gensources @kg @akoeplinger
/mcs/tools/upload-to-sentry @alexanderkyte @akoeplinger
/mono/arch @vargaz @lewurm
/mono/btls @baulig @luhenry @marek-safar
/mono/dis @lambdageek @vargaz
/mono/eglib @vargaz @luhenry
/mono/benchmark @alexanderkyte @luhenry
/mono/metadata @vargaz @lambdageek
/mono/metadata/*verify* @lambdageek @luhenry
/mono/metadata/*profiler* @alexrp @luhenry
/mono/metadata/handle* @jaykrell @lambdageek
/mono/metadata/monitor* @brzvlad @vargaz
/mono/metadata/sgen* @brzvlad @vargaz
/mono/metadata/thread* @luhenry @lateralusX
/mono/metadata/w32* @luhenry @lateralusX @jaykrell
/mono/metadata/*-win* @lateralusX @luhenry @luhenry
/mono/mini @vargaz @lewurm
/mono/mini/*cfgdump* @lewurm @luhenry
/mono/mini/*exceptions* @lewurm @luhenry
/mono/mini/*ppc* @lewurm @vargaz
/mono/mini/*riscv* @alexrp @lewurm
/mono/mini/*type-check* @lewurm @lambdageek
/mono/mini/interp/* @lewurm @BrzVlad
/mono/mini/*profiler* @alexrp @luhenry
/mono/mini/debugger-agent.c @vargaz @lewurm @DavidKarlas
/mono/native @baulig @luhenry @marek-safar
/mono/profiler @alexrp @luhenry
/mono/sgen @BrzVlad @luhenry
/mono/utils @vargaz @lewurm
/mono/utils/atomic* @lewurm @luhenry
/mono/utils/mono-hwcap* @lewurm @luhenry
/mono/utils/mono-mem* @lewurm @luhenry
/mono/utils/mono-threads* @luhenry @vargaz
/mono/utils/*-win* @lateralusX @jay
/msvc @lateralusX @luhenry
/msvc/*profiler* @alexrp @luhenry
/msvc/scripts @akoeplinger @kg
/packaging @alexischr @akoeplinger @luhenry @directhex
/packaging/MacSDK/msbuild.py @radical @akoeplinger
/runtime @akoeplinger @marek-safar @luhenry
/samples @luhenry @lewurm
/samples/profiler @alexrp @luhenry
/samples/size @alexrp @luhenry
/scripts @akoeplinger @luhenry
/scripts/ci @akoeplinger @alexischr
/sdks @marek-safar @luhenry @vargaz
/sdks/builds/android* @luhenry @jonpryor
/sdks/builds/mxe* @luhenry @jonpryor
/sdks/builds/ios* @vargaz @rolfbjarne
/sdks/builds/wasm* @vargaz @kjpou1
/sdks/wasm @vargaz @kjpou1 @kg
/sdks/ios @vargaz @rolfbjarne
/sdks/android @luhenry @jonpryor
/support @luhenry @vargaz
/tools @luhenry @vargaz
/tools/locale-builder @marek-safar @egorbo
/tools/monograph @vargaz @vargaz
/tools/nuget-hash-extractor @marek-safar @radical
/tools/offsets-tool @lewurm @rolfbjarne
/tools/pedump @lambdageek @lewurm
/tools/sgen @brzvlad @vargaz
+10 -12
View File
@@ -1,7 +1,3 @@
<!--
If you are new to the project get yourself familiar with https://www.mono-project.com/community/bugs/make-a-good-bug-report/ before filling the issue
-->
## Steps to Reproduce
1.
@@ -12,19 +8,19 @@ If you are new to the project get yourself familiar with https://www.mono-projec
You may drag & drop the attachment (repro code/solution, screenshot, etc.) onto the issue.
-->
### Current Behavior
## Current Behavior
<!--
What is the current behavior?
What is the current behaviour?
-->
### Expected Behavior
## Expected Behavior
<!--
Please describe the behavior you are expecting
Please describe the behaviour you are expecting
-->
## On which platforms did you notice this
### On which platforms did you notice this
[ ] macOS
[ ] Linux
@@ -36,12 +32,14 @@ Please describe the behavior you are expecting
You can use `mono --version` or About dialog to obtain this information.
-->
## Stacktrace
### Stacktrace
```
Please paste the stack trace here if available.
Please paste the stacktrace here if available.
```
<!--
You can join us at https://gitter.im/mono/mono to discuss your reported issue
-->
-->
+1 -6
View File
@@ -40,7 +40,6 @@ Ankh.NoLoad
*.gpState
.vscode/
*.exp
.vs/
# Tooling
_ReSharper*/
@@ -89,9 +88,7 @@ stamp-h.in
*~
*.swp
*.o
*.dylib
.deps
.libs
# Libtool
libtool.m4
@@ -132,6 +129,4 @@ mono-*.tar.*
tmpinst-dir.stamp
msvc/scripts/inputs/
extensions-config.h
*.mlpd
llvm/build/
llvm/usr/
-7
View File
@@ -58,10 +58,3 @@
[submodule "external/api-snapshot"]
path = external/api-snapshot
url = git://github.com/mono/api-snapshot.git
[submodule "external/llvm"]
path = external/llvm
url = git://github.com/mono/llvm.git
branch = release_60
[submodule "external/helix-binaries"]
path = external/helix-binaries
url = git://github.com/mono/helix-binaries.git
-91
View File
@@ -1,91 +0,0 @@
{
"configurations": [
{
"name": "Mac",
"includePath": [
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1",
"/usr/local/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include",
"/usr/include",
"${workspaceRoot}",
"${workspaceRoot}/mono",
"${workspaceRoot}/mono/eglib",
"${workspaceRoot}/support"
],
"defines": [],
"intelliSenseMode": "clang-x64",
"browse": {
"path": [
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1",
"/usr/local/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/9.0.0/include",
"/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include",
"/usr/include",
"${workspaceRoot}",
"${workspaceRoot}/mono",
"${workspaceRoot}/mono/eglib",
"${workspaceRoot}/support"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
},
"macFrameworkPath": [
"/System/Library/Frameworks",
"/Library/Frameworks"
]
},
{
"name": "Linux",
"includePath": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}",
"${workspaceRoot}/mono",
"${workspaceRoot}/mono/eglib",
"${workspaceRoot}/support"
],
"defines": [],
"intelliSenseMode": "clang-x64",
"browse": {
"path": [
"/usr/include",
"/usr/local/include",
"${workspaceRoot}",
"${workspaceRoot}/mono",
"${workspaceRoot}/mono/eglib",
"${workspaceRoot}/support"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
},
{
"name": "Win32",
"includePath": [
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include",
"${workspaceRoot}",
"${workspaceRoot}/mono",
"${workspaceRoot}/mono/eglib",
"${workspaceRoot}/support"
],
"defines": [
"_DEBUG",
"UNICODE"
],
"intelliSenseMode": "msvc-x64",
"browse": {
"path": [
"C:/Program Files (x86)/Microsoft Visual Studio 14.0/VC/include/*",
"${workspaceRoot}",
"${workspaceRoot}/mono",
"${workspaceRoot}/mono/eglib",
"${workspaceRoot}/support"
],
"limitSymbolsToIncludedHeaders": true,
"databaseFilename": ""
}
}
],
"version": 4
}
+133
View File
@@ -0,0 +1,133 @@
# Mono Code Owners File
#
# GitHub uses this file to determine who to assign for reviews
# on pull requests. Please keep this file alphabetically sorted.
#
# References:
#
# https://github.com/blog/2392-introducing-code-owners
# https://help.github.com/articles/about-codeowners
# These owners will be the default owners for everything in the repo.
* @luhenry @marek-safar
# Order is important. The last matching pattern has the most precedence.
/acceptance-tests @akoeplinger
/acceptance-tests/profiler-stress* @alexrp
/data @marek-safar @akoeplinger
/data/gdb @vargaz
/data/lldb @lewurm @vargaz
/docs @luhenry @marek-safar
/docs/sources/mono-api-profiler.html @alexrp
/external @marek-safar @luhenry
/external/binary-reference-assemblies @marek-safar @akoeplinger
/external/bockbuild @akoeplinger @alexischr
/external/boringssl @baulig
/external/nuget-buildtasks @radical @akoeplinger
/libgc @BrzVlad @vargaz
/llvm @vargaz
/man @marek-safar @miguel
/man/*prof* @alexrp
/mcs @marek-safar
/mcs/build @marek-safar @akoeplinger
/mcs/class @marek-safar @akoeplinger
/mcs/class/corlib/System.Reflection*/ @vargaz @lambdageek
/mcs/class/Mono.Btls.Interface @baulig
/mcs/class/Mono.Data.Tds @egorbo
/mcs/class/Mono.Debugger.Soft @vargaz
/mcs/class/Mono.Options @jonpryor
/mcs/class/Mono.Profiler.Log @alexrp
/mcs/class/Mono.Security/Mono.Security/Interface @baulig
/mcs/class/System/Mono.AppleTls @baulig
/mcs/class/System/Mono.Btls @baulig
/mcs/class/System/Mono.Net.Security @baulig
/mcs/class/System/Mono.Security.Interface @baulig
/mcs/class/System.Data* @egorbo
/mcs/errors @marek-safar
/mcs/ilasm @marek-safar
/mcs/jay @marek-safar
/mcs/mcs @marek-safar @lewurm
/mcs/tests @marek-safar
/mcs/tools @marek-safar @akoeplinger
/mono @luhenry
/mono/btls @baulig
/mono/dis @lambdageek @vargaz
/mono/eglib @kumpera @vargaz @luhenry
/mono/metadata @vargaz @kumpera
/mono/metadata/*verify* @kumpera
/mono/metadata/*profiler* @alexrp
/mono/metadata/monitor* @brzvlad
/mono/metadata/sgen* @brzvlad
/mono/metadata/threads* @luhenry @kumpera
/mono/metadata/threadpool* @luhenry
/mono/metadata/w32* @luhenry
/mono/metadata/*-win* @lateralusX @luhenry
/mono/mini @vargaz @kumpera
/mono/mini/*cfgdump* @lewurm
/mono/mini/*exceptions* @lewurm
/mono/mini/*ppc* @lewurm
/mono/mini/*type-check* @lewurm
/mono/mini/interp/* @lewurm @BrzVlad
/mono/mini/*profiler* @alexrp
/mono/mini/debugger-agent.c @DavidKarlas
/mono/profiler @alexrp @kumpera
/mono/sdks @luhenry
/mono/sdks/android @luhenry @jonpryor
/mono/sdks/ios @vargaz @rolfbjarne
/mono/sdks/wasm @kumpera @lrz
/mono/sgen @BrzVlad @kumpera
/mono/utils @kumpera @vargaz
/mono/utils/atomic* @alexrp
/mono/utils/mono-hwcap* @alexrp
/mono/utils/mono-mem* @alexrp
/mono/utils/mono-threads* @luhenry @kumpera
/mono/utils/*-win* @lateralusX @kumpera
/msvc @lateralusX
/msvc/*profiler* @alexrp
/msvc/scripts @akoeplinger
/packaging/ @alexischr @akoeplinger
/packaging/MacSDK/msbuild.py @radical @akoeplinger
/runtime @akoeplinger @marek-safar
/samples @luhenry
/samples/profiler @alexrp
/samples/size @alexrp
/scripts @akoeplinger
/scripts/ci @akoeplinger
/scripts/ci/run-test-profiler-stress-tests.sh @alexrp
/support @luhenry @vargaz
/tools @kumpera
/tools/checker @tritao
/tools/crash-bisector @kumpera
/tools/locale-builder @marek-safar
/tools/monograph @vargaz
/tools/nuget-hash-extractor @marek-safar
/tools/offsets-tool @lewurm @rolfbjarne
/tools/pedump @kumpera @lambdageek
/tools/sgen @brzvlad
+5 -28
View File
@@ -11,17 +11,9 @@ else
tools_dir = tools
endif
if ENABLE_MSVC
build_with_msvc = msvc
build_without_msvc =
else
build_with_msvc =
build_without_msvc = msvc
endif
SUBDIRS = $(build_with_msvc) mk po $(libgc_dir) llvm mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) $(build_without_msvc) $(docs_dir) acceptance-tests
SUBDIRS = po $(libgc_dir) mono $(ikvm_native_dir) support data runtime scripts man samples $(tools_dir) msvc $(docs_dir) acceptance-tests llvm
# Keep in sync with SUBDIRS
DIST_SUBDIRS = $(build_with_msvc) m4 mk po $(libgc_dir) llvm mono ikvm-native support data runtime scripts man samples tools $(build_without_msvc) docs acceptance-tests
DIST_SUBDIRS = m4 po $(libgc_dir) mono ikvm-native support data runtime scripts man samples tools msvc docs acceptance-tests llvm
all: update_submodules
@@ -50,15 +42,8 @@ dist-hook:
test -d $(distdir)/mcs || mkdir $(distdir)/mcs
d=`cd $(distdir)/mcs && pwd`; cd $(mcs_topdir) && $(MAKE) distdir=$$d dist-recursive
rm -rf `find $(top_distdir)/external -path '*\.git'`
rm -rf `find $(top_distdir)/external -path '*\.libs'`
rm -rf `find $(top_distdir)/external -path '*\.deps'`
rm -f `find $(top_distdir)/external -path '*\.o'`
rm -f `find $(top_distdir)/external -path '*\.so'`
rm -f `find $(top_distdir)/external -path '*\.lo'`
rm -f `find $(top_distdir)/external -path '*\.Plo'`
rm -f `find $(top_distdir)/external -name '\.dirstamp'`
rm -f `find $(top_distdir)/external -path '*\.exe' -not -path '*/roslyn-binaries/*'`
rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*' -not -path '*/helix-binaries/*'`
rm -f `find $(top_distdir)/external -path '*\.dll' -not -path '*/binary-reference-assemblies/*' -not -path '*/roslyn-binaries/*'`
rm -rf "$(top_distdir)/external/linker/linker/Tests"
pkgconfigdir = $(libdir)/pkgconfig
@@ -74,15 +59,9 @@ if BITCODE
BITCODE_CHECK=yes
endif
if DEFAULT_TESTS
CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-default.sh
else
CI_TEST_SCRIPT=$(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
endif
.PHONY: check-ci
check-ci:
MONO_LLVMONLY=$(BITCODE_CHECK) $(CI_TEST_SCRIPT)
MONO_LLVMONLY=$(BITCODE_CHECK) $(srcdir)/scripts/ci/run-test-$(TEST_PROFILE).sh
.PHONY: validate do-build-mono-mcs mcs-do-clean mcs-do-tests
validate: do-build-mono-mcs
@@ -147,7 +126,6 @@ package-inputs:
(echo " <project dir=\"$$1\" library=\"$$2\">"; \
read boot; echo " <boot>$$boot</boot>"; \
read flags; echo " <flags>$$flags</flags>"; \
read sources;echo " <sources>$$sources</sources>"; \
read output; echo " <output>$$output</output>"; \
read built; echo " <built_sources>`echo $$built | sed 's/\\\/\\\\/g'`</built_sources>"; \
read libou; echo " <library_output>$$libou</library_output>"; \
@@ -166,10 +144,9 @@ update-llvm-version:
update-solution-files:
cd msvc/scripts && $(MAKE) genproj.exe || exit $$?;
$(MAKE) update-csproj
$(MAKE) package-inputs
(cd msvc/scripts; mono --debug genproj.exe $(GENPROJ_ARGS))
(cd msvc/scripts; $(MAKE) genproj.exe; mono genproj.exe $(GENPROJ_ARGS))
update-solution-files-with-tests:
$(MAKE) "GENPROJ_ARGS=2012 true true" update-solution-files
+23 -60
View File
@@ -3,7 +3,7 @@ create cross platform applications. It is an open source
implementation of Microsoft's .NET Framework based on the ECMA
standards for C# and the Common Language Runtime.
The Mono project is part of the [.NET Foundation](https://www.dotnetfoundation.org/)
The Mono project is part of the [.NET Foundation](http://www.dotnetfoundation.org/)
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mono/mono?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
@@ -29,8 +29,7 @@ The Mono project is part of the [.NET Foundation](https://www.dotnetfoundation.o
| Windows | amd64 | [![windows-amd64][15]][16] |
| Windows | i386 | [![windows-i386][17]][18] |
| CentOS | s390x (cs) | [![centos-s390x][19]][20] |
| Debian 9 | ppc64el (cs) | [![debian-9-ppc64el][21]][22]|
| AIX | ppc64 (cs) | [![aix-ppc64][23]][24] |
| Debian 8 | ppc64el (cs) | [![debian-8-ppc64el][21]][22]|
_(cs) = community supported architecture_
@@ -54,10 +53,8 @@ _(cs) = community supported architecture_
[18]: https://jenkins.mono-project.com/job/z/label=w32/
[19]: https://jenkins.mono-project.com/job/test-mono-mainline-community/label=centos-s390x/badge/icon
[20]: https://jenkins.mono-project.com/job/test-mono-mainline-community/label=centos-s390x
[21]: https://jenkins.mono-project.com/job/test-mono-mainline-community-chroot/label=debian-9-ppc64el/badge/icon
[22]: https://jenkins.mono-project.com/job/test-mono-mainline-community-chroot/label=debian-9-ppc64el
[23]: https://jenkins.mono-project.com/job/test-mono-mainline-community/label=aix-ppc64/badge/icon
[24]: https://jenkins.mono-project.com/job/test-mono-mainline-community/label=aix-ppc64
[21]: https://jenkins.mono-project.com/job/test-mono-mainline-community-chroot/label=debian-8-ppc64el/badge/icon
[22]: https://jenkins.mono-project.com/job/test-mono-mainline-community-chroot/label=debian-8-ppc64el
Compilation and Installation
============================
@@ -66,15 +63,15 @@ Building the Software
---------------------
Please see our guides for building Mono on
[Mac OS X](https://www.mono-project.com/docs/compiling-mono/mac/),
[Linux](https://www.mono-project.com/docs/compiling-mono/linux/) and
[Windows](https://www.mono-project.com/docs/compiling-mono/windows/).
[Mac OS X](http://www.mono-project.com/docs/compiling-mono/mac/),
[Linux](http://www.mono-project.com/docs/compiling-mono/linux/) and
[Windows](http://www.mono-project.com/docs/compiling-mono/windows/).
Note that building from Git assumes that you already have Mono installed,
so please download and [install the latest Mono release](https://www.mono-project.com/download/)
so please download and [install the latest Mono release](http://www.mono-project.com/download/)
before trying to build from Git. This is required because the Mono build
relies on a working Mono C# compiler to compile itself
(also known as [bootstrapping](https://en.wikipedia.org/wiki/Bootstrapping_(compilers))).
(also known as [bootstrapping](http://en.wikipedia.org/wiki/Bootstrapping_(compilers))).
If you don't have a working Mono installation
---------------------------------------------
@@ -114,7 +111,7 @@ Once you have installed the software, you can run a few programs:
* `mono program.exe` runtime engine
* `mcs program.cs` C# compiler
* `mcs program.cs` C# compiler
* `monodis program.exe` CIL Disassembler
@@ -131,14 +128,6 @@ Directory Roadmap
* `external/` - Git submodules for external libraries (Newtonsoft.Json, ikvm, etc).
* `ikvm-native/` - Glue code for ikvm.
* `libgc/` - The (deprecated) Boehm GC implementation.
* `llvm/` - Utility Makefiles for integrating the Mono LLVM fork.
* `m4/` - General utility Makefiles.
* `man/` - Manual pages for the various Mono commands and programs.
* `mcs/` - The class libraries, compiler and tools
@@ -153,59 +142,33 @@ Directory Roadmap
* `arch/` - Architecture specific portions.
* `benchmark/` - A collection of benchmarks.
* `btls/` - Build files for the BTLS library which incorporates BoringSSL.
* `cil/` - Common Intermediate Representation, XML
definition of the CIL bytecodes.
* `dis/` - CIL executable Disassembler.
* `dis/` - CIL executable Disassembler
* `eglib/` - Independent implementation of the glib API.
* `io-layer/` - The I/O layer and system abstraction for
emulating the .NET IO model.
* `metadata/` - The object system and metadata reader.
* `mini/` - The Just in Time Compiler.
* `profiler/` - The profiler implementation.
* `sgen/` - The SGen Garbage Collector implementation.
* `tests/` - The main runtime tests.
* `unit-tests/` - Additional runtime unit tests.
* `utils/` - Utility functions used across the runtime codebase.
* `msvc/` - Logic for the MSVC / Visual Studio based runtime and BCL build system.
The latter is experimental at the moment.
* `packaging/` - Packaging logic for the OS X and Windows Mono packages.
* `po/` - Translation files.
* `runtime/` - A directory that contains the Makefiles that link the
mono/ and mcs/ build systems.
* `samples/` - Some simple sample programs on uses of the Mono
runtime as an embedded library.
* `samples/` -Some simple sample programs on uses of the Mono
runtime as an embedded library.
* `scripts/` - Scripts used to invoke Mono and the corresponding program.
* `sdks/` - A new way of embedding Mono into Xamarin.iOS, Xamarin.Android and other products.
* `support/` - Various support libraries.
* `tools/` - A collection of tools, mostly used during Mono development.
Contributing to Mono
====================
Before submitting changes to Mono, please review the [contribution
guidelines](https://www.mono-project.com/community/contributing/).
guidelines](http://www.mono-project.com/community/contributing/).
Please pay particular attention to the [Important
Rules](https://www.mono-project.com/community/contributing/#important-rules)
Rules](http://www.mono-project.com/community/contributing/#important-rules)
section.
Reporting bugs
@@ -215,7 +178,7 @@ To submit bug reports, please [open an issue on the mono GitHub repo](https://gi
Please use the search facility to ensure the same bug hasn't already
been submitted and follow our
[guidelines](https://www.mono-project.com/community/bugs/make-a-good-bug-report/)
[guidelines](http://www.mono-project.com/community/bugs/make-a-good-bug-report/)
on how to make a good bug report.
Configuration Options
@@ -244,12 +207,12 @@ Disables the inclusion of a Boehm garbage collector.
* This defaults to `included`.
* `--enable-cooperative-suspend`
* `--with-cooperative-gc`
* If you pass this flag the Mono runtime is configured to only use
the cooperative mode of the garbage collector. If you do not pass
this flag, then you can control at runtime the use of the
cooperative GC mode by setting the `MONO_ENABLE_COOP_SUSPEND` flag.
cooperative GC mode by setting the `MONO_ENABLE_COOP` flag.
* `--with-tls=__thread,pthread`
@@ -435,7 +398,7 @@ for Mono. The LLVM code generator and optimizer will be
used instead of Mono's built-in code generator for both
Just in Time and Ahead of Time compilations.
* See https://www.mono-project.com/docs/advanced/mono-llvm/ for the
* See http://www.mono-project.com/docs/advanced/mono-llvm/ for the
full details and up-to-date information on this feature.
* You will need to have an LLVM built that Mono can link
@@ -504,7 +467,7 @@ also, see the man page.
* This configures the Mono compiler to generate code
suitable to be used by Google's Native Client:
https://code.google.com/p/nativeclient/
http://code.google.com/p/nativeclient/
* Currently this is used with Mono's AOT engine as
Native Client does not support JIT engines yet.
@@ -578,7 +541,7 @@ file for information about Microsoft's patent grant.
Mono Trademark Use Policy
=========================
The use of trademarks and logos for Mono can be found [here](https://www.dotnetfoundation.org/legal/mono-tm).
The use of trademarks and logos for Mono can be found [here](http://www.dotnetfoundation.org/legal/mono-tm).
Maintaining the Class Library Solution Files
============================================
-1
View File
@@ -4,4 +4,3 @@ Makefile
*.dll
*.mdb
coreclr-testlist.txt
microbench-perf.sh
@@ -0,0 +1,14 @@
using System;
using System.IO;
using System.Reflection;
namespace System.Runtime.Loader
{
public static class AssemblyExtensions
{
public static Type[] GetTypes(this Assembly assembly)
{
return assembly.GetTypes ();
}
}
}
+1 -3
View File
@@ -3,10 +3,9 @@ BENCHMARKER_PATH=$(ACCEPTANCE_TESTS_PATH)/benchmarker
ROSLYN_PATH=$(ACCEPTANCE_TESTS_PATH)/roslyn
CORECLR_PATH=$(ACCEPTANCE_TESTS_PATH)/coreclr
MSTESTSUITE_PATH=$(ACCEPTANCE_TESTS_PATH)/ms-test-suite
DEBIANSHOOTOUTMONO_PATH=$(ACCEPTANCE_TESTS_PATH)/DebianShootoutMono
CLEANFILES = *.dll *.exe *.mdb
EXTRA_DIST=README.md SUBMODULES.json microbench.mk versions.mk profiler-stress.mk roslyn.mk coreclr.mk ms-test-suite.mk
EXTRA_DIST=README.md SUBMODULES.json versions.mk roslyn.mk coreclr.mk ms-test-suite.mk
CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
TOOLS_CLASS=$(mcs_topdir)/class/lib/build
@@ -18,7 +17,6 @@ ILASM = $(TOOLS_RUNTIME) $(TOOLS_CLASS)/ilasm.exe
XUNIT = $(RUNTIME) $(abs_top_builddir)/external/xunit-binaries/xunit.console.exe
include versions.mk
include microbench.mk
include profiler-stress.mk
include roslyn.mk
include coreclr.mk
+2 -10
View File
@@ -2,7 +2,7 @@
{
"name": "roslyn",
"url": "git://github.com/mono/roslyn.git",
"rev": "7a840bd5697ef6ea41f554a09d837636fba9d88d",
"rev": "1d9895045041925490038c5df0d8f947d8dcbd7f",
"remote-branch": "origin/mono-testing",
"branch": "mono-testing",
"directory": "roslyn"
@@ -10,7 +10,7 @@
{
"name": "coreclr",
"url": "git://github.com/mono/coreclr.git",
"rev": "f3d9c9f742f9dcb5faf40080db5e7f464dab7e7c",
"rev": "83d8279997d8ce4ad344ff9b937b2d13d074dcaa",
"remote-branch": "origin/mono",
"branch": "mono",
"directory": "coreclr"
@@ -30,13 +30,5 @@
"remote-branch": "origin/master",
"branch": "master",
"directory": "benchmarker"
},
{
"name": "DebianShootoutMono",
"url": "https://github.com/alexanderkyte/DebianShootoutMono.git",
"rev": "3fde2ced806c1fe7eed81120a40d99474fa009f0",
"remote-branch": "origin/release_11_15_2018",
"branch": "release_11_15_2018",
"directory": "DebianShootoutMono"
}
]
+9 -8
View File
@@ -2162,6 +2162,7 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/double/doubleepsilon.cs \
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/double/doubleequals1.cs \
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/double/doubleequals2.cs \
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/double/doublegethashcode.cs \
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletoboolean.cs \
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletobyte.cs \
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/double/doubleiconvertibletodatetime.cs \
@@ -3241,6 +3242,7 @@ CORECLR_COREMANGLIB_TEST_CS_SRC= \
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptionctor3.cs \
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/security/securityexception/securityexceptiontostring.cs \
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/single/singleepsilon.cs \
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/single/singlegethashcode.cs \
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/single/singleisinfinity.cs \
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/single/singleisnan.cs \
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/single/singleisnegativeinfinity.cs \
@@ -3689,8 +3691,9 @@ CORECLR_STRESSTEST_RUNNER_CS_SRC= \
$(CORECLR_PATH)/tests/src/GC/Stress/Framework/RFLogging.cs \
$(CORECLR_PATH)/tests/src/GC/Stress/Framework/DetourHelpers.cs \
$(CORECLR_PATH)/tests/src/GC/Stress/Framework/LoaderClass.cs \
GCStressTests/AssemblyLoadContext.cs
GCStressTests/AssemblyLoadContext.cs \
GCStressTests/AssemblyExtensions.cs
CORECLR_TESTLIBRARY_CS_SRC = \
$(CORECLR_PATH)/tests/src/Common/CoreCLRTestLibrary/TestFramework.cs \
$(CORECLR_PATH)/tests/src/Common/CoreCLRTestLibrary/Utilities.cs \
@@ -3712,7 +3715,7 @@ CORECLR_DISABLED_TEST_CS_SRC += \
CORECLR_DISABLED_TEST_CS_SRC += \
$(CORECLR_PATH)/tests/src/readytorun/main.cs \
$(CORECLR_PATH)/tests/src/readytorun/test.cs
# relies on a referenced managed or native assembly, to complicated here:
CORECLR_DISABLED_TEST_CS_SRC += \
$(CORECLR_PATH)/tests/src/Regressions/assemblyref/assem.cs \
@@ -3852,7 +3855,7 @@ CORECLR_DISABLED_TEST_CS_SRC += \
CORECLR_DISABLED_TEST_CS_SRC += \
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/datetime/cfdatetimetools.cs \
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/datetime/datetimeisdaylightsavingtime.cs
# relies on delegatedefinitions.cs helper
CORECLR_DISABLED_TEST_CS_SRC += \
$(CORECLR_PATH)/tests/src/CoreMangLib/cti/system/multicastdelegate/multicastdelegatector.cs \
@@ -3960,7 +3963,7 @@ CORECLR_DISABLED_TEST_CS_SRC += \
$(CORECLR_PATH)/tests/src/CoreMangLib/system/delegate/threatmodel/public/testclass.cs \
$(CORECLR_PATH)/tests/src/CoreMangLib/system/delegate/threatmodel/tests/bindingtarget.cs \
$(CORECLR_PATH)/tests/src/CoreMangLib/system/delegate/threatmodel/tests/testclass.cs
# samples (should probably be removed upstream)
CORECLR_DISABLED_TEST_CS_SRC += \
$(CORECLR_PATH)/tests/src/hosting/samples/hosting/usercode/usercode.cs \
@@ -4966,6 +4969,7 @@ CORECLR_TEST_IL_SRC = \
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/regress/vswhidbey/223862/rem.il \
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/regress/vswhidbey/228572/conv.il \
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/regress/vswhidbey/481244/foo.il \
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/regress/vswhidbey/481244/foo2.il \
$(CORECLR_PATH)/tests/src/JIT/jit64/regress/ddb/118414/118414.il \
$(CORECLR_PATH)/tests/src/JIT/jit64/regress/ddb/127931/127931.il \
$(CORECLR_PATH)/tests/src/JIT/jit64/regress/vsw/102974/test.il \
@@ -5057,9 +5061,6 @@ CORECLR_DISABLED_TEST_IL_SRC += \
CORECLR_DISABLED_TEST_IL_SRC += \
$(CORECLR_PATH)/tests/src/JIT/Directed/coverage/oldtests/lcliimpl.il
# We use an r4 for r4-r8 stack merge so it loses precision
CORECLR_DISABLED_TEST_IL_SRC += \
$(CORECLR_PATH)/tests/src/JIT/jit64/opt/regress/vswhidbey/481244/foo2.il
# FIXME: these tests are baselined, i.e. we don't have time to investigate
# them right now but want to make sure we don't introduce new regressions
-17
View File
@@ -1,17 +0,0 @@
#! /bin/sh
r='@mono_build_root@'
aotpattern="--aot="
# if this is an aot invoke
if [[ $@ =~ $aotpattern ]];
then
# just aot the code
echo "$r/runtime/mono-wrapper $@"
exec $r/runtime/mono-wrapper $@
else
# else run it under perf
echo "$MONO_PERF_BINARY record -o $r/acceptance-tests/perf.data -v -s -g -- $r/mono/mini/mono-sgen $@"
exec $MONO_PERF_BINARY record -o $r/acceptance-tests/perf.data -v -s -g $r/mono/mini/mono-sgen $@
fi
-119
View File
@@ -1,119 +0,0 @@
check-microbench: DebianShootoutMono.stamp
@$(MAKE) test-run-microbench
DebianShootoutMono.stamp:
@$(MAKE) validate-DebianShootoutMono RESET_VERSIONS=1
@$(MAKE) prepare-dlls
@touch $@
abs_top_srcdir = $(abspath $(top_srcdir))
TEST_EXE_PATH=$(abs_top_srcdir)/acceptance-tests/external/DebianShootoutMono/release/
NET_4_X_RUNTIME=MONO_PATH=$(TEST_EXE_PATH):$(abs_top_srcdir)/mcs/class/lib/net_4_x $(abs_top_srcdir)/runtime/mono-wrapper
FULL_AOT_RUNTIME=MONO_PATH=$(abs_top_srcdir)/mcs/class/lib/testing_aot_full $(abs_top_srcdir)/runtime/mono-wrapper
PERF_BINARY=$(if $(MONO_PERF_BINARY),$(MONO_PERF_BINARY),perf)
PERF_RUNTIME=$(abs_top_srcdir)/acceptance-tests/microbench-perf.sh
define BenchmarkDotNetTemplate
run-microbench-$(1):: DebianShootoutMono.stamp
MONO_BENCH_AOT_RUN="$(AOT_RUN_FLAGS)" \
MONO_BENCH_AOT_BUILD="$(AOT_BUILD_FLAGS)" \
MONO_BENCH_EXECUTABLE="$(abs_top_srcdir)/runtime/mono-wrapper" \
MONO_BENCH_PATH="$(abs_top_srcdir)/mcs/class/lib/$(TEST_PROFILE)" \
MONO_BENCH_INPUT="$(2)" \
$(NET_4_X_RUNTIME) \
$(TEST_EXE_PATH)/DebianShootoutMono.exe $(1)
test-run-microbench:: run-microbench-$(1)
run-microbench-debug-$(1):: DebianShootoutMono.stamp
echo MONO_PATH="$(abs_top_srcdir)/mcs/class/lib/$(TEST_PROFILE)" $(abs_top_srcdir)/runtime/mono-wrapper $(AOT_BUILD_FLAGS) $(TEST_EXE_PATH)/DebianShootoutMono.exe
MONO_BENCH_INPUT="$(2)" \
MONO_PATH="$(abs_top_srcdir)/mcs/class/lib/$(TEST_PROFILE)" \
$(abs_top_srcdir)/runtime/mono-wrapper $(AOT_RUN_FLAGS) $(TEST_EXE_PATH)/DebianShootoutMono.exe Run $(1)
test-run-microbench-debug:: run-microbench-debug-$(1)
if HOST_LINUX
run-microbench-profiled-$(1):: microbench-results/$(1).perf.data
microbench-results/$(1).perf.data: DebianShootoutMono.stamp
mkdir -p microbench-results
MONO_PERF_BINARY="$(PERF_BINARY)" \
MONO_BENCH_EXECUTABLE="$(PERF_RUNTIME)" \
MONO_BENCH_AOT_RUN="$(AOT_RUN_FLAGS)"\
MONO_BENCH_AOT_BUILD="$(AOT_BUILD_FLAGS)"\
MONO_BENCH_PATH="$(abs_top_srcdir)/mcs/class/lib/$(TEST_PROFILE)" \
MONO_BENCH_INPUT="$(2)" \
$(NET_4_X_RUNTIME) \
$(TEST_EXE_PATH)/DebianShootoutMono.exe $(1) $(2)
mv perf.data microbench-results/$(1).perf.data
microbench-results/$(1).tmp.perf: microbench-results/$(1).perf.data
$(PERF_BINARY) script -i microbench-results/$(1).perf.data > microbench-results/$(1).tmp.perf
microbench-results/$(1).perf-flame.svg: microbench-results/$(1).tmp.perf
cat microbench-results/$(1).tmp.perf | ./external/DebianShootoutMono/FlameGraph/stackcollapse-perf.pl > microbench-results/$(1).perf-folded
./external/DebianShootoutMono/FlameGraph/flamegraph.pl microbench-results/$(1).perf-folded > microbench-results/$(1).perf-flame.svg
rm microbench-results/$(1).tmp.perf
rm microbench-results/$(1).perf-folded
MONO_PERF_FLAGS=--show-cpu-utilization -n --hierarchy -T $(MONO_PERF_ADDITIONAL_FLAGS)
microbench-results/$(1).perf.report: microbench-results/$(1).perf.data
$(PERF_BINARY) report -i microbench-results/$(1).perf.data $(MONO_PERF_FLAGS) > microbench-results/$(1).perf.report
test-run-microbench-profiled:: run-microbench-profiled-$(1)
test-run-microbench-publish-collect:: microbench-results/$(1).perf.data microbench-results/$(1).perf.report microbench-results/$(1).perf-flame.svg
endif
endef
if HOST_LINUX
test-run-microbench-perf-check:
$(PERF_BINARY) record -a -o perf.data -- echo "testing"
rm perf.data
microbench-results/perf-data.zip:
zip microbench-results/perf-data.zip microbench-results/*.perf.data
rm microbench-results/*.perf.data
perf-report: microbench-results/perf-data.zip
perf-report-total: test-run-microbench-publish-collect
@$(MAKE) perf-report
endif
.PHONY: prepare-dlls
if FULL_AOT_TESTS
prepare-dlls:
$(FULL_AOT_RUNTIME) $(AOT_BUILD_FLAGS) $(TEST_EXE_PATH)/*.{dll,exe}
else
prepare-dlls:
endif
FIXTURE_DIR=$(abs_top_srcdir)/acceptance-tests/external/DebianShootoutMono/fixtures
$(eval $(call BenchmarkDotNetTemplate,Mandelbrot,))
$(eval $(call BenchmarkDotNetTemplate,RegexRedux,$(FIXTURE_DIR)/regexredux-input.txt))
$(eval $(call BenchmarkDotNetTemplate,KNucleotide,$(FIXTURE_DIR)/knucleotide-input.txt))
$(eval $(call BenchmarkDotNetTemplate,BinaryTrees,))
$(eval $(call BenchmarkDotNetTemplate,NBodyTest,))
$(eval $(call BenchmarkDotNetTemplate,SpectralNorm,))
$(eval $(call BenchmarkDotNetTemplate,Fannkuchredux,))
$(eval $(call BenchmarkDotNetTemplate,Fasta,))
$(eval $(call BenchmarkDotNetTemplate,RevComp,$(FIXTURE_DIR)/revcomp-input.txt))
#$(eval $(call BenchmarkDotNetTemplate,GistBenchmark,$(MONO_BENCH_GIST_URL))) broken in BDN, bug filed
+11 -18
View File
@@ -40,6 +40,7 @@ namespace Mono.Profiling.Tests.Stress {
public int? ExitCode { get; set; }
public string StandardOutput { get; set; }
public string StandardError { get; set; }
public string CombinedOutput { get; set; }
}
static class Program {
@@ -124,11 +125,6 @@ namespace Mono.Profiling.Tests.Stress {
if (Environment.GetEnvironmentVariable ("MONO_PROFILER_STRESS_OPTIONS") is string envOptions)
options = envOptions;
var suspend = false;
if (Environment.GetEnvironmentVariable ("MONO_PROFILER_STRESS_SUSPEND") is string envSuspend)
suspend = bool.Parse (envSuspend);
var rand = new Random (seed);
var cpus = Environment.ProcessorCount;
@@ -179,9 +175,6 @@ namespace Mono.Profiling.Tests.Stress {
info.EnvironmentVariables.Clear ();
info.EnvironmentVariables.Add ("MONO_PATH", classDir);
if (suspend)
info.EnvironmentVariables.Add ("MONO_DEBUG", "suspend-on-native-crash,suspend-on-unhandled");
var progress = $"({i + 1}/{benchmarks.Length})";
Console.ForegroundColor = ConsoleColor.Blue;
@@ -198,17 +191,22 @@ namespace Mono.Profiling.Tests.Stress {
var stdout = new StringBuilder ();
var stderr = new StringBuilder ();
var combined = new StringBuilder ();
proc.OutputDataReceived += (sender, args) => {
if (args.Data != null)
lock (result)
lock (result) {
stdout.AppendLine (args.Data);
combined.AppendLine (args.Data);
}
};
proc.ErrorDataReceived += (sender, args) => {
if (args.Data != null)
lock (result)
lock (result) {
stderr.AppendLine (args.Data);
combined.AppendLine (args.Data);
}
};
result.Stopwatch.Start ();
@@ -235,6 +233,7 @@ namespace Mono.Profiling.Tests.Stress {
lock (result) {
result.StandardOutput = stdout.ToString ();
result.StandardError = stderr.ToString ();
result.CombinedOutput = combined.ToString ();
}
}
@@ -246,16 +245,10 @@ namespace Mono.Profiling.Tests.Stress {
if (result.ExitCode != 0) {
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine ("===== stdout =====");
Console.WriteLine ("===== stdout + stderr =====");
Console.ResetColor ();
Console.WriteLine (result.StandardOutput);
Console.ForegroundColor = ConsoleColor.Red;
Console.WriteLine ("===== stderr =====");
Console.ResetColor ();
Console.WriteLine (result.StandardError);
Console.WriteLine (result.CombinedOutput);
}
results.Add (result);
+1 -1
View File
@@ -1,5 +1,5 @@
check-roslyn:
@$(MAKE) validate-roslyn RESET_VERSIONS=1
cd $(ROSLYN_PATH); \
./build.sh --restore --build --test --mono || exit; \
./mono-testing.sh "$(XUNIT)" || exit; \
echo "done"
-10
View File
@@ -7,7 +7,6 @@ $(eval $(call ValidateVersionTemplate,benchmarker,BENCHMARKER))
$(eval $(call ValidateVersionTemplate,roslyn,ROSLYN))
$(eval $(call ValidateVersionTemplate,coreclr,CORECLR))
$(eval $(call ValidateVersionTemplate,ms-test-suite,MSTESTSUITE))
$(eval $(call ValidateVersionTemplate,DebianShootoutMono,DEBIANSHOOTOUTMONO))
# Bump the given submodule to the revision given by the REV make variable
# If COMMIT is 1, commit the change
@@ -15,7 +14,6 @@ bump-benchmarker: __bump-benchmarker
bump-roslyn: __bump-version-roslyn
bump-coreclr: __bump-version-coreclr
bump-ms-test-suite: __bump-version-ms-test-suite
bump-DebianShootoutMono: __bump-version-DebianShootoutMono
# Bump the given submodule to the branch given by the BRANCH/REMOTE_BRANCH make variables
# If COMMIT is 1, commit the change
@@ -23,7 +21,6 @@ bump-branch-benchmarker: __bump-branch-benchmarker
bump-branch-roslyn: __bump-branch-roslyn
bump-branch-coreclr: __bump-branch-coreclr
bump-branch-ms-test-suite: __bump-branch-ms-test-suite
bump-branch-DebianShootoutMono: __bump-branch-DebianShootoutMono
# Bump the given submodule to its current GIT version
# If COMMIT is 1, commit the change
@@ -31,7 +28,6 @@ bump-current-benchmarker: __bump-current-benchmarker
bump-current-roslyn: __bump-current-version-roslyn
bump-current-coreclr: __bump-current-version-coreclr
bump-current-ms-test-suite: __bump-current-version-ms-test-suite
bump-current-DebianShootoutMono: __bump-current-version-DebianShootoutMono
commit-bump-benchmarker:
$(MAKE) bump-benchmarker COMMIT=1
@@ -45,9 +41,6 @@ commit-bump-coreclr:
commit-bump-ms-test-suite:
$(MAKE) bump-ms-test-suite COMMIT=1
commit-bump-DebianShootoutMono:
$(MAKE) bump-DebianShootoutMono COMMIT=1
commit-bump-current-benchmarker:
$(MAKE) bump-current-benchmarker COMMIT=1
@@ -59,6 +52,3 @@ commit-bump-current-coreclr:
commit-bump-current-ms-test-suite:
$(MAKE) bump-current-ms-test-suite COMMIT=1
commit-bump-current-DebianShootoutMono:
$(MAKE) bump-current-DebianShootoutMono COMMIT=1
+4 -6
View File
@@ -89,11 +89,9 @@ if test x$NOCONFIGURE = x && test -z "$*"; then
echo
fi
am_opt="--add-missing --copy --gnu -Wno-portability -Wno-obsolete"
case $CC in
xlc )
am_opt="$am_opt --include-deps";;
am_opt=--include-deps;;
esac
@@ -120,7 +118,7 @@ for PARAM; do
done
if test x$has_ext_mod = xtrue; then
pushd $top_srcdir../mono-extensions/scripts
pushd ../mono-extensions/scripts
sh ./prepare-repo.sh $ext_mod_args || exit 1
popd
else
@@ -144,8 +142,8 @@ if grep "^AC_CONFIG_HEADERS" configure.ac >/dev/null; then
autoheader || { echo "**Error**: autoheader failed."; exit 1; }
fi
echo "Running automake $am_opt ..."
automake $am_opt ||
echo "Running automake --gnu $am_opt ..."
automake --add-missing --gnu -Wno-portability -Wno-obsolete $am_opt ||
{ echo "**Error**: automake failed."; exit 1; }
echo "Running autoconf ..."
autoconf || { echo "**Error**: autoconf failed."; exit 1; }
-11397
View File
File diff suppressed because it is too large. Load diff
+487 -1675
View File
File diff suppressed because it is too large. Load diff
-3
View File
@@ -11,9 +11,6 @@
<dllmap dll="oci" target="libclntsh@libsuffix@" os="!windows"/>
<dllmap dll="db2cli" target="libdb2_36@libsuffix@" os="!windows"/>
<dllmap dll="MonoPosixHelper" target="$mono_libdir/libMonoPosixHelper@libsuffix@" os="!windows" />
<dllmap dll="System.Native" target="$mono_libdir/@MONO_NATIVE_LIBRARY_NAME@@libsuffix@" os="!windows" />
<dllmap dll="System.Net.Security.Native" target="$mono_libdir/@MONO_NATIVE_LIBRARY_NAME@@libsuffix@" os="!windows" />
<dllmap dll="System.Security.Cryptography.Native.Apple" target="$mono_libdir/@MONO_NATIVE_LIBRARY_NAME@@libsuffix@" os="osx" />
<dllmap dll="libmono-btls-shared" target="$mono_libdir/libmono-btls-shared@libsuffix@" os="!windows" />
<dllmap dll="i:msvcrt" target="@LIBC@" os="!windows"/>
<dllmap dll="i:msvcrt.dll" target="@LIBC@" os="!windows"/>
+12 -12
View File
@@ -53,7 +53,7 @@ def stringify_class_name(ns, name):
if ns == "":
return name
else:
return "{0}.{1}".format (ns, name)
return "{}.{}".format (ns, name)
class ArrayPrinter:
"Print a C# array"
@@ -66,7 +66,7 @@ class ArrayPrinter:
def to_string(self):
obj = self.val.cast (gdb.lookup_type ("MonoArray").pointer ()).dereference ()
length = obj ['max_length']
return "{0} [{1}]".format (stringify_class_name (self.class_ns, self.class_name [0:len (self.class_name) - 2]), int (length))
return "{} [{}]".format (stringify_class_name (self.class_ns, self.class_name [0:len (self.class_name) - 2]), int (length))
class ObjectPrinter:
"Print a C# object"
@@ -96,7 +96,7 @@ class ObjectPrinter:
return (field.name, self.obj [field.name])
except:
# Superclass
return (field.name, self.obj.cast (gdb.lookup_type ("{0}".format (field.name))))
return (field.name, self.obj.cast (gdb.lookup_type ("{}".format (field.name))))
def children(self):
# FIXME: It would be easier if gdb.Value would support iteration itself
@@ -109,7 +109,7 @@ class ObjectPrinter:
class_name = obj ['vtable'].dereference ()['klass'].dereference ()['name'].string ()
if class_name [-2:len(class_name)] == "[]":
return {}.__iter__ ()
gdb_type = gdb.lookup_type ("struct {0}_{1}".format (class_ns.replace (".", "_"), class_name))
gdb_type = gdb.lookup_type ("struct {}_{}".format (class_ns.replace (".", "_"), class_name))
return self._iterator(obj.cast (gdb_type))
except:
print (sys.exc_info ()[0])
@@ -129,12 +129,12 @@ class ObjectPrinter:
return ArrayPrinter (self.val,class_ns,class_name).to_string ()
if class_ns != "":
try:
gdb_type = gdb.lookup_type ("struct {0}.{1}".format (class_ns, class_name))
gdb_type = gdb.lookup_type ("struct {}.{}".format (class_ns, class_name))
except:
# Maybe there is no debug info for that type
return "{0}.{1}".format (class_ns, class_name)
return "{}.{}".format (class_ns, class_name)
#return obj.cast (gdb_type)
return "{0}.{1}".format (class_ns, class_name)
return "{}.{}".format (class_ns, class_name)
return class_name
except:
print (sys.exc_info ()[0])
@@ -154,9 +154,9 @@ class MonoMethodPrinter:
val = self.val.dereference ()
klass = val ["klass"].dereference ()
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
return "\"{0}:{1} ()\"".format (class_name, val ["name"].string ())
return "\"{}:{} ()\"".format (class_name, val ["name"].string ())
# This returns more info but requires calling into the inferior
#return "\"{0}\"".format (gdb.parse_and_eval ("mono_method_full_name ({0}, 1)".format (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
#return "\"{}\"".format (gdb.parse_and_eval ("mono_method_full_name ({}, 1)".format (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
class MonoClassPrinter:
"Print a MonoClass structure"
@@ -169,9 +169,9 @@ class MonoClassPrinter:
return "0x0"
klass = self.val.dereference ()
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
return "\"{0}\"".format (class_name)
return "\"{}\"".format (class_name)
# This returns more info but requires calling into the inferior
#return "\"{0}\"".format (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*){0})->byval_arg)".format (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
#return "\"{}\"".format (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*){})->byval_arg)".format (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
def lookup_pretty_printer(val):
t = str (val.type)
@@ -245,4 +245,4 @@ exec_file = gdb.current_objfile ().filename
if os.stat (exec_file).st_size != os.lstat (exec_file).st_size:
exec_file = os.readlink (exec_file)
exec_dir = os.path.dirname (exec_file)
gdb.execute ("source {0}/{1}-gdbinit".format (exec_dir, os.path.basename (exec_file)))
gdb.execute ("source {}/{}-gdbinit".format (exec_dir, os.path.basename (exec_file)))
+16 -16
View File
@@ -48,7 +48,7 @@ def stringify_class_name(ns, name):
if ns == "":
return name
else:
return "{0}.{1}".format (ns, name)
return "{}.{}".format (ns, name)
class ArrayPrinter:
"Print a C# array"
@@ -61,7 +61,7 @@ class ArrayPrinter:
def to_string(self):
obj = self.val.cast (gdb.lookup_type ("MonoArray").pointer ()).dereference ()
length = obj ['max_length']
return "{0} [{1}]".format (stringify_class_name (self.class_ns, self.class_name [0:len(self.class_name) - 2]), int(length))
return "{} [{}]".format (stringify_class_name (self.class_ns, self.class_name [0:len(self.class_name) - 2]), int(length))
class ObjectPrinter:
"Print a C# object"
@@ -91,7 +91,7 @@ class ObjectPrinter:
return (field.name, self.obj [field.name])
except:
# Superclass
return (field.name, self.obj.cast (gdb.lookup_type ("{0}".format (field.name))))
return (field.name, self.obj.cast (gdb.lookup_type ("{}".format (field.name))))
def children(self):
# FIXME: It would be easier if gdb.Value would support iteration itself
@@ -105,7 +105,7 @@ class ObjectPrinter:
if class_name [-2:len(class_name)] == "[]":
return {}.__iter__ ()
try:
gdb_type = gdb.lookup_type ("struct {0}_{1}".format (class_ns.replace (".", "_"), class_name))
gdb_type = gdb.lookup_type ("struct {}_{}".format (class_ns.replace (".", "_"), class_name))
return self._iterator(obj.cast (gdb_type))
except:
return {}.__iter__ ()
@@ -127,12 +127,12 @@ class ObjectPrinter:
return ArrayPrinter (self.val,class_ns,class_name).to_string ()
if class_ns != "":
try:
gdb_type = gdb.lookup_type ("struct {0}.{1}".format (class_ns, class_name))
gdb_type = gdb.lookup_type ("struct {}.{}".format (class_ns, class_name))
except:
# Maybe there is no debug info for that type
return "{0}.{1}".format (class_ns, class_name)
return "{}.{}".format (class_ns, class_name)
#return obj.cast (gdb_type)
return "{0}.{1}".format (class_ns, class_name)
return "{}.{}".format (class_ns, class_name)
return class_name
except:
print (sys.exc_info ()[0])
@@ -152,9 +152,9 @@ class MonoMethodPrinter:
val = self.val.dereference ()
klass = val ["klass"].dereference ()
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
return "\"{0}:{1} ()\"".format (class_name, val ["name"].string ())
return "\"{}:{} ()\"".format (class_name, val ["name"].string ())
# This returns more info but requires calling into the inferior
#return "\"{0}\"".format (gdb.parse_and_eval ("mono_method_full_name ({0}, 1)".format (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
#return "\"{}\"".format (gdb.parse_and_eval ("mono_method_full_name ({}, 1)".format (str (int (self.val.cast (gdb.lookup_type ("guint64")))))).string ())
class MonoClassPrinter:
"Print a MonoClass structure"
@@ -168,11 +168,11 @@ class MonoClassPrinter:
klass = self.val.dereference ()
class_name = stringify_class_name (klass ["name_space"].string (), klass ["name"].string ())
if add_quotes:
return "\"{0}\"".format (class_name)
return "\"{}\"".format (class_name)
else:
return class_name
# This returns more info but requires calling into the inferior
#return "\"{0}\"".format (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*){0})->byval_arg)".format (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
#return "\"{}\"".format (gdb.parse_and_eval ("mono_type_full_name (&((MonoClass*){})->byval_arg)".format (str (int ((self.val).cast (gdb.lookup_type ("guint64")))))))
def to_string(self):
try:
@@ -220,7 +220,7 @@ class MonoGenericClassPrinter:
method_inst_str = ""
if int(method_inst.cast (gdb.lookup_type ("guint64"))) != 0:
method_inst_str = str(method_inst)
return "{0}, [{1}], [{2}]>".format (container_str, class_inst_str, method_inst_str)
return "{}, [{}], [{}]>".format (container_str, class_inst_str, method_inst_str)
def to_string(self):
try:
@@ -250,9 +250,9 @@ class MonoTypePrinter:
info = str(t ["data"]["generic_class"])
if info != "":
return "{{{0}, {1}}}".format (kind, info)
return "{{{}, {}}}".format (kind, info)
else:
return "{{{0}}}".format (kind)
return "{{{}}}".format (kind)
except:
#print (sys.exc_info ()[0])
#print (sys.exc_info ()[1])
@@ -281,7 +281,7 @@ class MonoMethodRgctxPrinter:
if i > 0:
inst_str = inst_str + ", "
inst_str = inst_str + type_printer.to_string ()
return "MRGCTX[{0}, [{1}]]".format (klass_printer.to_string(), inst_str)
return "MRGCTX[{}, [{}]]".format (klass_printer.to_string(), inst_str)
class MonoVTablePrinter:
"Print a MonoVTable structure"
@@ -296,7 +296,7 @@ class MonoVTablePrinter:
klass = vtable ["klass"]
klass_printer = MonoClassPrinter (klass)
return "vtable({0})".format (klass_printer.to_string ())
return "vtable({})".format (klass_printer.to_string ())
def lookup_pretty_printer(val):
t = str (val.type)
+1 -1
View File
@@ -116,7 +116,7 @@
<add prefix="http" type="System.Net.HttpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="https" type="System.Net.HttpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="ftp" type="System.Net.FtpWebRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</webRequestModules>
</system.net>
+1 -1
View File
@@ -132,7 +132,7 @@
<add prefix="http" type="System.Net.HttpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="https" type="System.Net.HttpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="ftp" type="System.Net.FtpWebRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</webRequestModules>
<settings>
<ipv6 enabled="false"/>
+1 -1
View File
@@ -133,7 +133,7 @@
<add prefix="http" type="System.Net.HttpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="https" type="System.Net.HttpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="ftp" type="System.Net.FtpWebRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</webRequestModules>
</system.net>
+1 -1
View File
@@ -136,7 +136,7 @@
<add prefix="http" type="System.Net.HttpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="https" type="System.Net.HttpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="file" type="System.Net.FileWebRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="ftp" type="System.Net.FtpWebRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<add prefix="ftp" type="System.Net.FtpRequestCreator, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
</webRequestModules>
</system.net>
+2 -3
View File
@@ -52,8 +52,7 @@ EXTRA_DIST = \
-include $(mcs_topdir)/build/config.make
DOC_PROFILE:=net_4_x
CLASS=$(mcs_topdir)/class/lib/$(DOC_PROFILE)
CLASS=$(mcs_topdir)/class/lib/$(DEFAULT_PROFILE)
dist-hook:
$(mkdir_p) $(distdir)/sources
@@ -69,7 +68,7 @@ clean-local:
-rm -f deploy/* convert.exe* AgilityPack.dll*
-rm -f $(ASSEMBLED_DOCS)
TOOL_MAKE=$(MAKE) -f $(srcdir)/docs.make topdir=$(srcdir)/../mcs srcdir=$(srcdir) PROFILE=$(DOC_PROFILE)
TOOL_MAKE=$(MAKE) -f $(srcdir)/docs.make topdir=$(srcdir)/../mcs srcdir=$(srcdir)
monoapi.zip: monoapi.tree
+2 -2
View File
@@ -13,10 +13,10 @@ ASSEMBLED_DOCS = \
monoapi.tree monoapi.zip
convert.exe: $(srcdir)/convert.cs AgilityPack.dll
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Xml.dll -out:$@ $< -r:AgilityPack.dll
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/System.Xml.dll -out:$@ $< -r:AgilityPack.dll
AgilityPack.dll:
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll -r:$(topdir)/class/lib/$(PROFILE)/System.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Xml.dll -target:library -out:$@ $(srcdir)/HtmlAgilityPack/*.cs
$(CSCOMPILE) -r:$(topdir)/class/lib/$(PROFILE)/System.dll -r:$(topdir)/class/lib/$(PROFILE)/System.Xml.dll -target:library -out:$@ $(srcdir)/HtmlAgilityPack/*.cs
monoapi.zip: monoapi.tree
@test -f $@ || { rm -f $< && $(MAKE) $<; }
-116
View File
@@ -1,116 +0,0 @@
# Mono RISC-V Port
These are some useful links and notes pertaining to the RISC-V port of Mono.
## Useful RISC-V documents
* [RISC-V User-Level ISA Specification](https://riscv.org/specifications/)
* [RISC-V Privileged ISA Specification](https://riscv.org/specifications/privileged-isa/)
* [RISC-V Debug Specification Standard](https://github.com/riscv/riscv-debug-spec/blob/master/riscv-debug-spec.pdf)
* [RISC-V Assembly Programmer's Manual](https://github.com/riscv/riscv-asm-manual/blob/master/riscv-asm.md)
* [RISC-V ELF psABI Specification](https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md)
## Useful RISC-V repositories
* [RISC-V Organization](https://github.com/riscv)
* [RISC-V Linux](https://github.com/riscv/riscv-linux)
* [RISC-V LLD](https://github.com/riscv/riscv-lld)
* [RISC-V Tools](https://github.com/riscv/riscv-tools)
* [RISC-V GNU Toolchain](https://github.com/riscv/riscv-gnu-toolchain)
* [RISC-V Binutils](https://github.com/riscv/riscv-binutils-gdb)
* [RISC-V GCC](https://github.com/riscv/riscv-gcc)
* [RISC-V Glibc](https://github.com/riscv/riscv-glibc)
* [RISC-V Newlib](https://github.com/riscv/riscv-newlib)
* [RISC-V QEMU](https://github.com/riscv/riscv-qemu)
* [RISC-V Opcodes](https://github.com/riscv/riscv-opcodes)
* [RISC-V Tests](https://github.com/riscv/riscv-tests)
* [lowRISC Organization](https://github.com/lowrisc)
* [RISC-V LLVM](https://github.com/lowrisc/riscv-llvm)
## Setting up a cross environment
Setting up a cross environment with a Linux toolchain and QEMU is quite easy.
First, add these to your `.bashrc` (or some other script that you run):
```bash
export RISCV=$HOME/riscv
export PATH=$RISCV/bin:$PATH
export QEMU_LD_PREFIX=$RISCV/sysroot
```
Install some dependencies needed to build the toolchain:
```console
# apt install autoconf automake autotools-dev curl libmpc-dev libmpfr-dev libgmp-dev libusb-1.0-0-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev device-tree-compiler pkg-config libexpat-dev libglib2.0-dev libpixman-1-dev
```
Now you can build the toolchain:
```console
$ git clone --recursive [email protected]:riscv/riscv-tools.git
$ cd riscv-tools
$ ./build.sh
$ cd riscv-gnu-toolchain
$ ./configure --prefix=$RISCV --enable-multilib
$ make linux
$ cd ../..
$ git clone --recursive [email protected]:riscv/riscv-qemu.git
$ cd riscv-qemu
$ mkdir build
$ cd build
$ ../configure --prefix=$RISCV --disable-werror
$ make
$ make install
```
## Building Mono with a cross toolchain
Building Mono is quite straightforward:
```console
$ ./autogen.sh --prefix=$RISCV/sysroot --host=riscv64-unknown-linux-gnu
$ make
$ make install
```
You can set `CFLAGS` as appropriate to change the RISC-V options, such as which
standard extensions and ABI to use. For example, to use the 64-bit soft float
ABI:
```console
$ CFLAGS="-mabi=lp64" ./autogen.sh --prefix=$RISCV/sysroot --host=riscv64-unknown-linux-gnu
```
Note that, since this is a cross build, the `mcs` directory won't be built. You
will have to build the managed libraries and tools through a native build of
Mono and copy them into `$RISCV/sysroot`.
You can run Mono with QEMU like this:
```console
$ qemu-riscv64 $RISCV/sysroot/bin/mono hello.exe
```
## Debugging
```console
$ qemu-riscv64 -g 12345 ./mono/mini/mono-sgen --interp basic.exe &
$ riscv64-unknown-elf-gdb -ex 'target remote localhost:12345' -ex 'b main' -ex 'c' ./mono/mini/mono-sgen
```
## Things to be done
In no particular order:
* Complete the soft float port.
* Complete the 32-bit port.
* Add unwind info to trampolines.
* Implement AOT support.
* Implement interpreter support.
* Implement LLVM support.
* Implement SDB support.
* Implement `dyn_call` support.
* Ensure all runtime tests pass.
* Ensure all corlib tests pass.
* Set up CI on Jenkins.
+1 -1
+1 -1
+1 -1
+1 -1
+1 -1
-1
Submodule external/llvm deleted from 1aaaaa5246.
+1 -3
View File
@@ -1,11 +1,9 @@
AM_CPPFLAGS = $(GLIB_CFLAGS)
glib_libs = $(top_builddir)/mono/eglib/libeglib.la
lib_LTLIBRARIES = libikvm-native.la
libikvm_native_la_SOURCES = jni.c os.c jni.h
libikvm_native_la_LDFLAGS = -avoid-version
libikvm_native_la_LIBADD = $(glib_libs)
libikvm_native_la_LIBADD = $(GLIB_LIBS)
-3
View File
@@ -185,6 +185,3 @@ EXTRA_DIST += configure.host
.S.s:
if $(CPP) $< >$@ ; then :; else rm -f $@; fi
test:
test-bundle:
+4 -5
View File
@@ -74,13 +74,12 @@ if test x$NOCONFIGURE = x && test -z "$*"; then
echo
fi
am_opt="--add-missing --copy --gnu -Wno-obsolete"
case $CC in
xlc )
am_opt="$am_opt --include-deps";;
am_opt=--include-deps;;
esac
if grep "^AC_PROG_LIBTOOL" configure.ac >/dev/null; then
if test -z "$NO_LIBTOOLIZE" ; then
echo "Running libtoolize..."
@@ -105,8 +104,8 @@ if grep "^AC_CONFIG_HEADERS" configure.ac >/dev/null; then
autoheader || { echo "**Error**: autoheader failed."; exit 1; }
fi
echo "Running automake $am_opt ..."
automake $am_opt ||
echo "Running automake --gnu $am_opt ..."
automake --add-missing --gnu -Wno-obsolete $am_opt ||
{ echo "**Error**: automake failed."; exit 1; }
echo "Running autoconf ..."
autoconf || { echo "**Error**: autoconf failed."; exit 1; }
+1 -2
View File
@@ -396,8 +396,7 @@ GC_bool GC_register_main_static_data()
# if (defined(LINUX) || defined (__GLIBC__) || defined(NACL)) /* Are others OK here, too? */ \
&& (__GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ > 2) \
|| (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG))) \
|| defined(OPENBSD)
|| (__GLIBC__ == 2 && __GLIBC_MINOR__ == 2 && defined(DT_CONFIG)))
/* We have the header files for a glibc that includes dl_iterate_phdr. */
/* It may still not be available in the library on the target system. */
+9 -49
View File
@@ -42,6 +42,11 @@
# define GC_CONST
# endif
# ifdef __cplusplus
extern "C" {
# endif
/* Define word and signed_word to be unsigned and signed types of the */
/* size as char * or void *. There seems to be no way to do this */
/* even semi-portably. The following is probably no better/worse */
@@ -61,10 +66,6 @@
typedef __int64 GC_signed_word;
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* Public read-only variables */
GC_API GC_word GC_gc_no;/* Counter incremented per collection. */
@@ -500,17 +501,7 @@ GC_API GC_PTR GC_malloc_atomic_ignore_off_page GC_PROTO((size_t lb));
#endif
#if defined(__linux__) || defined(__GLIBC__)
#ifdef __cplusplus
} // extern "C"
#endif
# include <features.h>
#ifdef __cplusplus
extern "C" {
#endif
# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1 || __GLIBC__ > 2) \
&& !defined(__ia64__)
# ifndef GC_HAVE_BUILTIN_BACKTRACE
@@ -844,18 +835,6 @@ typedef GC_PTR (*GC_fn_type) GC_PROTO((GC_PTR client_data));
GC_API GC_PTR GC_call_with_alloc_lock
GC_PROTO((GC_fn_type fn, GC_PTR client_data));
/*
* These are similar to GC_do_blocking () in upstream bdwgc. The design is
* simpler in that there is no distinction between active and inactive stack
* frames; instead, while a thread is in blocking state, it promises to not
* interact with the GC at all, and to not keep any pointers to GC memory
* around from before entering blocking state. Additionally, these can be
* called unbalanced (they simply set a flag internally).
*/
GC_API void GC_start_blocking GC_PROTO((void));
GC_API void GC_end_blocking GC_PROTO((void));
/* The following routines are primarily intended for use with a */
/* preprocessor which inserts calls to check C pointer arithmetic. */
/* They indicate failure by invoking the corresponding _print_proc. */
@@ -974,17 +953,7 @@ GC_API void (*GC_is_visible_print_proc)
#if !defined(GC_USE_LD_WRAP) && \
(defined(GC_PTHREADS) || defined(GC_SOLARIS_THREADS) || defined(GC_DARWIN_THREADS) || defined(GC_MACOSX_THREADS))
#ifdef __cplusplus
} // extern "C"
#endif
# include "gc_pthread_redirects.h"
#ifdef __cplusplus
extern "C" {
#endif
#endif
# if defined(PCR) || defined(GC_SOLARIS_THREADS) || \
@@ -1004,17 +973,8 @@ extern void GC_thr_init(void); /* Needed for Solaris/X86 */
#endif /* THREADS && !SRC_M3 */
#if defined(GC_WIN32_THREADS) && !defined(__CYGWIN32__) && !defined(__CYGWIN__)
#ifdef __cplusplus
} // extern "C"
#endif
# include <windows.h>
#ifdef __cplusplus
extern "C" {
#endif
# ifdef GC_INSIDE_DLL
BOOL WINAPI GC_DllMain(HINSTANCE inst, ULONG reason, LPVOID reserved);
# endif
@@ -1109,10 +1069,6 @@ extern "C" {
GC_API void GC_win32_free_heap ();
#endif
#ifdef __cplusplus
} // extern "C"
#endif
#if ( defined(_AMIGA) && !defined(GC_AMIGA_MAKINGLIB) )
/* Allocation really goes through GC_amiga_allocwrapper_do */
# include "gc_amiga_redirects.h"
@@ -1122,4 +1078,8 @@ extern "C" {
# include "gc_local_alloc.h"
#endif
#ifdef __cplusplus
} /* end of extern "C" */
#endif
#endif /* _GC_H */
-8
View File
@@ -44,10 +44,6 @@
# include "gc.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* The following allocators signal an out of memory condition with */
/* return GC_oom_fn(bytes); */
@@ -114,8 +110,4 @@ extern int GC_gcj_debug_kind;
GC_gcj_malloc_ignore_off_page(s,d)
# endif
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* GC_GCJ_H */
-8
View File
@@ -49,10 +49,6 @@
#ifndef GC_LOCAL_ALLOC_H
#define GC_LOCAL_ALLOC_H
#ifdef __cplusplus
extern "C" {
#endif
/* We assume ANSI C for this interface. */
GC_PTR GC_local_malloc(size_t bytes);
@@ -66,10 +62,6 @@ GC_PTR GC_local_malloc_atomic(size_t bytes);
void * ptr_to_struct_containing_descr);
#endif
#ifdef __cplusplus
} // extern "C"
#endif
# ifdef GC_DEBUG
/* We don't really use local allocation in this case. */
# define GC_LOCAL_MALLOC(s) GC_debug_malloc(s,GC_EXTRAS)
-29
View File
@@ -15,11 +15,6 @@
/* facility in thr_keycreate. Alternatively, keep a redundant pointer */
/* to thread specific data on the thread stack. */
# include <thread.h>
#ifdef __cplusplus
extern "C" {
#endif
int GC_thr_create(void *stack_base, size_t stack_size,
void *(*start_routine)(void *), void *arg, long flags,
thread_t *new_thread);
@@ -31,22 +26,11 @@ extern "C" {
# define thr_join GC_thr_join
# define thr_suspend GC_thr_suspend
# define thr_continue GC_thr_continue
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* GC_SOLARIS_THREADS */
#if defined(GC_SOLARIS_PTHREADS)
# include <pthread.h>
# include <signal.h>
#ifdef __cplusplus
extern "C" {
#endif
extern int GC_pthread_create(pthread_t *new_thread,
const pthread_attr_t *attr,
void * (*thread_execp)(void *), void *arg);
@@ -55,11 +39,6 @@ extern "C" {
# define pthread_join GC_pthread_join
# define pthread_create GC_pthread_create
# define pthread_detach GC_pthread_detach
#ifdef __cplusplus
} // extern "C"
#endif
#endif
#if defined(GC_SOLARIS_PTHREADS) || defined(GC_SOLARIS_THREADS)
@@ -72,10 +51,6 @@ extern "C" {
# include <pthread.h>
# include <signal.h>
#ifdef __cplusplus
extern "C" {
#endif
int GC_pthread_create(pthread_t *new_thread,
const pthread_attr_t *attr,
void *(*start_routine)(void *), void *arg);
@@ -112,10 +87,6 @@ extern "C" {
# define dlopen GC_dlopen
#endif
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* GC_xxxxx_THREADS */
#endif /* GC_PTHREAD_REDIRECTS_H */
-10
View File
@@ -43,17 +43,7 @@
*
*/
# ifdef THREADS
#ifdef __cplusplus
extern "C" {
#endif
void GC_noop1 GC_PROTO((word));
#ifdef __cplusplus
} // extern "C"
#endif
# ifdef PCR_OBSOLETE /* Faster, but broken with multiple lwp's */
# include "th/PCR_Th.h"
# include "th/PCR_ThCrSec.h"
+1 -20
View File
@@ -366,10 +366,6 @@ void GC_print_callers GC_PROTO((struct callinfo info[NFRAMES]));
# define BZERO(x,n) bzero((char *)(x),(int)(n))
# endif
#ifdef __cplusplus
extern "C" {
#endif
#if defined(DARWIN)
# if defined(POWERPC)
# define GC_MACH_THREAD_STATE_FLAVOR PPC_THREAD_STATE
@@ -417,18 +413,7 @@ extern "C" {
* Stop and restart mutator threads.
*/
# ifdef PCR
#ifdef __cplusplus
} // extern "C"
#endif
# include "th/PCR_ThCtl.h"
#ifdef __cplusplus
extern "C" {
#endif
# define STOP_WORLD() \
PCR_ThCtl_SetExclusiveMode(PCR_ThCtl_ExclusiveMode_stopNormal, \
PCR_allSigsBlocked, \
@@ -1330,7 +1315,7 @@ void GC_initiate_gc GC_PROTO((void));
/* If the mark state is invalid, this */
/* becomes full colleection. Otherwise */
/* it's partial. */
void GC_push_all (void* bottom, void* top);
void GC_push_all GC_PROTO((ptr_t bottom, ptr_t top));
/* Push everything in a range */
/* onto mark stack. */
void GC_push_selected GC_PROTO(( \
@@ -1975,10 +1960,6 @@ void GC_err_puts GC_PROTO((GC_CONST char *s));
/* some other reason. */
# endif /* PARALLEL_MARK */
#ifdef __cplusplus
} // extern "C"
#endif
# if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS)
/* We define the thread suspension signal here, so that we can refer */
/* to it in the dirty bit implementation, if necessary. Ideally we */
+4 -6
View File
@@ -1191,13 +1191,11 @@ void GC_mark_init()
* Should only be used if there is no possibility of mark stack
* overflow.
*/
void GC_push_all(void_bottom, void_top)
void* void_bottom;
void* void_top;
void GC_push_all(bottom, top)
ptr_t bottom;
ptr_t top;
{
ptr_t bottom = (ptr_t)void_bottom;
ptr_t top = (ptr_t)void_top;
word length;
register word length;
bottom = (ptr_t)(((word) bottom + ALIGNMENT-1) & ~(ALIGNMENT-1));
top = (ptr_t)(((word) top) & ~(ALIGNMENT-1));
+2
View File
@@ -1245,6 +1245,7 @@ void GC_start_blocking(void) {
GC_thread me;
LOCK();
me = GC_lookup_thread(pthread_self());
GC_ASSERT(!(me -> thread_blocked));
# ifdef SPARC
me -> stop_info.stack_ptr = (ptr_t)GC_save_regs_in_stack();
# else
@@ -1272,6 +1273,7 @@ void GC_end_blocking(void) {
GC_thread me;
LOCK(); /* This will block if the world is stopped. */
me = GC_lookup_thread(pthread_self());
GC_ASSERT(me -> thread_blocked);
me -> thread_blocked = FALSE;
UNLOCK();
}
+1 -47
View File
@@ -48,7 +48,6 @@ struct GC_thread_Rep {
/* 0 ==> entry not valid. */
/* !in_use ==> stack_base == 0 */
GC_bool suspended;
GC_bool thread_blocked;
# ifdef CYGWIN32
void *status; /* hold exit value until join in case it's a pointer */
@@ -175,7 +174,6 @@ static GC_thread GC_new_thread(void) {
/* the world, wait here. Hopefully this can't happen on any */
/* systems that don't allow us to block here. */
while (GC_please_stop) Sleep(20);
GC_ASSERT(!thread_table[i]->thread_blocked);
return thread_table + i;
}
@@ -225,6 +223,7 @@ static void GC_delete_thread(DWORD thread_id) {
}
}
#ifdef CYGWIN32
/* Return a GC_thread corresponding to a given pthread_t. */
@@ -246,20 +245,6 @@ static GC_thread GC_lookup_thread(pthread_t id)
return thread_table + i;
}
#else
static GC_thread GC_lookup_thread(DWORD id)
{
int i;
LONG max = GC_get_max_thread_index();
for (i = 0; i <= max; i++)
if (thread_table[i].in_use && thread_table[i].id == id)
return &thread_table[i];
return NULL;
}
#endif /* CYGWIN32 */
void GC_push_thread_structures GC_PROTO((void))
@@ -279,35 +264,6 @@ void GC_push_thread_structures GC_PROTO((void))
# endif
}
/* Wrappers for functions that are likely to block for an appreciable */
/* length of time. Must be called in pairs, if at all. */
/* Nothing much beyond the system call itself should be executed */
/* between these. */
void GC_start_blocking(void) {
GC_thread me;
LOCK();
#ifdef CYGWIN32
me = GC_lookup_thread(pthread_self());
#else
me = GC_lookup_thread(GetCurrentThreadId());
#endif
me->thread_blocked = TRUE;
UNLOCK();
}
void GC_end_blocking(void) {
GC_thread me;
LOCK(); /* This will block if the world is stopped. */
#ifdef CYGWIN32
me = GC_lookup_thread(pthread_self());
#else
me = GC_lookup_thread(GetCurrentThreadId());
#endif
me->thread_blocked = FALSE;
UNLOCK();
}
/* Defined in misc.c */
extern CRITICAL_SECTION GC_write_cs;
@@ -325,8 +281,6 @@ void GC_stop_world()
for (i = 0; i <= GC_get_max_thread_index(); i++)
if (thread_table[i].stack_base != 0
&& thread_table[i].id != thread_id) {
if (thread_table [i].thread_blocked)
continue;
# ifdef MSWINCE
/* SuspendThread will fail if thread is running kernel code */
while (SuspendThread(thread_table[i].handle) == (DWORD)-1)
-1
View File
@@ -1,3 +1,2 @@
/Makefile
/Makefile.in
/llvm_config.mk
+22 -48
View File
@@ -1,56 +1,30 @@
#
# Conditional submodule for llvm
#
# make reset-llvm will checkout a version of llvm which is suitable for this version of mono
# into $top_srcdir/llvm/llvm.
#
EXTRA_DIST=build.mk build_llvm_config.sh
LLVM_PATH=llvm
if ENABLE_LLVM
SUBMODULES_CONFIG_FILE = $(top_srcdir)/llvm/SUBMODULES.json
include $(top_srcdir)/scripts/submodules/versions.mk
if HOST_WIN32
llvm_config=llvm-config.exe
else
llvm_config=llvm-config
endif
$(eval $(call ValidateVersionTemplate,llvm,LLVM))
if HAVE_ZLIB
llvm_extra_libs=-lz
else
llvm_extra_libs=
endif
# Bump the given submodule to the revision given by the REV make variable
# If COMMIT is 1, commit the change
bump-llvm: __bump-version-llvm
if INTERNAL_LLVM
# Bump the given submodule to the branch given by the BRANCH/REMOTE_BRANCH make variables
# If COMMIT is 1, commit the change
bump-branch-llvm: __bump-branch-llvm
all-local: configure-llvm build-llvm install-llvm llvm_config.mk
# Bump the given submodule to its current GIT version
# If COMMIT is 1, commit the change
bump-current-llvm: __bump-current-version-llvm
clean-local: clean-llvm clean-llvm-config
clean-local:
$(RM) -r $(LLVM_PATH)
$(mono_build_root)/llvm/llvm_config.mk: install-llvm
$(top_srcdir)/llvm/build_llvm_config.sh "$(top_srcdir)/llvm/usr/bin/$(llvm_config)" "$(LLVM_CODEGEN_LIBS)" "$(llvm_extra_libs)" > $@
else
all-local: llvm_config.mk
clean-local: clean-llvm-config
$(mono_build_root)/llvm/llvm_config.mk: $(top_srcdir)/llvm/Makefile.am
$(top_srcdir)/llvm/build_llvm_config.sh "$(EXTERNAL_LLVM_CONFIG)" "$(LLVM_CODEGEN_LIBS)" "$(llvm_extra_libs)" > $@
endif
llvm_config.mk: $(mono_build_root)/llvm/llvm_config.mk
clean-llvm-config:
- rm -rf llvm_config.mk
else
all-local:
clean-local:
endif
# Override this so we don't try to re-copy llvm when we install mono
install:
if TARGET_WASM
LLVM_TARGET=wasm32
else
LLVM_TARGET=
endif
include build.mk
EXTRA_DIST=SUBMODULES.json
+10
View File
@@ -0,0 +1,10 @@
[
{
"name": "llvm",
"url": "git://github.com/mono/llvm.git",
"rev": "9f79399f87282524fee099b328bd8cbf07929daf",
"remote-branch": "origin/master",
"branch": "master",
"directory": "llvm"
}
]
-59
View File
@@ -1,59 +0,0 @@
abs_top_srcdir ?= $(abspath $(CURDIR)/..)
LLVM_BUILD ?= $(abspath $(abs_top_srcdir)/llvm/build)
LLVM_PREFIX ?= $(abspath $(abs_top_srcdir)/llvm/usr)
# LLVM_BRANCH := $(shell git -C "$(abs_top_srcdir)/external/llvm" rev-parse --abbrev-ref HEAD)
LLVM_VERSION := $(shell git -C "$(abs_top_srcdir)/external/llvm" rev-parse HEAD)
# FIXME: URL should be http://xamjenkinsartifact.blob.core.windows.net/build-package-osx-llvm-$(LLVM_BRANCH)/llvm-osx64-$(LLVM_VERSION).tar.gz
LLVM_DOWNLOAD_LOCATION = "http://xamjenkinsartifact.blob.core.windows.net/build-package-osx-llvm-release60/llvm-osx64-$(LLVM_VERSION).tar.gz"
CMAKE := $(or $(CMAKE),$(shell which cmake))
NINJA := $(shell which ninja)
$(LLVM_BUILD) $(LLVM_PREFIX):
mkdir -p $@
EXTRA_LLVM_ARGS = $(if $(filter $(LLVM_TARGET),wasm32), -DLLVM_BUILD_32_BITS=On -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="WebAssembly",)
# -DLLVM_ENABLE_LIBXML2=Off is needed because xml2 is not used and it breaks 32-bit builds on 64-bit Linux hosts
$(LLVM_BUILD)/$(if $(NINJA),build.ninja,Makefile): $(abs_top_srcdir)/external/llvm/CMakeLists.txt | $(LLVM_BUILD) $(LLVM_PREFIX)
cd $(LLVM_BUILD) && $(CMAKE) \
$(if $(NINJA),-G Ninja) \
-DCMAKE_INSTALL_PREFIX="$(LLVM_PREFIX)" \
-DCMAKE_BUILD_TYPE=Release \
-DLLVM_BUILD_TESTS=Off \
-DLLVM_INCLUDE_TESTS=Off \
-DLLVM_BUILD_EXAMPLES=Off \
-DLLVM_INCLUDE_EXAMPLES=Off \
-DLLVM_TOOLS_TO_BUILD="opt;llc;llvm-config;llvm-dis" \
-DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64" \
$(EXTRA_LLVM_ARGS) \
-DLLVM_ENABLE_ASSERTIONS=$(if $(INTERNAL_LLVM_ASSERTS),On,Off) \
-DLLVM_ENABLE_LIBXML2=Off \
-DHAVE_FUTIMENS=0 \
$(LLVM_CMAKE_ARGS) \
$(abs_top_srcdir)/external/llvm
.PHONY: configure-llvm
configure-llvm: $(LLVM_BUILD)/$(if $(NINJA),build.ninja,Makefile)
# The DESTDIR fix is to prevent the build from trying to install this out-of-build-tree
# as the DESTDIR hasn't been created when we're building mono
.PHONY: build-llvm
build-llvm: configure-llvm
DESTDIR="" $(if $(NINJA),$(NINJA),$(MAKE)) -C $(LLVM_BUILD)
.PHONY: install-llvm
install-llvm: build-llvm | $(LLVM_PREFIX)
DESTDIR="" $(if $(NINJA),$(NINJA),$(MAKE)) -C $(LLVM_BUILD) install
.PHONY: download-llvm
download-llvm:
(wget --no-verbose -O - $(LLVM_DOWNLOAD_LOCATION) || curl -L $(LLVM_DOWNLOAD_LOCATION)) | tar -xzf - -C $(dir $(LLVM_PREFIX))
.PHONY: clean-llvm
clean-llvm:
$(RM) -r $(LLVM_BUILD) $(LLVM_PREFIX)
-172
View File
@@ -1,172 +0,0 @@
#!/bin/bash
llvm_config=$1
llvm_codegen_libs="$2"
llvm_extra_libs="${@:3}"
use_llvm_config=1
llvm_host_win32=0
llvm_host_win32_wsl=0
llvm_host_win32_cygwin=0
function win32_format_path {
local formatted_path=$1
if [[ $llvm_host_win32_wsl = 1 ]] && [[ $1 != "/mnt/"* ]]; then
# if path is not starting with /mnt under WSL it could be a windows path, convert using wslpath.
formatted_path="$(wslpath -a "$1")"
elif [[ $llvm_host_win32_cygwin = 1 ]] && [[ $1 != "/cygdrive/"* ]]; then
# if path is not starting with /cygdrive under CygWin it could be a windows path, convert using cygpath.
formatted_path="$(cygpath -a "$1")"
fi
echo "$formatted_path"
}
if [[ $llvm_config = *".exe" ]]; then
llvm_host_win32=1
# llvm-config is a windows binary. Check if we are running CygWin or WSL since then we might still be able to run llvm-config.exe
host_uname="$(uname -a)"
case "$host_uname" in
*Microsoft*)
use_llvm_config=1
llvm_host_win32_wsl=1
;;
CYGWIN*)
use_llvm_config=1
llvm_host_win32_cygwin=1
;;
*)
use_llvm_config=0
esac
fi
if [[ $llvm_host_win32 = 1 ]]; then
llvm_config=$(win32_format_path "$llvm_config")
fi
if [[ $use_llvm_config = 1 ]]; then
llvm_api_version=`$llvm_config --mono-api-version` || "0"
with_llvm=`$llvm_config --prefix`
llvm_config_cflags=`$llvm_config --cflags`
llvm_system=`$llvm_config --system-libs`
llvm_core_components=`$llvm_config --libs analysis core bitwriter`
if [[ $llvm_api_version -lt 600 ]]; then
llvm_old_jit=`$llvm_config --libs mcjit jit 2>>/dev/null`
else
llvm_old_jit=`$llvm_config --libs mcjit 2>>/dev/null`
fi
llvm_new_jit=`$llvm_config --libs orcjit 2>>/dev/null`
if [[ ! -z $llvm_codegen_libs ]]; then
llvm_extra=`$llvm_config --libs $llvm_codegen_libs`
fi
# When building for Windows subsystem using WSL or CygWin the path returned from llvm-config.exe
# could be a Windows style path, make sure to format it into a path usable for WSL/CygWin.
if [[ $llvm_host_win32 = 1 ]]; then
with_llvm=$(win32_format_path "$with_llvm")
fi
fi
# When cross compiling for Windows on system not capable of running Windows binaries, llvm-config.exe can't be used to query for
# LLVM parameters. In that scenario we will need to fallback to default values.
if [[ $llvm_host_win32 = 1 ]] && [[ $use_llvm_config = 0 ]]; then
# Assume we have llvm-config sitting in llvm-install-root/bin directory, get llvm-install-root directory.
with_llvm="$(dirname $llvm_config)"
with_llvm="$(dirname $with_llvm)"
llvm_config_path=$with_llvm/include/llvm/Config/llvm-config.h
# llvm-config.exe --mono-api-version
llvm_api_version=`awk '/MONO_API_VERSION/ { print $3 }' $llvm_config_path`
# llvm-config.exe --cflags, returned information currently not used.
llvm_config_cflags=
# llvm-config.exe --system-libs
if [[ $llvm_api_version -lt 600 ]]; then
llvm_system="-limagehlp -lpsapi -lshell32"
else
llvm_system="-lpsapi -lshell32 -lole32 -luuid -ladvapi32"
fi
# llvm-config.exe --libs analysis core bitwriter
if [[ $llvm_api_version -lt 600 ]]; then
llvm_core_components="-lLLVMBitWriter -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport"
else
llvm_core_components="-lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle"
fi
# llvm-config.exe --libs mcjit jit
if [[ $llvm_api_version -lt 600 ]]; then
llvm_old_jit="-lLLVMJIT -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMMCJIT -lLLVMTarget -lLLVMRuntimeDyld -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMExecutionEngine -lLLVMMC -lLLVMCore -lLLVMSupport"
else
# Current build of LLVM 60 for cross Windows builds doesn't support LLVM JIT.
llvm_old_jit=
fi
# LLVM 36 doesn't support new JIT and LLVM 60 is build without LLVM JIT support for cross Windows builds.
llvm_new_jit=
# Check codegen libs and add needed libraries.
case "$llvm_codegen_libs" in
*x86codegen*)
# llvm-config.exe --libs x86codegen
if [[ $llvm_api_version -lt 600 ]]; then
llvm_extra="-lLLVMX86CodeGen -lLLVMX86Desc -lLLVMX86Info -lLLVMObject -lLLVMBitReader -lLLVMMCDisassembler -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMMC -lLLVMCore -lLLVMSupport"
else
llvm_extra="-lLLVMX86CodeGen -lLLVMGlobalISel -lLLVMX86Desc -lLLVMX86Info -lLLVMMCDisassembler -lLLVMX86AsmPrinter -lLLVMX86Utils -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMMC -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMSupport -lLLVMDemangle"
fi
;;
*armcodegen*)
# llvm-config.exe --libs armcodegen
if [[ $llvm_api_version -lt 600 ]]; then
llvm_extra="-lLLVMARMCodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMCore -lLLVMARMDesc -lLLVMMCDisassembler -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMMC -lLLVMSupport"
else
llvm_extra="-lLLVMARMCodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMARMDesc -lLLVMMCDisassembler -lLLVMARMInfo -lLLVMARMAsmPrinter -lLLVMARMUtils -lLLVMMC -lLLVMSupport -lLLVMDemangle"
fi
;;
*aarch64codegen*)
# llvm-config.exe --libs aarch64codegen
if [[ $llvm_api_version -lt 600 ]]; then
llvm_extra="-lLLVMAArch64CodeGen -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMMCParser -lLLVMCodeGen -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMipa -lLLVMAnalysis -lLLVMTarget -lLLVMCore -lLLVMAArch64Desc -lLLVMAArch64Info -lLLVMAArch64AsmPrinter -lLLVMMC -lLLVMAArch64Utils -lLLVMSupport"
else
llvm_extra="-lLLVMAArch64CodeGen -lLLVMGlobalISel -lLLVMSelectionDAG -lLLVMAsmPrinter -lLLVMDebugInfoCodeView -lLLVMDebugInfoMSF -lLLVMCodeGen -lLLVMTarget -lLLVMScalarOpts -lLLVMInstCombine -lLLVMTransformUtils -lLLVMBitWriter -lLLVMAnalysis -lLLVMProfileData -lLLVMObject -lLLVMMCParser -lLLVMBitReader -lLLVMCore -lLLVMBinaryFormat -lLLVMAArch64Desc -lLLVMAArch64Info -lLLVMAArch64AsmPrinter -lLLVMMC -lLLVMAArch64Utils -lLLVMSupport -lLLVMDemangle"
fi
;;
*)
llvm_extra=$llvm_codegen_libs
esac
fi
if [[ $llvm_config_cflags = *"stdlib=libc++"* ]]; then
llvm_libc_c="-stdlib=libc++"
llvm_libc_link="-lc++"
else
llvm_libc_c=""
llvm_libc_link="-lstdc++"
fi
if [[ $llvm_host_win32 = 1 ]]; then
host_cxxflag_additions="-std=gnu++11"
host_cflag_additions="-DNDEBUG"
else
host_cxxflag_additions="-std=c++11"
host_cflag_additions=""
fi
if [[ ! -z $llvm_extra_libs ]]; then
llvm_extra="$llvm_extra $llvm_extra_libs"
fi
# llvm-config --clfags adds warning and optimization flags we don't want
cflags_additions="-I$with_llvm/include -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -DLLVM_API_VERSION=$llvm_api_version $llvm_libc_c $host_cflag_additions"
cxxflag_additions="-fno-rtti -fexceptions $host_cxxflag_additions"
ldflags="-L$with_llvm/lib"
llvm_lib_components="$llvm_core_components $llvm_old_jit $llvm_new_jit $llvm_extra"
echo "LLVM_CFLAGS_INTERNAL=$cflags_additions"
echo "LLVM_CXXFLAGS_INTERNAL=$cflags_additions $cxxflag_additions"
echo "LLVM_LDFLAGS_INTERNAL=$ldflags"
echo "LLVM_LIBS_INTERNAL=$llvm_lib_components $ldflags $llvm_system $llvm_libc_link"
+1 -1
View File
@@ -1 +1 @@
EXTRA_DIST = lib-ld.m4 lib-link.m4 lib-prefix.m4 $(wildcard *.m4)
EXTRA_DIST = iconv.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 $(wildcard *.m4)
-40
View File
@@ -1,40 +0,0 @@
# Usage:
# AC_MONO_APPLE_TARGET(target-name, action-if-found, action-if-not-found)
#
# Checks whether `target-name` is defined in "TargetConditionals.h"
#
AC_DEFUN([AC_MONO_APPLE_TARGET], [
AC_MONO_APPLE_AVAILABLE([$1], [for $1], [$1 == 1], $2, $3)
])
# Usage:
# AC_MONO_APPLE_AVAILABLE(name, message, conditional, action-if-found, action-if-not-found)
#
# Checks for `conditional` using "TargetConditionals.h" and "AvailabilityMacros.h"
#
AC_DEFUN([AC_MONO_APPLE_AVAILABLE], [
# cache the compilation check
AC_CACHE_CHECK([$2], [ac_cv_apple_available_[]$1], [
AC_TRY_COMPILE([
#include "TargetConditionals.h"
#include "AvailabilityMacros.h"
],[
#if !($3)
#error failed
#endif
], [
ac_cv_apple_available_[]$1=yes
], [
ac_cv_apple_available_[]$1=no
])
])
# keep the actions out of the cache check because they need to be always executed.
if test x$ac_cv_apple_available_[]$1 = xyes; then
$1=yes
[$4]
else
$1=no
[$5]
fi
])
+214
View File
@@ -0,0 +1,214 @@
# iconv.m4 serial 11 (gettext-0.18.1)
dnl Copyright (C) 2000-2002, 2007-2010 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
dnl with or without modifications, as long as this notice is preserved.
dnl From Bruno Haible.
AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
[
dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
AC_REQUIRE([AC_LIB_RPATH])
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
dnl accordingly.
AC_LIB_LINKFLAGS_BODY([iconv])
])
AC_DEFUN([AM_ICONV_LINK],
[
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
dnl those with the standalone portable GNU libiconv installed).
AC_REQUIRE([AC_CANONICAL_HOST]) dnl for cross-compiles
dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
dnl accordingly.
AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
dnl Add $INCICONV to CPPFLAGS before performing the following checks,
dnl because if the user has installed libiconv and not disabled its use
dnl via --without-libiconv-prefix, he wants to use it. The first
dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
am_save_CPPFLAGS="$CPPFLAGS"
AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
AC_CACHE_CHECK([for iconv], [am_cv_func_iconv], [
am_cv_func_iconv="no, consider installing GNU libiconv"
am_cv_lib_iconv=no
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
[am_cv_func_iconv=yes])
if test "$am_cv_func_iconv" != yes; then
am_save_LIBS="$LIBS"
LIBS="$LIBS $LIBICONV"
AC_TRY_LINK([#include <stdlib.h>
#include <iconv.h>],
[iconv_t cd = iconv_open("","");
iconv(cd,NULL,NULL,NULL,NULL);
iconv_close(cd);],
[am_cv_lib_iconv=yes]
[am_cv_func_iconv=yes])
LIBS="$am_save_LIBS"
fi
])
if test "$am_cv_func_iconv" = yes; then
AC_CACHE_CHECK([for working iconv], [am_cv_func_iconv_works], [
dnl This tests against bugs in AIX 5.1, HP-UX 11.11, Solaris 10.
am_save_LIBS="$LIBS"
if test $am_cv_lib_iconv = yes; then
LIBS="$LIBS $LIBICONV"
fi
AC_TRY_RUN([
#include <iconv.h>
#include <string.h>
int main ()
{
/* Test against AIX 5.1 bug: Failures are not distinguishable from successful
returns. */
{
iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
if (cd_utf8_to_88591 != (iconv_t)(-1))
{
static const char input[] = "\342\202\254"; /* EURO SIGN */
char buf[10];
const char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_utf8_to_88591,
(char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res == 0)
return 1;
}
}
/* Test against Solaris 10 bug: Failures are not distinguishable from
successful returns. */
{
iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
if (cd_ascii_to_88591 != (iconv_t)(-1))
{
static const char input[] = "\263";
char buf[10];
const char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_ascii_to_88591,
(char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if (res == 0)
return 1;
}
}
#if 0 /* This bug could be worked around by the caller. */
/* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
{
iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
if (cd_88591_to_utf8 != (iconv_t)(-1))
{
static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
char buf[50];
const char *inptr = input;
size_t inbytesleft = strlen (input);
char *outptr = buf;
size_t outbytesleft = sizeof (buf);
size_t res = iconv (cd_88591_to_utf8,
(char **) &inptr, &inbytesleft,
&outptr, &outbytesleft);
if ((int)res > 0)
return 1;
}
}
#endif
/* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
provided. */
if (/* Try standardized names. */
iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
/* Try IRIX, OSF/1 names. */
&& iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
/* Try AIX names. */
&& iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
/* Try HP-UX names. */
&& iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
return 1;
return 0;
}], [am_cv_func_iconv_works=yes], [am_cv_func_iconv_works=no],
[case "$host_os" in
aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
*) am_cv_func_iconv_works="guessing yes" ;;
esac])
LIBS="$am_save_LIBS"
])
case "$am_cv_func_iconv_works" in
*no) am_func_iconv=no am_cv_lib_iconv=no ;;
*) am_func_iconv=yes ;;
esac
else
am_func_iconv=no am_cv_lib_iconv=no
fi
if test "$am_func_iconv" = yes; then
AC_DEFINE([HAVE_ICONV], [1],
[Define if you have the iconv() function and it works.])
fi
if test "$am_cv_lib_iconv" = yes; then
AC_MSG_CHECKING([how to link with libiconv])
AC_MSG_RESULT([$LIBICONV])
else
dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
dnl either.
CPPFLAGS="$am_save_CPPFLAGS"
LIBICONV=
LTLIBICONV=
fi
AC_SUBST([LIBICONV])
AC_SUBST([LTLIBICONV])
])
dnl Define AM_ICONV using AC_DEFUN_ONCE for Autoconf >= 2.64, in order to
dnl avoid warnings like
dnl "warning: AC_REQUIRE: `AM_ICONV' was expanded before it was required".
dnl This is tricky because of the way 'aclocal' is implemented:
dnl - It requires defining an auxiliary macro whose name ends in AC_DEFUN.
dnl Otherwise aclocal's initial scan pass would miss the macro definition.
dnl - It requires a line break inside the AC_DEFUN_ONCE and AC_DEFUN expansions.
dnl Otherwise aclocal would emit many "Use of uninitialized value $1"
dnl warnings.
m4_define([gl_iconv_AC_DEFUN],
m4_version_prereq([2.64],
[[AC_DEFUN_ONCE(
[$1], [$2])]],
[[AC_DEFUN(
[$1], [$2])]]))
gl_iconv_AC_DEFUN([AM_ICONV],
[
AM_ICONV_LINK
if test "$am_cv_func_iconv" = yes; then
AC_MSG_CHECKING([for iconv declaration])
AC_CACHE_VAL([am_cv_proto_iconv], [
AC_TRY_COMPILE([
#include <stdlib.h>
#include <iconv.h>
extern
#ifdef __cplusplus
"C"
#endif
#if defined(__STDC__) || defined(__cplusplus)
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
#else
size_t iconv();
#endif
], [], [am_cv_proto_iconv_arg1=""], [am_cv_proto_iconv_arg1="const"])
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
AC_MSG_RESULT([
$am_cv_proto_iconv])
AC_DEFINE_UNQUOTED([ICONV_CONST], [$am_cv_proto_iconv_arg1],
[Define as const if the declaration of iconv() needs const.])
fi
])
+17 -113
View File
@@ -111,11 +111,10 @@ directory.
.SH OPTIONS
.TP
.I "--config FILE"
Specifies that a DLLMAP Mono config file must be bundled as well. In
the simple and cross compiler modes, if no config file is specified
the one for the current target is picked (either the system one in the
case of the simple mode, or the one that came from the cross
compilation target for the cross compiling mode).
Specifies that a machine.config file must be bundled as well.
Typically this is $prefix/etc/mono/1.0/machine.config or
$prefix/etc/mono/2.0/machine.config depending on the profile that you
are using (1.0 or 2.0)
.TP
.I "--config-dir DIR"
When passed, DIR will be set for the MONO_CFG_DIR environment variable
@@ -203,31 +202,13 @@ Provides mkbundle access to a managed linker to preprocess the assemblies.
.TP
.I "--machine-config FILE"
Uses the given FILE as the machine.config file for the generated
application. The machine config contains an XML file that is used by
System.Configuration APIs to configure the .NET stack. Typically this
is
.I $prefix/etc/mono/4.5/machine.config.
.Sp
If you want to disable this automatic bundling, you can use the
.I "--no-machine-config"
flag. In the simple and cross compiler modes, if no machine.config file is specified
the one for the current target is picked (either the system one in the
case of the simple mode, or the one that came from the cross
compilation target for the cross compiling mode).
.TP
.I "--no-config"
In simple or cross compiling mode, this prevents mkbundle from
automatically bundling a config file.
application.
.TP
.I "--nodeps"
This is the default: \fImkbundle\fP will only include the assemblies that
were specified on the command line to reduce the size of the resulting
image created.
.TP
.I "--no-machine-config"
In simple or cross compiling mode, this prevents mkbundle from
automatically bundling a machine.config file.
.TP
.I "-o filename"
Places the output on `out'. If the flag -c is specified, this is the
C host program. If not, this contains the resulting executable.
@@ -271,36 +252,6 @@ This flag is mutually exlusive with
By default the mkbundle tool will download from a Mono server the
target runtimes, you can specify a different server to provide
cross-compiled runtimes.
.TP
.I "--mono-api-struct-path FILE"
FILE points to a file with the definition of the \fIBundleMonoAPI\fP structure which contains the
required pointers to various Mono API functions used throughout the generated code. This mechanism
is meant to be used by third parties which embed the Mono runtime and dynamically load and initialize
it as part of the application startup, in which case the Mono APIs will not be available for the shared
library loader and the bundle will fail to work (one example of such an embedding third party is
Xamarin.Android).
After providing the definition FILE, the embedder must call the \fIvoid initialize_mono_api (const BundleMonoAPI *info)\fP
function found in the generated code
.B before
calling \fIvoid mono_mkbundle_init ()\fP. The structure passed to \fIinitialize_mono_api\fP doesn't need
to be dynamically allocated as its contents is copied to the local structure in the generated code and no
pointer to the passed structure is retained or used after \fIinitialize_mono_api\fP returns.
The list of pointers is not documented here. Instead, please look at the \fIbundle-mono-api.inc\fP file
found in the mkbundle source directory in your Mono source tree (\fImcs/tools/mkbundle\fP) or in the Mono's
GitHub repository, https://github.com/mono/mono/blob/master/mcs/tools/mkbundle/bundle-mono-api.inc
Please note that your structure must match the one expected by your version of the Mono runtime.
The file must also define the \fImkbundle_log_error\fP function with the following signature:
.nf
static void mkbundle_log_error (const char *format, ...) {}
.fi
The function should implement logging API specific to the embedder.
.SH OLD EMBEDDING
.PP
The old embedding system compiles a small C stub that embeds the
@@ -389,80 +340,33 @@ not require runtime code generation. The "llvmonly" setting does the same, but f
to go through the llvm backend.
.SH WINDOWS
If you are using the old embedding on Windows systems, it possible to use
a Unix-like toolchain like cygwin's and install gcc, gcc-mingw packages or
use Visual Studio 2015/2017 VC toolchain together with Clang for Visual Studio as assembler.
Clang can be installed as an individual component, "Clang/C2", using Visual Studio installer.
.PP
Using Visual Studio toolchain, mkbundle will, by default, use latest installed Visual Studio compiler
and linker as well as Windows SDK. If executed from one of the Visual Studio developer command prompts,
mkbundle will retrieve information directly from that build environment.
If you are using the old embedding on Windows systems, it it necessary
to have Unix-like toolchain to be installed for \fImkbundle\fP to
work. You can use cygwin's and install gcc, gcc-mingw and as
packages.
.SH ENVIRONMENT VARIABLES
.TP
.I "AS"
Assembler command. The default is "as". For Visual Studio, default is "clang.exe".
If "clang.exe" for Visual Studio is not installed, mkbundle will fall back using "as".
Assembler command. The default is "as".
.TP
.I "CC"
C compiler command. The default is "cc" for Linux, "gcc"
for cygwin and "cl.exe" for Visual Studio.
C compiler command. The default is "cc" under Linux and "gcc"
under Windows.
.TP
.I "MONO_BUNDLED_OPTIONS"
Options to be passed to the bundled
Mono runtime, separated by spaces. See the mono(1) manual page or run mono --help.
.SH WINDOWS VISUAL STUDIO ENVIRONMENT VARIABLES
.TP
.I "VisualStudioVersion"
Visual Studio version used in mkbundle build.
Default, latest installed Visual Studio version.
Values, "14.0" for Visual Studio 2015 or "15.0" for Visual Studio 2017.
.TP
.I "WindowsSdkVersion"
Windows SDK version used in mkbundle build.
Default/unknown, latest installed Windows SDK.
Values, "8.1", "10.0.10240.0", "10.0.15063.0" etc.
.TP
.I "VSCMD_ARG_TGT_ARCH"
Output target architecture used in mkbundle build.
Default/unknown, use architecture of .NET runtime executing mkbundle.
Values, "x86" or "x64".
NOTE, when running from a Visual Studio command prompt, this variable should already be set
by the command prompt and match the rest of that build environment.
.TP
.I "INCLUDE"
Override all custom include paths passed to "cl.exe".
Predefined by Visual Studio developer command prompt or auto detected by mkbundle when undefined.
.TP
.I "LIB"
Override all custom library paths passed to "link.exe".
Predefined by Visual Studio developer command prompt or auto detected by mkbundle when undefined.
.TP
.I "MONOPREFIX"
Use a custom Mono SDK install root matching the output target architecture (x86/x64).
Default, mkbundle will look for installed Mono SDK’s matching targeted architecture.
.TP
.I "MONOLIB"
Use a different mono library name or an absolute path to the mono library passed to linker.
Default, mkbundle will use default mono library name depending on mkbundle dynamic/static use case.
NOTE, supplied mono library needs to match mkbundle dynamic/static use case and target architecture.
.TP
.I "VCCRT"
Override C-runtime library linker settings.
Default "MD", mkbundle will use dynamic C-runtime linking on Windows compatible with Mono SDK distribution.
If a custom built Mono runtime using static C-Runtime linkage is used, setting this variable to "MT"
will link using static C-runtime libraries.
.TP
.I "VCSUBSYSTEM"
Override Windows subsystem.
Default, "windows". If console subsystem is preferred, use "console".
NOTE, if console output is expected from output target process then
set this variable to "console".
.SH FILES
This program will load referenced assemblies from the Mono assembly
cache.
.PP
Targets are loaded from ~/.mono/targets/TARGETNAME/mono
.SH BUGS
The option "--static" is not supported under Windows when using the
old embedding.
Moreover, a full cygwin environment containing at least "gcc" and "as"
is required for the build process. The generated executable does not
depend on cygwin.
.SH MAILING LISTS
Visit http://lists.ximian.com/mailman/listinfo/mono-devel-list for details.
.SH WEB SITE
+1 -6
View File
@@ -2,17 +2,12 @@
.SH NAME
Mono CIL strip
.SH SYNOPSIS
.B mono-cil-strip [options] assembly [output-assembly]
.B mono-cil-strip assembly [output-assembly]
.SH DESCRIPTION
mono-cil-strip is a tool which takes an assembly, and empty its method bodies.
This is useful to reduce an assembly size when an assembly has already been
compiled using Mono's Ahead Of Time compiler (AOT), where the CIL code is no
longer necessary, but the metadata still is.
.SH OPTIONS
The following options are available:
.TP
.I "-q"
Only output errors.
.SH COPYRIGHT
Copyright (C) 2008 Novell, Inc (http://www.novell.com)
.SH MAILING LISTS
+29 -97
View File
@@ -214,20 +214,6 @@ and
.I llvm
options. This feature is experimental.
.TP
.I llvmopts=[options]
Use this option to add more flags to the built-in set of flags passed to the
LLVM optimizer. The list of possible flags that can be passed can be
obtained by calling the bundled
.I opt
program that comes with Mono.
.TP
.I llvmllc=[options]
Use this option to add more flags to the built-in set of flags passed to the
LLVM static compiler (llc). The list of possible flags that can be passed can be
obtained by calling the bundled
.I llc
program that comes with Mono.
.TP
.I llvm-outfile=[filename]
Gives the path for the temporary LLVM bitcode file created during AOT.
.I dedup
@@ -381,9 +367,6 @@ Prints additional information about type loading failures.
.TP
.I write-symbols,no-write-symbols
Instructs the AOT compiler to emit (or not emit) debug symbol information.
.TP
.I no-opt
Instructs the AOT compiler tot no call opt when compiling with LLVM.
.PP
For more information about AOT, see: http://www.mono-project.com/docs/advanced/aot/
.RE
@@ -488,9 +471,6 @@ in your program, or Mono's class libraries attempts to generate code
dynamically. You should test your software upfront and make sure that
you do not use any dynamic features.
.TP
\fB--full-aot-interp\fR
Same as --full-aot with fallback to the interpreter.
.TP
\fB--gc=boehm\fR, \fB--gc=sgen\fR
Selects the Garbage Collector engine for Mono to use, Boehm or SGen.
Currently this merely ensures that you are running either the
@@ -601,11 +581,6 @@ Controls whether the runtime should attempt to inline (the default),
or not inline methods invocations
.ne
.RE
\fB--response=FILE\fR
Provides a response file, this instructs the Mono command to read
other command line options from the specified file, as if the
options had been specified on the command line. Useful when you have
very long command lines.
.TP
\fB--runtime=VERSION\fR
Mono supports different runtime versions. The version used depends on the program
@@ -830,7 +805,7 @@ This compiles a method (namespace.name:methodname), this is used for
testing the compiler performance or to examine the output of the code
generator.
.TP
\fB--compile-all\fR
\fB--compileall\fR
Compiles all the methods in an assembly. This is used to test the
compiler performance or to examine the output of the code generator
.TP
@@ -854,7 +829,7 @@ on.
.TP
\fB--ncompile\fR
Instruct the runtime on the number of times that the method specified
by --compile (or all the methods if --compile-all is used) to be
by --compile (or all the methods if --compileall is used) to be
compiled. This is used for testing the code generator performance.
.TP
\fB--stats\fR
@@ -1151,13 +1126,15 @@ When Mono is built with a soft float fallback on ARM and this variable is set to
"1", Mono will always emit soft float code, even if a VFP unit is
detected.
.TP
\fBMONO_DARWIN_USE_KQUEUE_FSW\fR
Fall back on the kqueue FileSystemWatcher implementation in Darwin. The default is the FSEvent implementation.
.TP
\fBMONO_DARWIN_WATCHER_MAXFDS\fR
This is a debugging aid used to force limits on the kqueue FileSystemWatcher
This is a debugging aid used to force limits on the FileSystemWatcher
implementation in Darwin. There is no limit by default.
.TP
\fBMONO_DISABLE_AIO\fR
If set, tells mono NOT to attempt using native asynchronous I/O services. In
that case, a default select/poll implementation is used. Currently only epoll()
is supported.
.TP
\fBMONO_DISABLE_MANAGED_COLLATION\fR
If this environment variable is `yes', the runtime uses unmanaged
collation (which actually means no culture-sensitive collation). It
@@ -1183,38 +1160,19 @@ For platforms that do not otherwise have a way of obtaining random bytes
this can be set to the name of a file system socket on which an egd or
prngd daemon is listening.
.TP
\fBMONO_ENABLE_AIO\fR
If set, tells mono to attempt using native asynchronous I/O services. If not
set, a default select/poll implementation is used. Currently epoll and kqueue
are supported.
.TP
\fBMONO_THREADS_SUSPEND\fR
Selects a mechanism that Mono will use to suspend threads. May be set to
"preemptive", "coop", or "hybrid". Threads may need to be suspended by the
debugger, or using some .NET threading APIs, and most commonly when the SGen
garbage collector needs to stop all threads during a critical phase of garbage
collection. Preemptive mode is the mode that Mono has used historically, going
back to the Boehm days, where the garbage collector would run at any point and
suspend execution of all threads as required to perform a garbage collection.
The cooperative mode on the other hand requires the cooperation of all threads
to stop at a safe point. This makes for an easier to debug garbage collector.
As of Mono 4.3.0 it is a work in progress, and while it works, it has not been
used extensively. This option enables the feature and allows us to find spots
that need to be tuned for this mode of operation. Hybrid mode is a combination
of the two that retains better compatability with scenarios where Mono is
embedded in another application: threads that are running managed code or code
that comprises the Mono runtime will be cooperatively suspended, while threads
running embedder code will be preemptively suspended.
Alternatively, coop and hybrid mode can be enabled at compile time by using the
--enable-cooperative-suspend or --enable-hybrid-suspend flags, respectively,
when calling configure. The \fBMONO_THREADS_SUSPEND\fR environment variable
takes priority over the compiled default.
.TP
\fBMONO_ENABLE_COOP_SUSPEND\fR
This environment variable is obsolete, but retained for backward compatibility.
Use \fBMONO_THREADS_SUSPEND\fR set to "coop" instead. Note that if configure flags
were provided to enable cooperative or hybrid suspend, this variable is ignored.
\fBMONO_ENABLE_COOP\fR
This makes the Mono runtime and the SGen garbage collector run in cooperative
mode as opposed to run on preemptive mode. Preemptive mode is the mode
that Mono has used historically, going back to the Boehm days, where the
garbage collector would run at any point and suspend execution of all
threads as required to perform a garbage collection. The cooperative mode
on the other hand requires the cooperation of all threads to stop at a
safe point. This makes for an easier to debug garbage collector. As
of Mono 4.3.0 it is a work in progress, and while it works, it has not
been used extensively. This option enabled the feature and allows us to
find spots that need to be tuned for this mode of operation. Alternatively,
this mode can be enabled at compile time by using the --with-cooperative-gc
flag when calling configure.
.TP
\fBMONO_ENV_OPTIONS\fR
This environment variable allows you to pass command line arguments to
@@ -1638,31 +1596,11 @@ home directories that might be shared over the network.
If set, extra checks are made during IO operations. Currently, this
includes only advisory locks around file writes.
.TP
\fBMONO_TLS_PROVIDER\fR
This environment variable controls which TLS/SSL provider Mono will
use. The options are usually determined by the operating system where
Mono was compiled and the configuration options that were used for
it.
.RS
.ne 8
.TP
.I default
Uses the default TLS stack that the Mono runtime was configured with.
Usually this is configured to use Apple's SSL stack on Apple
platforms, and Boring SSL on other platforms.
.TP
.I apple
Forces the use of the Apple SSL stack, only works on Apple platforms.
.TP
.I btls
Forces the use of the BoringSSL stack. See
https://opensource.google.com/projects/boringssl for more information
about this stack.
.TP
.I legacy
This is the old Mono stack, which only supports SSL and TLS up to
version 1.0. It is deprecated and will be removed in the future.
.RE
\fBMONO_THEME\fR
The name of the theme to be used by Windows.Forms. Available themes today
include "clearlooks", "nice" and "win32".
.Sp
The default is "win32".
.TP
\fBMONO_TLS_SESSION_CACHE_TIMEOUT\fR
The time, in seconds, that the SSL/TLS session cache will keep it's entry to
@@ -1716,8 +1654,8 @@ Currently, the following options are supported:
Enables small structs alignment to 4/8 bytes.
.TP
\fBarm-use-fallback-tls\fR
When this option is set on ARM, a fallback thread local store will be used instead
of the default fast thread local storage primitives.
When this option is set on ARM, a fallback TLS will be used instead
of the default fast TLS.
.TP
\fBbreak-on-unverified\fR
If this variable is set, when the Mono VM runs into a verification
@@ -1846,12 +1784,6 @@ This option will suspend the program when an exception occurs.
.TP
\fBsuspend-on-unhandled\fR
This option will suspend the program when an unhandled exception occurs.
.TP
\fBthread-dump-dir=DIR\fR
Use DIR for storage thread dumps created by SIGQUIT.
.TP
\fBverbose-gdb\fR
Make gdb output on native crashes more verbose.
.ne
.RE
.TP
@@ -1933,7 +1865,7 @@ for example, to see managed frame names on gdb backtraces.
\fBMONO_VERBOSE_METHOD\fR
Enables the maximum JIT verbosity for the specified method. This is
very helpfull to diagnose a miscompilation problems of a specific
method. This can be a semicolon-separated list of method names to
method. This can be a comma-separated list of method names to
match. If the name is simple, this applies to any method with that
name, otherwise you can use a mono method description (see the section
METHOD DESCRIPTIONS).
+1 -1
View File
@@ -12,9 +12,9 @@ TestResult-*.xml
TestResult*.xml
.dep_dirs-*
apidiff/*
csprojdiff/*
errors/*.log
errors/dummy.xml
class/Mono.Data.Sqlite/test.db
class/RabbitMQ.Client/docs/specs/autogenerated-api-0-8.cs
class/RabbitMQ.Client/docs/specs/autogenerated-api-0-9.cs
class/RabbitMQ.Client/docs/specs/autogenerated-api-qpid-0-8.cs
+13 -31
View File
@@ -4,7 +4,8 @@ SUBDIRS := build jay mcs class nunit24 ilasm tools tests errors docs packages
# Resgen is corlib specific tool
build_SUBDIRS := build jay tools/gensources class class/aot-compiler tools
basic_SUBDIRS := build jay class
build_SUBDIRS := build class class/aot-compiler tools ilasm
monodroid_SUBDIRS := build class tools
monodroid_tools_SUBDIRS := build class tools
monotouch_SUBDIRS := build class tools
@@ -13,9 +14,7 @@ monotouch_tv_SUBDIRS := build class
monotouch_runtime_SUBDIRS := build class
monotouch_watch_runtime_SUBDIRS := build class
monotouch_tv_runtime_SUBDIRS := build class
monotouch_tools_SUBDIRS := build class tools
xammac_SUBDIRS := build class
testing_aot_full_interp_SUBDIRS := build class
testing_aot_hybrid_SUBDIRS := build class
testing_aot_full_SUBDIRS := build class
binary_reference_assemblies_SUBDIRS := build class
@@ -27,7 +26,6 @@ winaot_SUBDIRS := build class
orbis_SUBDIRS := build class
unreal_SUBDIRS := build class
wasm_SUBDIRS := build class
wasm_tools_SUBDIRS := build class tools
include build/rules.make
@@ -38,14 +36,14 @@ all-local $(STD_TARGETS:=-local):
@:
dir-check:
@if [ "$(NO_DIR_CHECK)" = "" ]; then $(MAKE) -C ../runtime; fi
@if [ "$(NO_DIR_CHECK)" = "" -a "$(PROFILE)" != "basic" ]; then $(MAKE) -C ../runtime; fi
# fun specialty targets
PROFILES = net_4_x binary_reference_assemblies xbuild_12 xbuild_14
.PHONY: all-profiles compiler-test-profiles run-compiler-test-profiles $(STD_TARGETS:=-profiles)
all-profiles compiler-test-profiles run-compiler-test-profiles $(STD_TARGETS:=-profiles): %-profiles: profiles-do--%
.PHONY: all-profiles $(STD_TARGETS:=-profiles)
all-profiles $(STD_TARGETS:=-profiles): %-profiles: profiles-do--%
@:
profiles-do--%:
@@ -77,25 +75,21 @@ $(_boot_:%=profile-do--monotouch_tv--%): profile-do--monotouch_tv--%:
$(_boot_:%=profile-do--monotouch_runtime--%): profile-do--monotouch_runtime--%: profile-do--build--%
$(_boot_:%=profile-do--monotouch_watch_runtime--%): profile-do--monotouch_watch_runtime--%: profile-do--build--%
$(_boot_:%=profile-do--monotouch_tv_runtime--%): profile-do--monotouch_tv_runtime--%: profile-do--build--%
$(_boot_:%=profile-do--monotouch_tools--%): profile-do--monotouch_tools--%: profile-do--build--%
$(_boot_:%=profile-do--xammac--%): profile-do--xammac--%: profile-do--build--%
$(_boot_:%=profile-do--xammac_net_4_5--%): profile-do--xammac_net_4_5--%: profile-do--build--%
$(_boot_:%=profile-do--testing_aot_full_interp--%): profile-do--testing_aot_full_interp--%: profile-do--build--%
$(_boot_:%=profile-do--testing_aot_hybrid--%): profile-do--testing_aot_hybrid--%: profile-do--build--%
$(_boot_:%=profile-do--testing_aot_full--%): profile-do--testing_aot_full--%: profile-do--build--%
$(_boot_:%=profile-do--winaot--%): profile-do--winaot--%: profile-do--build--%
$(_boot_:%=profile-do--orbis--%): profile-do--orbis--%: profile-do--build--%
$(_boot_:%=profile-do--unreal--%): profile-do--unreal--%: profile-do--build--%
$(_boot_:%=profile-do--wasm--%): profile-do--wasm--%: profile-do--build--%
$(_boot_:%=profile-do--wasm_tools--%): profile-do--wasm_tools--%: profile-do--build--%
$(_boot_:%=profile-do--build--%): profile-do--build--%: profile-do--basic--%
compiler-test:
$(MAKE) -C tests test
$(MAKE) -C errors test
testcorlib:
@cd class/corlib && $(MAKE) test run-test
run-compiler-test:
$(MAKE) -C tests run-test
$(MAKE) -C errors run-test
compiler-tests:
$(MAKE) TEST_SUBDIRS="tests errors" run-test-profiles
package := mcs-$(VERSION)
@@ -152,19 +146,15 @@ distcheck: dist-tarball
# Targets for creating API diffs of the framework
MONO_API_SNAPSHOT_PATH := $(topdir)../external/api-snapshot/
GENAPI := $(MONO_API_SNAPSHOT_PATH)tools/genapi/Microsoft.DotNet.GenAPI.exe
GENAPI := $(MONO_API_SNAPSHOT_PATH)tools/genapi/GenAPI.exe
MONO_API_SNAPSHOT_PROFILE_PATH := $(MONO_API_SNAPSHOT_PATH)profiles/$(PROFILE)/
MONO_API_ASSEMBLIES_IGNORED := $(addprefix $(topdir)class/lib/$(PROFILE)/, Mono.CSharp.dll SystemWebTestShim.dll standalone-runner-support.dll nunit.core.dll nunit.core.extensions.dll nunit.core.interfaces.dll nunit.framework.dll nunit.framework.extensions.dll nunit.mocks.dll nunit.util.dll nunit-console-runner.dll nunitlite.dll Mono.Profiler.Log.dll)
MONO_API_ASSEMBLIES := $(filter-out $(MONO_API_ASSEMBLIES_IGNORED), $(wildcard $(topdir)class/lib/$(PROFILE)/*.dll)) $(wildcard $(topdir)class/lib/$(PROFILE)/Facades/*.dll)
MONO_API_ASSEMBLIES_CS := $(MONO_API_ASSEMBLIES:$(topdir)class/lib/$(PROFILE)/%.dll=$(MONO_API_SNAPSHOT_PROFILE_PATH)%.cs)
apidiff/ignored-attr.txt:
$(MONO_API_SNAPSHOT_PROFILE_PATH)%.cs: $(topdir)class/lib/$(PROFILE)/%.dll $(GENAPI) $(MONO_API_SNAPSHOT_PATH)profiles/license-header.txt
@mkdir -p $(dir $@)
@echo "T:System.Runtime.CompilerServices.CompilerGeneratedAttribute" > $@
$(MONO_API_SNAPSHOT_PROFILE_PATH)%.cs: $(topdir)class/lib/$(PROFILE)/%.dll $(GENAPI) $(MONO_API_SNAPSHOT_PATH)profiles/license-header.txt apidiff/ignored-attr.txt
@mkdir -p $(dir $@)
$(Q) MONO_PATH=$(topdir)class/lib/$(BUILD_TOOLS_PROFILE) $(RUNTIME) $(GENAPI) -libPath:$(topdir)class/lib/$(PROFILE),$(topdir)class/lib/$(PROFILE)/Facades -out:$(dir $@) -headerFile:$(MONO_API_SNAPSHOT_PATH)profiles/license-header.txt -assemblyAttributes -typeForwardedTo -assemblyVersion -excludeAttributesList:apidiff/ignored-attr.txt -assembly:$< || echo "Couldn't process assembly." > $@
$(Q) MONO_PATH=$(topdir)class/lib/$(BUILD_TOOLS_PROFILE) $(RUNTIME) $(GENAPI) -libPath:$(topdir)class/lib/$(PROFILE),$(topdir)class/lib/$(PROFILE)/Facades -out:$(dir $@) -headerFile:$(MONO_API_SNAPSHOT_PATH)profiles/license-header.txt -assemblyAttributes -typeForwardedTo -assemblyVersion -assembly:$< || echo "Couldn't process assembly." > $@
mono-api-current: $(MONO_API_ASSEMBLIES_CS)
@@ -185,11 +175,3 @@ mono-api-diff:
@mkdir -p apidiff
$(Q) sed -e "/@diffdata@/r temp.patch" -e "/@diffdata@/d" -e "s/@title@/Public API Diff/g" -e "s/@description@/If the changes are intentional, run <code>make -C mcs mono-api-diff<\/code> locally and commit changes in external\/api-snapshot./g" diff.html.in > apidiff/index.html
$(Q) if [ -s temp.patch ]; then echo "Error: Found public API differences, see mcs/apidiff/index.html. If the changes are intentional, please go to external/api-snapshot and commit them."; rm -f temp.patch; exit 1; else echo "No differences found."; rm -f temp.patch; fi
mono-csproj-diff:
@echo "Generating csproj diff..."
$(Q) git add -A "*.csproj" $(topdir)../bcl.sln
$(Q) git diff --no-renames HEAD "*.csproj" $(topdir)../bcl.sln > $(abspath $(topdir))/temp.patch
@mkdir -p csprojdiff
$(Q) sed -e "/@diffdata@/r temp.patch" -e "/@diffdata@/d" -e "s/@title@/Project Files Diff/g" -e "s/@description@/Use <code>@monojenkins commit csproj<\/code> to commit them./g" diff.html.in > csprojdiff/index.html
$(Q) if [ -s temp.patch ]; then echo "Error: Found csproj differences, see mcs/csprojdiff/index.html. If the changes are intentional, please commit them."; rm -f temp.patch; exit 1; else echo "No differences found."; rm -f temp.patch; fi
+6 -11
View File
@@ -2,7 +2,7 @@ thisdir = build
SUBDIRS =
include ../build/rules.make
BUILT_FILES = common/Consts.cs $(topdir)/class/lib/$(PROFILE_DIRECTORY)/Consts.cs common/sourcelink.json
BUILT_FILES = common/Consts.cs
all-local install-local test-local run-test-local csproj-local run-test-ondotnet-local uninstall-local doc-update-local: $(BUILT_FILES)
@:
@@ -10,19 +10,14 @@ all-local install-local test-local run-test-local csproj-local run-test-ondotnet
clean-local:
-rm -f $(BUILT_FILES) deps/*
$(topdir)/class/lib/$(PROFILE_DIRECTORY):
mkdir -p $@
common/Consts.cs $(topdir)/class/lib/$(PROFILE_DIRECTORY)/Consts.cs: common/Consts.cs.in $(wildcard config.make) | $(topdir)/class/lib/$(PROFILE_DIRECTORY)
common/Consts.cs: common/Consts.cs.in $(wildcard config.make)
test -n '$(MONO_VERSION)'
test -n '$(MONO_CORLIB_VERSION)'
sed -e 's,@''MONO_VERSION@,$(MONO_VERSION),' -e 's,@''MONO_CORLIB_VERSION@,$(MONO_CORLIB_VERSION),' $< > $@
common/sourcelink.json: common/sourcelink.json.in $(wildcard config.make) | $(topdir)/class/lib/$(PROFILE_DIRECTORY)
sed -e 's,@mono_topdir@,$(shell cd $(topdir)/.. && pwd),' -e 's,@mono_commit_hash@,$(shell cd $(topdir)/.. && git rev-parse HEAD),' -e 's,@corefx_commit_hash@,$(shell cd $(topdir)/../external/corefx && git rev-parse HEAD),' -e 's,@corert_commit_hash@,$(shell cd $(topdir)/../external/corert && git rev-parse HEAD),' -e 's,@cecil_commit_hash@,$(shell cd $(topdir)/../external/cecil && git rev-parse HEAD),' $< > $@
PLATFORMS = macos linux win32 unix
PLATFORMS = darwin linux win32
PROFILES = \
basic \
build \
binary_reference_assemblies \
net_4_x \
@@ -31,7 +26,6 @@ PROFILES = \
COMMON_SRCS = \
Consts.cs.in \
sourcelink.json.in \
Locale.cs \
MonoTODOAttribute.cs \
basic-profile-check.cs \
@@ -39,13 +33,14 @@ COMMON_SRCS = \
AssemblyRef.cs
DISTFILES = \
README.makefiles.md \
README.makefiles \
README.platforms \
README.configury \
config-default.make \
corcompare.make \
corcompare-api.xsl \
executable.make \
gensources.sh \
library.make \
rules.make \
tests.make \
+791
View File
@@ -0,0 +1,791 @@
The MCS makefiles (-*- outline -*-)
Peter Williams <[email protected]>
The new makefiles try to abstract building on Windows and Linux. They
try to provide a consistent set of ways to express the things that our
build system needs to let us do, specifically:
* Build recursively
* Build libraries and executables easily
* Let developers use different runtimes and class libaries
* Make distributions easily
* Provide a framework for testing
* Build platform-independently whenever possible
* Generate, update, and build monodoc documentation.
** Makefile structure
A general makefile looks like this:
========================================
thisdir = class/Mono.My.Library
SUBDIRS =
include ../../build/rules.make
all-local:
do some stuff
install-local:
$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/share/
$(INSTALL_DATA) myfile.txt $(DESTDIR)$(prefix)/share/myfiledir
clean-local:
rm -f my-generated-file
test-local: my_test_program.exe
run-test-local:
$(RUNTIME) my_test_program.exe
run-test-ondotnet-local:
$(RUNTIME) my_test_program.exe
DISTFILES = myfile.txt my_test_source.cs
dist-local: dist-default
doc-update-local:
my_test_program.exe: my_test_source.cs
$(CSCOMPILE) /target:exe /out:$@ $<
========================================
Each makefile follows the same pattern: it does some setup, includes
the standard make rules, and provides rules for eight standard targets:
all, install, test, run-test, clean, dist, and doc-update.
"Some setup" is defining two variables: $(thisdir) and
$(SUBDIRS). $(thisdir) is the directory that the makefile lives in,
relative to the top directory (ie, class/corlib) and $(SUBDIRS)
defines the subdirectories that should be built in.
The eight targets do the following:
* all-local builds whatever someone would expect to be built
when they just type 'make'. Most likely Foo.dll or Foo.exe
* install-local installs whatever got built by all-local.
* test-local _builds_ the test programs or libraries but does
_not_ run them.
* run-test-local actually runs the tests. It shouldn't
necessarily exit in an error if the test fails, but should make that
situation obvious. It should only run tests that take care of
themselves automatically; interactive tests should have an individual
target. The idea is that 'make run-test' from the toplevel should be
able to proceed unsupervised and test everything that can be tested in
such a manner.
* run-test-ondotnet-local is a variant of run-test-local. It is used only to validate if our tests themselves works fine under Microsoft runtime (on Windows). Basically, in this target, we should not use $(TEST_RUNTIME) to test our libraries.
* clean-local removes built files; 'make clean' should leave
only files that go into a distribution tarball. (But it is not necessarily
true that all files that go into a tarball need to be left after a make clean.)
* dist-local copies files into the distribution tree, which is
given by the variable $(distdir). dist-local always depends on the
target 'dist-default'. See ** 'make dist' below.
* doc-update-local should generate or update monodoc documentation,
if appropriate. This is usually only appropriate for libraries. It's
defined as a standard target so that it can easily be run recursively
across all libraries within the module.
** Build configuration
In general, MCS needs to be able to build relying only on the
existence of a runtime and core libraries (corlib, System,
System.Xml). So there shouldn't be any checking for libraries or
whatnot; MCS should be able to build out of the box. We try to keep
platform detection and feature testing (ie, for HP/UX echo) inside
the makefiles; right now, there's no configuration script, and it'd
be nice to keep it that way. (I am told that some people build on
both Windows and Linux in the same tree, which would be impossible to
do if we cached platform-related configury values.)
That being said, it's very convenient for developers to be able to
customize their builds to suit their needs. To allow this, the
Makefile rules are set up to allow people to override pretty much any
important variable.
Configuration variables are given defaults in `config-default.make';
`rules.make' optionally includes `$(topdir)/build/config.make', so you
can customize your build without CVS trying to commit your modified
`config-default.make' all the time. Platform-specific variables are
defined in `$(topdir)/build/platforms/$(BUILD_PLATFORM).make', where
$(BUILD_PLATFORM) is detected in config-default.make. (Currently, the only
choices are linux.make and win32.make.)
The best way to learn what the configuration variables are is to read
`config.make' and `platform.make'. There aren't too many and hopefully
they should be self-explanatory; see the numerous examples below for
more information if you're confused.
** Recommendations for platform specifics
If you find yourself needing a platform-specific customization, try
and express it in terms of a feature, rather than a platform test. In
other words, this is good:
========================================
run-test-local: my-test.exe
ifdef PLATFORM_NEEDS_CRAZY_CRAP
crazy-crap
endif
$(RUNTIME) my-test.exe
========================================
and this is bad:
========================================
run-test-local: my-test.exe
ifdef WINDOWS
crazy-crap
else
ifdef AMIGA
crazy-crap
endif
endif
$(RUNTIME) my-test.exe
========================================
The latter accumulates and gets unpleasant and it sucks. Granted,
right now we only have two platforms, so it's not a big deal, but it's
good form to get used to and practice. Anyway, take a look at how we
do the various corlib building hacks for examples of how we've done
platform-specificity. It certainly isn't pretty, but at least it's a
little structured.
** Saving effort
The point of the build system is to abstract things and take
care of all the easy stuff. So if you find yourself writing a
Makefile, know that there's probably already infrastructure to do what
you want. Here are all the common cases I can think of ...
* Compiling C# code? use:
========================================
my-program.exe: my-source.cs
$(CSCOMPILE) /target:exe /out:$@ $^
========================================
or
========================================
my-lib.dll: my-source.cs
$(CSCOMPILE) /target:library /out:$@ $^
========================================
Note the '$@' and '$^' variables. The former means "the name of the
file that I am trying to make" and the latter means "all the
dependencies of the file I am trying to make." USE THESE VARIABLES
AGGRESSIVELY. Say that you add a new source to your program:
========================================
my-program.exe: my-source.cs my-new-source.cs
$(CSCOMPILE) /target:exe /out:$@ $^
========================================
Because of the $^ variable, you don't need to remember to add another
file to the command line. Similarly, if you rename your program, you
won't need to remember to change the rule:
========================================
MonoVaporizer.exe: my-source.cs my-new-source.cs
$(CSCOMPILE) /target:exe /out:$@ $^
========================================
will still work. Another useful variable is $<, which means "the first
dependency of whatever I'm building." If you order your dependencies
carefully it can be extremely useful.
* Just building an executable? use:
========================================
PROGRAM = myprogram.exe
LOCAL_MCS_FLAGS = /r:System.Xml.dll
include ../build/executable.make
========================================
executable.make builds a program in the current directory. Its name is
held in $(PROGRAM), and its sources are listed in the file
$(PROGRAM).sources. It might seem to make more sense to just list the
program's sources in the Makefile, but when we build on Windows we
need to change slashes around, which is much easier to do if the
sources are listed in a file. The variable $(LOCAL_MCS_FLAGS) changes
the flags given to the compiler; it is included in $(CSCOMPILE) so you
don't need to worry about it.
executable.make does a lot for you: it builds the program in 'make
all-local', installs the program in $(prefix)/bin, distributes the
sources, and defines empty test targets. Now, if your program has a
test, set the variable HAS_TEST:
========================================
PROGRAM = myprogram.exe
LOCAL_MCS_FLAGS = /r:System.Xml.dll
HAS_TEST = yes
include ../build/executable.make
test-local: mytester.exe
run-test-local: mytester.exe
$(RUNTIME) $<
mytester.exe: mytester.cs
$(CSCOMPILE) /target:exe /out:$@ mytester.cs
========================================
If your program has NUnit tests, set the variable HAS_NUNIT_TEST:
========================================
PROGRAM = myprogram.exe
LOCAL_MCS_FLAGS = /r:System.Xml.dll
HAS_NUNIT_TEST = yes
include ../build/executable.make
========================================
HAS_NUNIT_TEST tests follow library.make NUnit test conventions:
the files should be in a subdirectory called Test/, and if
your program is called myprogram.exe, they should be listed in
myprogram_test.dll.sources. The names in that files should *not* have
the Test/ prefix. 'make test' will build myprogram_test_$(PROFILE).dll
in the current directory, automatically supplying the flags to
reference the original program and NUnit.Framework.dll.
If your program has 'built sources', that is, source files generated
from other files (say, generated by jay), define a variable called
BUILT_SOURCES and do *not* list the sources in $(PROGRAM).sources:
========================================
PROGRAM = myprogram.exe
LOCAL_MCS_FLAGS = /r:System.Xml.dll
BUILT_SOURCES = parser.cs
CLEAN_FILES = y.output
include ../build/executable.make
parser.cs: parser.jay
$(topdir)/jay/jay $< > $@
========================================
executable.make will automatically delete the $(BUILT_SOURCES) files
on 'make clean'. Since this situation is a common occurrence and jay
happens to leave behind y.output files, you can also define a variable
called $(CLEAN_FILES) that lists extra files to be deleted when 'make clean' is
called. (That's in addition to your executable and the built sources).
* Buildling a library? Use
========================================
LIBRARY = Mono.MyLib.dll
LIB_MCS_FLAGS = /unsafe
TEST_MCS_FLAGS = /r:System.Xml.dll
include ../../build/library.make
========================================
Where you library is called $(LIBRARY); it will be put into
$(topdir)/class/lib. LIB_MCS_FLAGS is the set of MCS flags to use when
compiling the library; in addition, a global set of flags called
$(LIBRARY_FLAGS) is added (that variable is defined in
config-defaults.make), as well as the usual $(LOCAL_MCS_FLAGS).
As in executable.make, the sources for your library are listed in
$(LIBRARY).sources. Note: these source lists should have Unix forward
slashes and Unix newlines (\n, not \r\n.) If you get an error about
"touch: need a filename", that means your .sources file doesn't end in
a newline. It should.
Now library.make also assumes that your library has an NUnit2 test
harness. The files should be in a subdirectory called Test/, and if
your library is called Mono.Foo.dll, they should be listed in
Mono.Foo_test.dll.sources. The names in that files should *not* have
the Test/ prefix. 'make test' will build Mono.Foo_test.dll in the
current directory, automatically supplying the flags to reference the
original library and NUnit.Framework.dll.
If you don't have a test, just do this:
========================================
LIBRARY = Mono.MyLib.dll
LIB_MCS_FLAGS = /unsafe
NO_TEST = yes
include ../../build/library.make
========================================
and feel ashamed. Every good library has a test suite!
Extra flags needed to compile the test library should be listed in
$(TEST_MCS_FLAGS); often you will have a line like this:
========================================
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
========================================
Again, library.make does a lot for you: it builds the dll, it
generates makefile fragments to track the dependencies, it installs
the library, it builds the test dll on 'make test', it runs
$(TEST_HARNESS) on it on 'make run-test', it removes the appropriate
files on 'make clean', and it distributes all the source files on
'make dist'. (TEST_HARNESS defaults to be nunit-console.exe but it may
be overridden to, say, nunit-gtk). If you have extra files to
distribute when using either library.make or executable.make, use the
variable $(EXTRA_DISTFILES):
========================================
EXTRA_DISTFILES = \
Test/testcase1.in \
Test/testcase1.out \
README
========================================
Again, library.make and executable.make do the right things so that we
can build on Windows, doing some trickery to invert slashes and
overcome command-line length limitations. Use them unless you have a
really good reason not to. If you're building a bunch of small
executables, check out tools/Makefile or tools/security/Makefile; if
all the files are in the current directory, changing slashes isn't a
big deal, and command-line lengths won't be a problem, so
executable.make isn't necessary (and indeed it won't work, since it
can only build one .exe in a directory).
If you're building a library, library.make is highly recommended; the
only DLL that doesn't use it is corlib, because building corlib is a
fair bit more complicated than it should be. Oh well.
library.make also automatically supports generating and updating
monodoc documentation. Documentation is stored within the
Documentation directory (a sibling to the Test directory), and is
generated/updated whenever the doc-update target is executed.
Assembling of the documentation so that the monodoc browser can
display the documentation is handled separately within the mcs/docs
all-local target; see mcs/docs/Makefile for details.
* Running a C# program? Use $(RUNTIME)
========================================
run-test-local: myprog.exe
$(RUNTIME) myprog.exe
========================================
$(RUNTIME) might be empty (if you're on windows), so don't expect to
be able to give it any arguments. If you're on a platform which has an
interpreter or jitter, $(RUNTIME_FLAGS) is included in $(RUNTIME), so
set that variable.
$(TEST_RUNTIME) is the runtime to use when running tests. Right now it's
just "mono --debug".
* Calling the compiler directly? Use $(MCS).
Really, you should use $(CSCOMPILE) whenever possible, but $(MCS) is
out there. $(BOOTSTRAP_MCS) is the C# compiler that we use to build
mcs.exe; on Linux, we then use mcs.exe to build everything else, but
on Windows, we use csc.exe to build everything. Only use
$(BOOTSTRAP_MCS) if you know what you're doing.
* Compiling C code? Use $(CCOMPILE)
To give it flags, set $(LOCAL_CFLAGS). As with compiling C#, the
variable $(CFLAGS) will automatically be included on the command line.
* Compiling resources with resgen
If you have a resource that should be compiled with resgen and
included in your assembly, you can use the RESOURCES_DEFS variable.
This variable can contain lists of pairs that are separated by comma
to represent the resource ID as embedded in the assembly followed by
the file name, like this:
RESOURCE_DEFS = Messages,TextResources.resx Errors,ErrorList.txt
* Documentation-related needs? Use $(MDOC)
$(MDOC) is a front-end to the monodoc documentation system, supporting
documentation generation, updating, importing from Microsoft XML
Documentation and ECMA documentation formats, assembling documentation
for use within the monodoc documentation browser, and exporting
documentation to various other output formats such as static HTML.
It is currently only used for library.make's doc-update-local target
and for assembling documentation within $topdir/docs.
* Installing files? Use $(MKINSTALLDIRS), $(INSTALL_DATA) or
$(INSTALL_BIN), $(prefix), and $(DESTDIR).
Every time a file is installed the commands should look like this:
========================================
install-local:
$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/my/dir
$(INSTALL_DATA) myfile $(DESTDIR)$(prefix)/my/dir
========================================
This way the directory is created recursively if needed (admittedly, we could
probably rely on mkdir -p), the file is given the correct permissions,
the user can override $(MKINSTALLDIRS) and $(INSTALL) if they need to,
and we can support $(DESTDIR) installs. We use $(DESTDIR) to make
monocharge tarballs, and it's useful otherwise, so try and use it
consistently.
* 'make dist'? Use $(DISTFILES)
The 'dist-default' target will copy the files listed in $(DISTFILES)
into the distribution directory, as well as Makefile and ChangeLog if
they exist. This is almost always all that you need, so ideally your
make dist support should only be:
========================================
DISTFILES = README Test/thoughts.txt
dist-local: dist-default
========================================
DISTFILES will cope correctly with files in subdirectories, by the
way. Note that if you put a nonexistant file or a directory in
DISTFILES it will *not* complain; it will just ignore it.
If you want to test your 'make dist' code, you can try
========================================
$ cd class/Mono.MyClass
$ make dist-local distdir=TEST
========================================
And your files should be copied into TEST/ in the current directory.
There is a toplevel 'make distcheck' target, which will build a dist
tarball, try to build it, install files to a temporary prefix, make
clean it, make a distribution, and compare the files left over to the
files originally in the tarball: they should be the same. But this
takes about 15 minutes to run on my 1.1 Ghz computer, so it's not for
the faint of heart.
* Lots of files? Use $(wildcard *.foo)
When specifying the sources to a library or executable, wildcards are
not encouraged; in fact they're not allowed if you use library.make or
executable.make. But there are times when they're useful, eg:
========================================
DISTFILES = $(wildcard Test/*.in) $(wildcard Test/*.out)
========================================
Just so you know that 'make' has this feature.
* Referencing files in other directories? Use $(topdir).
$(topdir) is the path to the top directory from the current build
directory. Basically it's a sequence of ../.. computed from the value
that you give $(thisdir) at the top of your Makefile. Try to reference
things from $(topdir), so your code can be moved or cut-and-pasted
around with a minimum of fuss.
* Conditional building? Use ifdef/ifndef/endif
Now in general we want to avoid conditional building, but sometimes
something doesn't work on Linux or already exists on Windows or
whatnot. (See below on recommended form for how to build
platform-specifically.) GNU Make supports the following construction:
========================================
BUILD_EXPERIMENTAL = yes
ifdef BUILD_EXPERIMENTAL
experimental_stuff = my-experiment.exe
else
experimental_stuff =
endif
all-local: my-sane.exe $(experimental_stuff)
========================================
'ifdef' means 'if the variable is set to nonempty', so you could have
========================================
BUILD_EXPERIMENTAL = colorless green ideas sleep furiously
========================================
and Make would be happy. I hope that the meaning of 'ifndef' should be
obvious. If you want to only sometimes build a target, the above
construction is the recommended way to go about it; it's nice to have
the rules exist in a Makefile even if they aren't invoked.
If you want to see why conditionals aren't nice, take a look at
library.make or class/corlib/Makefile.
* 'Private' directories that shouldn't be built by default? Use DIST_ONLY_SUBDIRS
Several of the MCS class libraries have demo or experimental
implementations that depend on things not included with MCS (say,
Gtk#). We don't want to build them by default, because the user might
not have those dependencies installed, but it's nice to have a
Makefile for them to be built nicely.
First of all, there's nothing stopping you from writing a Makefile for
such a directory; just don't put it in the SUBDIRS line of its parent
directory. That way, you can do all the normal build things like 'make
all' or 'make clean' in that directory, but people trying to bootstrap
their system won't run into problems.
At the same time you probably want to include this directory in the
distribution so that people can use your demo or experimental code if
they know what they're doing. Hence the variable
$(DIST_ONLY_SUBDIRS). As you might guess, it's like the SUBDIRS
variable: it lists subdirectories that a regular shouldn't recurse
into, but should have their 'make dist' rules invoked.
Say you've written Mono.MyFancyLib.dll and you have
a demo app using Gtk# called MyFancyDemo. The Makefile rules might
look like this:
class/Mono.MyFancyLib/Makefile
========================================
thisdir = class/Mono.MyFancyLib
SUBDIRS =
DIST_ONLY_SUBDIRS = MyFancyDemo
include ../../build/rules.make
LIBRARY = Mono.MyFancyLib.dll
LIB_MCS_FLAGS = /r:System.dll
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
include ../../build/library.make
========================================
class/Mono.MyFancyLib/MyFancyDemo/Makefile
========================================
thisdir = class/Mono.MyFancyLib/MyFancyDemo
SUBDIRS =
include ../../../build/rules.make
PROGRAM = FancyDemo.exe
LOCAL_MCS_FLAGS = /r:gtk-sharp.dll
include ../../../build/executable.make
========================================
* Special recursion needs?
By default, rules.make defines the all, install, clean, etc. targets
to look something like this:
all: all-recursive
$(MAKE) all-local
Sometimes that doesn't cut it; say for example you want to check for
something before doing a lengthy recursive build (see
$(topdir)/Makefile) or you have a something like this
class/MyLibrary:
Build MyLibrary.dll
class/MyLibrary/Test:
Build TestMyLibrary.exe
'make clean test' will fail here, because the build will happen in
the Test subdirectory first, so there will be no MyLibrary.dll to link
against. (Unless you write a nasty evil relative path rule which is
strongly discouraged.)
Anyway, to solve this problem you can do
========================================
thisdir = class/MyLibrary
SUBDIRS = Test
include ../../build/rules.make
# Normally, make runs 'all-recursive' first, and then 'all-local'
# With this, we ensure that 'all-local' is executed first.
all-recursive: all-local
test-recursive: test-local
...
========================================
** A few implementation details
The way rules.make does its recursion is very standard; it maps
{all,install,clean, dist,test} to $@-recursive, which executes that rule
in each directory in $(SUBDIRS), and then calls $@-local in the current
directory. So something that gets built in a subdirectory cannot rely on
something that gets built in its parent directory. If this is a problem,
see the previous section. Note that the recursive rule for 'dist' is
different; it makes dist-recursive in subdirectories, so you at least
have to define that rule.
Note that even a directory that doesn't, for example, have any tests
must still define test-local; otherwise 'make test' run from the
toplevel directory will break.
** Flags for Tools
We want to make it so that the user can specify certain flags to
always be given to a tool, so there's a general way of implementing
FLAGS variables:
* $(foo_FLAGS) remains unset or defaulted to something
sensible; the user can provide overrides this way.
* $(LOCAL_foo_FLAGS) is set in a specific Makefile to
provide necessary values.
* $(PLATFORM_foo_FLAGS) is set in the platform configuration
to provide platform-specific values.
* $(PROFILE_foo_FLAGS) is set in the profile configuration
to provide profile-specific values.
* $(USE_foo_FLAGS) is defined to be the combination of all of
the above, and it's what is actually passed to $(foo).
$(MCS_FLAGS) and $(CFLAGS) follow this model. If you end up finding
that another tool is used commonly (hm, jay...), please follow this form.
** Portability tips
Always use the icky Windows /argument way of passing parameters to the C#
compiler so that csc can be used.
Always use /r:foo.dll, not /r:foo. Windows requires the former.
Use /r:$(corlib), not /r:corlib.
If you're writing shell script code as part of a make rule, remember
that Windows has command-line length limits. So something like
========================================
mytool $(all_the_sources_to_corlib)
========================================
Is probably going to cause problems. As I understand it,
========================================
for f in $(all_the_sources_to_corlib) ; do ...
========================================
is ok, since the shell itself doesn't have those limitations. Other
than that, you should still try to write fairly portable shell
script. Linux and Cygwin both use the GNU utilities, but there's at
least one hardy soul trying to build Mono on HP/UX, and no doubt there
will be ports to more Unices as time goes on.
** Misc
We still don't use /d:NET_1_1 ; it causes some build problems right
now.
There's a hack in class/System.Data/Makefile to work around a very
strange crash in the runtime with some custom attribute stuff. It'd be
nice to fix it.
Also, there's a /lib:$(prefix)/lib in the System.dll Makefile, which
is for some reason necessary if System.Xml.dll hasn't been built yet.
(Well, it's necessary because of the /r:System.Xml.dll, but that
should be in the search path, it seems.)
A lot of the weird targets in the old makefiles have been dropped; I
have a feeling that a lot of them are archaic and not needed anymore.
I'd really like to write a build tool in C#. It would be nice to have
something really extensible and well-designed and clean. NAnt is,
IMHO, an apalling abomination and a tragically bad attempt at solving
the software building problem. Just so you know.
(On the other hand, NUnit is really neat.)
Peter
-747
View File
@@ -1,747 +0,0 @@
# The MCS makefiles
Author: Peter Williams <peter@newton.cx>
The new makefiles try to abstract building on Windows and Linux. They
try to provide a consistent set of ways to express the things that our
build system needs to let us do, specifically:
* Build recursively
* Build libraries and executables easily
* Let developers use different runtimes and class libaries
* Make distributions easily
* Provide a framework for testing
* Build platform-independently whenever possible
* Generate, update, and build monodoc documentation.
Makefile structure
==================
A general makefile looks like this:
```
thisdir = class/Mono.My.Library
SUBDIRS =
include ../../build/rules.make
all-local:
do some stuff
install-local:
$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/share/
$(INSTALL_DATA) myfile.txt $(DESTDIR)$(prefix)/share/myfiledir
clean-local:
rm -f my-generated-file
test-local: my_test_program.exe
run-test-local:
$(RUNTIME) my_test_program.exe
run-test-ondotnet-local:
$(RUNTIME) my_test_program.exe
DISTFILES = myfile.txt my_test_source.cs
dist-local: dist-default
doc-update-local:
my_test_program.exe: my_test_source.cs
$(CSCOMPILE) /target:exe /out:$@ $<
```
Each makefile follows the same pattern: it does some setup, includes
the standard make rules, and provides rules for eight standard targets:
`all`, `install`, `test`, `run-test`, `clean`, `dist`, and `doc-update`.
"Some setup" is defining two variables: `$(thisdir)` and
`$(SUBDIRS)`. `$(thisdir)` is the directory that the makefile lives in,
relative to the top directory (ie, `class/corlib`) and `$(SUBDIRS)`
defines the subdirectories that should be built in.
The eight targets do the following:
* `all-local` builds whatever someone would expect to be built
when they just type `make'` Most likely `Foo.dll` or `Foo.exe`
* `install-local` installs whatever got built by `all-local`.
* `test-local` _builds_ the test programs or libraries but does
_not_ run them.
* `run-test-local` actually runs the tests. It shouldn't
necessarily exit in an error if the test fails, but should make that
situation obvious. It should only run tests that take care of
themselves automatically; interactive tests should have an individual
target. The idea is that `make run-test` from the toplevel should be
able to proceed unsupervised and test everything that can be tested in
such a manner.
* `run-xunit-test-local` this is a variation of the above, but it runs the
tests that were built with Xunit instead of NUnit.
* `run-test-ondotnet-local` is a variant of `run-test-local`. It is used only to validate if our tests themselves works fine under Microsoft runtime (on Windows). Basically, in this target, we should not use $(TEST_RUNTIME) to test our libraries.
* `clean-local` removes built files; `make clean` should leave
only files that go into a distribution tarball. (But it is not
necessarily true that all files that go into a tarball need to be left
after a make clean.)
* `dist-local` copies files into the distribution tree, which is
given by the variable `$(distdir)`. `dist-local` always depends on the
target `dist-default`. See ** `make dist` below.
* `doc-update-local` should generate or update monodoc documentation,
if appropriate. This is usually only appropriate for libraries. It's
defined as a standard target so that it can easily be run recursively
across all libraries within the module.
Build configuration
===================
In general, MCS needs to be able to build relying only on the
existence of a runtime and core libraries (`mscorlib`, `System`,
`System.Xml`). So there shouldn't be any checking for libraries or
whatnot; MCS should be able to build out of the box. We try to keep
platform detection and feature testing (ie, for HP/UX echo) inside
the makefiles; right now, there's no configuration script, and it'd
be nice to keep it that way. (I am told that some people build on
both Windows and Linux in the same tree, which would be impossible to
do if we cached platform-related configury values.)
That being said, it's very convenient for developers to be able to
customize their builds to suit their needs. To allow this, the
Makefile rules are set up to allow people to override pretty much any
important variable.
Configuration variables are given defaults in `config-default.make`;
`rules.make` optionally includes `$(topdir)/build/config.make`, so you
can customize your build without CVS trying to commit your modified
`config-default.make` all the time. Platform-specific variables are
defined in `$(topdir)/build/platforms/$(BUILD_PLATFORM).make`, where
`$(BUILD_PLATFORM)` is detected in `config-default.make`. (Currently, the only
choices are `linux.make` and `win32.make`)
The best way to learn what the configuration variables are is to read
`config.make` and `platform.make`. There aren't too many and hopefully
they should be self-explanatory; see the numerous examples below for
more information if you're confused.
Recommendations for platform specifics
--------------------------------------
If you find yourself needing a platform-specific customization, try
and express it in terms of a feature, rather than a platform test. In
other words, this is good:
```
run-test-local: my-test.exe
ifdef PLATFORM_NEEDS_CRAZY_CRAP
crazy-crap
endif
$(RUNTIME) my-test.exe
```
and this is bad:
```
run-test-local: my-test.exe
ifdef WINDOWS
crazy-crap
else
ifdef AMIGA
crazy-crap
endif
endif
$(RUNTIME) my-test.exe
```
The latter accumulates and gets unpleasant and it sucks. Granted,
right now we only have two platforms, so it's not a big deal, but it's
good form to get used to and practice. Anyway, take a look at how we
do the various corlib building hacks for examples of how we've done
platform-specificity. It certainly isn't pretty, but at least it's a
little structured.
Saving effort
=============
The point of the build system is to abstract things and take
care of all the easy stuff. So if you find yourself writing a
Makefile, know that there's probably already infrastructure to do what
you want. Here are all the common cases I can think of.
Compiling C# code? use:
-----------------------
```
my-program.exe: my-source.cs
$(CSCOMPILE) /target:exe /out:$@ $^
```
or
```
my-lib.dll: my-source.cs
$(CSCOMPILE) /target:library /out:$@ $^
```
Note the `$@` and `$^` variables. The former means "the name of the
file that I am trying to make" and the latter means "all the
dependencies of the file I am trying to make." USE THESE VARIABLES
AGGRESSIVELY. Say that you add a new source to your program:
```
my-program.exe: my-source.cs my-new-source.cs
$(CSCOMPILE) /target:exe /out:$@ $^
```
Because of the $^ variable, you don't need to remember to add another
file to the command line. Similarly, if you rename your program, you
won't need to remember to change the rule:
```
MonoVaporizer.exe: my-source.cs my-new-source.cs
$(CSCOMPILE) /target:exe /out:$@ $^
```
will still work. Another useful variable is $<, which means "the first
dependency of whatever I'm building." If you order your dependencies
carefully it can be extremely useful.
Just building an executable?
----------------------------
Then use:
```
PROGRAM = myprogram.exe
LOCAL_MCS_FLAGS = /r:System.Xml.dll
include ../build/executable.make
```
executable.make builds a program in the current directory. Its name is
held in `$(PROGRAM)`, and its sources are listed in the file
`$(PROGRAM).sources`. It might seem to make more sense to just list the
program's sources in the Makefile, but when we build on Windows we
need to change slashes around, which is much easier to do if the
sources are listed in a file. The variable `$(LOCAL_MCS_FLAGS)` changes
the flags given to the compiler; it is included in `$(CSCOMPILE)` so you
don't need to worry about it.
`executable.make` does a lot for you: it builds the program in 'make
all-local', installs the program in `$(prefix)/bin`, distributes the
sources, and defines empty test targets. Now, if your program has a
test, set the variable `HAS_TEST`:
```
PROGRAM = myprogram.exe
LOCAL_MCS_FLAGS = /r:System.Xml.dll
HAS_TEST = yes
include ../build/executable.make
test-local: mytester.exe
run-test-local: mytester.exe
$(RUNTIME) $<
mytester.exe: mytester.cs
$(CSCOMPILE) /target:exe /out:$@ mytester.cs
```
If your program has NUnit tests, set the variable `HAS_NUNIT_TEST`:
```
PROGRAM = myprogram.exe
LOCAL_MCS_FLAGS = /r:System.Xml.dll
HAS_NUNIT_TEST = yes
include ../build/executable.make
```
`HAS_NUNIT_TEST` tests follow `library.make` NUnit test conventions:
the files should be in a subdirectory called `Test/`, and if
your program is called `myprogram.exe`, they should be listed in
`myprogram_test.dll.sources`. The names in that files should *not* have
the `Test/` prefix. `make test'`will build `myprogram_test_$(PROFILE).dll`
in the current directory, automatically supplying the flags to
reference the original program and `NUnit.Framework.dll`.
If your program has 'built sources', that is, source files generated
from other files (say, generated by jay), define a variable called
`BUILT_SOURCES` and do *not* list the sources in `$(PROGRAM).sources`:
```
PROGRAM = myprogram.exe
LOCAL_MCS_FLAGS = /r:System.Xml.dll
BUILT_SOURCES = parser.cs
CLEAN_FILES = y.output
include ../build/executable.make
parser.cs: parser.jay
$(topdir)/jay/jay $< > $@
```
`executable.make` will automatically delete the `$(BUILT_SOURCES)` files
on `make clean`. Since this situation is a common occurrence and jay
happens to leave behind y.output files, you can also define a variable
called `$(CLEAN_FILES)` that lists extra files to be deleted when
`make clean` is called. (That's in addition to your executable and the built sources).
Buildling a library? Use
------------------------
```
LIBRARY = Mono.MyLib.dll
LIB_MCS_FLAGS = /unsafe
TEST_MCS_FLAGS = /r:System.Xml.dll
include ../../build/library.make
```
Where you library is called `$(LIBRARY)`; it will be put into
`$(topdir)/class/lib`. `LIB_MCS_FLAGS` is the set of MCS flags to use when
compiling the library; in addition, a global set of flags called
`$(LIBRARY_FLAGS)` is added (that variable is defined in
`config-defaults.make`), as well as the usual `$(LOCAL_MCS_FLAGS)`.
As in `executable.make`, the sources for your library are listed in
`$(LIBRARY).sources`. Note: these source lists should have Unix forward
slashes and Unix newlines (\n, not \r\n.) If you get an error about
"touch: need a filename", that means your .sources file doesn't end in
a newline. It should.
Now `library.make` also assumes that your library has an NUnit2 test
harness. The files should be in a subdirectory called `Test/`, and if
your library is called `Mono.Foo.dll`, they should be listed in
`Mono.Foo_test.dll.sources`. The names in that files should *not* have
the `Test/` prefix. `make test` will build `Mono.Foo_test.dll` in the
current directory, automatically supplying the flags to reference the
original library and `NUnit.Framework.dll`.
If you don't have a test, just do this:
```
LIBRARY = Mono.MyLib.dll
LIB_MCS_FLAGS = /unsafe
NO_TEST = yes
include ../../build/library.make
```
and feel ashamed. Every good library has a test suite!
Extra flags needed to compile the test library should be listed in
$(TEST_MCS_FLAGS); often you will have a line like this:
```
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
```
Again, `library.make` does a lot for you: it builds the dll, it
generates makefile fragments to track the dependencies, it installs
the library, it builds the test dll on `make test`, it runs
`$(TEST_HARNESS)` on it on `make run-test`, it removes the appropriate
files on 'make clean', and it distributes all the source files on
`make dist`. (`TEST_HARNESS` defaults to be `nunit-console.exe` but it may
be overridden to, say, `nunit-gtk`). If you have extra files to
distribute when using either `library.make` or `executable.make`, use the
variable `$(EXTRA_DISTFILES)`:
```
EXTRA_DISTFILES = \
Test/testcase1.in \
Test/testcase1.out \
README
```
Again, `library.make` and `executable.make` do the right things so that we
can build on Windows, doing some trickery to invert slashes and
overcome command-line length limitations. Use them unless you have a
really good reason not to. If you're building a bunch of small
executables, check out `tools/Makefile` or `tools/security/Makefile`; if
all the files are in the current directory, changing slashes isn't a
big deal, and command-line lengths won't be a problem, so
executable.make isn't necessary (and indeed it won't work, since it
can only build one .exe in a directory).
If you're building a library, `library.make` is highly recommended; the
only DLL that doesn't use it is corlib, because building corlib is a
fair bit more complicated than it should be. Oh well.
`library.make` also automatically supports generating and updating
monodoc documentation. Documentation is stored within the
Documentation directory (a sibling to the Test directory), and is
generated/updated whenever the doc-update target is executed.
Assembling of the documentation so that the monodoc browser can
display the documentation is handled separately within the mcs/docs
all-local target; see mcs/docs/Makefile for details.
Running a C# program? Use $(RUNTIME)
------------------------------------
```
run-test-local: myprog.exe
$(RUNTIME) myprog.exe
```
`$(RUNTIME)` might be empty (if you're on windows), so don't expect to
be able to give it any arguments. If you're on a platform which has an
interpreter or jitter, $(RUNTIME_FLAGS) is included in $(RUNTIME), so
set that variable.
$(TEST_RUNTIME) is the runtime to use when running tests. Right now it's
just "mono --debug".
Calling the compiler directly? Use $(MCS).
------------------------------------------
Really, you should use $(CSCOMPILE) whenever possible, but $(MCS) is
out there. $(BOOTSTRAP_MCS) is the C# compiler that we use to build
mcs.exe; on Linux, we then use mcs.exe to build everything else, but
on Windows, we use csc.exe to build everything. Only use
$(BOOTSTRAP_MCS) if you know what you're doing.
Compiling C code? Use $(CCOMPILE)
---------------------------------
To give it flags, set $(LOCAL_CFLAGS). As with compiling C#, the
variable $(CFLAGS) will automatically be included on the command line.
Compiling resources with resgen
-------------------------------
If you have a resource that should be compiled with resgen and
included in your assembly, you can use the RESOURCES_DEFS variable.
This variable can contain lists of pairs that are separated by comma
to represent the resource ID as embedded in the assembly followed by
the file name, like this:
RESOURCE_DEFS = Messages,TextResources.resx Errors,ErrorList.txt
Documentation-related needs? Use $(MDOC)
----------------------------------------
$(MDOC) is a front-end to the monodoc documentation system, supporting
documentation generation, updating, importing from Microsoft XML
Documentation and ECMA documentation formats, assembling documentation
for use within the monodoc documentation browser, and exporting
documentation to various other output formats such as static HTML.
It is currently only used for library.make's doc-update-local target
and for assembling documentation within $topdir/docs.
Installing files? Use $(MKINSTALLDIRS), $(INSTALL_DATA) or $(INSTALL_BIN), $(prefix), and $(DESTDIR).
-----------------------------------------------------------------------------------------------------
Every time a file is installed the commands should look like this:
```
install-local:
$(MKINSTALLDIRS) $(DESTDIR)$(prefix)/my/dir
$(INSTALL_DATA) myfile $(DESTDIR)$(prefix)/my/dir
```
This way the directory is created recursively if needed (admittedly, we could
probably rely on mkdir -p), the file is given the correct permissions,
the user can override $(MKINSTALLDIRS) and $(INSTALL) if they need to,
and we can support $(DESTDIR) installs. We use $(DESTDIR) to make
monocharge tarballs, and it's useful otherwise, so try and use it
consistently.
'make dist'? Use $(DISTFILES)
-----------------------------
The 'dist-default' target will copy the files listed in $(DISTFILES)
into the distribution directory, as well as Makefile and ChangeLog if
they exist. This is almost always all that you need, so ideally your
make dist support should only be:
```
DISTFILES = README Test/thoughts.txt
dist-local: dist-default
```
DISTFILES will cope correctly with files in subdirectories, by the
way. Note that if you put a nonexistant file or a directory in
DISTFILES it will *not* complain; it will just ignore it.
If you want to test your 'make dist' code, you can try
```
$ cd class/Mono.MyClass
$ make dist-local distdir=TEST
```
And your files should be copied into TEST/ in the current directory.
There is a toplevel 'make distcheck' target, which will build a dist
tarball, try to build it, install files to a temporary prefix, make
clean it, make a distribution, and compare the files left over to the
files originally in the tarball: they should be the same. But this
takes about 15 minutes to run on my 1.1 Ghz computer, so it's not for
the faint of heart.
Lots of files? Use $(wildcard *.foo)
------------------------------------
When specifying the sources to a library or executable, wildcards are
not encouraged; in fact they're not allowed if you use library.make or
executable.make. But there are times when they're useful, eg:
```
DISTFILES = $(wildcard Test/*.in) $(wildcard Test/*.out)
```
Just so you know that `make` has this feature.
Referencing files in other directories? Use $(topdir).
------------------------------------------------------
$(topdir) is the path to the top directory from the current build
directory. Basically it's a sequence of ../.. computed from the value
that you give $(thisdir) at the top of your Makefile. Try to reference
things from $(topdir), so your code can be moved or cut-and-pasted
around with a minimum of fuss.
Conditional building? Use ifdef/ifndef/endif
--------------------------------------------
Now in general we want to avoid conditional building, but sometimes
something doesn't work on Linux or already exists on Windows or
whatnot. (See below on recommended form for how to build
platform-specifically.) GNU Make supports the following construction:
```
BUILD_EXPERIMENTAL = yes
ifdef BUILD_EXPERIMENTAL
experimental_stuff = my-experiment.exe
else
experimental_stuff =
endif
all-local: my-sane.exe $(experimental_stuff)
```
'ifdef' means 'if the variable is set to nonempty', so you could have
```
BUILD_EXPERIMENTAL = colorless green ideas sleep furiously
```
and Make would be happy. I hope that the meaning of 'ifndef' should be
obvious. If you want to only sometimes build a target, the above
construction is the recommended way to go about it; it's nice to have
the rules exist in a Makefile even if they aren't invoked.
If you want to see why conditionals aren't nice, take a look at
library.make or class/corlib/Makefile.
'Private' directories that shouldn't be built by default? Use DIST_ONLY_SUBDIRS
--------------------------------------------------------------------------------
Several of the MCS class libraries have demo or experimental
implementations that depend on things not included with MCS (say,
Gtk#). We don't want to build them by default, because the user might
not have those dependencies installed, but it's nice to have a
Makefile for them to be built nicely.
First of all, there's nothing stopping you from writing a Makefile for
such a directory; just don't put it in the SUBDIRS line of its parent
directory. That way, you can do all the normal build things like 'make
all' or 'make clean' in that directory, but people trying to bootstrap
their system won't run into problems.
At the same time you probably want to include this directory in the
distribution so that people can use your demo or experimental code if
they know what they're doing. Hence the variable
$(DIST_ONLY_SUBDIRS). As you might guess, it's like the SUBDIRS
variable: it lists subdirectories that a regular shouldn't recurse
into, but should have their 'make dist' rules invoked.
Say you've written Mono.MyFancyLib.dll and you have
a demo app using Gtk# called MyFancyDemo. The Makefile rules might
look like this:
class/Mono.MyFancyLib/Makefile
```
thisdir = class/Mono.MyFancyLib
SUBDIRS =
DIST_ONLY_SUBDIRS = MyFancyDemo
include ../../build/rules.make
LIBRARY = Mono.MyFancyLib.dll
LIB_MCS_FLAGS = /r:System.dll
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS)
include ../../build/library.make
```
class/Mono.MyFancyLib/MyFancyDemo/Makefile
```
thisdir = class/Mono.MyFancyLib/MyFancyDemo
SUBDIRS =
include ../../../build/rules.make
PROGRAM = FancyDemo.exe
LOCAL_MCS_FLAGS = /r:gtk-sharp.dll
include ../../../build/executable.make
```
Special recursion needs?
------------------------
By default, rules.make defines the all, install, clean, etc. targets
to look something like this:
```
all: all-recursive
$(MAKE) all-local
```
Sometimes that doesn't cut it; say for example you want to check for
something before doing a lengthy recursive build (see
$(topdir)/Makefile) or you have a something like this
```
class/MyLibrary:
Build MyLibrary.dll
class/MyLibrary/Test:
Build TestMyLibrary.exe
```
`make clean test` will fail here, because the build will happen in
the Test subdirectory first, so there will be no `MyLibrary.dll` to link
against. (Unless you write a nasty evil relative path rule which is
strongly discouraged.)
Anyway, to solve this problem you can do
```
thisdir = class/MyLibrary
SUBDIRS = Test
include ../../build/rules.make
# Normally, make runs 'all-recursive' first, and then 'all-local'
# With this, we ensure that 'all-local' is executed first.
all-recursive: all-local
test-recursive: test-local
...
```
A few implementation details
----------------------------
The way rules.make does its recursion is very standard; it maps
`{all,install,clean,dist,test}` to `$@-recursive`, which executes that rule
in each directory in `$(SUBDIRS)`, and then calls `$@-local` bin the current
directory. So something that gets built in a subdirectory cannot rely on
something that gets built in its parent directory. If this is a problem,
see the previous section. Note that the recursive rule for 'dist' is
different; it makes dist-recursive in subdirectories, so you at least
have to define that rule.
Note that even a directory that doesn't, for example, have any tests
must still define test-local; otherwise 'make test' run from the
toplevel directory will break.
Flags for Tools
---------------
We want to make it so that the user can specify certain flags to
always be given to a tool, so there's a general way of implementing
FLAGS variables:
* `$(foo_FLAGS)` remains unset or defaulted to something
sensible; the user can provide overrides this way.
* `$(LOCAL_foo_FLAGS)` is set in a specific Makefile to
provide necessary values.
* `$(PLATFORM_foo_FLAGS)` is set in the platform configuration
to provide platform-specific values.
* `$(PROFILE_foo_FLAGS)` is set in the profile configuration
to provide profile-specific values.
* `$(USE_foo_FLAGS)` is defined to be the combination of all of
the above, and it's what is actually passed to $(foo).
`$(MCS_FLAGS)` and `$(CFLAGS)` follow this model. If you end up finding
that another tool is used commonly (hm, jay...), please follow this form.
Portability tips
----------------
Always use the icky Windows /argument way of passing parameters to the C#
compiler so that csc can be used.
Always use `/r:foo.dll`, not `/r:foo`. Windows requires the former.
Use `/r:$(corlib)`, not `/r:corlib`.
If you're writing shell script code as part of a make rule, remember
that Windows has command-line length limits. So something like
```
mytool $(all_the_sources_to_corlib)
```
Is probably going to cause problems. As I understand it,
```
for f in $(all_the_sources_to_corlib) ; do ...
```
is ok, since the shell itself doesn't have those limitations. Other
than that, you should still try to write fairly portable shell
script. Linux and Cygwin both use the GNU utilities, but there's at
least one hardy soul trying to build Mono on HP/UX, and no doubt there
will be ports to more Unices as time goes on.
Misc
----
We still don't use `/d:NET_1_1`; it causes some build problems right
now.
There's a hack in class/System.Data/Makefile to work around a very
strange crash in the runtime with some custom attribute stuff. It'd be
nice to fix it.
Also, there's a /lib:$(prefix)/lib in the System.dll Makefile, which
is for some reason necessary if System.Xml.dll hasn't been built yet.
(Well, it's necessary because of the /r:System.Xml.dll, but that
should be in the search path, it seems.)
A lot of the weird targets in the old makefiles have been dropped; I
have a feeling that a lot of them are archaic and not needed anymore.
I'd really like to write a build tool in C#. It would be nice to have
something really extensible and well-designed and clean. NAnt is,
IMHO, an apalling abomination and a tragically bad attempt at solving
the software building problem. Just so you know.
(On the other hand, NUnit is really neat.)
Peter
-1
View File
@@ -1,2 +1 @@
/Consts.cs
/sourcelink.json
+7 -3
View File
@@ -38,7 +38,7 @@ static class Consts
public const string MonoCompany = "Mono development team";
public const string MonoProduct = "Mono Common Language Infrastructure";
public const string MonoCopyright = "(c) Various Mono authors";
public const string MonoCorlibVersion = "@MONO_CORLIB_VERSION@";
public const int MonoCorlibVersion = @MONO_CORLIB_VERSION@;
#if MOBILE
// Versions of .NET Framework for Silverlight 4.0
@@ -98,7 +98,7 @@ static class Consts
public const string AssemblyMono_Security = "Mono.Security, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756";
public const string AssemblyMono_Messaging_RabbitMQ = "Mono.Messaging.RabbitMQ, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=0738eb9f132ed756";
public const string AssemblyCorlib = "mscorlib, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=" + PublicKeyToken;
public const string AssemblySystem = "System, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=" + PublicKeyToken;
public const string AssemblySystem = "System, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
public const string AssemblySystem_Data = "System.Data, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
public const string AssemblySystem_Design = "System.Design, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblySystem_DirectoryServices = "System.DirectoryServices, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
@@ -109,13 +109,17 @@ static class Consts
public const string AssemblySystem_ServiceProcess = "System.ServiceProcess, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblySystem_Web = "System.Web, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a";
public const string AssemblySystem_Windows_Forms = "System.Windows.Forms, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
#if NET_4_0
public const string AssemblySystem_2_0 = "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
public const string AssemblySystemCore_3_5 = "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
public const string AssemblySystem_Core = "System.Core, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=" + PublicKeyToken;
public const string AssemblySystem_Core = "System.Core, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
public const string WindowsBase_3_0 = "WindowsBase, Version=3.0.0.0, PublicKeyToken=31bf3856ad364e35";
public const string AssemblyWindowsBase = "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
public const string AssemblyPresentationCore_3_5 = "PresentationCore, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
public const string AssemblyPresentationCore_4_0 = "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
public const string AssemblyPresentationFramework_3_5 = "PresentationFramework, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35";
public const string AssemblySystemServiceModel_3_0 = "System.ServiceModel, Version=3.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089";
#elif MOBILE
public const string AssemblySystem_Core = "System.Core, Version=" + FxVersion + ", Culture=neutral, PublicKeyToken=b77a5c561934e089";
#endif
}
-2
View File
@@ -45,8 +45,6 @@ static partial class SR
{
return string.Format (CultureInfo.InvariantCulture, resourceFormat, p1, p2, p3);
}
internal static string GetResourceString (string str) => str;
}
#if !INSIDE_CORLIB
+11 -10
View File
@@ -1,13 +1,14 @@
using System;
interface II
{
}
class X
{
static void Foo (II a = default (II), II b = default, II c = (II) null)
class X {
// Check installed compiler
static void Generic<T> ()
{
// we use 'var' all around in the compiler sources
var x = new X ();
}
void DefaultParametersAvailable (int i = 3)
{
}
@@ -41,9 +42,9 @@ class X
Version min_mono_version;
#if __MonoCS__
min_mono_version = new Version (5, 19);
min_mono_version = new Version (5, 11);
#else
min_mono_version = new Version (5, 10);
min_mono_version = new Version (4, 9);
#endif
if (version < min_mono_version)
-8
View File
@@ -1,8 +0,0 @@
{
"documents": {
"@mono_topdir@/external/corefx/*": "https://raw.githubusercontent.com/mono/corefx/@corefx_commit_hash@/*",
"@mono_topdir@/external/corert/*": "https://raw.githubusercontent.com/mono/corert/@corert_commit_hash@/*",
"@mono_topdir@/external/cecil/*": "https://raw.githubusercontent.com/mono/cecil/@cecil_commit_hash@/*",
"@mono_topdir@/*": "https://raw.githubusercontent.com/mono/mono/@mono_commit_hash@/*"
}
}
+2 -3
View File
@@ -32,10 +32,9 @@ mono_libdir = $(exec_prefix)/lib
sysconfdir = $(prefix)/etc
#RUNTIME = mono
RUNTIME = false
MONO_PATH_TOP = $(topdir)/class/lib/$(PROFILE_DIRECTORY)
MONO_PATH_TOP = $(topdir)/class/lib/$(PROFILE_DIRECTORY)/
MONO_PATH_TESTS = $(MONO_PATH_TOP)/tests
TEST_MONO_PATH = $(MONO_PATH_TOP)$(PLATFORM_PATH_SEPARATOR)$(MONO_PATH_TESTS)$(PLATFORM_PATH_SEPARATOR).
TEST_RUNTIME = MONO_PATH="$(TEST_MONO_PATH)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) --debug
TEST_RUNTIME = MONO_PATH="$(MONO_PATH_TOP)$(PLATFORM_PATH_SEPARATOR)$(TEST_MONO_PATH)$(PLATFORM_PATH_SEPARATOR)$(MONO_PATH_TESTS)$(PLATFORM_PATH_SEPARATOR).$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) --debug
# In case you want to add MCS_FLAGS, this lets you not have to
# keep track of the default value
+1 -1
View File
@@ -1,5 +1,5 @@
API_INFO = $(MONO_PATH) $(RUNTIME) $(topdir)/class/lib/$(PROFILE)/mono-api-info.exe
API_DIFF = $(MONO_PATH) $(RUNTIME) $(topdir)/class/lib/$(PROFILE)/mono-api-diff.exe
API_DIFF = $(MONO_PATH) $(RUNTIME) $(topdir)/tools/corcompare/mono-api-diff.exe
TRANSFORM = $(MONO_PATH) $(RUNTIME) $(topdir)/tools/corcompare/transform.exe
OBJECTS = $(topdir)/build/corcompare/$(LIBRARY_NAME:.dll=.html)
+4 -7
View File
@@ -42,17 +42,15 @@ executable_CLEAN_FILES += $(build_lib) $(build_lib).so $(build_lib).mdb $(build_
makefrag = $(depsdir)/$(PROFILE)_$(base_prog).makefrag
LIB_REFS_ALL = $(DEFAULT_REFERENCES) $(LIB_REFS)
ifdef TARGET_NET_REFERENCE
# System*, mscorlib references come from the TARGET_NET_REFERENCE dir, others from the profile dir
LIB_REFS_MONO = $(call _FILTER_OUT,System,$(call _FILTER_OUT,mscorlib,$(LIB_REFS_ALL)))
LIB_REFS_SYSTEM = $(filter-out $(LIB_REFS_MONO),$(LIB_REFS_ALL))
# System.*.dll references come from the TARGET_NET_REFERENCE dir, others from the profile dir
LIB_REFS_MONO = $(call _FILTER_OUT,System,$(LIB_REFS))
LIB_REFS_SYSTEM = $(filter-out $(LIB_REFS_MONO),$(LIB_REFS))
MCS_REFERENCES = $(patsubst %,-r:$(topdir)/../external/binary-reference-assemblies/$(TARGET_NET_REFERENCE)/%.dll,$(LIB_REFS_SYSTEM))
MCS_REFERENCES += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/%.dll,$(LIB_REFS_MONO))
else
MCS_REFERENCES = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/%.dll,$(LIB_REFS_ALL))
MCS_REFERENCES = $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/%.dll,$(LIB_REFS))
endif
ifdef KEYFILE
@@ -191,7 +189,6 @@ csproj-local:
echo $(thisdir):$$config_file >> $(topdir)/../msvc/scripts/order; \
(echo $(is_boot); \
echo $(USE_MCS_FLAGS) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) $(patsubst %,-r:%,$(LIB_REFS)); \
echo $(sourcefile); \
echo $(PROGRAM); \
echo $(BUILT_SOURCES_cmdline); \
echo $(build_lib); \
+113
View File
@@ -0,0 +1,113 @@
#! /bin/sh
outfile=$1
incfile=$2
excfile=$3
extfile=$4
extexcfile=$5
process_includes_1() {
sed -e '/^[ \t]*$/d' -e '/^[ \t]*#/d' -e '/*/d' $1 > $2
if cmp -s $1 $2; then
false
else
sed -n 's,^[ \t]*#include ,,p' $1 |
while read inc; do
cat $inc >> $2
echo $outfile: $inc >> $outfile.makefrag
echo $inc: >> $outfile.makefrag
done
# expand wildcards
sed -n '/*/p' $1 | grep -v '#' |
while read wildc; do
# quick syntax to exclude files:
# ../../../MyDir/*.cs:FileToExclude1.cs,FileToExclude2.cs
wc=`echo $wildc | cut -d \: -f 1` # ../../../MyDir/*.cs
qexc=`echo $wildc | cut -d \: -f 2` # FileToExclude1.cs,FileToExclude2.cs
if test "$wc" = "$qexc"; then
# no quick excludes - just expand the wildcard
ls $wildc >> $2
else
wcdir=`echo $wildc | cut -d \* -f 1` # ../../../MyDir/
# Enumerate files from 'FileToExclude1.cs,FileToExclude2.cs'
# and save to $outfile.exc
oldIFS=$IFS
IFS=,
for i in $qexc; do
echo "$wcdir$i" >> $outfile.exc
done
IFS=$oldIFS
ls $wc >> $2
fi
done
fi
}
process_includes() {
i=$1; o=$2; t=${2}.tmp
while process_includes_1 $i $o; do
mv $o $t
i=$t
done
rm -f $t
}
check_newline_eof() {
file=$1
if ! test -f "$file"; then return; fi
if ! test -z "$(tail -c 1 "$file")"; then echo "$file: missing newline at end of file."; exit 1; fi
}
check_newline_eof $incfile
check_newline_eof $excfile
check_newline_eof $extfile
check_newline_eof $extexcfile
rm -f $outfile.makefrag
process_includes $incfile $outfile.inc
if test x$extfile != x -a -f "$extfile"; then
process_includes $extfile $outfile.ext.inc
cat $outfile.ext.inc >> $outfile.inc
rm -f $outfile.ext.inc
fi
sort -u $outfile.inc > $outfile.inc_s
rm -f $outfile.inc
if test -n "$excfile" -a -f "$excfile"; then
process_includes $excfile $outfile.exc
fi
if test -n "$extexcfile"; then
process_includes $extexcfile $outfile.ext_exc
cat $outfile.ext_exc >> $outfile.exc
rm -f $outfile.ext_exc
fi
if test -f $outfile.exc; then
# So what we're doing below with uniq -u is that we take
# lines that have not been duplicated. This computes the
# symmetric difference between the files. This is not
# what we want. If a file is in the excludes but not in
# the sources, we want that file not to show up. By duplicating the
# excludes, we ensure that we won't end up in this failure state.
sort -u $outfile.exc > $outfile.exc_s
# Duplicate excludes
cat $outfile.exc_s >> $outfile.exc_s_dup
cat $outfile.exc_s >> $outfile.exc_s_dup
rm -f $outfile.exc $outfile.exc_s
cat $outfile.inc_s $outfile.exc_s_dup | sort | uniq -u > $outfile
rm -f $outfile.inc_s $outfile.exc_s_dup
else
mv $outfile.inc_s $outfile
fi
+34 -26
View File
@@ -14,22 +14,23 @@
# command line.
#
LIB_REFS_FULL = $(call _FILTER_OUT,=, $(LIB_REFS)) $(DEFAULT_REFERENCES)
# All dependent libs become dependent dirs for parallel builds
# Have to rename to handle differences between assembly/directory names
DEP_LIBS=$(patsubst System.Xml,System.XML,$(LIB_REFS))
LIB_REFS_FULL = $(call _FILTER_OUT,=, $(LIB_REFS))
LIB_REFS_ALIAS = $(filter-out $(LIB_REFS_FULL),$(LIB_REFS))
# All dependent libs become dependent dirs for parallel builds
DEP_LIBS = $(filter-out %=, $(subst =,= ,$(LIB_REFS)))
ifdef TARGET_NET_REFERENCE
# System*, mscorlib references come from the TARGET_NET_REFERENCE dir, others from the profile dir
LIB_REFS_MONO_FULL = $(call _FILTER_OUT,System,$(call _FILTER_OUT,mscorlib,$(LIB_REFS_FULL)))
# System.*.dll references come from the TARGET_NET_REFERENCE dir, others from the profile dir
LIB_REFS_MONO_FULL = $(call _FILTER_OUT,System,$(LIB_REFS_FULL))
LIB_REFS_MONO_ALIAS = $(call _FILTER_OUT,System,$(LIB_REFS_ALIAS))
LIB_REFS_NET_FULL = $(filter-out $(LIB_REFS_MONO_FULL),$(LIB_REFS_FULL))
LIB_REFS_NET_ALIAS = $(filter-out $(LIB_REFS_MONO_ALIAS),$(LIB_REFS_ALIAS))
LIB_REFS_SYSTEM_FULL = $(filter-out $(LIB_REFS_MONO_FULL),$(LIB_REFS_FULL))
LIB_REFS_SYSTEM_ALIAS = $(filter-out $(LIB_REFS_MONO_ALIAS),$(LIB_REFS_ALIAS))
LIB_MCS_FLAGS += $(patsubst %,-r:$(topdir)/../external/binary-reference-assemblies/$(TARGET_NET_REFERENCE)/%.dll,$(LIB_REFS_NET_FULL))
LIB_MCS_FLAGS += $(patsubst %,-r:%.dll, $(subst =,=$(topdir)/../external/binary-reference-assemblies/$(TARGET_NET_REFERENCE)/,$(LIB_REFS_NET_ALIAS)))
LIB_MCS_FLAGS += $(patsubst %,-r:$(topdir)/../external/binary-reference-assemblies/$(TARGET_NET_REFERENCE)/%.dll,$(LIB_REFS_SYSTEM_FULL))
LIB_MCS_FLAGS += $(patsubst %,-r:%.dll, $(subst =,=$(topdir)/../external/binary-reference-assemblies/$(TARGET_NET_REFERENCE)/,$(LIB_REFS_SYSTEM_ALIAS)))
LIB_MCS_FLAGS += $(patsubst %,-r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/%.dll,$(LIB_REFS_MONO_FULL))
LIB_MCS_FLAGS += $(patsubst %,-r:%.dll, $(subst =,=$(topdir)/class/lib/$(PROFILE_DIRECTORY)/,$(LIB_REFS_MONO_ALIAS)))
@@ -60,9 +61,11 @@ endif
the_libdir_base = $(topdir)/class/$(lib_dir)/$(PROFILE_DIRECTORY)/$(if $(LIBRARY_SUBDIR),$(LIBRARY_SUBDIR)/)
ifdef RESOURCE_STRINGS
ifneq (basic, $(PROFILE))
RESOURCE_STRINGS_FILES += $(RESOURCE_STRINGS:%=--resourcestrings:%)
IL_REPLACE_FILES += $(IL_REPLACE:%=--ilreplace:%)
endif
endif
ifdef ENFORCE_LIBRARY_WARN_AS_ERROR
ifeq ($(LIBRARY_WARN_AS_ERROR),yes)
@@ -72,10 +75,16 @@ endif
endif
endif
# add sourcelink information if we're building a portable PDB
ifneq (, $(findstring debug:portable, $(PROFILE_MCS_FLAGS)))
LIB_MCS_FLAGS += -sourcelink:$(topdir)/build/common/sourcelink.json
endif
#
# The bare directory contains the plain versions of System and System.Xml
#
bare_libdir = $(the_libdir_base)bare
#
# The secxml directory contains the System version that depends on
# System.Xml and Mono.Security
#
secxml_libdir = $(the_libdir_base)secxml
the_libdir = $(the_libdir_base)$(intermediate)
@@ -127,7 +136,6 @@ csproj-library:
echo $(thisdir):$$config_file >> $(topdir)/../msvc/scripts/order; \
(echo $(is_boot); \
echo $(USE_MCS_FLAGS) $(LIBRARY_FLAGS) $(LIB_MCS_FLAGS) $(KEYFILE_MCS_FLAGS); \
echo $(LIBRARY); \
echo $(LIBRARY_NAME); \
echo $(BUILT_SOURCES_cmdline); \
echo $(build_lib); \
@@ -216,7 +224,7 @@ test-local run-test-local run-test-ondotnet-local:
ccomma = ,
define RESOURCE_template
$(1).resources: $(2)
$$(RESGEN) "$$<" "$$@"
$(RESGEN) "$$<" "$$@"
GEN_RESOURCE_DEPS += $(1).resources
GEN_RESOURCE_FLAGS += -resource:$(1).resources
@@ -228,12 +236,11 @@ ifdef RESOURCE_DEFS
$(foreach pair,$(RESOURCE_DEFS), $(eval $(call RESOURCE_template,$(word 1, $(subst $(ccomma), ,$(pair))), $(word 2, $(subst $(ccomma), ,$(pair))))))
endif
DISTFILES = $(wildcard *.sources) $(EXTRA_DISTFILES) $(DIST_LISTED_RESOURCES)
DISTFILES = $(wildcard *$(LIBRARY)*.sources) $(EXTRA_DISTFILES) $(DIST_LISTED_RESOURCES)
ASSEMBLY = $(LIBRARY)
ASSEMBLY_EXT = .dll
the_assembly = $(the_lib)
include $(topdir)/build/tests.make
ifdef HAVE_CS_TESTS
@@ -244,7 +251,6 @@ csproj-test:
echo $(thisdir):$$config_file >> $(topdir)/../msvc/scripts/order; \
(echo false; \
echo $(USE_MCS_FLAGS) -r:$(the_assembly) $(TEST_MCS_FLAGS); \
echo $(LIBRARY); \
echo $(test_lib); \
echo $(BUILT_SOURCES_cmdline); \
echo $(test_lib); \
@@ -289,12 +295,14 @@ endif
# The library
# If the directory contains the per profile include file, generate list file.
# TODO: depend on all *.sources (except tests) for now and figure out how to list only needed files later
PROFILE_sources = $(filter-out %test.dll.exclude.sources %test.dll.sources, $(wildcard *.sources))
PROFILE_sources := $(firstword $(if $(PROFILE_PLATFORM),$(wildcard $(PROFILE_PLATFORM)_$(PROFILE)_$(LIBRARY).sources)) $(wildcard $(PROFILE)_$(LIBRARY).sources) $(wildcard $(LIBRARY).sources))
PROFILE_excludes = $(firstword $(if $(PROFILE_PLATFORM),$(wildcard $(PROFILE_PLATFORM)_$(PROFILE)_$(LIBRARY).exclude.sources)) $(wildcard $(PROFILE)_$(LIBRARY).exclude.sources))
# Note, gensources.sh can create a $(sourcefile).makefrag if it sees any '#include's
# We don't include it in the dependencies since it isn't always created
sourcefile = $(depsdir)/$(PROFILE_PLATFORM)_$(PROFILE)_$(LIBRARY_SUBDIR)_$(LIBRARY).sources
$(sourcefile): $(PROFILE_sources) $(PROFILE_excludes) $(depsdir)/.stamp
$(GENSOURCES) --strict --platformsdir:$(topdir)/build "$@" "$(LIBRARY)" "$(PROFILE_PLATFORM)" "$(PROFILE)"
$(sourcefile): $(PROFILE_sources) $(PROFILE_excludes) $(topdir)/build/gensources.sh $(depsdir)/.stamp
$(SHELL) $(topdir)/build/gensources.sh $@ '$(PROFILE_sources)' '$(PROFILE_excludes)'
library_CLEAN_FILES += $(sourcefile)
@@ -382,9 +390,9 @@ gen-deps:
update-corefx-sr-generic:
ifneq ($(RESX_STRINGS),)
MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/resx2sr.exe $(RESX_EXTRA_ARGUMENTS) $(RESX_STRINGS) >$(SR_OUTPUT)
MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/resx2sr.exe $(RESX_STRINGS) >$(SR_OUTPUT)
endif
update-corefx-sr: $(RESX_RESOURCE_STRING) $(XTEST_RESX_RESOURCE_STRING)
make SR_OUTPUT=corefx/SR.cs RESX_STRINGS="$(RESX_RESOURCE_STRING)" RESX_EXTRA_ARGUMENTS="$(RESX_EXTRA_ARGUMENTS)" update-corefx-sr-generic \
&& make SR_OUTPUT=corefx/SR.tests.cs RESX_STRINGS=$(XTEST_RESX_RESOURCE_STRING) update-corefx-sr-generic
make SR_OUTPUT=corefx/SR.cs RESX_STRINGS="$(RESX_RESOURCE_STRING)" update-corefx-sr-generic \
&& make SR_OUTPUT=corefx/SR.tests.cs RESX_STRINGS=$(XTEST_RESX_RESOURCE_STRING) update-corefx-sr-generic
+36
View File
@@ -0,0 +1,36 @@
# -*- makefile -*-
#
# Platform-specific makefile rules. This one's for macOS.
#
PLATFORM_MCS_FLAGS =
PLATFORM_RUNTIME = $(RUNTIME)
PLATFORM_CORLIB = mscorlib.dll
PLATFORM_TEST_HARNESS_EXCLUDES = NotOnMac,MacNotWorking,
EXTERNAL_MCS = mcs
EXTERNAL_MBAS = mbas
EXTERNAL_RUNTIME = mono
#ILDISASM = monodis
ILDISASM = false
PLATFORM_PATH_SEPARATOR = :
# Define this if this ever will work on Linux
# PLATFORM_MAKE_CORLIB_CMP = yes
# This is for changing / to \ on windows
PLATFORM_CHANGE_SEPARATOR_CMD = cat
hidden_prefix = .
hidden_suffix =
platform-check:
@:
# I tried this but apparently Make's version strings aren't that
# ... consistent between releases. Whatever.
#
# @if ! $(MAKE) --version |grep '^GNU Make version 3' 1>/dev/null 2>&1 ; then \
# echo "*** You need to build MCS with GNU make. Try \`gmake'" ; \
# exit 1 ; \
# fi
-38
View File
@@ -1,38 +0,0 @@
# -*- makefile -*-
#
# Platform-specific makefile rules. This one's for macOS.
#
PLATFORM_MCS_FLAGS =
PLATFORM_RUNTIME = $(RUNTIME)
PLATFORM_CORLIB = mscorlib.dll
PLATFORM_TEST_HARNESS_EXCLUDES = NotOnMac,MacNotWorking,
EXTERNAL_MCS = mcs
EXTERNAL_MBAS = mbas
EXTERNAL_RUNTIME = mono
#ILDISASM = monodis
ILDISASM = false
PLATFORM_PATH_SEPARATOR = :
# Define this if this ever will work on Linux
# PLATFORM_MAKE_CORLIB_CMP = yes
# This is for changing / to \ on windows
PLATFORM_CHANGE_SEPARATOR_CMD = cat
hidden_prefix = .
hidden_suffix =
platform-check:
@:
# I tried this but apparently Make's version strings aren't that
# ... consistent between releases. Whatever.
#
# @if ! $(MAKE) --version |grep '^GNU Make version 3' 1>/dev/null 2>&1 ; then \
# echo "*** You need to build MCS with GNU make. Try \`gmake'" ; \
# exit 1 ; \
# fi
PLATFORM_MACOS=1
-36
View File
@@ -1,36 +0,0 @@
# -*- makefile -*-
#
# Platform-specific makefile rules. This one's for any unix (FreeBSD, OpenBSD, etc.)
#
PLATFORM_MCS_FLAGS =
PLATFORM_RUNTIME = $(RUNTIME)
PLATFORM_CORLIB = mscorlib.dll
PLATFORM_TEST_HARNESS_EXCLUDES =
EXTERNAL_MCS = mcs
EXTERNAL_MBAS = mbas
EXTERNAL_RUNTIME = mono
#ILDISASM = monodis
ILDISASM = false
PLATFORM_PATH_SEPARATOR = :
# Define this if this ever will work on Unix
# PLATFORM_MAKE_CORLIB_CMP = yes
# This is for changing / to \ on windows
PLATFORM_CHANGE_SEPARATOR_CMD = cat
hidden_prefix = .
hidden_suffix =
platform-check:
@:
# I tried this but apparently Make's version strings aren't that
# ... consistent between releases. Whatever.
#
# @if ! $(MAKE) --version |grep '^GNU Make version 3' 1>/dev/null 2>&1 ; then \
# echo "*** You need to build MCS with GNU make. Try \`gmake'" ; \
# exit 1 ; \
# fi
+119
View File
@@ -0,0 +1,119 @@
# -*- makefile -*-
monolite_path := $(topdir)/class/lib/monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)
with_mono_path_monolite = MONO_PATH="$(monolite_path)$(PLATFORM_PATH_SEPARATOR)$(monolite_path)/Facades$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
monolite_flag := $(depsdir)/use-monolite
use_monolite := $(wildcard $(monolite_flag))
MONOLITE_MSCORLIB = $(monolite_path)/mscorlib.dll
ifdef use_monolite
ifdef MCS_MODE
CSC_LOCATION = $(monolite_path)/mcs.exe
endif
PROFILE_RUNTIME = $(with_mono_path_monolite) $(RUNTIME)
BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(CSC_LOCATION)
else
PROFILE_RUNTIME = $(EXTERNAL_RUNTIME)
ifdef MCS_MODE
BOOTSTRAP_MCS = mcs
else
BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(CSC_LOCATION)
endif
endif
MCS = $(BOOTSTRAP_MCS)
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:WIN_PLATFORM -d:BOOTSTRAP_BASIC -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES)
API_BIN_PROFILE = v4.7.1
NO_SIGN_ASSEMBLY = yes
NO_TEST = yes
NO_INSTALL = yes
FRAMEWORK_VERSION = 4.5
# Compiler all using same bootstrap compiler
LIBRARY_COMPILE = $(BOOT_COMPILE)
# Verbose basic only
# V = 1
#
# Copy from rules.make because I don't know how to unset MCS_FLAGS
#
USE_MCS_FLAGS = /codepage:$(CODEPAGE) /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
.PHONY: profile-check do-profile-check
profile-check:
@:
ifeq (.,$(thisdir))
all-recursive: do-profile-check
all-local: post-profile-cleanup
clean-local: clean-profile
endif
clean-profile:
-rm -f $(PROFILE_EXE) $(PROFILE_OUT) $(monolite_flag)
post-profile-cleanup:
@rm -f $(monolite_flag)
PROFILE_EXE = $(depsdir)/basic-profile-check.exe
PROFILE_OUT = $(PROFILE_EXE:.exe=.out)
MAKE_Q=$(if $(V),,-s)
do-profile-check: $(depsdir)/.stamp
@ok=:; \
rm -f $(PROFILE_EXE) $(PROFILE_OUT); \
if [ -z '$(MAKE_Q)' ] && [ -n '$(PROFILE_RUNTIME)' ]; then $(PROFILE_RUNTIME) --version; fi; \
$(MAKE) $(MAKE_Q) $(PROFILE_OUT) || ok=false; \
if $$ok; then rm -f $(PROFILE_EXE) $(PROFILE_OUT); else \
if test ! -s $(MONOLITE_MSCORLIB); then \
$(MAKE) $(MAKE_Q) do-get-monolite ; \
fi; \
if test -f $(MONOLITE_MSCORLIB); then \
$(MAKE) $(MAKE_Q) do-profile-check-monolite ; \
else \
echo "*** The runtime '$(PROFILE_RUNTIME)' doesn't appear to be usable." 1>&2; \
echo "*** Check README for information on how to bootstrap a Mono installation." 1>&2 ; \
exit 1; fi; fi
ifdef use_monolite
do-get-monolite:
do-profile-check-monolite:
@echo "*** The contents of your 'monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)' directory may be out-of-date" 1>&2
@echo "*** You may want to try 'make get-monolite-latest'" 1>&2
rm -f $(monolite_flag)
exit 1
else
do-get-monolite:
@echo "*** Downloading bootstrap required 'monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)'" 1>&2
$(MAKE) $(MAKE_Q) -C $(topdir)/class get-monolite-latest
do-profile-check-monolite: $(depsdir)/.stamp
@echo "*** The runtime '$(PROFILE_RUNTIME)' doesn't appear to be usable." 1>&2
@echo "*** Trying the 'monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)' directory." 1>&2
@echo dummy > $(monolite_flag)
$(MAKE) do-profile-check
endif
$(PROFILE_EXE): $(topdir)/build/common/basic-profile-check.cs
$(MAKE) $(MAKE_Q) -C $(topdir)/packages
$(BOOTSTRAP_MCS) /warn:0 /noconfig /r:System.dll /r:mscorlib.dll /out:$@ $<
$(PROFILE_OUT): $(PROFILE_EXE)
$(PROFILE_RUNTIME) $< > $@ 2>&1
+12 -115
View File
@@ -1,129 +1,26 @@
# -*- makefile -*-
monolite_path := $(topdir)/class/lib/monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)
with_mono_path_monolite = MONO_PATH="$(monolite_path)$(PLATFORM_PATH_SEPARATOR)$(monolite_path)/Facades$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH"
monolite_flag := $(depsdir)/use-monolite
use_monolite := $(wildcard $(monolite_flag))
MONOLITE_MSCORLIB = $(monolite_path)/mscorlib.dll
ifdef use_monolite
ifdef MCS_MODE
CSC_LOCATION = $(monolite_path)/mcs.exe
endif
PROFILE_RUNTIME = $(with_mono_path_monolite) $(RUNTIME)
BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(CSC_LOCATION)
else
PROFILE_RUNTIME = $(EXTERNAL_RUNTIME)
ifdef MCS_MODE
BOOTSTRAP_MCS = mcs
else
BOOTSTRAP_MCS = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(CSC_LOCATION)
endif
endif
#
# Special setup for boostrap tools which we want to run with system/monolite core libraries
# for all libraries build as part of this profile
#
ILASM = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/tmp/ilasm.exe
STRING_REPLACER = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/tmp/cil-stringreplacer.exe
GENSOURCES =$(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/tmp/gensources.exe
BOOTSTRAP_PROFILE = basic
BUILD_TOOLS_PROFILE = basic
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
MCS = $(BOOTSTRAP_MCS)
PLATFORMS = macos linux win32 unix
PLATFORMS = darwin linux win32
DEFAULT_REFERENCES = mscorlib
# nuttzing!
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:WIN_PLATFORM -d:BOOTSTRAP_BASIC -nowarn:1699 -nostdlib
profile-check:
@:
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES)
API_BIN_PROFILE = v4.7.1
BOOTSTRAP_BIN_PROFILE = v4.7
NO_SIGN_ASSEMBLY = yes
NO_TEST = yes
NO_INSTALL = yes
FRAMEWORK_VERSION = 4.5
MONO_FEATURE_APPLETLS=1
# Compiler all using same bootstrap compiler
LIBRARY_COMPILE = $(BOOT_COMPILE)
# Verbose basic only
# V = 1
#
# Copy from rules.make because I don't know how to unset MCS_FLAGS
#
USE_MCS_FLAGS = /codepage:$(CODEPAGE) /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
.PHONY: profile-check do-profile-check
profile-check:
@:
ifeq (.,$(thisdir))
all-recursive: do-profile-check
all-local: post-profile-cleanup
clean-local: clean-profile
endif
clean-profile:
-rm -f $(PROFILE_EXE) $(PROFILE_OUT) $(monolite_flag)
post-profile-cleanup:
@rm -f $(monolite_flag)
PROFILE_EXE = $(depsdir)/basic-profile-check.exe
PROFILE_OUT = $(PROFILE_EXE:.exe=.out)
MAKE_Q=$(if $(V),,-s)
do-profile-check: $(depsdir)/.stamp
@ok=:; \
rm -f $(PROFILE_EXE) $(PROFILE_OUT); \
if [ -z '$(MAKE_Q)' ] && [ -n '$(PROFILE_RUNTIME)' ]; then $(PROFILE_RUNTIME) --version; fi; \
$(MAKE) $(MAKE_Q) $(PROFILE_OUT) || ok=false; \
if $$ok; then rm -f $(PROFILE_EXE) $(PROFILE_OUT); else \
if test ! -s $(MONOLITE_MSCORLIB); then \
$(MAKE) $(MAKE_Q) do-get-monolite ; \
fi; \
if test -f $(MONOLITE_MSCORLIB); then \
$(MAKE) $(MAKE_Q) do-profile-check-monolite ; \
else \
echo "*** The runtime '$(PROFILE_RUNTIME)' doesn't appear to be usable." 1>&2; \
echo "*** Check README for information on how to bootstrap a Mono installation." 1>&2 ; \
exit 1; fi; fi
ifdef use_monolite
do-get-monolite:
do-profile-check-monolite:
@echo "*** The contents of your 'monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)' directory may be out-of-date" 1>&2
@echo "*** You may want to try 'make get-monolite-latest'" 1>&2
rm -f $(monolite_flag)
exit 1
else
do-get-monolite:
@echo "*** Downloading bootstrap required 'monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)'" 1>&2
$(MAKE) $(MAKE_Q) -C $(topdir)/class get-monolite-latest
do-profile-check-monolite: $(depsdir)/.stamp
@echo "*** The runtime '$(PROFILE_RUNTIME)' doesn't appear to be usable." 1>&2
@echo "*** Trying the 'monolite-$(BUILD_PLATFORM)/$(MONO_CORLIB_VERSION)' directory." 1>&2
@echo dummy > $(monolite_flag)
$(MAKE) do-profile-check
endif
$(PROFILE_EXE): $(topdir)/build/common/basic-profile-check.cs
$(BOOTSTRAP_MCS) /warn:0 /noconfig /langversion:latest /r:System.dll /r:mscorlib.dll /out:$@ $<
$(PROFILE_OUT): $(PROFILE_EXE)
$(PROFILE_RUNTIME) $< > $@ 2>&1
+2 -1
View File
@@ -8,7 +8,7 @@ MCS = $(BOOTSTRAP_MCS)
profile-check:
@:
DEFAULT_REFERENCES = mscorlib
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
PROFILE_MCS_FLAGS = \
-d:NET_1_1 \
@@ -24,6 +24,7 @@ PROFILE_MCS_FLAGS = \
-d:ANDROID \
-nowarn:1699 \
-nostdlib \
$(DEFAULT_REFERENCES) \
$(PLATFORM_DEBUG_FLAGS)
API_BIN_PROFILE = build/monodroid
+2 -2
View File
@@ -9,9 +9,9 @@ profile-check:
@:
TARGET_NET_REFERENCE = v4.6
DEFAULT_REFERENCES = mscorlib
DEFAULT_REFERENCES = -r:$(topdir)/../external/binary-reference-assemblies/$(TARGET_NET_REFERENCE)/mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib $(PLATFORM_DEBUG_FLAGS)
PROFILE_MCS_FLAGS = -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 4.5
-2
View File
@@ -2,5 +2,3 @@ include $(topdir)/build/profiles/monotouch_runtime.make
PROFILE_MCS_FLAGS += \
-d:FULL_AOT_RUNTIME
NO_SRE=1
+2 -2
View File
@@ -8,7 +8,7 @@ MCS = $(BOOTSTRAP_MCS)
profile-check:
@:
DEFAULT_REFERENCES = mscorlib
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll
PROFILE_MCS_FLAGS = \
-d:NET_1_1 \
-d:NET_2_0 \
@@ -24,6 +24,7 @@ PROFILE_MCS_FLAGS = \
-d:FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK \
-nowarn:1699 \
-nostdlib \
$(DEFAULT_REFERENCES) \
$(PLATFORM_DEBUG_FLAGS) \
$(MONOTOUCH_MCS_FLAGS)
@@ -39,4 +40,3 @@ NO_CONSOLE = yes
PROFILE_DISABLE_BTLS=1
MONO_FEATURE_APPLETLS=1
ONLY_APPLETLS=1
ENABLE_GSS=1
-18
View File
@@ -1,18 +0,0 @@
# -*- makefile -*-
BOOTSTRAP_PROFILE = build
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
MCS = $(BOOTSTRAP_MCS)
profile-check:
@:
TARGET_NET_REFERENCE = v4.6
DEFAULT_REFERENCES = mscorlib
PROFILE_MCS_FLAGS = -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib $(PLATFORM_DEBUG_FLAGS)
FRAMEWORK_VERSION = 4.5
NO_INSTALL = yes
-2
View File
@@ -7,5 +7,3 @@ NO_THREAD_ABORT=1
NO_THREAD_SUSPEND_RESUME=1
NO_MULTIPLE_APPDOMAINS=1
NO_PROCESS_START=1
NO_VTS_TEST=1
NO_GSS=1
@@ -8,5 +8,3 @@ NO_THREAD_SUSPEND_RESUME=1
# The binding generator (btv) still needs to execute processes,
# so we need a System.dll that can do that.
#NO_PROCESS_START=1
NO_GSS=1
-2
View File
@@ -9,8 +9,6 @@ NO_THREAD_SUSPEND_RESUME=1
NO_MULTIPLE_APPDOMAINS=1
NO_PROCESS_START=1
NO_MONO_SECURITY=1
NO_GSS=1
MONO_FEATURE_APPLETLS=
ONLY_APPLETLS=
MONO_FEATURE_APPLE_X509=1
NO_VTS_TEST=1
@@ -6,7 +6,6 @@ PROFILE_MCS_FLAGS += \
NO_THREAD_ABORT=1
NO_THREAD_SUSPEND_RESUME=1
NO_GSS=1
# The binding generator (bwatch) still needs to execute processes,
# so we need a System.dll that can do that.
#NO_PROCESS_START=1
+4 -8
View File
@@ -5,23 +5,19 @@ BOOTSTRAP_PROFILE = build
BOOTSTRAP_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
MCS = $(BOOTSTRAP_MCS)
PLATFORMS = macos linux win32 unix
PLATFORMS = darwin linux win32
# nuttzing!
profile-check:
@:
DEFAULT_REFERENCES = mscorlib
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib $(PLATFORM_DEBUG_FLAGS)
DEFAULT_REFERENCES = -r:$(topdir)/class/lib/$(PROFILE_DIRECTORY)/mscorlib.dll
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:NET_4_6 -d:MONO -d:WIN_PLATFORM -d:MULTIPLEX_OS -nowarn:1699 -nostdlib $(DEFAULT_REFERENCES) $(PLATFORM_DEBUG_FLAGS)
API_BIN_PROFILE = v4.7.1
FRAMEWORK_VERSION = 4.5
XBUILD_VERSION = 4.0
MONO_FEATURE_APPLETLS=1
ENFORCE_LIBRARY_WARN_AS_ERROR = yes
ifdef PLATFORM_MACOS
MONO_FEATURE_APPLETLS=1
ENABLE_GSS=1
endif
Loaded 100 of 4248 files, more files were not shown because too many files have changed in this diff. Show more