Compare commits

...
777 Commits
Author SHA1 Message Date
Niklas Therning 7f39a42fb7 Bump to latest corefx 3.0 mono form 2018-11-12 15:43:59 +01:00
Zoltan Varga bf6a1edf75 [jit] Profiler argument handling changes (#10885)
[jit] Profiler argument handling changes
2018-10-22 07:08:54 -04:00
Zoltan Varga 299ae7a84e [jit] Profiler argument handling changes (#10885)
[jit] Profiler argument handling changes
2018-10-22 07:08:38 -04:00
Zoltan Varga 54503ed970 [jit] Profiler argument handling changes (#10885)
[jit] Profiler argument handling changes
2018-10-22 07:08:14 -04:00
Zoltan Varga a7f448ad32 [jit] Profiler argument handling changes (#10885)
[jit] Profiler argument handling changes
2018-10-22 07:08:00 -04:00
Zoltan Varga 479a90be29 [jit] Profiler argument handling changes (#10885)
[jit] Profiler argument handling changes
2018-10-22 07:07:45 -04:00
Bernhard Urban b969364b7d [ci] run regression tests with AOT (#11092) 2018-10-22 12:46:20 +02:00
Zoltan Varga 5c5aef6164 [jit] Profiler argument handling changes (#10885)
[jit] Profiler argument handling changes
2018-10-22 04:06:26 -04:00
Zoltan Varga d58bf0bf41 [jit] Profiler argument handling changes (#10885)
[jit] Profiler argument handling changes
2018-10-22 04:06:03 -04:00
Zoltan Varga d7705f3fa5 [jit] Profiler argument handling changes (#10885)
[jit] Profiler argument handling changes
2018-10-22 04:05:40 -04:00
Zoltan Varga af0f521891 [jit] Profiler argument handling changes (#10885)
[jit] Profiler argument handling changes
2018-10-22 04:05:17 -04:00
Zoltan Varga 2b029b3df4 [jit] Profiler argument handling changes (#10885)
* [jit] Add support for accessing method arguments in the profiler in llvmonly mode, by generating code to store them into the MonoProfilerCallContext.args array.

* [jit] Use ctx->args instead of ctx->context for accessing arguments in the profiler.

* Update after review comments.

* [jit] Switch --trace to use the profiler infrastructure.

* Fix a rebase problem.

* Fix c++ failures.
2018-10-22 02:20:39 +02:00
Zoltan Varga aa670c98cb [wasm] Fix AOT support. (#11291)
* [wasm] Fix the creation of runtime.js in ninja mode.

* [wasm] Exit with an error code if the emscripten runtime hits an abort.

* [wasm] Error out when mono_wasm_load_runtime () fails too.

* [wasm] Wrap some code in ENVIRONMENT_IS_SHELL.

* [aot] Emit runtime invoke wrappers for up to 40 parameters for bitcode, newly added tests depend on it.

* [aot] Fix a buffer overflow in mini_get_gsharedvt_out_sig_wrapper_signature ().

* [wasm] Remove some filesystem code which is no longer needed.

* [wasm] Disable coop gc on the cross compiler, it effects the generated code.

* [wasm] Use a different random device under wasm so we can override its behavior. This is needed because /dev/random no longer works in emscripten 1.38.13 in JS shells.

* [wasm] Bump emscripten to 1.38.13.

* [wasm] Print a stack in one more abort case.

* [wasm] Add putchar to EXPORTED_FUNCTIONS, llvm-lto seems to create references to it after linking.
2018-10-21 22:44:43 +02:00
Alexander Köplinger 6a8a2059bb [Microsoft.Build.Engine] Fix race condition in TestTasks.dll compilation and embedding (#11275)
Since we've started embedding test resources inside of the test assembly
we've sometimes seen a strange error on Jenkins during the test run:

```
Msg: Error initializing task StringTestTask: Could not load file or assembly 'Microsoft.Build.Utilities.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
Msg: Error initializing task StringTestTask: System.TypeLoadException: Could not load file or assembly 'Microsoft.Build.Utilities.Core, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies.
  at (wrapper managed-to-native) System.RuntimeType.GetConstructors_native(System.RuntimeType,System.Reflection.BindingFlags)
...
```

However this was from an xbuild_12 run so how come it tried to load xbuild 14 stuff?

The reason is there's a race condition between when TestTasks.dll gets
built and when it's embedded inside of the test assembly.

If we're building the xbuild_12 and xbuild_14 profile at the same time
we could end up embedding the xbuild_14 version of TestTasks.dll instead
of the correct one since we're copying it to the same file name.

The fix is to remove the unnecessary copying logic since we can just tell
the compiler to embed the file under the correct name.
2018-10-21 02:09:37 +02:00
Vlad Brezae 4a6b11577f [aot] Reenable recursion checking when initing shared got entries (#11258) 2018-10-20 12:37:59 +02:00
Jay Krell 0a2b2b7b21 Disable direct x86 aot tailcalls. Except to self. (#11282)
FullAOT is hypothetically ok, but FullAOT has other problems (https://github.com/mono/mono/issues/11276).

This addresses https://github.com/mono/mono/issues/11265.
This regressed presumably https://github.com/mono/mono/commit/f5373adc8a89d4b0d1d549fdd6d9adc3ded4b400.
2018-10-19 23:44:00 -07:00
Jay Krell f87470806d Fix recently introduced warning. (#11257) 2018-10-19 23:47:51 +02:00
Bernhard Urban b104565ccf [interp] use unsigned conversion for nuint (#11259)
[interp] use unsigned conversion for nuint

Fixes `MutableDataTest.Constructor` on Xamarin.iOS with interpreter.

monotouch tests are looking good now with interp-only:
<img width="906" alt="screenshot 2018-10-19 at 11 22 07" src="https://user-images.githubusercontent.com/75403/47209686-3d7b2780-d391-11e8-887f-9e1f39de2026.png">
😬
2018-10-19 17:25:33 -04:00
Jay Krell 44db64c620 Typesafe coop handles for all platforms. (#11012)
This is an alternative or precursor to https://github.com/mono/mono/pull/10212.

 - Removes the dependency of some ABIs passing a pointer and a pointer in a struct the same.
 - Therefore gives all platforms the same type safety.
 - *If* we move to C++, allows us to have member functions in coop handles.
 -  Having the coop signatures available in C can provide  benefits, though we should 
    probably generate them from reading metadata -- though they won't match w/o more changes,
    since we mixup types in several places, like IntPtr vs. pointers.

JIT now traffics in old type-unsafe handles, and wrappers are generated with C preprocessor to trivially convert.
 This way the JIT doesn't have to pass structs by value here, which was tried/failed.

The C preprocessor machinery can/should be extended for additional gains.
In particular driving managed/native coop icall transitions from 3+ per call to 1 (like https://github.com/mono/mono/pull/10212).

That will require better verification of the signatures in icall-def.h, either automated and en masses or gradually manually. Embedders will likely do something else, or at least have to independently invent similar.

Whereever a native function was exposed via multiple managed names, wrappers are reused.
2018-10-19 14:13:28 -07:00
Aleksey Kliger (λgeek) eaaf83ef92 [runtime] Don't init classes in ves_icall_RuntimeTypeHandle_is_subclass_of (#11227)
We must not get a TLE if referenced types are in an assembly that can't be
loaded.

Fixes https://github.com/mono/mono/issues/11123
2018-10-19 14:11:31 -04:00
Kenneth Pouncey 85493320e7 [wasm] Fix Sample.html so sample will run (#11242)
* [wasm] Sample program in wasm sdks does not run.

- Add `mono-config.js` reference to html file.

resolves: https://github.com/mono/mono/issues/11239

* Fix `runtime.js` to reference `mono-config.js` variables.

* Fix packager.exe where it deletes the `runtime.js`.

- Replaced the File Delete and Copy with a Copy if new call.
- re-add the generation of a skeleton  `runtime.js` file if one can not be found.
2018-10-19 20:08:56 +02:00
Alexander Köplinger e48ca0d4cc [Mono.Debugger.Soft] Fixed spaces vs. tabs in Makefile 2018-10-19 20:04:50 +02:00
monojenkins 86941b00c1 [WinForms] Propagate the flags from DrawTextInternal to MeasureTextInternal (#11262)
Flags to DrawText never reached MeasureText therefore strings with '&' were measured incorrect when drawn with flag TextFormatFlags.NoPrefix.
Fixes #6352
2018-10-19 18:09:53 +02:00
Alexander Köplinger 2d8839e704 [System] Don't throw NIE for ServicePoint.ConnectionLeaseTimeout and .ReceiveBufferSize (#11246)
* [System] Don't throw NIE for ServicePoint.ConnectionLeaseTimeout and .ReceiveBufferSize

Instead return a no-op value. This is the same behavior as .NET Core.

Fixes https://github.com/dotnet/standard/issues/642

* Bump API snapshot submodule
2018-10-19 17:48:23 +02:00
Alexander Köplinger 2c1e5292f5 Bump corefx submodule
MemberInfoTests.cs moved from System.Runtime -> System.Reflection
2018-10-19 13:37:43 +02:00
Eberhard Beilharz 5fa2df8b4d [metadata] Fix crash related to custom attributes (#10739)
* [tests] Renumber duplicate return codes

* [metadata] Fix crash related to custom attributes (#10737)

When a class doesn't contain the desired custom attribute we used
to return the last available attribute. This prevented
`cominterop_ccw_queryinterface()` to detect that the interface
isn't implemented and lead to a crash.

This change fixes #10737.

* [cominterop] Switch to GC Unsafe in IUnknown and IDispatch impls

These methods can be called directly from embedding APIs.
2018-10-19 07:03:25 -04:00
Ludovic Henry aa5438dd5d [sdks] Package what's missing for XA (#11253)
They require the additional files:
 - mono/eglib/eglib-config.h: that's to build `libmonodroid`
 - mcs/build/Consts.cs: that's to build `Mono.Posix` and `Mono.Data.Sqlite`
2018-10-19 06:57:31 -04:00
Rodrigo Kumpera 2ae12c6a0a [wasm] Fix provision-wasm to do emsdk selection. Remove the need for the emcc patch. (#11250)
[wasm] Fix provision-wasm to do emsdk selection. Remove the need for the emcc patch.
2018-10-19 04:45:41 -04:00
Vlad Brezae 7a40ab148d [interp] Remove mint_type uses at execution time (#11167)
It is too slow. Check during transform whether the class is stored on vtstack or not.
2018-10-19 10:27:00 +03:00
Kenneth Pouncey dd7ac9ddd6 Fix Duplicate assemblies in config.js file_list: [ ... ] (#11236)
resolves: https://github.com/mono/mono/issues/11187
2018-10-19 02:28:23 -04:00
Alexander Kyte 9aab5273dd Add crash reporting debugger event (#10628)
This should help get information on native crashes that happen in hard-to-debug environments. 

To quote https://github.com/mono/mono/issues/10157 : 


When a mono runtime is attached to a managed debugger and the debugged runtime is induced to cause a crash, the state of that crash is not communicated to the managed debugger. This, combined with the difficulty in having the debugged runtime both attached to the managed debugger and lldb, makes this type of crash difficult to interactively debug.

When the managed debugger is the only connection someone has with the runtime because it is embedded in a way that is resistant to unmanaged debugging (watchOS application on-device, for instance), this is an even more difficult problem.

By adding an SDB protocol event that sends a type of "runtime death" and a blob of opaque json (version dependent, no protocol guarantees), people can report these crashes without having to assist a mono runtime engineer in observing a crash on device.

In the case that spurious bugs in this manner are submitted, it will require less effort as well to spot stack frames that indicate misuse of mixed managed-unmanaged APIs (which offer the ability to drive a segfault or g_assert
2018-10-19 02:39:03 +02:00
Alexis Christoforides 4844ab019d [corlib] Import System.IO.UnmanagedMemoryStream from CoreFX (#11210)
* [corlib] Import System.IO.UnmanagedMemoryStream from CoreFX

* Bump API snapshot submodule

* [csproj] Update project files
2018-10-18 18:34:38 -04:00
Ludovic Henry bdebfe93fb [tests] Embed Mono.Data.Sqlite test resource (#11244) 2018-10-18 18:30:49 -04:00
Zoltan Varga ab18dea99b [arm64] Remove the limitation on the number of nullable arguments for dyncalls. (#11186)
* [arm64] Remove the limitation on the number of nullable arguments for dyncalls.

Fixes https://github.com/xamarin/xamarin-macios/issues/4984.

* [amd64] Remove the limitation on the number of nullable arguments for dyncalls.

* [jit] Add tests for dyncalls with lots of nullable arguments.
2018-10-18 23:11:31 +02:00
Jay Krell d16869c510 Remove a few raw pointers, correct some signatures, remove some unnecessary handles(). (#11211)
* Mark AddRefInternal as NOHANDLES(). Its signature was incorrect.

* Change ves_icall_System_Runtime_InteropServices_Marshal_ReleaseInternal to NOHANDLES.

* Mark ves_icall_System_Runtime_InteropServices_Marshal_QueryInterfaceInternal NOHANDLES.

* ves_icall_System_Runtime_InteropServices_Marshal_BufferToBSTR to nohandles().

* ves_icall_System_Runtime_InteropServices_Marshal_FreeBSTR to nohandles().

* ves_icall_System_Runtime_InteropServices_Marshal_FreeHGlobal nohandles().

* ves_icall_System_Runtime_InteropServices_Marshal_FreeCoTaskMem nohandles().

* Fix the signature of ves_icall_System_Runtime_InteropServices_Marshal_AllocCoTaskMemSize.

* [coop] Remove most uses of out_of_memory_ex.
2018-10-18 22:27:03 +02:00
Ludovic Henry cb616340d0 [pipeline] Ensure only 1 build per-product is executed per-node (#11247) 2018-10-18 22:09:16 +02:00
Alexander Köplinger 229a4673d4 [ci] Move OSX .pkg build to a separate bot pool
Allows us to better utilize the bockbuild cache.
2018-10-18 16:36:01 +02:00
Alexander Köplinger d07ddffffe [Mono.Debugger.Soft] Simplify building dtest-app.exe for monodroid profile (#11229)
We only build it if we're explicitly building the monodroid profile and for the
monodroid_tools profile we only build the test assembly but not dtest-app.exe
2018-10-18 13:06:27 +02:00
Alexis Christoforides 660ca3bc70 [corlib] Ensure that Console Streams are thread-safe (#11205)
The Console class wraps the standard system stream reader/writers on construction so as to expose them as thread-safe. However, the Set-Out/In/Err methods in referencesource do not do the same when they replace default targets.

CoreFX code does: https://github.com/mono/corefx/blob/1748f6492e8b96842f76e1a9e7b5d7e8ccfca480/src/System.Console/src/System/Console.cs\#L412-L444

Possible fix for https://github.com/mono/mono/issues/11146
2018-10-17 17:10:40 -04:00
Martin Baulig 95017ad9e4 Add myself as code owner of mono/native and some managed code. (#11228)
- `mono/native`
- `/mcs/class/corlib/Mono` (dependency injector, mono native, pal, certificates)
- `mcs/class/corlib/System.Security.Cryptography.X509Certificates`
- `/mcs/class/System/Mono` (PAL, certificates and dependency injector)
- `/mcs/class/System/System.Security.Cryptography.X509Certificates`
2018-10-17 21:26:47 +02:00
Ludovic Henry a282040c96 [bcl] Build all XUnit and NUnit tests for monodroid, monotouch, monotouch_tv, monotouch_watch and wasm BCL profiles (#11201) 2018-10-17 14:44:45 -04:00
Vlad Brezae 2b64076769 [aot] Ensure shared got entries are initialized before loading methods (#11190)
Executing aot code that uses them would crash. Fixes random csc crashes.
2018-10-17 14:21:45 -04:00
Egor Bogatov 2a250915c4 [corlib] Add xunit tests for BitConverter, Convert, etc (#10758)
* Add System.Runtime.Extensions tests

* ignore Environment.UserDomainName.cs

* bump corefx
2018-10-17 07:45:55 -07:00
HebaruSan b286fe3d74 Fix MessageBox text color for dark themes (#11196)
## Problem

`MessageBox` displays as black-on-dark in a dark theme:

![image](https://user-images.githubusercontent.com/1559108/47039608-f64f2580-d149-11e8-9c1d-1dd8d99d4cb8.png)

This can be difficult to read.

## Cause

The text is drawn with a hard coded color of `Color.Black`. This assumes that the background under the text will be light to contrast with black.

## Changes

Now the color is `SystemColors.ControlText` instead, to match the background of the popup.

In a normal theme this will still be black.
2018-10-17 14:10:17 +02:00
Alexander Köplinger a2f0c286af [pkg] Add preinstall which removes existing Mono of the same version (#11203)
Fixes https://github.com/mono/mono/issues/11202
2018-10-17 12:50:11 +02:00
Alexander Köplinger 237482628a Bump api-snapshot 2018-10-17 12:35:34 +02:00
Johan Lorensson b2d0e7e8a6 Merge pull request #11100 from lateralusX/lateralusX/build-btls-msvc
Build BTLS on Windows, Visual Studio.
2018-10-17 08:39:55 +02:00
Alexander Köplinger efd6c05aef Upstream a few test related commits from my Helix work (#11197)
* [bcl] Run System.Windows.Forms.DataVisualization tests

* [bcl] Run Mono.Messaging.* tests

* [bcl] Use correct label for mdoc tests

* [runtime] Skip verifying an xunit-binaries assembly
2018-10-17 03:48:49 +02:00
Jay Krell 99c3c9ba32 Fix cygwin configure error message to match scripts/ci. (#11151) 2018-10-17 01:54:12 +02:00
Bernhard Urban 965aebf500 [ppc] fix UCONTEXT_REG macros for FreeBSD (#11128)
Contributed by @lenoil98. Fixes https://github.com/mono/mono/issues/11020
2018-10-17 01:49:47 +02:00
Alexis Christoforides d3769a73ff [corlib] Import System.IO.IOException from CoreFX (#11102)
* [corlib] Import System.IO.IOException/FileLoadException from CoreFX

* [corlib] Remove unused string

* [corlib] Remove another test assert for BadImageFormatException

Exception message no longer includes the file name
2018-10-17 01:38:30 +02:00
Alexander Köplinger 0fad97f2f3 [wasm] Use latest Microsoft.AspNetCore.App in ProxyDriver.csproj 2018-10-16 23:10:53 +02:00
Alexander Köplinger 74687a0a63 Remove azure-pipelines.yml
It was an experiment
2018-10-16 22:50:08 +02:00
Alexander Köplinger 6c7790d0a8 Move CODEOWNERS to .github folder
So all GitHub related special files are in one place
2018-10-16 21:28:05 +02:00
Martin Baulig b61a3ffb02 [System]: Reenable native Apple Certificate support on WatchOS. (#11173)
During the code refactoring this summer, support for native apple certificates
has been dropped on watchOS.

* add `apple-certificates.sources` and move all certificate-related code from
  `appletls.sources`.

* move non-network related code from `MacProxy` into a new `AppleTypes`.

* add the `MONO_FEATURE_APPLE_X509` magic to `System/Makefile` where it was missing from.
2018-10-16 20:57:09 +02:00
Ludovic Henry 2a4cfddd9a [sdks] Build tests for BCL targets (#11141)
* [sdks] Build BCL profiles without configure flags

* [sdks] Add BclTemplate to build BCL profiles

This is to avoid building all the profiles in a single `sdks/out/bcl` directory which will be shared between android, ios and wasm.

* [sdks] Simplify call to BclTemplate

* [mcs] Make directory dependency as order-only

We would otherwise always rebuild the target since the directory is updated whenever something is added to the directory. This is a common Makefile technique.

* [sdks] Build tests for BCL targets
2018-10-16 14:00:12 -04:00
Jonathan Chambers 36edb2f275 Take fast path only for delegate types not Delegate/MulticastDelegate. (#11182) 2018-10-16 13:14:32 -04:00
Alexander Köplinger 7a505f2e40 [mcs] Fix platform-specific build of "build" profile and remove more remnants of the "basic" profile (#11185)
The platform specific build got lost in 8d8fd97dbf but we need it for monolite. The remnants of the "basic" profile are no longer needed.
2018-10-16 19:12:13 +02:00
Ludovic Henry 0fd450ac6b [sdks] Add Groovy script to build the SDKs archives for the products (#11137) 2018-10-16 11:03:51 -04:00
Zoltan Varga 0beb087567 [WIP] [wasm] AOT work. (#11071)
* [runtime] Fix the signature of some native type tests.

* [runtime] Add stubs for the ves_icall_System_Net_NetworkInformation_MacOsIPInterfaceProperties_ParseRouteInfo_internal () icall, needed for AOT.

* [wasm] Print a native stack trace on asserts.

* [wasm] Avoid mmaps with zero length, it leads to an exception under emscripten.

* [bcl] Preserve CustomAttributeData:.ctor (), its called from the runtime.

* [wasm] Print out full test names in the test runner.

* [wasm] Preserve System.Threading.WasmRuntim.

* [wasm] Rename config.js to mono-config.js

* [wasm] Add targets to build aot versions of the test suites.

* [wasm] Exit with a nonzero exit code in case of a failure.

* [wasm] Disable crash reporting.

* [wasm] Use mono headers for public functions.

* [wasm] Enable building AOT tests on CI.

* [wasm] Run some AOT test suites on CI.

* [runtime] Make MonoBundledAssembly.size non-const.

* [wasm] Add a --setenv=VARIABLE=VALUE argument to runtime-tests.js which allows the setting of environment variables.

* [wasm] Update cross compiler executable name.

* [wasm] Remove unused aot-driver.js file, runtime-tests.js has the same functionality.

* [wasm] Run mini tests with AOT on CI.

* [wasm] Error out if the linker fails.

* [wasm] Fix building the AOT tests from another directory.

* [wasm] Use a matching Mono.Cecil.dll for the linker.

* [wasm] Fix running aot tests on CI.

* Revert "[sdks] Switch the invocation of the offsets too to 64 bit on osx. (#10903)"

This reverts commit 2989a83f23.

This seems to cause failures on linux+webassembly.
2018-10-16 10:29:29 +02:00
monojenkins b71a4b76bb [sdks] futimens and futimes symbols are missing on anything earlier than 10.13 (#11179)
This breaks when LLVM is built on 10.13+ and the runtimes are built on 10.12.
2018-10-15 23:02:41 -04:00
Martin Baulig f973c6d90f [System] Make a test compile on mobile. (#11175) 2018-10-16 01:12:14 +02:00
Jay Krell d30c8649f1 mono_field_get_type to mono_field_get_type_internal to skip GC mode machinery (#11082)
But also optimize mono_field_get_type in the common case, to "short circuit"
and skip ditto.
2018-10-16 00:40:43 +02:00
Alexander Kyte 2d415fa1b3 [crash] Split unmanaged method pointers into method ip + offset (#11142)
The VS4M team is making a tool that makes a symbolication lookup table. This enables symbolication without access to the relevant binary. 

For unmanaged, it's much harder to precompute things because we were presenting the instruction address. From the address, any lookup needs to find the function enclosing this interior pointer.

To make it easier, this reports the address of the native method as well as the offset. A lookup table can simply key on the function start address with this now. 

ie:

  ``` 
      {
        "native_address" : "0x1003a6340",
        "native_offset" : "0x00046",
        "native_module" : "mono"
      }
```

 ```
$ nm mini/mono-sgen | grep '1003a6340' 

00000001003a6340 t _mono_runtime_run_main_checked

```

```
$ nm mini/mono-sgen | grep ' t ' | sort -n

00000001000a4e90 t _alloc_ireg
00000001000a4eb0 t _decompose_long_opcode
00000001000aae90 t _mono_decompose_long_opts
00000001000aaea0 t _mono_decompose_vtype_opts
00000001000ae130 t _m_class_get_byval_arg
00000001000ae150 t _alloc_dreg
............
```
2018-10-16 00:39:37 +02:00
Jay Krell c105cd2339 Remove GC mode transitions from mono_array_length, and replace with mono_array_length_internal. (#11122) 2018-10-15 14:07:58 -07:00
Alexander Kyte 1bc31b3ab1 [crash] Bump static memory for crash string to 500k
Note:
- This memory isn't accessed until we're crashing
- On any modern machine, unused static memory is lazily allocated. When
we access it, the fault will trigger the MMU to map memory for us.
- This is guaranteed to be reentrant and safe. mmap (the alternative) is
surely fairly stable on many systems, but this is not guaranteed. The
documentation pages for mmap specifically claim it as not safe in these async
contexts.
2018-10-15 13:12:50 -04:00
Alexander Kyte aef45d547e [crash] Print half-completed dump when space runs out 2018-10-15 13:12:50 -04:00
Martin Baulig 51548b4d37 Initial Mono.Native Support. (#10596)
`Mono.Native` is the new name for both `System.Native` and `System.Security.Cryptography.Apple`.
It is built as a stand-alone shared library and not bundled with the runtime because we
may need to build two different versions of it.

Starting with macOS 10.12+ and iOS 10+, Apple introduced a new Unified API for some of the
crypto primitives that we're using as part of System.Security.Cryptography.Apple.

On Desktop, we can check at runtime whether the OS version is recent enough and switch
implementation accordingly.  We build a single `libmono_native` shared library.

However, on Mobile we cannot have any undefined symbols as this would break Bitcode.

During the mobile build, we are called with `CC` containing an explicit minium version flag,
which is either `-mmacosx-version-min=`, `-mios-simulator-version-min=` or `-miphoneos-version-min=`
depending on platform.

We build two versions of the shared library:
- `libmono_native_compat` is built with whichever minimum version is passed to us via `CC`.
- `libmono_native_unifed` is built with the minimum version set to macOS 10.12+ / iOS 10+.

For testing purposes, there is a function called `mono_native_get_platform_type ()`
(see mono/native/mono-native-platform.c), which returns a `MonoNativePlatformType` enum value.
There is also `Mono.MonoNativePlatform.GetPlatformType ()` (see mcs/class/corlib/Mono/MonoNativePlatform.cs).

This can be called by automated tests both to ensure that the library has been correctly installed and also
to verify that it's the correct version of it.

* `configure.ac`: add new configure checks for Mono.Native.

* `mono/native/`: new directory - this replaces the `System.Native` code that was previously in `mono/metadata`.

* `mcs/class/corlib/Mono`: New internal `MonoNativePlatformType` and `MonoNativePlatform` classes.
2018-10-15 17:38:45 +02:00
Alexander Köplinger 2ebb5efed5 Fix comment in RemoteExecutorTestBase.Mono.cs 2018-10-15 17:21:36 +02:00
lateralusX 360620a68a Additional checks for correct environment when doing msvc BTLS builds. 2018-10-15 16:51:44 +02:00
lateralusX c77084dcb8 Add lib prefix of msvc build BTLS library. 2018-10-15 14:51:22 +02:00
lateralusX d5e38af6c7 Fix BTLS build warnings on Windows. 2018-10-15 14:45:24 +02:00
lateralusX dd3e2cd0c7 Fix case insensitive compares. 2018-10-15 14:45:24 +02:00
lateralusX f8249e65be Add vcxproj to build btls as part of regular mono msvc build. 2018-10-15 14:45:24 +02:00
lateralusX 1678b9cbae Bump external/boringssl commit. 2018-10-15 14:45:23 +02:00
lateralusX c1d38347cb Build script for btls using msvc. 2018-10-15 14:45:23 +02:00
lateralusX 9761c65ae8 Fix mono btls build using msvc 2015/2017. 2018-10-15 14:45:23 +02:00
Alexander Köplinger 8d1dd6aa65 Fix Mono.Debugger.Soft to use test exe's from different directory (#11033)
And make it work for the monodroid_tools profile.
2018-10-15 14:12:19 +02:00
monojenkins fa79aa7e8b Merge pull request #11127 from lewurm/mono-ppc-sigill
[ppc] use G_BYTE_ORDER in order to define patch_load_sequence

Fixes https://github.com/mono/mono/issues/11021
2018-10-15 03:35:35 -04:00
Zoltan Varga 2989a83f23 [sdks] Switch the invocation of the offsets too to 64 bit on osx. (#10903) 2018-10-15 04:50:54 +02:00
Marek Safar 2e5d1bbe82 [metadata] Remove unused type caches 2018-10-14 08:27:44 -07:00
Maxim Lipnin 5c4e4c5084 Add check for empty string to correctly get constructors in case of name="*" 2018-10-12 18:22:08 -07:00
Maxim Lipnin 081ca12f82 [Reflection] Fixing bugs in MonoParameterInfo caught by xunit tests (#11052)
This PR fixes the bugs caught by [RawDefaultValue](https://github.com/mono/corefx/blob/411def5f278956f3c514c02ab76d9bb89428fef7/src/System.Runtime/tests/System/Reflection/ParameterInfoTests.cs#L22) and [VerifyParameterInfoGetRealObjectWorks](https://github.com/mono/corefx/blob/411def5f278956f3c514c02ab76d9bb89428fef7/src/System.Runtime/tests/System/Reflection/ParameterInfoTests.cs#L91) tests
2018-10-12 18:12:49 -07:00
monojenkins 232ed99c1c Bump API snapshot submodule 2018-10-12 18:00:46 -07:00
Zoltan Varga e5b4c144ac Fix checking the contents of the sourcelink file on windows. 2018-10-12 18:00:46 -07:00
Zoltan Varga 7f81c2776f [sdb] Add support for reading the sourcelink data from portable pdb files using a new SourceLink property on ModuleMirror objects.
Fixes https://github.com/mono/mono/issues/10038.
2018-10-12 18:00:46 -07:00
Bernhard Urban e5504fb8ea [mini helpers] strip more directives on arm (#11124)
* `-s` removes all symbols.
* `-x` removes non-global symbols.

This is needed in order to get human readable output with `MONO_VERBOSE_METHOD=method`, so instead of:

```
Disassembly of section .text:

00000000 <.text>:
   0:   e92d4900        .word   0xe92d4900
   4:   e24dd05c        .word   0xe24dd05c
   8:   e1a0b00d        .word   0xe1a0b00d
   c:   e58b0030        .word   0xe58b0030
  10:   e58b1034        .word   0xe58b1034
[...]
```

It is this now:
```
Disassembly of section .text:

00000000 <.text>:
   0:   e92d4900        push    {r8, fp, lr}
   4:   e24dd05c        sub     sp, sp, #92     ; 0x5c
   8:   e1a0b00d        mov     fp, sp
   c:   e58b0030        str     r0, [fp, #48]   ; 0x30
  10:   e58b1034        str     r1, [fp, #52]   ; 0x34
[...]
```

This is needed due to a newer toolchain on our ARM bots. Tested on armv7 and aarch64.
2018-10-12 17:23:33 -04:00
Jay Krell 697e959c6f mono_class_from_mono_type to mono_class_from_mono_type_internal to skip GC mode machinery (#11078) 2018-10-12 12:24:17 -07:00
Bernhard Urban ddf734ee52 [ppc] use G_BYTE_ORDER in order to define patch_load_sequence
Fixes https://github.com/mono/mono/issues/11021
2018-10-12 17:22:52 +02:00
Kenneth Pouncey c3999baa3d [wasm] Add support for Module.locateFile to runtime loading (#11101)
* [wasm] Fix the build.

* [wasm] Add --copy parameter to packager

- copy parameter

```

        --copy=always|ifnewer        Set the type of copy to perform
                              'always' overwrites the file if it exists.
                              'ifnew' copies or overwrites the file if modified or size is different.

```

- Fix wasm build target in do-runtime target.

* [wasm] Add support for Module.locateFile to runtime loading

See issue https://github.com/mono/mono/issues/11099 for more information.

resolves issue: https://github.com/mono/mono/issues/11099

* Fix spelling of option `ifnew` to `ifnewer`
2018-10-12 10:59:57 -04:00
Jay Krell ec623e581e Replace MONO_CLASS_IS_INTERFACE with MONO_CLASS_IS_INTERFACE_INTERNAL to avoid gc mode transitions. (#11112) 2018-10-12 07:58:04 -07:00
Jay Krell 51ebea7a48 mono_method_signature to mono_method_signature_internal to skip GC mode machinery (#11080) 2018-10-12 01:18:06 -07:00
monojenkins 656c820cf9 [2018-08] Bump msbuild (#11098) 2018-10-11 17:35:22 -04:00
Martin Baulig 3baefe7ef1 Build BTLS on Windows, cygwin/mingw. (#9306)
* Build BTLS on Windows.

* Quote more cmake paths

Should fix issue on Windows build where cmake is installed in C:\Program Files

* Fix btls cygwin x86, x64 Windows build.

NOTE, cygwin btls build depends on cygwin installed cmake, update cygwin
install to include cmake before building.

* Disable BTLS as default for Windows builds.
2018-10-11 17:25:13 -04:00
Vlad Brezae 431628cad7 [interp] Implement interpreter entry trampolines on amd64 (#10978)
* [interp] Avoid unnecessary allocations when pinvoke void functions

* [amd64] Refactor interp pinvoke context computation

* [amd64] Interp trampoline for interpreter entry

* [aot] Don't include interp_in_wrapper when we use entry trampoline

These wrappers take a lot of space in the image.
2018-10-11 17:18:30 -04:00
Bernhard Urban 15ae6a97ad [exceptions] continue program execution when mapping of stack overflow guard page fails (#11064)
* [exceptions] continue program execution when mapping of stack overflow guard page fails

Related: https://github.com/mono/mono/issues/10415

* turn comment into warning

* fix mono_gc_register_altstack call when no guard page is mapped
2018-10-11 17:16:17 -04:00
Bernhard Urban 288b9b0f95 [tests] lower recursion depth of PerformNoPinAction (#11065)
so it doesn't overflow the stack when running on macOS with `clang -O0`.
2018-10-11 17:15:54 -04:00
Jay Krell 0d308e5e9a x86 mono_arch_get_patch_offset: add support for 0xe9/jmp eip+32b. (#11089)
I don't know what the specific code is or what changed, etc.

This addresses Mac/x86:

https://jenkins.mono-project.com/job/test-mono-pull-request-i386-osx/15364/parsed_console/log.html

```Unable to compile method 'int Tests:calli_sig_check_2 ()' due to: 'Invalid IL code in Tests:calli_sig_check_2 (): IL_000b: calli     0x11000044```

which then fails an assert and fails overall.

CI goes deep into bash w/o echoing commands but a repro is:

 cd mono/mini
 MONO_PATH=./../../mcs/class/lib/net_4_x lldb -- ./mono --aot iltests.exe

The code is meant to be invalid, and meant to raise an exception,
which is catchable/resumable (at least in the JIT case where
executing IL the first time, can raise an exception while caller is
running, vs. AOT where the codegen all happens offline -- leaving what?
A note made at AOT time that calling the code should raise an exception?).

It isn't meant to fail an assert in either case.
2018-10-11 16:46:09 -04:00
Alexander Kyte c3fe80a0c4 [crash] Crash Reporter V2 (#10532)
This change set represents a major set of changes to the crash reporting mechanism. 

1) Coordination involving mandatory timeouts and signals have been changed greatly, to instead use semaphores and to end waiting as soon as possible. 

2) Dumping of unmanaged symbols outside of mono has been made possible. Embedders that want to get information on frames outside of mono-sgen can register the library with an icall. This carefully preserves both privacy (opt-in) and resiliency (can't crash/lose more info when misused).

3) The dumper has moved from a workflow that kills the runtime after a long delay into one that can dump individual threads or the entire runtime in a prompt manner. The runtime doesn't die at the end of the dump, but allows threads to resume what they were doing and returns to the caller. 

4) This has allowed for the addition of a number of tests that stress both parallel and concurrent dumping of threads. These run fairly quickly, and leave the runtime in a state to continue testing. 

5) With this lightweight testing setup created, a long burn-in testing period was done. Places we were using locks or trying to malloc resulted in crashes or hangs. After making the needed changes, it managed to run the dumping tests in a loop for a whole weekend on a Linux x64 configuration without any problems.

This has resulted in a dumper with dramatically improved stability and performance.
2018-10-11 16:38:21 -04:00
Zoltan Varga 92ebd1793b [wasm] Fix the build. (#11063) 2018-10-11 16:33:37 -04:00
Jay Krell 2c3ad9d458 mono_class_enum_basetype to mono_class_enum_basetype_internal to skip GC mode machinery. (#11079) 2018-10-11 12:13:23 -04:00
Jay Krell b77c6a6885 mono_class_is_assignable_from to mono_class_is_assignable_from_internal to skip GC mode machinery (#11081)
FIXME mono_class_is_assignable_from_checked
2018-10-11 09:48:16 -04:00
Jay Krell 70208087df Replace mono_object_get_class with mono_object_class to avoid gc transitions. (#11077) 2018-10-11 09:47:53 -04:00
Alexander Kyte 6b9b24c583 [runtime] Fixup stacktrace creation on s390x (#11073)
* [runtime] Fix mismatched parenthesis on exc-s390x

* [runtime] Fix mismatched static function type declaration on s390x

* [runtime] Fixup b7c18caf0c for s390x
2018-10-10 17:25:44 -04:00
Alexander Kyte b4067405d3 [runtime] Fix internal llvm (#11074)
The makefile uses $(dir $<) which has `../` and so refers to `llvm/external/llvm` rather than `external/llvm` now that we're using llvm from a submodule in external/
2018-10-10 15:46:31 -04:00
monojenkins fb7ad92db9 Merge pull request #11053 from BrzVlad/fix-interp-static-field
[interp] Optimize static field access

Do most of the work on transform side and include the field address in the instruction stream. We need to run cctor at runtime to preserve expected order. This makes static field access 4 times faster.



<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->
2018-10-10 13:25:41 -04:00
Aleksey Kliger 6161324629 Example experiment "null" 2018-10-10 11:54:14 -04:00
Aleksey Kliger 8a0fbd4e89 Add --enable-experiment= and MONO_EXPERIMENT= support
Experiments are unsupported and provide no stability or backward compatability
guarantees.
2018-10-10 11:54:14 -04:00
Marek Safar 8d8fd97dbf [build] Unify bootstrap profiles (#11024)
* [build] Unify bootstrap profiles

We can now rely on build only as we have reliable monolite and package
compilers

* Fixes genproj dependencies

* [csproj] Update project files
2018-10-10 08:49:38 -07:00
Maxim Lipnin 831e73abcd [Reflection] Unify exception param name 2018-10-09 18:02:24 -07:00
Maxim Lipnin 98db98fe06 [Reflection] Handle overflow exception on constructor invocation (#11028)
It allows to re-enable  [Invoke_OneDimensionalArray_NegativeLengths_ThrowsOverflowException](https://github.com/mono/corefx/blob/master/src/System.Reflection/tests/ConstructorInfoTests.cs#L96) test and enable [TestInvoke_1DArrayWithNegativeLength](https://github.com/mono/corefx/blob/master/src/System.Runtime/tests/System/Reflection/ConstructorInfoTests.cs#L79) test.

Fixes https://github.com/mono/mono/issues/10024
2018-10-09 16:59:12 -07:00
monojenkins 53f4861c2d [csproj] Update project files 2018-10-09 16:33:53 -07:00
monojenkins d44969b5c4 Bump API snapshot submodule 2018-10-09 16:33:53 -07:00
Maxim Lipnin 58dd6ac196 Disable GetTypeTests.cs 2018-10-09 16:33:53 -07:00
Maxim Lipnin 88c68600e6 [Reflection] CoreFX import for TypeDelegator type 2018-10-09 16:33:53 -07:00
Aleksey Kliger fdfd781b4a Always use InvariantCulture calendars in X509Certificate on Mobile
Allow the linker to remove UmAlQuraCalendar and HijriCalendar on mobile devices

Match the CoreFX X509Certificate changes: https://github.com/mono/corefx/commit/4eb1fc2abd2ffa70e402d22415d0209b21725a10

Fixes https://github.com/mono/mono/issues/10448
2018-10-09 15:47:26 -07:00
Jay Krell d4c0479362 [icalls] Declare all icalls correctly. (#11019)
It is hacky to have to avoid includes in order to have conflicting/incorrect declarations.

And hacky to use extern "C" when the reason is to have incorrect prototypes.

It is arguably hacky to suppress the gcc warning -- granted, the functions are never called, and merely their addresses taken and put into void* -- arguably gcc's warning is too strict and should only trigger for calls or taking address into a non-void*.

Arguably the declarations should be moved around the tree.

Perhaps we should omit the prototypes from C++.
2018-10-09 13:27:49 -04:00
Jay Krell b477d7dad8 [icall] Add InOut handles. Use InOut handles and Out handles more correctly. (#11042)
This is only an unenforced naming convention.
2018-10-09 13:27:28 -04:00
Zoltan Varga 1d71454132 [arm64] Pass small stack args correctly on linux. Fixes pinvoke.exe with llvm+full aot. (#10674)
* [arm64] Pass small stack args correctly on linux. Fixes pinvoke.exe with llvm+full aot.

* Bump llvm.
2018-10-09 11:37:54 -04:00
Bernhard Urban e357ef7ae8 Bump corefx
Commit list for mono/corefx:

* mono/corefx@17e9259f14 [tests] add finalizer helper to avoid false pinning (#156)
* mono/corefx@4eb1fc2abd Remove calendary dependency from X509Certificate

Diff: https://github.com/mono/corefx/compare/411def5f278956f3c514c02ab76d9bb89428fef7...17e9259f147d9b4b32394d249bf2b7aa1673e406
2018-10-09 11:33:12 -04:00
Zoltan Varga 65e207ba7c [wasm] AOT work. (#10989)
* [llvm] Fix the icall signature of a few llvm EH icalls.

* [wasm] Disable com/remoting in the linker.

* [wasm] Enable direct icalls.

* [wasm] Generate the configuration into a config.js file instead of rewriting the runtime.js file.

* [wasm] Enable icall symbol map in the cross compiler, compile the device runtime with -fexceptions.

* [wasm] Rename runtime-tests.g.js -> runtime-tests.js.

* [wasm] Add mono_wasm_assembly_get_entry_point () function to obtain the entry point of an assembly.

* [wasm] Add profiler support to the packager.

* [wasm] Add support for running a normal .net executable to the test runner.
2018-10-09 11:32:20 -04:00
Vlad Brezae 78455914e8 [interp] Optimize static field access
Do most of the work on transform side and include the field address in the instruction stream. We need to run cctor at runtime to preserve expected order. This makes static field access 4 times faster.
2018-10-09 17:38:39 +03:00
Ludovic Henry a618a1a9ea [sdks] Add cmake toolchain file for LLVM MXE builds (#11008)
We couldn't compile llvmwin{32,64} on Linux because we would try to use {i686,x86_64}-w64-mingw-cmake but it wouldn't exist.
2018-10-09 08:14:20 -04:00
Egor Bogatov ed50d2560a Depend on all *_test.dll.sources for make run-test (#11030)
* depend on all test.sources for `make run-test`

* fix typo (to exclude xunit tests)
2018-10-08 21:31:03 -04:00
Ludovic Henry 8b7d80396e [llvm] Add as a submodule (#11010) 2018-10-08 18:27:20 -04:00
Alexander Köplinger a8d007e51d AOT: use 32 bit flags for as/ld when targetting x86 on linux (#11032)
So it works when running the 64bit as/ld on the host with a 32bit mono binary.
2018-10-08 18:24:04 -04:00
Jay Krell 6b3cb0d93b [Coop] Convert mono_object_clone_checked, mono_object_new_from_token, mono_class_create_runtime_vtable, mono_runtime_object_init_checked. (#11018)
* [coop] Optimize mono_runtime_object_init_handle -- don't pin non-valuetypes.

* [coop] Convert mono_runtime_object_init_checked to call mono_runtime_object_init_handle.

* [coop] Convert mono_class_create_runtime_vtable.

* [Coop] Convert mono_object_new_from_token.

* [coop] Convert mono_object_clone_checked.
2018-10-08 11:36:30 -07:00
Ludovic Henry c6ddea6c06 [mcs] Fix dependencies on mcs/class/lib/<Profile>/tests/<Profile>_corlib_test.dll.nunitlite.config (#11029)
The directory mcs/class/lib/wasm/tests wouldn't necessarily be created before we would try to copy the file to it.
2018-10-08 12:42:17 -04:00
Rodrigo Kumpera df46658fd1 [wasm] Unbreak the debugger and harden it against bad assemblies. (#11011)
* [wasm] Harden the debugger against invalid breakpoints.

This happens when you reload a page and the old BPs land in now invalid code regions.

* Add node support to library_mono.js

* [wasm] Correctly register pdb files.
2018-10-08 12:08:23 -04:00
Ludovic Henry 58228c24fa [sdks] Build Android SDKs archive in Debug configuration on master builds (#11007)
* [sdks] Build Android SDKs archive in Debug configuration on master builds

* [sdks] Drop `product-` prefix from Android and iOS SDKs CI_TAGS parameters
2018-10-08 11:46:52 -04:00
Zoltan Varga c7c89f2155 [llvm] Fix the loaded llvm build. (#11014) 2018-10-08 11:06:05 -04:00
Jay Krell b7c18caf0c Significant disambiguation between host and target. (#10969) 2018-10-08 10:38:35 -04:00
Jay Krell 58925baab1 [icalls] Change gboolean to MonoBoolean. (#11017) 2018-10-08 10:37:37 -04:00
Calvin Buckley 0d29dfb9dd Mitigation for spawn FD closing taking forever with a big FD limit (#10761)
* Mitigation for spawn FD closing taking forever with a big FD limit

On systems with a large file descriptor limit, Mono takes a very
long time to spawn a new process; with informal testing on the AIX
CI builder, (with a POWER7) it took ~30 minutes. This is obviously
very undesirable, but hand our is forced - libraries the user might
be calling could be creating non-CLOEXEC files we're unaware of. As
such, we started from the FD limit and worked our way down until we
hit stdio. Using APIs such as posix_spawn aren't desirable as we do
some fiddling with the child before we exec; and even then, closing
FDs with posix_spawn relies on non-standard file actions like
Solaris' addclosefrom not present on many systems. (All of this is
unnecessary on Windows, of course.)

This presents an alternative way (currently only implemented on AIX
but with notes how for other platforms) to try to close the child's
loose FDs before exec; by trying to get the highest number FD in
use, then work our way down. In the event we can't, we simply fall
back to the old logic.

See #6555 for a discussion and the initial problem being mitigated.

* Use an another strategy of closing only known to be open handles

...on FreeBSD and AIX.

Use the kinfo_getfiles library call on FreeBSD and only close what's
safe to close. On AIX, use the third and fourth arguments to getprocs
to check what's open. However, the array to get all the handles takes
1 MB, so allocate it on the heap; like what kinfo_getfiles does. We
don't need to free these as the child will exec or exit, which blows
it all away.

The previous strategy from previous commit is still used and on AIX,
enhanced.

* Add Linux strategy to fork FD close

Tested on WSL, shows benefits with big FD ulimit.
2018-10-08 08:31:29 -04:00
monojenkins a756fa0f4a [csproj] Update project files 2018-10-08 10:03:28 +02:00
Marek Safar cd5135022b Bump linker 2018-10-08 10:03:28 +02:00
Marek Safar 539b148920 [linker] Adds more tests 2018-10-08 10:03:28 +02:00
monojenkins e64d8aaa72 Bump API snapshot submodule 2018-10-08 10:02:16 +02:00
Marek Safar 6ca0889b3c [build] Fixes Mono.Cecil boostrap dependency 2018-10-08 10:02:16 +02:00
Marek Safar 0b003f9fa4 Bump cecil 2018-10-08 10:02:16 +02:00
Marek Safar 6070870c2d [build] Update XI facades to build against reference assemblies (#10980)
Clean up facades to build remaining ones in parallel
2018-10-07 16:37:41 -04:00
Ludovic Henry d319f72d0d [sdks] Fix wasm order-only dependency on .PHONY target (#11009) 2018-10-05 20:26:37 -04:00
Jay Krell 31c90d2817 [icalls] Replace gboolean and mono_bool by MonoBoolean. (#10948)
Though one of these is an enum, use gint32.

The enums MonoResolveTokenError and MonoProtocolType are also used in icalls, but that is left alone.
2018-10-05 21:33:06 +02:00
Jay Krell bf11fbd8d3 ifdef HAVE_ARRAY_ELEM_INIT is not actually guarding code that uses C99 array (#10996)
initialization, but rather code that is portable to C89 and C++98.

The alternative is also ok, just costs typically a pointer and a relocation per array element,
things most people wouldn't notice but was presumably the point here.
2018-10-05 21:20:16 +02:00
Alexander Köplinger 67390ef6f4 Bump corefx 2018-10-05 18:24:10 +02:00
Alexis Christoforides b8ccd4071f [corlib] Fixup for System.IO.MemoryStream CoreFX import 2018-10-05 10:49:14 -04:00
Ludovic Henry 0c776d5a9e Bump to llvm/release_60/117a508c (#10983) 2018-10-05 09:49:35 -04:00
Rodrigo Kumpera b42a6a83ad Merge pull request #10962 from kumpera/another_vtable_bug
[runtime] Properly inflate cmods of (m)var.
2018-10-05 09:26:50 -04:00
monojenkins 7d18d3d660 [bcl] Update BCL Linked Size 2018-10-05 09:39:25 +02:00
Ankit Jain 2fbfadbd9c Bump msbuild to track xplat-master (#10339) 2018-10-05 09:13:22 +02:00
Alexander Kyte 7d56ecc42c [crash] Make stub for rethrow_preserve_exception on aarch64 2018-10-05 02:04:59 -04:00
Alexander Kyte 7ca584cdc3 [crash] Fixup field name typo on untested arches (#10990) 2018-10-05 00:04:19 +02:00
Rodrigo Kumpera 84b6e89300 [aot] Add clangxx option to --aot (#10779)
* [aot] Add clangxx option to --aot that removes the hardcoded clang++ in our aot compiler.

* [mini] Make --aot addictive.

* Update CI script for bitcode.
2018-10-04 17:18:28 -04:00
Alexander Kyte dcdbf3aafc [runtime] Fix malformed string selection in exceptions-ppc.c (#10987) 2018-10-04 22:14:02 +02:00
Maxim Lipnin ab0099d393 Bump corert 2018-10-04 21:54:05 +02:00
Maxim Lipnin 90cc835df8 Bump corert 2018-10-04 21:54:05 +02:00
Maxim Lipnin 3d24f0ba99 Extract case for verifying several object array parameters to separate test method. 2018-10-04 21:54:05 +02:00
Maxim Lipnin bc4d1a18ed Add unit tests to verify custom attribute ctor with object array as parameter 2018-10-04 21:54:05 +02:00
Alexander Köplinger 8b90cefc79 Fix corefx submodule ref 2018-10-04 19:42:35 +02:00
monojenkins 3568d3648e [csproj] Update project files 2018-10-04 19:01:44 +02:00
monojenkins 0627919d75 Bump API snapshot submodule 2018-10-04 19:01:44 +02:00
Alexis Christoforides 83ad1cb3d8 [corlib] Import System.IO.MemoryStream from CoreFX 2018-10-04 19:01:44 +02:00
Rodrigo Kumpera 577ab741b2 Make a bunch of classes optional to the runtime. (#10804)
The makes the following classes optional to the runtime:

System.Reflection.CustomAttributeData
System.Text.StringBuilder
System.Math
System.Console
System.Diagnostics.StackTrace

Those are all types that can be clearly made optional. There are a lot of other types
we could, but there are deeper dependencies in places as threadpool or marshal.

* [runtime] Kill mono_defaults.console_class.

* [runtime] Kill mono_defaults.asyncresult_class. Doesn't help much as it's still needed by the TP.

* [runtime] Remove mono_defaults.stack_trace_class.

* [runtime] Remove dead field.

* [runtime] Remove mono_defaults.math_class

* [runtime] Cleanup handleref resolution to use the access macros.

* [runtime] Remove mono_defaults.stribuilder_class.

* [runtime] Remove System.Reflection.CustomAttributeData

* [corlib] Update linker description.

* [runtime] Fix compilation of the iOS SDK.
2018-10-04 18:21:40 +02:00
Alexander Köplinger d9fabd0501 [tests] Remove magic which prepends MonoTests to NUnit test selection (#10977)
When passing FIXTURE or TESTNAME to "make run-test" we automatically
prepended `MonoTests.` to the value since all of our NUnit tests
start with that to save you from typing a few chars.

Now that we have xUnit tests as well this is confusing since it doesn't
happen there. Better to remove it for consistency.
2018-10-04 17:05:25 +02:00
Alexander Köplinger 42e347ee47 [corlib] Simplify confusing "SSPI" error message and align with corefx (#10976)
Right now if anything goes wrong in the security stack you get a message like this:

```
System.Security.Authentication.AuthenticationException: A call to SSPI failed, see inner exception. ---> Mono.Btls.MonoBtlsException: Ssl error:1000007d:SSL routines:OPENSSL_internal:CERTIFICATE_VERIFY_FAILED
```

This is confusing since SSPI is a Windows-only thing and is not used on Mono.
We inherited this error message string from referencesource.

Change the string to something more generic which also aligns us with CoreFX:
https://github.com/dotnet/corefx/blob/a10890f4ffe0fadf090c922578ba0e606ebdd16c/src/System.Net.Security/src/Resources/Strings.resx#L210-L212
2018-10-04 17:04:58 +02:00
Alexander Köplinger b13145bb12 [ci] Always pass sha1 from Mac to Windows packaging build
Before we only did this for PR builds but it turns out it's needed for
normal master/branch builds too.

In situations where there are two Mac builds at roughly the same time
the downstream Windows builds would otherwise both refer to the same/latest
commit since they just checkout the latest ref on the branch.

Now we reset the Windows build to the sha1 which is passed to it.
2018-10-04 14:21:59 +02:00
Kenneth Pouncey a7f5952c69 [wasm][bindings] Add support for strongly typed marshalling of C# enums. (#10958)
* Add support for strongly typed marshalling of C# enums.

JavaScript does not have the concept of Enums like TypeScript.  Strings are used to represent enums.  This PR allows a strongly type contract between C# values and the string representations used by a lot of the JavaScript API's.

Example:

DOM InputElement type ->  https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#attr-type#Form_<input>_types

    The InputElement types are represented by strings.  button, checkbox, color, date, datetime-local etc....

     These string can be represented and marshalled back and forth by defining an enum as shown below with an `Export` data contract attribute.

```
    public enum InputElementType
    {
        [Export(EnumValue = ConvertEnum.ToLower)]
        Button,
        [Export(EnumValue = ConvertEnum.ToLower)]
        CheckBox,
        [Export(EnumValue = ConvertEnum.ToLower)]
        Color,
        [Export(EnumValue = ConvertEnum.ToLower)]
        Date,
        [Export("datetime-local")]
        DateTimeLocal,
   }

```

The enum conversion allows controlling the marshalling:

- Default - Marshals the enum name as is
- ToLower - Marshals the enum name to lower case string
- ToUpper - Marshals the enum name to upper case string
- Numeric - Marshals the enum numeric values.

Marshalling from C# to JavaScript using the SDK Bindings should be made as easy and pain free as possible.

Marshalling the string values from JavaScript to C# will need a little help.  The SDK Bindings Runtime provides a method to transport the string value to a strongly typed enum.

```
   WebAssembly.Runtime.EnumFromExportContract(typeof(InputElementType), inputElementType);
```

* Add marshalling of C# Enums to method calls.

* Add tests to bindings-test harness for testing marshalling of C# enum values.

* Modify test for marshalling enum value without Export contract.
2018-10-04 11:44:05 +02:00
monojenkins 385b8a2783 Merge pull request #10749 from lewurm/interp-fixes-for-native-type
[interp] fixes for native types

please look at single commits.

------------------------

[interp] fix op_implicit/op_explicit conversions for native types
    
Conversion operators have been mostly broken in the interpreter, for example conversion from nint to float didn't work. While some conversions are easy to intrinsify (like nint -> I8), there are harder cases like nint -> decimal. The JIT actually falls back to the managed implementation, so let's do this in the interpreter as well.
    
However the managed implementation expects a pointer to the value type, i.e. the container type System.nfloat instead of float/double primitives. In such cases the value is going to be stored in a local and then the address of its storage is pushed on the stack before invoking the managed implementation of the conversion.
    
Added test cases for scenarios observed in Xamarin.iOS.

-----------------------

[interp] support ntype.CompareTo ()

-----------------------

[interp] support ntype.Equals ()

-----------------------

 [interp] support nfloat.*Infinity

-----------------------

[interp] support ntype.ToString ()

-----------------------

The conversion issue creeped everywhere in Xamarin.iOS since it heavily relies on nint/nuint/nfloat. With this PR we are getting close to a green monotouch tests 😁 
<img width="874" alt="screen shot 2018-09-21 at 23 24 36" src="https://user-images.githubusercontent.com/75403/45907566-b457eb80-bdf8-11e8-9cc7-b8cf311dd269.png">

needs backporting to 2018-06 and 2018-08
2018-10-04 11:25:35 +02:00
HebaruSan 0c2543cecf Fix default colors for DataGridView (#10944)
* Fix default colors for DataGridView

* Update tests
2018-10-04 10:54:56 +02:00
Egor Bogatov 895bf51b0c Use Mono.Android as a reference for netstandard facade (#10849)
* bump external/binary-reference-assemblies

* use Mono.Android for netstandard

* use API_BIN_REFS

* move ifeq monodroid upper

* use Mono.Android in System.Drawing.Primitives instead of ns

* fix typo

* Add Mono.Android back to ns as API_BIN_REFS

* Bump API snapshot submodule

* [csproj] Update project files
2018-10-04 10:39:21 +02:00
monojenkins 8d8587f4bc [bcl] Update BCL Linked Size 2018-10-04 09:32:05 +02:00
Alexander Kyte 19fbbda478 Merge pull request #10468 from alexanderkyte/fix_stacktrace
[runtime] Fix stored exception throws
2018-10-04 03:31:30 -04:00
Alexander Kyte e46fa20466 [crash] Fix trampoline rethrows to set caught_in_unmanaged 2018-10-03 17:11:04 -04:00
Rodrigo Kumpera e32462ed7d [mini] Add regression test for #10834. 2018-10-03 13:35:59 -04:00
Rodrigo Kumpera ccaf6a86dc [metadata] Make type dup used by inflate_generic_type be cmod aware. Fixes #10834
We didn't include cmods when inflating var/mvar cuz we'd mono_metadata_type_dup' the inflated type
and not the (m)var MonoType.

The solution is to add a variant of mono_metadata_type_dup that takes the source of cmods to use.
2018-10-03 13:25:29 -04:00
Rodrigo Kumpera 517be3d557 [metadata] Improve --print-vtable when dealing with broken types or abstract methods. 2018-10-03 13:23:28 -04:00
Bernhard Urban 7c61df97a8 [interp] introduce float R4 stack type 2018-10-03 16:57:32 +02:00
Bernhard Urban bdae608a88 [interp] support ntype.ToString () 2018-10-03 16:56:59 +02:00
Bernhard Urban 5f41720a4d [interp] support nfloat.*Infinity 2018-10-03 16:56:58 +02:00
Bernhard Urban 4cccb0dda9 [interp] support ntype.Equals () 2018-10-03 16:56:58 +02:00
Bernhard Urban 6a759dbcd4 [interp] support ntype.CompareTo () 2018-10-03 16:56:58 +02:00
Bernhard Urban bffb1163df [interp] fix op_implicit/op_explicit conversions for native types
Conversion operators have been mostly broken in the interpreter, for
example conversion from nint to float didn't work. While some
conversions are easy to intrinsify (like nint -> I8), there are harder
cases like nint -> decimal. The JIT actually falls back to the managed
implementation, so let's do this in the interpreter as well.

However the managed implementation expects a pointer to the value type,
i.e. the container type System.nfloat instead of float/double primitives.
In such cases the value is going to be stored in a local and then the
address of its storage is pushed on the stack before invoking the
managed implementation of the conversion.

Added test cases for scenarios observed in Xamarin.iOS.
2018-10-03 16:56:58 +02:00
Vlad Brezae ffb4f021bf [interp] Avoid emitting some unnecessary opcodes (#10894) 2018-10-03 10:50:27 -04:00
Rolf Bjarne Kvinge 5501111e8a [sdks/ios] Build libMonoPosixHelper for device architectures, so that zlib-helper.o is created. (#10921)
xamarin-macios currently builds zlib-helper.o using mono's source code.

It would be preferrable to use a version built by mono, and since
zlib-helper.o is a byproduct of building libMonoPosixHelper, we need to build
libMonoPosixHelper (we already build it for simulator architectures), even
though we don't need/use libMonoPosixHelper itself.
2018-10-03 10:46:47 -04:00
monojenkins 0eea315727 Merge pull request #10672 from jaykrell/fault-addr-wasm.3
Get fault_addr in debugger stacks.

This time w/o breaking WebAssembly and w/ working on Mac.
2018-10-03 15:35:52 +02:00
Alexander Köplinger 6ad08fff9e [bcl] Put xunit tests in mcs/class/lib/PROFILE/tests too (#10928)
So they are next to their NUnit counterparts.

Move xunit remote executor app to tests dir too and compile it when
compiling the test assembly instead of doing it before running the test.

We need to use an absolute path for the xunit remote executor and it
needs to be in Windows format on Windows since we pass it as an env var
to the xunit tests.
2018-10-03 12:16:19 +02:00
Aleksey Kliger fbf43a4266 [linker] Bump to mono/linker@e6760e6f
Includes mono/linker@4dde7af5c8
to fix permissions of files created by OutputStep.

Fixes https://github.com/mono/mono/issues/10743
2018-10-03 10:27:51 +02:00
Maxim Lipnin 4905422666 [Reflection] Fix issue with finding types in module using an asterisk as filter criteria 2018-10-03 08:45:49 +02:00
Paul Hebble 7d52f0fb7e Paint ToolStrip background with ToolStrip.BackColor 2018-10-03 08:42:40 +02:00
monojenkins 82e573122a [csproj] Update project files 2018-10-03 08:38:19 +02:00
monojenkins dc42f1562f Bump API snapshot submodule 2018-10-03 08:38:19 +02:00
Marek Safar 6bcccccb82 [corlib] Control SRE using its own define 2018-10-03 08:38:19 +02:00
Marek Safar 4c20744e2a [corlib] Updates PNSE version of DynamicMethod to have matching APIs 2018-10-03 08:38:19 +02:00
Johan Lorensson c82567b6c9 Merge pull request #10646 from lateralusX/lateralusX/issue10508-diag
Fix scheduling problem related to thread-suspend-suspended and thread-suspend-selfsuspended.
2018-10-03 08:31:53 +02:00
monojenkins 8f9d781f8c [bcl] Update BCL Linked Size 2018-10-03 08:25:25 +02:00
Ludovic Henry def2d9e550 [sdks] Use make --output-sync=recurse on CI (#10939)
When building the SDKs on CI, the output is very scrambled. There are simultaneously outputs from making multiple runtimes, uncompressing some tar archives, cloning some repos, building various BCL profiles, etc. This makes it quite hard to easily understand what's going wrong when the build fails.

By using `--output-sync=recurse`, we make sure that even if many targets are executed in parallel, the output is still as if it was executed sequentially.
2018-10-02 23:42:05 -04:00
Ludovic Henry bc6d91e992 Update azure-pipelines.yml 2018-10-02 23:07:03 -04:00
Ludovic Henry cd3974f221 Update azure-pipelines.yml 2018-10-02 22:56:10 -04:00
Ludovic Henry d216896999 Update azure-pipelines.yml 2018-10-02 22:55:40 -04:00
Ludovic Henry 17ac875028 Update azure-pipelines.yml 2018-10-02 22:52:32 -04:00
Ludovic Henry 9072200e08 Update azure-pipelines.yml 2018-10-02 22:45:13 -04:00
Ludovic Henry f7c77c35f0 Update azure-pipelines.yml 2018-10-02 22:38:18 -04:00
miguel f824e73d2f [AzureDevOps] Move to Ubuntu 2018-10-02 22:36:53 -04:00
miguel 4f27bfe066 Update 2018-10-02 22:36:03 -04:00
Ludovic Henry 9e570bc053 Update azure-pipelines.yml 2018-10-02 22:34:16 -04:00
Ludovic Henry ee90fb094e Update azure-pipelines.yml 2018-10-02 22:25:26 -04:00
Miguel de Icaza 708af8c15e Set up CI with Azure Pipelines
Barebones script for the dev.azure.com/mono-project pipeline setup.
2018-10-02 22:20:59 -04:00
Aleksey Kliger (λgeek) c0d72ca8cb [w32handle] Add coop state transitions in mono_w32handle_lock_handles (#10910)
If another thread locked at least one of the other handles, and there is a
cooperative GC STW happening, this function will loop forever.

Add GC Safe transitions around the call to sleep to give this thread a chance
to suspend.

Fixes https://github.com/mono/mono/issues/10863
2018-10-03 00:03:49 +02:00
Vlad Brezae 84ec74a9f0 [runtime] Fix undefined pthread_main_np (#10930)
It is exported only when _DARWIN_C_SOURCE is defined.
2018-10-03 00:00:59 +02:00
Ludovic Henry 6dcc779e17 [sdks] Build llvm-llvm{,win}{32.64} on Linux on CI as well (#10937) 2018-10-02 16:53:02 -04:00
Martin Baulig f0921fd850 Use passwordless import in the X509Certificate(byte[]) constructor.
The `X509Certificate(byte[])` constructor should call `CertificateProvider.Import(byte[])`
to use the native apple implementation if possible.

Add temporary hack to `X509Certificate2(byte[])` to ensure that we always get an
`X509Certificate2Impl`.
2018-10-02 17:21:58 +02:00
Marek Safar 2b6eae3912 [linker] Reenable accidentally disabled test 2018-10-02 16:30:49 +02:00
Rodrigo Kumpera f399693f63 [metadata] Improve --print-vtable. 2018-10-02 10:24:08 -04:00
Rodrigo Kumpera 28dbdb4217 [metadata] Extract print_vtable_layout_result. 2018-10-02 10:24:03 -04:00
Rodrigo Kumpera 0919c6fd90 [metadata] print just the assembly name when dumping the vtable. 2018-10-02 10:23:59 -04:00
Ludovic Henry a67333b58f [sdks] Ensure LLVM is cloned before trying to download (#10913) 2018-10-02 08:53:24 -04:00
Maxim Lipnin f04b43a44d [Reflection] Fix the issue with ToString method in MonoCMethod type (#10901)
Fixes https://github.com/mono/mono/issues/10838.

The new behavior is similar to coreclr's one: https://github.com/dotnet/coreclr/blob/af4ec7c89d0192ad14392da04e8c097da8ec9e48/src/System.Private.CoreLib/src/System/Reflection/RuntimeConstructorInfo.cs#L145
2018-10-02 14:29:49 +02:00
Alexander Köplinger e9de4af4d4 [ci] Remove workaround for libtiff issue
We recently updated libtiff, let's see if this is still required
2018-10-02 13:31:09 +02:00
Jay Krell b07aab167f Restore typecheck to corlib version check, so that mixing
old integer with new string errors w/o crash.
2018-10-02 11:19:27 +02:00
Alexander Köplinger 634e726bdf [packaging] Remove installation of openssl via brew on macOS (#10874)
We're now using an msbuild version which uses .NET Core 2.x which no longer needs openssl.
2018-10-02 11:10:23 +02:00
Alexander Köplinger 6145ad25fc Merge pull request #10912 from akoeplinger/test-precompile
[mcs] Fix test compilation to use common target and refactor mono-symbolicate test building
2018-10-02 11:09:35 +02:00
monojenkins d31c926a74 [bcl] Update BCL Linked Size 2018-10-02 10:45:43 +02:00
Maxim Lipnin c22ac963e9 [System.Reflection] CoreFX import for TypeInfo type (#10871)
* [System.Reflection] CoreFX import for TypeInfo type

* Bump corefx

* Bump corefx

* Bump API snapshot submodule

* [csproj] Update project files
2018-10-02 10:35:43 +02:00
Kenneth Pouncey d02ecf72b6 [wasm] Update sample.cs usage and docs (#10847)
* Fix problem with HttpClientHandler not returning the response status text if available when there is an http error.

resolves: https://github.com/mono/mono/issues/10842

* Extend C# sample to include:

- Calling JavaScript functions from C#
- Calling C# functions from JavaScript.
- Referencing JavaScript objects
- Getting and Setting JavaScrip object properties.
- Invoking JavaScript object functions.
- Setting up the default HttpClientHandler
- Instantiating a default WasmHttpMessageHandler.
- Setting up HttpClient calls
- Parsing and testing the correct results returned from the HtppClient.
- Obtaining a byte array and string array from response.
- Obtaining a reference to a global script function defined in the .html file and calling it.
- Working with DOM objects using the SDK's WebAssembly.Bindings.dll

resolves: https://github.com/mono/mono/issues/7548

* Update sample usage docs
2018-10-02 10:33:04 +02:00
Jay Krell f246511f38 [cxx] Do not define C++ keywords: bool, inline, final, it can break things. (#10883)
* [cxx] Do not define C++ keywords: bool, inline, final, it can break things.

https://jenkins.mono-project.com/job/d/421/parsed_console/log.html

  C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\include\xkeycheck.h(250): fatal error C1189: #error:  The C++ Standard Library forbids macroizing keywords. Enable warning C4005 to find the forbidden macro. [d:\j\workspace\d\msvc\libmonoruntime.vcxproj]

* PR: Leave profiler defining C++ keywords (define bool char).
* PR: Restore libgc. (mainline removed the code in 2011).
2018-10-01 22:40:15 -07:00
Alexander Köplinger f782e36a80 [mcs] Fix test compilation to use common target
Add proper dependencies to the test support files where they were missing.
Compile test files using the standard "make test" target.
2018-10-02 02:08:07 +02:00
Alexander Köplinger a7d4c2a8b9 [mono-symbolicate] Refactor so test assets can be precompiled 2018-10-02 01:58:59 +02:00
Ludovic Henry 0aebe90cac [sdks] Create archive targets for pre-building on CI (#10882)
* [sdks] Remove redundant --enable-cxx

* [sdks] Shorten `-m32`/`-m64` parameters detection for runtimes

* [sdks] Build BCL profiles without configure flags

* [sdks] Add BclTemplate to build BCL profiles

This is to avoid building all the profiles in a single `sdks/out/bcl` directory which will be shared between android, ios and wasm.

* [sdks] Create archive targets for pre-building on CI

* [sdks] Use archive-{android,ios,wasm} on CI

* [sdks] Run archive-llvm-llvm{,win}{32,64} on CI
2018-10-01 17:43:46 -04:00
Vlad Brezae 9182bcccc3 [runtime] Disable stack guard for main thread on osx (#10899)
On macOS Mojave, it seems that changing the mapping of stack pages for main thread can lead to corruption bugs.

https://github.com/mono/mono/issues/10802
2018-10-01 16:37:16 -04:00
Alexander Kyte 52a9b776ea [runtime] Fix off by one with stacktrace rethrow 2018-10-01 14:23:48 -04:00
Jo Shields 6f8ca69401 Merge pull request #10898 from directhex/master
Bump version to 5.21.0
2018-10-01 12:05:05 -04:00
Jo Shields bb8a0ce8e7 Bump version to 5.21.0 2018-10-01 10:21:34 -04:00
lateralusX 51affb26bc Fix scheduling problem related to thread-suspend-suspended and thread-suspend-selfsuspended.
thread-suspend-suspended and thread-suspend-selfsuspended tests has showed long
execution times on low core Windows machines running wow64. It looks like an OS
related issue where ResumeThread Win32 API takes a lot longer time to complete
when running a test scenario like thread-suspend-suspended and this additional
time adds up over many iterations pushing it over to timeout. NOTE, the same behavior
has been identified running on .NET framework, so it's not a mono specific issue and
only reproduce under wow64 on low core machines (probably when one core is busy
just leaving us with one core for most of the test).

Since the purpose of the test is to run GC when t1 is suspended, doing this more
deterministic will fix the ResumeThread issue under wow64 on low core count as
well as making the tests more deterministic, always having t1 in a suspended state
when running GC (that will test the suspend suspended scenario).

Full investigation can be found in, https://github.com/mono/mono/issues/10508.
2018-10-01 16:15:10 +02:00
Alexis Christoforides acf812f519 [MacSDK] Update libtiff (#10879) 2018-10-01 13:01:13 +02:00
Alexander Köplinger a97309722a [bcl] Fix tarball build
TestResourceHelper.cs didn't get included in the tarball.
2018-10-01 12:48:54 +02:00
Zoltan Varga 8d85c905bf [bcl] Mark ActivationServices.CreateProxyForType () with 'remoting' in the linker descriptor. 2018-10-01 12:28:54 +02:00
Marek Safar f3fecf91fb [corlib] Cleans up few static ctors 2018-10-01 09:50:19 +02:00
Marek Safar d3f78f5308 [linker] Adds more reflection tests 2018-10-01 09:50:19 +02:00
Alexander Kyte 2e15fa255f [runtime] Add test for icall wrapper rethrowing and exception length 2018-09-30 23:26:10 -04:00
Alexander Kyte cd1a48ef26 [runtime] Fix stored exception throws
On cooperative suspend, the wrapper frames capture the exception
in a MonoError, which then must be thrown. The problem with treating
it as a CIL THROW opcode is that every time you THROW, you completely
reset the stacktrace's collectin of saved frames.

The RETHROW opcode will force the JIT to rely on an in-flight exception,
that in our case has been taken our of the in-flight context.

By relying on the new MONO_RETHROW, we will take an explicit exception
and put it back in-flight without clearing the stored stacktrace.
2018-09-30 23:26:09 -04:00
Alexander Kyte 2cee721190 [runtime] Add mono_rethrow opcode 2018-09-30 23:26:09 -04:00
Jay Krell 189906da8b Disable slow (failing?) test on ARM64 FullAOT pending investigation. (#10784) 2018-10-01 00:53:50 +02:00
Alexander Köplinger 7250eef8f6 Fix tarball build due to test dependency in Microsoft.Build.Tasks
We only generate that test dll when compiling the tests, not during a
normal build.
2018-09-29 00:33:25 +02:00
Alexander Köplinger 93c0b1ae57 [tests] Reenable bug-80392.2.exe (#10873)
It should be fixed by https://github.com/mono/mono/pull/10793.
2018-09-28 16:16:02 -04:00
Alexander Köplinger afb344c155 [System.Windows.Forms] Switch tests to use embedded test resources 2018-09-28 19:52:47 +02:00
Alexander Köplinger 2ed3c07822 Merge pull request #10862 from akoeplinger/bcl-tests-embedded-resources
Switch NUnit BCL tests to use embedded test resources instead of reading from the repo

Right now a lot of our tests expect to be able to read resources directly from the repository, e.g. `File.Open ("../../resources/some-file.txt")`

In order to run these tests in a standalone, clean environment without access to the source repo we need to change that. The most straightforward way to achieve that is to embed all the resources inside of the test assemblies and extract/read them from there during test execution time.

The new TestResourceHelper helper class extracts all embedded test resources to a temporary directory and cleans them up when the test runner process exits. This allows us to make relatively small changes to the tests as opposed to rewriting them all to read directly from the embedded resource stream (which isn't even possible in all cases).
2018-09-28 19:36:52 +02:00
Zoltan Varga 8d439e3f56 [runtime] Avoid warning about missing icalls in another place. (#10813) 2018-09-28 11:40:27 -04:00
Alexander Köplinger 55bc02ccee [System.Runtime.Serialization] Use response file for test resources args
Otherwise we hit "argument list too long" errors on Windows.
2018-09-28 14:58:40 +02:00
Alexander Köplinger 5efd509300 Don't run WebMatrix.Data tests on Windows
We don't have the sqlite3 library there.
2018-09-28 11:35:56 +02:00
Rodrigo Kumpera 23c4de0522 [wasm] Cross compile the AOT compiler for windows. (#10691)
* [wasm] Add wasm-cross-win.

* [wasm] Fix dependencies between make targets
2018-09-27 22:05:05 -04:00
Vlad Brezae d887ca281f [coop] Fix deadlock when unwinding (#10793)
At the moment of a safepoint, the runtime can be holding the loader lock. Fixes gsharing-valuetype-layout.exe timeouts.
2018-09-27 22:04:21 -04:00
Alexander Kyte a7d355dd72 [merp] Fix return value handling of posix_spawn (#10823) 2018-09-27 22:00:55 -04:00
Marek Habersack 8fe211b4ce [sdks] One more update to get XA PR builds working on Linux (#10853)
It turns out some Debian versions identify themselves as `Debian GNU/Linux`, add
this string to the list of distributions which have mingw. This *should* fix the
PR builds (fingers crossed)
2018-09-27 21:30:40 -04:00
Alexander Köplinger f091139c56 Remove EXTRA_FILES from iOS SDKs
They are no longer needed now that all the test resources are embedded.
2018-09-28 01:23:52 +02:00
Alexander Köplinger 5c528fcaa2 [WebMatrix.Data] Switch tests to use embedded test resources 2018-09-27 22:47:59 +02:00
Alexander Köplinger 0d7aa4ff4c [Microsoft.Build.Utilities] Fix tests to not rely on repository sources 2018-09-27 22:47:58 +02:00
Alexander Köplinger e04abd912b [Microsoft.Build.Tasks] Switch tests to use embedded test resources 2018-09-27 22:47:56 +02:00
Alexander Köplinger c608757c0d [Microsoft.Build.Framework] Delete no longer used test resources 2018-09-27 22:47:55 +02:00
Alexander Köplinger c11189fa1a [Microsoft.Build.Engine] Switch tests to use embedded test resources 2018-09-27 22:47:53 +02:00
Alexander Köplinger 70a8bf5532 [Microsoft.Build] Switch tests to use embedded test resources
Also moved some xbuild test data to mcs/class/lib/net_4_x/tests/xbuild
2018-09-27 22:47:52 +02:00
Alexander Köplinger 1f3ab29158 [Commons.Xml.Relaxng] Switch tests to use embedded test resources 2018-09-27 22:47:18 +02:00
Alexander Köplinger 85c8db4edb [I18N] Switch tests to use embedded test resources 2018-09-27 22:47:16 +02:00
Alexander Köplinger 3d910b7477 [System.XML] Switch tests to use embedded test resources 2018-09-27 22:47:14 +02:00
Alexander Köplinger ebfcbad232 [System.Xaml] Switch tests to use embedded test resources 2018-09-27 22:47:13 +02:00
Alexander Köplinger bf6bc36b2e [System.Web.Services] Switch tests to use embedded test resources 2018-09-27 22:47:11 +02:00
Alexander Köplinger ca1455d58b [System.Web] Switch CacheItemPriorityQueueTest to use embedded test resources 2018-09-27 22:47:10 +02:00
Alexander Köplinger 960afe9e9c [System.ServiceModel.Web] Switch tests to use embedded test resources 2018-09-27 22:47:08 +02:00
Alexander Köplinger 5f5676ae50 [System.ServiceModel] Switch tests to use embedded test resources 2018-09-27 22:47:07 +02:00
Alexander Köplinger 01f56e7d4e [System.Security] Switch tests to use embedded test resources 2018-09-27 22:47:05 +02:00
Alexander Köplinger 8ce85205d9 [System.Runtime.Serialization] Switch tests to use embedded test resources 2018-09-27 22:47:04 +02:00
Alexander Köplinger bd687b1b5b [System.IO.Compression.FileSystem] Switch tests to use embedded test resources 2018-09-27 22:47:02 +02:00
Alexander Köplinger fcaee1689b [System.IO.Compression] Switch tests to use embedded test resources 2018-09-27 22:47:00 +02:00
Alexander Köplinger f21b2956e7 [System.IdentityModel] Switch tests to use embedded test resources 2018-09-27 22:46:58 +02:00
Alexander Köplinger 3b40965d0a [System.Drawing] Switch tests to use embedded test resources 2018-09-27 22:46:56 +02:00
Alexander Köplinger 3d08cc7e23 [System.Data.DataSetExtensions] Switch tests to use embedded test resources 2018-09-27 22:46:55 +02:00
Alexander Köplinger 662524f2e1 [System.Data] Switch tests to use embedded test resources 2018-09-27 22:46:53 +02:00
Alexander Köplinger 8da092621f [System] Switch tests to use embedded test resources 2018-09-27 22:46:52 +02:00
Alexander Köplinger 233d44227b [corlib] Switch tests to use embedded test resources 2018-09-27 22:46:50 +02:00
Alexander Köplinger 23b1249cc4 [bcl] Fix nunitlite app.config file custom logic for tests
Makes it possible to precompute these config without actually running the tests.

Allows System.Configuration tests to use a different file.
2018-09-27 22:46:49 +02:00
Jay Krell 1f3f35d2d9 Restore sqrtf/-lm accidentally deleted in https://github.com/mono/mono/commit/4259352d3a7d4b8d6b9980c4e2da844957710609 (#10785) 2018-09-27 13:15:18 -07:00
Alexander Köplinger a2bb00f75e [bcl] Add a helper for extracting all embedded test resources in an assembly 2018-09-27 21:36:19 +02:00
Alexander Köplinger f2451980a2 [tests] Disable bug-80392.2.exe and monitor-wait-abort.exe on OSX (#10846)
They frequently fail, see https://github.com/mono/mono/issues/10845
2018-09-27 15:17:07 +02:00
Marek Safar 0302d9d152 [System.Core] Removes no longer needed reference (#10827)
* [System.Core] Removes no longer needed reference

* [csproj] Update project files
2018-09-27 12:10:27 +02:00
Maxim Lipnin b0fa87ff92 [System.Reflection] CoreFX import for EventInfo type. (#10770)
Part of #9660.

The changes:
- included corefx version of EventInfo type;
- included related xunit tests from corefx System.Reflection;
- made System.Reflection/EventInfo.cs partial and left some Mono-specific stuff only there.

Some changes will be done in corefx part.
2018-09-27 12:08:32 +02:00
Johan Lorensson dbca1d90f5 Fix parameter problem in test_op_il_seq_point.sh (#10790)
Look like:

https://github.com/mono/mono/commit/e8029e1474b701184840f6e0abea51966d048831

caused issues in the parameters for this test since caller was not updated
accordingly.

This fixes so that the caller pass needed additional argument + simplify the
AOT use case for Windows since different tested versions will need different
toolchain versions that in turn will cause additional complexity. Since the
test doesn't validate the compile/link of AOT module (and don't handle errors)
anyways, Windows versions of this test will just generate assembler output.
2018-09-27 10:15:35 +02:00
Marek Habersack 757a45bcf9 [sdks] Debian Linux doesn't need to build MXE
Debian and its derivatives include full mingw chain (both 64 and 32-bit) and so
they don't need to build the toolchain at all. However, the current detection of
Linux flavor takes into account only Ubuntu and all other distros are configured
to *require* MXE but they do *not* build them.

This commit fixes detection of distros which provide the mingw toolchain in a
way that makes it easy to extend the set of compatible distributions as needed.
In order to mark a distribution as one with MinGW one has to add the `:Distro:`
string to the `LINUX_WITH_MINGW` make variable in `mxe.mk`. The `Distro` string
is whatever the `determine-linux-flavor.sh` script returns.
2018-09-27 09:19:30 +02:00
Jay Krell a242681d04 Assume C99 signbit is always present, and link to it via C like the rest of mono-math.h. (#10830)
MONO_API here was dubious, as all systems have it, except Visual C++ was configured away.

In Visual C++, it is in ucrt, so present in 2015 also.

More information in nearby comments.
2018-09-26 23:17:28 -07:00
Ludovic Henry d966213225 [sdks] Add download/pack capabilities for LLVM (#10806) 2018-09-26 20:13:39 -04:00
monojenkins 8c1acd45ca [csproj] Update project files 2018-09-26 11:49:51 +02:00
Maxim Lipnin 7c10d643f1 [Systen.Reflection] CoreFX import for RuntimeReflectionExtensions 2018-09-26 11:49:51 +02:00
Alexis Christoforides 3b8f0a9217 Disable some flaky tests
https://github.com/mono/mono/issues/8997
2018-09-26 11:46:51 +02:00
Jay Krell 4259352d3a [cxx] Rework C++ linkage to C99 trunc, isnan, isinf, etc. and some cleanup. (#10764)
This PR cleanups C++SDKs support and gets them all passing for the first time, esp. Android (WebAssembly already was, iOS uncertain before, green here).

* Current Visual C++ has signbit.

* Rework C++ linkage to C99 math-- trunc, isnan, isinf, etc.
Go through mono wrappers that are compiled as C.

Remove support for Visual C++ pre-2015 and non-C99 Solaris.
(Solaris has plenty of other problems compiling.)

Cleanup Windows ssize_t support.

* Remove trunc and aintl autoconfigury.
Use trunc unconditionally. (aintl is a Solaris near equivalent to trunc).

* Replace dis_isnan with mono_isnan.

* Interpreter already assumes presence of isinf and isfinite, so everywhere else might as well too.
A fair amount of cleanup therefore -- autoconf, ifdef, etc.

If this changes back, the mono_isinf, etc. wrappers are likely, but not necessarily, where to handle it for everyone, not sprinkling ifdefs and alternate implementations around -- assuming all users want the same fallback.

As well, we might want to import some good BSD libc versions of all these if there is any remaining question of portability. *Everyone* except old VAX and Cray have always used the same 32bit float and 64bit double representations since circa 1985 so these are all probably about one line of portable C89/C++98 each, maybe with endian sensitivity.
2018-09-26 05:45:59 -04:00
Zoltan Varga 352639f75a [wasm] AOT fixes (#10706)
* [wasm] Fix linker changes.

* Revert "[wasm] Enable the mini test suite under AOT. (#10670)"

This reverts commit 9cb832ff2a.

Revert this, it doesn't work yet.

* [wasm] Run AOT tests on CI.

* Fix the CI label.

* [wasm] Disable the aot test on CI, it doesn't yet run on linux.

* [wasm] Fix the computation of code_start/code_end for wasm.

* [llvm] Avoid passing a dummy extra args to wrappers which don't need it.

* [wasm] Enable gshared.

* [llvm] Fix the build.

* [llvm] Avoid passing a dummy arg to string:memcpy/bzero.

* [wasm] Enable exception catching.

* [wasm] Enable explicit division by zero checks.

* [wasm] Patch emscripten with the patch from https://github.com/kripken/emscripten/pull/7182.

* [wasm] Use '.' instead of source in the ninja build scripts since they might be ran with sh/dash instead of bash.

* [wasm] Reenable check-aot on CI.

* [wasm] Run emcc using bash -c since the emsdk_env.sh scripts contains bash-ishms.

* [wasm] Don't error out if the emscripten patch is already applied.

* [wasm] Fix do-aot-sample.

* [wasm] Disable AOT test on CI, it still doesn't work.

* [llvm] Add support for OP_RCNEQ.

* [jit] Make some tests in builtin-types.cs static.

* [wasm] Fix the return value of mono_wasm_exec_regression ().

* [wasm] Make aot-sample uses mini_tests.dll.
2018-09-26 11:29:00 +02:00
Jay Krell 7e4159b568 [Coop] Mostly convert appdomain.c. (#10733)
* [Coop] Mostly convert appdomain.c.

* Mostly don't convert mono_domain_try_unload at this time -- it was causing failures and maybe the domain swapping needs to be considered carefully with handles.

* Also a few assignments to non-local raw pointers remain, and should probably be suppressed.

See https://jenkins.mono-project.com/view/All/job/test-mono-mainline-staticanalysis-and-code-coverage/Centrinel_Report/

appdomain.c has 34 warnings. This should drop it significantly.
2018-09-25 13:45:34 -04:00
Zoltan Varga 1f6b73891e [runtime] Avoid warning about missing icalls when AOTing. Move mono_lookup_internal_call_full () to icall-internals.h (#10760)
since its not a public api function.

Fixes https://github.com/mono/mono/issues/10598.
2018-09-25 12:54:48 -04:00
Zoltan Varga f07faee174 [sdks] Add a 64 bit arm32 cross compiler build. (#10778) 2018-09-25 12:53:54 -04:00
Marek Safar addbed40a5 [corlib] Increases test timeout (#10792) 2018-09-25 12:50:58 -04:00
Rodrigo Kumpera 3e8761e5aa [wasm] Add --regression suppport for wasm. (#10740)
* [runtime] Allow strings when doing alloc-less cattr decoding.

* [runtime] Remove dead define.

* [wasm] Disable broken method under wasm.

* [wasm] Add mono_exec_regression to use mini's regression driver and make it work with WASM interp&AOT.

* [wasm] Remove dead targets. Packager is used for all test suites now.

* [wasm] Cleanup csc flags.

* [wasm] Move aot-sample to use mini_tests_basic again.

* [wasm] We no longer need to exclude FULLAOT from the test suite.

* [wasm] Expose mono_wasm_exec_regression.

* [wasm] Remove dead test driver.

* [wasm] Fix the provisioning step.

* [wasm] Bindings don't link well with the aot sample.

* [wasm] Update the test driver to include --regression support.

* [wasm] Change how regression tests are executed so we exec over aborts.

* [wasm] Appease the C++ typechecker.

* [wasm] Add more casting to make c++ happy.
2018-09-25 18:12:59 +02:00
FrozenShade666 ca0eaf0828 [WinForms] Fix bug with multiline TextBox which contains /t characters in the middle of text. (#10348)
There is wrong cursor placement after the \t character. Example:

textBox1.Multiline = true;
textBox1.Text = "aa\taa\r\nbb\tbb\r\n";
Point pt = textBox1.GetPositionFromCharIndex(4); //pt.X is wrong for index 4 or any other char after \t in the line.
2018-09-25 16:40:56 +02:00
Alexander Köplinger a90249fba1 Bump nunitlite to get xunit xml output format reporter (#10788)
* Bump nunitlite to get xunit xml output format reporter

* [csproj] Update project files
2018-09-25 15:26:01 +02:00
Alexander Köplinger 8a825b4fc6 [runtime-tests] Add xunit xml output option to test-runner.exe (#10789)
The default behavior is still to produce an NUnit xml file but we can
now produce xunit format too with the --xunit option.

Slightly refactored the xml reporting into distinct methods for NUnit/xunit.
2018-09-25 15:17:54 +02:00
Alexander Köplinger fe590b4eb0 [mcs] Add option to specify reference directory to compiler-tester (#10787)
We can use this to pass a directory the tests can use for -r or -lib.

Also fix cs1703-2.cs to not rely on binary outside repo during test.
2018-09-25 14:56:15 +02:00
Katelyn Gadd 22d5a4d552 Update roslyn automated tests (#10781)
Roslyn submodule was updated to enable more automated tests. This bumps our submodule revision, and uses roslyn's script to run tests instead of ours.

@monojenkins skip

Part of #6991
2018-09-25 13:13:28 +02:00
Alexander Köplinger 2e31adbbc8 [mcs] Add xUnit xml output option to compiler-tester (#10777)
Test result output in xUnit format can be produced by passing -resultXml to compiler-tester
2018-09-25 13:05:07 +02:00
EgorBo 1f7b49585b Add System.Runtime.InteropServices tests 2018-09-25 10:58:51 +02:00
Maxim Lipnin c63d2704b5 [System.Reflection] Include corefx unit tests from System.Reflection 2018-09-25 10:44:56 +02:00
Jay Krell b7487f8ca8 Remove hacks.h. Mostly it is unused. (#10766)
Remove hacks.h.
2018-09-24 14:48:31 -04:00
Alexander Kyte c2f2d991bd Merge pull request #10287 from alexanderkyte/nunit_telemetry
[runtime] Add standardized disk dumper for mono crashes
2018-09-24 12:32:42 -04:00
Jay Krell 06d6c4c3b3 [ci][cxx][sdks] C++ support for SDKs. (#10701)
* [ci][cxx][sdks] C++ support for SDKs.

* Remove cplusplus support, only cxx.

* [cxx][sdks] Provide isinf and isnan.
https://jenkins.mono-project.com/job/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/1/parsed_console/log.html

/Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/mono/mini/jit-icalls.c:994:14: error: 'isinf' was not declared in this scope
  if (isinf (v) || isnan (v))

/Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/mono/mini/jit-icalls.c:994:27: error: 'isnan' was not declared in this scope
  if (isinf (v) || isnan (v))

* Change target card mask from gpointer to mgreg_t.
Consider in future target_gsize instead, though if registers are larger than pointers (x32, arm64_32), ok.

Change inst_imm from mgreg_t to target_mgreg_t.

https://jenkins.mono-project.com/job/test-mono-pull-request-wasm-cxx/1/parsed_console/log.html

/mnt/jenkins/workspace/test-mono-pull-request-wasm-cxx/mono/mini/mini-runtime.c:3657:24: error: cast from 'gpointer {aka void*}' to 'mgreg_t {aka int}' loses precision [-fpermissive]
   g_assert ((((mgreg_t)arg) & 1) == 0);
                        ^                                            ^~~~
/mnt/jenkins/workspace/test-mono-pull-request-wasm-cxx/mono/mini/mini-runtime.c:3658:30: error: cast from 'gpointer {aka void*}' to 'mgreg_t {aka int}' loses precision [-fpermissive]
   arg = (gpointer)(((mgreg_t)arg) | 1);

In file included from /mnt/jenkins/workspace/test-mono-pull-request-wasm-cxx/mono/mini/method-to-ir.c:75:0:
/mnt/jenkins/workspace/test-mono-pull-request-wasm-cxx/mono/mini/method-to-ir.c: In function 'void mini_emit_write_barrier(MonoCompile*, MonoInst*, MonoInst*)':
/mnt/jenkins/workspace/test-mono-pull-request-wasm-cxx/mono/mini/ir-emit.h:703:39: error: cast from 'gpointer {aka void*}' to 'mgreg_t {aka int}' loses precision [-fpermissive]
         inst->inst_imm = (mgreg_t)(imm);  \
                                       ^
/mnt/jenkins/workspace/test-mono-pull-request-wasm-cxx/mono/mini/method-to-ir.c:2989:4: note: in expansion of macro 'MONO_EMIT_NEW_BIALU_IMM'
    MONO_EMIT_NEW_BIALU_IMM (cfg, OP_PAND_IMM, offset_reg, offset_reg, card_table_mask);
    ^~~~~~~~~~~~~~~~~~~~~~~

* [cxx][sdks] Move include out of extern "C" where it never belongs.

https://jenkins.mono-project.com/job/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/4/parsed_console/log.html

  template<typename _Tp, typename _Up, typename _Vp,
   ^
/Users/builder/android-toolchain/mxe-b9cbb53/lib/gcc/x86_64-w64-mingw32.static/5.4.0/include/c++/ext/type_traits.h:205:3: error: template with C linkage
   template<typename _Tp, typename _Up, typename _Vp, typename _Wp,
   ^
In file included from /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/mono/utils/mono-compiler.h:31:0,
                 from /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/mono/utils/dlmalloc.h:33,
                 from /Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/mono/utils/dlmalloc.c:27:
/Users/builder/android-toolchain/mxe-b9cbb53/lib/gcc/x86_64-w64-mingw32.static/5.4.0/include/c++/cmath: In function 'constexpr float std::abs(float)':
/Users/builder/android-toolchain/mxe-b9cbb53/lib/gcc/x86_64-w64-mingw32.static/5.4.0/include/c++/cmath:87:16: error: conflicting declaration of C function 'constexpr float std::abs(float)'
   abs(float __x)

* Expand cmath to wasm.

https://jenkins.mono-project.com/job/test-mono-pull-request-wasm-cxx/5/parsed_console/log.html

/mnt/jenkins/workspace/test-mono-pull-request-wasm-cxx/mono/mini/mini-llvm.c:4189:6: error: 'isnan' was not declared in this scope
  if (isnan (val))
      ^~~~~

* Provide cmath std::isnan for WebAssembly C++.

* Provide cmath std::isfinite for Android C++.

* Add cmath std::isunordered for Android

/Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/mono/mini/interp/interp.c:3282:14: error: use of undeclared identifier 'isunordered'; did you mean 'std::isunordered'?
                        CONDBR_S(!isunordered (sp [0].data.f, sp [1].data.f) && sp[0].data.f <= sp[1].data.f)
                                  ^~~~~~~~~~~
                                  std::isunordered

* Add cmath std::isinf for Android.

https://jenkins.mono-project.com/job/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/10/parsed_console/log.html

/Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/mono/mini/interp/interp.c:3751:8: error: use of undeclared identifier 'isinf'
                        if (isinf (sp [-1].data.f))

* "using std::isinf" sometimes breaks on Android, sometimes fixes Android,
because Android sometimes has global isinf.

/Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-android-cxx/mono/mini/interp/interp.c:92:12: error: target of using declaration conflicts with declaration already in scope
using std::isinf;
           ^
/Users/builder/android-toolchain/toolchains/arm64-v8a-clang/bin/../lib/gcc/aarch64-linux-android/4.9.x/../../../../include/c++/4.9.x/cmath:604:3: note: target of using declaration
  isinf(double __x)
  ^
/Users/builder/android-toolchain/toolchains/arm64-v8a-clang/bin/../sysroot/usr/include/math.h:234:6: note: conflicting declaration
int     (isinf)(double) __pure2;

There are still some errors in new lanes (WebAssembly works, Android does not, iOS not sure), to be addressed shortly, possibly by redoing some of the cmath stuff.
2018-09-23 23:18:23 -04:00
Jay Krell 3f63bad14e [w32handle] Fix duplicated handles for WaitAny and WaitAll (#9114)
* mono_w32handle_wait_multiple: Duplication is ok for WaitAny, exception for WaitAll.
Fixes https://github.com/mono/mono/issues/9089

* Duplicate detection in mono_win32_wait_for_multiple_objects_ex, like mono_w32handle_wait_multiple.

* Move wait duplicate tests from mono/tests to mcs/class/corlib/Test/System.Threading/WaitHandleTest.cs.

Run them with e.g.:

`PATH="/s/mono2/runtime/_tmpinst/bin:/Users/jay/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/share/dotnet:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin:/Users/jay/bin" MONO_REGISTRY_PATH="/Users/jay/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" DBG_RUNTIME_ARGS="" MONO_PATH="./../../class/lib/net_4_x-macos/:./../../class/lib/net_4_x-macos//tests:./../../../external/xunit-binaries:.:$MONO_PATH" /s/mono2/runtime/mono-wrapper --debug    ./../../class/lib/net_4_x-macos/nunit-lite-console.exe  ./../../class/lib/net_4_x/tests/net_4_x_corlib_test.dll    -exclude=NotOnMac,MacNotWorking,NotWorking,CAS  -format:nunit2 -result:TestResult-net_4_x.xml -test:MonoTests.System.Threading.WaitHandleTest.DuplicateWaitAll`

`PATH="/s/mono2/runtime/_tmpinst/bin:/Users/jay/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/share/dotnet:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin:/Users/jay/bin" MONO_REGISTRY_PATH="/Users/jay/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" DBG_RUNTIME_ARGS="" MONO_PATH="./../../class/lib/net_4_x-macos/:./../../class/lib/net_4_x-macos//tests:./../../../external/xunit-binaries:.:$MONO_PATH" /s/mono2/runtime/mono-wrapper --debug    ./../../class/lib/net_4_x-macos/nunit-lite-console.exe  ./../../class/lib/net_4_x/tests/net_4_x_corlib_test.dll    -exclude=NotOnMac,MacNotWorking,NotWorking,CAS  -format:nunit2 -result:TestResult-net_4_x.xml -test:MonoTests.System.Threading.WaitHandleTest.DuplicateWaitAny`

Find the full names with:

`PATH="/s/mono2/runtime/_tmpinst/bin:/Users/jay/.cargo/bin:/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/Applications/VMware Fusion.app/Contents/Public:/usr/local/share/dotnet:/opt/X11/bin:/Library/Frameworks/Mono.framework/Versions/Current/Commands:/Applications/Xamarin Workbooks.app/Contents/SharedSupport/path-bin:/Users/jay/bin" MONO_REGISTRY_PATH="/Users/jay/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" DBG_RUNTIME_ARGS="" MONO_PATH="./../../class/lib/net_4_x-macos/:./../../class/lib/net_4_x-macos//tests:./../../../external/xunit-binaries:.:$MONO_PATH" /s/mono2/runtime/mono-wrapper --debug    ./../../class/lib/net_4_x-macos/nunit-lite-console.exe  ./../../class/lib/net_4_x/tests/net_4_x_corlib_test.dll    -exclude=NotOnMac,MacNotWorking,NotWorking,CAS  -format:nunit2 -result:TestResult-net_4_x.xml -explore`

and look at the resulting .xml file.

I ran them w/ and w/o the fix, verify they both failed w/o and passed w/.
(w/o the fix was a slight hack of the fix)

* Move null checks so other uses can still null dereference.

* Short circuit duplicate search, correct either way.

* Fix windows build -- missing include.

* Add MonoError to mono_win32_wait_for_multiple_objects_ex, probably did this earlier but lost it somewhere in git.

* Add missing include.

* Follow shorter convention of rest of directory.

* Make the code slightly more complicated per PR.

* PR: Split into small used-once functions.

* cleanup

* add static

* PR: sizeof (array [0]) vs. sizeof (type)
2018-09-22 15:40:12 -07:00
Zoltan Varga fdad617285 [llvm] Remove an incorrect assert. (#10750) 2018-09-22 12:06:14 -04:00
Jay Krell 6e14e1899d Fix iOS SDK regression due to empty library. (#10754)
https://jenkins.mono-project.com/job/test-mono-pull-request-amd64-osx-products-sdks-ios/4837/parsed_console/log.html

ld: warning: -undefined dynamic_lookup is deprecated on tvOS
ar: no archive members specified
usage:  ar -d [-TLsv] archive file ...
    ar -m [-TLsv] archive file ...
    ar -m [-abiTLsv] position archive file ...
    ar -p [-TLsv] archive [file ...]
    ar -q [-cTLsv] archive file ...
    ar -r [-cuTLsv] archive file ...
    ar -r [-abciuTLsv] position archive file ...
    ar -t [-TLsv] archive [file ...]
    ar -x [-ouTLsv] archive [file ...]
make[5]: *** [libmono-system-net-security-native.la] Error 1
2018-09-22 11:55:34 -04:00
Jay Krell 3e74629d11 [Coop] Convert or partially convert mono_domain_try_type_resolve_typebuilder, mono_domain_try_type_resolve, mono_domain_try_type_resolve_name. (#10675)
* Convert or partially convert mono_domain_try_type_resolve_typebuilder, mono_domain_try_type_resolve, mono_domain_try_type_resolve_name.

In order to use TYPED_HANDLE_DECL, this required splitting handle.h into at least two pieces,
here called handle-decl.h and handle.h.

A fair amount of early returns had to be converted.

* PR: Move mono_domain_try_type_resolve_name from domain-internals.h to reflection-internals.h.
Move mono_domain_try_type_resolve_typebuilder ditto.
Move ves_icall_TypeBuilder_create_runtime_class from object-internals.h to reflection-internals.h.
Move TYPED_HANDLE_DECL (MonoReflectionAssembly) from handle-0.h to reflection-internals.h (previously object-internals.h)
Move TYPED_HANDLE_DECL (MonoReflectionTypeBuilder) ditto.

Add MONO_HANDLE_BOOL to handle.h so we can 1. Stop inverting tests and 2. Prefer
	true first in ternary.
	x = MONO_HANDLE_BOOL (y) ? z : 0
	instead of
	x = MONO_HANDLE_IS_NULL (y) ? 0 : z

Add include "reflection-internals.h" to mono-security.c
Add include "reflection-internals.h" to security.h

object-forward.h:
	Place MONO_RT_MANAGED_ATTR on MonoReflectionTypeBuilder.
		Really it should just be MonoObject, and then implied
		by everything that contains it.
	Place MONO_RT_MANAGED_ATTR consistently.
	Sort by native then managed.

mono_reflection_get_type_with_rootimage: Rename assembly to refection_assembly
and then use assembly to reduce occurences of MONO_HANDLE_GETVAL (assembly, assembly).

mono-security.c: include config.h unconditionally and just once.

* Change mono_class_get_ref_info_raw to return MonoReflectionTypeBuilder* instead of MonoObject*.
Remove casts on mono_class_get_ref_info_raw calls.

Change mono_class_get_ref_info to return MonoReflectionTypeBuilderHandle instead of MonoObjectHandle.

Move mono_class_get_ref_info from object-internals.h to reflection-internals.h.

Use mono_class_get_ref_info instead of mono_class_get_ref_info_raw.

* Cleanup -- MONO_HANDLE_BOOL and contains instead of cast.

* PR: Fix incorrect comment. Fix precise GC hole wrt invoke.
2018-09-21 16:20:48 -07:00
Ludovic Henry 5cb2ef2cc0 [sdks] Fix llvm-llvm32 build (#10611)
* [sdks] Fix llvm-llvm32 build

* [wasm] Make sure we compile wasm-cross as 32bits
2018-09-21 15:29:56 -04:00
Ludovic Henry 16dec74ede [sdks] Run Android tests on CI (#10577)
It's assuming a device or emulator is already attached or running. On our CI, a new emulator is automatically started at the beginning of the job and shutdown at the end of it.
2018-09-21 14:57:31 -04:00
Marek Habersack 4a2c6c26de [SDKS] Build host runtime with correct bitness (#10711)
When building 32-bit binaries on a 64-bit system and vice versa, it is necessary
to pass the `-m32` or `-m64` compiler flags, respectively. Failure to do so will
result not only in linking problems (different binary architecture) but also in
problems when using some system headers which are sensitive to the architecture.
For instance, `ucontext.h` contains register set definitions for different
architectures and building Mono runtime with a 64-bit compiler targetting 32-bit
architecture results in this error:

   .../mono/mono/utils/mono-sigcontext.h:173:74: error: ‘REG_EIP’ undeclared (first use in this function); did you mean ‘REG_RIP’?
      #define UCONTEXT_REG_EIP(ctx) (((ucontext_t*)(ctx))->uc_mcontext.gregs [REG_EIP])

The issue here is that the compiler defines the `__x86_64__` macro which causes
`ucontext.h` to choose declarations for amd64 (which does not use `REG_EIP` but
has `REG_RIP` instead) while Mono runtime assumes its building for a 32-bit host
and uses 32-bit register names. Passing `-m32` to the compiler will fix the
issue as now the compiler will define the `__i386__` macro and all parties will
agree where they are and what they want.

This commit uses a rather baroque statement when constructing compiler flags to
build the Mono runtime to check whether the host triple targets 32 or 64-bit
host and adds the appropriate flag.
2018-09-21 14:26:33 -04:00
Alexander Kyte 70c2a07a76 [crash] Fix summarize_frame assertion (#10723) 2018-09-21 10:34:15 -04:00
Kenneth Pouncey 87e56c36b9 Add nuspec for generating the WebAssembly Framework NuGet package. (#10712) 2018-09-21 09:03:11 -04:00
Marek Safar ff1dab57b0 [corlib] Makes remoting test more robust (and disable it on mobile) 2018-09-21 13:24:40 +02:00
monojenkins 3aff9473f4 [csproj] Update project files 2018-09-21 11:23:27 +02:00
Marek Safar 96af472795 [bcl] Removes Mono.CSharp from most mobile profiles
It's no longer needed as a dependency of Microsoft.CSharp and it has
no stable API
2018-09-21 11:23:27 +02:00
Martin Baulig b31eec8c1e [System]: Make sure HttpWebRequest observes exceptions on timeout. #10488. (#10595)
* [System]: Make sure `HttpWebRequest` observes exceptions on timeout. #10488.

`HttpWebRequest.RunWithTimeoutWorker()` needs to observe the worker task's exception
on timeout to prevent it from being thrown via the `TaskScheduler.UnobservedTaskException`
event.  Fixes #10488.

* Add `TaskContinuationOptions.OnlyOnFaulted | TaskContinuationOptions.OnlyOnCanceled` as suggested by Marek.

* Use 'OnlyFaulted' only.
2018-09-21 09:57:17 +02:00
Egor Bogatov e162fdaede [System.Data] use PAL_gssapi.c for SSPI (#9922)
PAL_gssapi.c was converted to C recently in corefx but since our fork is not up to date I copied `PAL_gssapi.c` and `PAL_gssapi.h` into mono/metadata (I guess I should just cherry-pick those files to our fork).
For System.Data it will allow users to connect to sql servers using SSPI (Security Support Provider Interface).
See https://github.com/mono/mono/issues/9028 and https://github.com/mono/mono/issues/9751
on macOS (and iOS) it uses built-in GSS.framework.
on Linux it requires an additional package (`krb`) to be installed (see .NET Core prerequisites, e.g. https://docs.microsoft.com/en-us/dotnet/core/linux-prerequisites?tabs=netcore2x#ubuntu). 
Unfortunately it's not installed on our CI yet.
2018-09-21 09:51:41 +02:00
monojenkins 39ecb27fc9 [bcl] Update BCL Linked Size 2018-09-21 09:09:02 +02:00
Jay Krell 59824272bf Strengthen _MonoImage.image_info from void* to MonoCLIImageInfo*, and remove the casts on every use. (#10676)
* Strengthen _MonoImage.image_info from void* to MonoCLIImageInfo*, and remove the casts on every use.

* Fix typo.
2018-09-20 22:40:26 -04:00
Jay Krell ab69814598 Some cleanup in appdomain.c. (#10686)
* Some cleanup in appdomain.c.
 - Combine exit paths.
 - npaths is always incremented, so remove test against 0 (assuming no overflow).

* Change g_strdelimit first parameter from string to character.

* Fix C++ -- goto around init.

* PR: Restore legacy types gint, gchar.
2018-09-20 22:38:50 -04:00
Alexander Kyte 5d96cdb7ca [runtime] Use guint64 for MonoStackHash everywhere 2018-09-20 20:57:26 -04:00
Alexander Kyte 128cdf7f88 [runtime] Add icall to format crashes to disk in uniform way 2018-09-20 20:57:25 -04:00
Marek Safar c2113246b9 [mcs] Adds sourcelink option (as unsupported) 2018-09-20 17:34:58 +02:00
monojenkins 980545e9f2 [csproj] Update project files 2018-09-20 17:03:08 +02:00
monojenkins 3bcb4f2dc6 Bump API snapshot submodule 2018-09-20 17:03:08 +02:00
Maxim Lipnin f3fcdc2b83 Bump corefx 2018-09-20 17:03:08 +02:00
Maxim Lipnin 547eac471f Bump corefx 2018-09-20 17:03:08 +02:00
Maxim Lipnin f00e90d588 [System.Reflection] CoreFX import for ParameterInfo type 2018-09-20 17:03:08 +02:00
lateralusX 311d64ad80 Temporary disable thread-suspend-suspended.exe and thread-suspend-selfsuspended.exe
Only on Windows x86 while investigating root cause of failure (not replicating outside CI).
2018-09-20 10:18:55 -04:00
Miguel de Icaza 7542f6231d [man] Add to mono.1 information about MONO_TLS_PROVIDER 2018-09-20 09:55:05 -04:00
monojenkins 929d528d8c [csproj] Update project files 2018-09-20 13:17:12 +02:00
monojenkins 3a1221354d Bump API snapshot submodule 2018-09-20 13:17:12 +02:00
Niklas Therning 866995d8fc Bump corert 2018-09-20 13:17:12 +02:00
Jay Krell 0cf1a2b4a8 [Coop] Convert assembly.c. (#10677)
See https://jenkins.mono-project.com/job/test-mono-mainline-staticanalysis/Centrinel_20Report/.
2018-09-20 00:17:14 -07:00
Jay Krell afe20fe67b [Coop] Convert dynamic-image.c. (#10681)
See https://jenkins.mono-project.com/job/test-mono-mainline-staticanalysis/Centrinel_20Report/.
2018-09-20 00:14:40 -07:00
monojenkins 6b1d8a6a80 [bcl] Update BCL Linked Size 2018-09-20 08:58:16 +02:00
Nikolay Sivov 9153553b65 [mini] Fix some compiler warnings. (#10644)
* [mini] Remove unused variable.

* [mini] Remove unused variable.

* [mini] Remove unused variable.

* [mini] Fix enum comparison warning.
2018-09-19 22:19:43 -04:00
Jay Krell 05009a40df [cxx] Fix C++ compilation regression. (#10702)
Caught by Aleksey Kliger.

transform.c(4251): error C2664: 'MonoReflectionType *mono_type_get_object_checked(MonoDomain *,MonoType *,MonoError *)': cannot convert argument 2 from 'gpointer' to 'MonoType *' [d:\j\workspace\d\msvc\libmono-dynamic.vcxproj]

Cast from void* to non-void*.
2018-09-19 16:20:06 -04:00
Zoltan Varga d2eeeb033f [wasm] Add beginnings of linker support in AOT mode. (#10636)
* [wasm] Add beginnings of linker support in AOT mode.

* Fix the compilation of monolinker.exe.

* Link in libmono-icall-table.a as well.

* Copy monolinker.exe instead of building it.
2018-09-19 12:20:24 -04:00
Rolf Bjarne Kvinge d2d8bb81cf [mono-api-html] Fix rendering of nuint. (#10662) 2018-09-19 12:19:00 -04:00
Rolf Bjarne Kvinge e297740cdf [mono-api-html] Render something for fields with marshalling info. (#10663)
Fixes this warning when comparing Xamarin.iOS.dll:

    Comparison resulting in no changes (src: Public, HasFieldMarshal dst: Public) :
    <field name="EdgeTessellationFactor" attrib="4102" fieldtype="System.UInt16[]" />
    <field name="EdgeTessellationFactor" attrib="6" fieldtype="System.UInt16[]" />
2018-09-19 12:18:20 -04:00
Zoltan Varga 65a97f8fc1 [offset-tool] Error out when parsing fails. (#10690) 2018-09-19 12:17:01 -04:00
Rodrigo Kumpera 9cb832ff2a [wasm] Enable the mini test suite under AOT. (#10670)
* [wasm] Enable the mini test suite under AOT.

* [wasm] Remove aot-driver.js as it's not needed anymore.
2018-09-19 12:16:01 -04:00
Kenneth Pouncey 7c7dcdb5a9 Add ninja build to the skds wasm build dependencies documentation. (#10683)
resolves https://github.com/mono/mono/issues/10682
2018-09-19 12:15:22 -04:00
Kenneth Pouncey c207ebcc35 [wasm] Rename sdks WebAssembly framework libraries. (#10639)
* Rename sdks WebAssembly framework libraries.

Rename:

- bindings.dll -> WebAssembly.Bindings.dll
- wasmhttp.dll -> WebAssembly.Net.Http.dll

resolves: https://github.com/mono/mono/issues/10620

* Fix package step

* Fix package step for WebAssembly.Net.Http.

 Fixed the package step that was failing due trying to include wasmhttp.pdb instead of WebAssembly.Net.Http.pdb.
2018-09-19 12:15:04 -04:00
Jay Krell 5614bdddce [Coop] Convert w32mutex-unix.c. (#10680)
See https://jenkins.mono-project.com/job/test-mono-mainline-staticanalysis/Centrinel_20Report/
2018-09-19 12:04:28 -04:00
Marek Safar 9265996e0b [build] Another make dist fix (#10688) 2018-09-19 11:58:35 -04:00
Zoltan Varga 1c80a9aaa3 [jit] Fix a constant propagation problem on 32 bit with iconst+conv.i8, we would be setting inst_imm even for long opcodes. (#10096)
* [jit] Fix a constant propagation problem on 32 bit with iconst+conv.i8, we would be setting inst_imm even for long opcodes.

* [llvm] Fix the special casing of OP_LCOMPARE_IMM, its not needed.

* Use TARGET_SIZEOF_VOID_P.
2018-09-19 11:39:27 -04:00
Rodrigo Kumpera dd74d8d932 [wasm/gc] It's valid to register for finalization an object without a finalizer. Don't register for fin objects added to refqueues under sgen. (#10649)
* [wasm/gc] It's valid to register for finalization an object without a finalizer. Don't register for fin objects added to refqueues under sgen.

The refqueue change undo part of 87fb34d18a.

This is due to how track resurrection weak refs are implemented under boehm and sgen. Sgen natively supports them so we don't
need to emulated it by registering them for finalization. This produces a lot of useless work for the GC.

* [wasm] Enable SRE.
2018-09-19 11:35:11 -04:00
Zoltan Varga 13a86a83e2 [bcl] Avoid retaining System.Globalization.CultureInfo.CreateCulture () in mscorlib.xml, its not longer used by the runtime. 2018-09-19 15:37:50 +02:00
monojenkins 630cdfb2f8 Merge pull request #10660 from BrzVlad/fix-interp-typeof
[interp] Optimize ldtoken + GetTypeFromHandle pair

As we do with jit. Improves speed of typeof operator by 10-15 times.



<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->
2018-09-19 07:05:04 -04:00
Marek Safar 767c2e32bc [System] Improves test failures reporting from TP threads 2018-09-19 10:09:33 +02:00
monojenkins 1df38917fe Merge pull request #10652 from lewurm/interp-safepoints
[interp] add safepoints and enable hybrid suspend as default

Fixes https://github.com/mono/mono/issues/10260
2018-09-18 20:15:03 -04:00
Jay Krell b2fc9cc12d Fix uninitialized read reported by valgrind. (#10630) 2018-09-18 16:46:29 -04:00
Zoltan Varga 1349da3368 [sdb] Avoid calling into the debuggee from VirtualMachine.GetObject () while holding the objects_lock. (#10650) 2018-09-18 15:07:40 -04:00
Jay Krell c76bacba17 Combine MONO_ATTRIBUTE_NO_OPTIMIZE and MONO_NO_OPTIMIZATION. 2018-09-18 10:27:33 -07:00
Jay Krell cb4d25dec2 Move MONO_SIG_HANDLER_DEBUG from mono/utils/mono-signal-handler.h to
mono/mini/mini-runtime.c so it can use the correct ifdefs
which should fix WebAssembly compilation and let it work on
Mac and Win32 also. This means we no longer need HOST_LINUX in configure.ac either.

Note that for Win32 we don't have the same sort of execution
of a debugger for this to help, but you can see it works
if you run in a debugger and break on mono_sigsegv_signal_handler_debug.
2018-09-18 10:24:18 -07:00
Rodrigo Kumpera 5bfe7a5d1b Merge pull request #10627 from kumpera/wasm-build-work
[wasm] Move test suite to use ninja
2018-09-18 12:37:57 -04:00
Jay Krell 7c191c1370 Get fault_addr in debugger stacks. 2018-09-18 09:35:35 -07:00
Jay Krell b690f2d3d1 Move signal handler stuff out of ifdef except MONO_SIG_HANDLER_INFO_TYPE since it was all the same. 2018-09-18 09:35:35 -07:00
Jay Krell 86ee99f6b3 Use MONO_SIG_HANDLER_INFO_TYPE in two places so that Win32 and Posix are otherwise identical. 2018-09-18 09:35:35 -07:00
Jay Krell 2aaeae2354 Provide MONO_ATTRIBUTE_NO_OPTIMIZE in mono-compiler.h. 2018-09-18 09:35:35 -07:00
Vlad Brezae 5f21fe213e [interp] Optimize ldtoken + GetTypeFromHandle pair
As we do with jit. Improves speed of typeof operator by 10-15 times.
2018-09-18 16:58:36 +03:00
Kenneth Pouncey 20a662fcb9 Add wasm-cross to .gitignore. (#10666) 2018-09-18 09:40:16 -04:00
Marek Safar dc41ecd86e [build] Fixes make dist (#10640)
* [build] Fixes make dist

* Update Makefile
2018-09-18 14:23:05 +02:00
Egor Bogatov 5a55842715 fix resolvemember crash 2018-09-18 14:18:36 +02:00
Bernhard Urban 409504d0c4 [interp] consolidate checkpoint and safepoint into one opcode 2018-09-18 14:16:44 +02:00
Bernhard Urban bcdfb53734 [interp] add safepoints and enable hybrid suspend as default 2018-09-18 14:16:44 +02:00
Ludovic Henry ad603864f8 Revert "Get fault_addr in debugger stacks. (#9673)"
It broke Linux WebAssembly.

This reverts commit a6712d05be.
2018-09-18 13:56:16 +02:00
EgorBo 565985dbd7 Implement IEnumerable for ConditionalWeakTable 2018-09-18 10:24:26 +02:00
Neale Ferguson cd70e9cf2a Fix s390x Outarg_VT (#10632)
* Fix outarg_vt processing. Fixes #10549

* Cleanup unused bits and pieces

* Correct the handling of structures being retuned from a call

* Restore vtcopy code etc.
2018-09-17 22:35:51 -04:00
Rodrigo Kumpera 2646cf41df Merge pull request #10624 from kumpera/dont-mmap-for-assemblies
[wasm] Switch to mkbundle style mono_register_bundled_assemblies instead of relying on emcc filesystem emulation. Fixes #10603.
2018-09-17 18:42:31 -04:00
Zoltan Varga d00adcc077 [wasm] Compile the runtime with --disable-icall-tables and explicitly link in libmono-icall-table.a. This will allow linking out unused icalls in the future in full-aot mode. (#10637) 2018-09-17 15:03:13 -04:00
monojenkins 3ca3d5b609 Merge pull request #10554 from vargaz/fix-17590
[llvm] Make sure OP_LSHL_IMM is transformed to a 64 bit shift even if the input is 32 bit, which can happen because the JIT IR is not regular. Fixes bug-17590.exe on arm64+fullaot+llvm.

Fixes https://github.com/mono/mono/issues/10527
2018-09-17 14:45:11 -04:00
Jay Krell a6712d05be Get fault_addr in debugger stacks. (#9673) 2018-09-17 11:25:01 -07:00
Rodrigo Kumpera 3b18995587 [wasm] Address reviewer feedback. 2018-09-17 09:41:57 -04:00
monojenkins 5d99724884 Merge pull request #10638 from nsivov/mini_fixes
[mini] Fix unused variables warnings
2018-09-17 07:45:04 -04:00
Nikolay Sivov 6a921395b0 [mini] Fix strict prototype warning. 2018-09-16 23:46:59 +03:00
Nikolay Sivov 1bad9adea6 [mini] Remove unused function. 2018-09-16 23:45:25 +03:00
Nikolay Sivov f3f63d40d6 [mini] Remove unused variables in mini-amd64.c. 2018-09-16 23:39:42 +03:00
Nikolay Sivov 64f6fab44b [mini] Fix unused variables warnings. 2018-09-16 23:29:44 +03:00
Nikolay Sivov fde2326351 [mono] Fix unused variables warnings in interp.c. 2018-09-16 23:24:33 +03:00
Nikolay Sivov c756616bdd [mini] Fix a couple of unused function warnings. (#10634)
This simply moves them to conditional block where they are used.
2018-09-16 22:15:21 +02:00
Maxim Lipnin 6202bdfb39 [Reflection] Use a type of actual argument in case when custom attribute ctor parameter is of System.Object type. 2018-09-16 19:13:30 +02:00
Jay Krell d589f3b64f Fix MonoTests.System.Linq.ParallelEnumerableTests.TestGroupBy (Linux/amd64/FullAOT/LLVM). (#10615)
* mono_aot_get_unbox_trampoline: amd64 compute unbox trampoline size correctly via runtime disassembly.
This fixes: MonoTests.System.Linq.ParallelEnumerableTests.TestGroupBy frequently crashing on FullAOT/LLVM/Linux/amd64 CI.

https://github.com/mono/mono/issues/10441
https://github.com/mono/mono/issues/9554
https://github.com/mono/mono/issues/9046

Race condition because the code varies in what actually runs.
Sometimes System_Linq_Parallel_WrapperEqualityComparer_1_T_GSHAREDVT_GetHashCode_System_Linq_Parallel_Wrapper_1_T_GSHAREDVT is called,
sometimes not.

FullAOT+LLVM for obvious reasons.

Very sensitive to exact code presumably because the bug depends on whether the first
unbox trampoline has the same size as the unbox trampoline for System_Linq_Parallel_WrapperEqualityComparer_1_T_GSHAREDVT_GetHashCode_System_Linq_Parallel_Wrapper_1_T_GSHAREDVT?
For example, this could be the only unbox trampoline or it could be first.

For example System_Security_Cryptography_ECCurve_get_Oid gets the first unbox trampoline and compiling it with mini or LLVM makes a difference.

Guessing here:
When the first unbox trampoline is 9 bytes in size and
System_Linq_Parallel_WrapperEqualityComparer_1_T_GSHAREDVT_GetHashCode_System_Linq_Parallel_Wrapper_1_T_GSHAREDVT
is 6 bytes in size, then System_Linq_Parallel_WrapperEqualityComparer_1_T_GSHAREDVT_GetHashCode_System_Linq_Parallel_Wrapper_1_T_GSHAREDVT's
unbox trampoline, which comes right before System_Linq_Parallel_WrapperEqualityComparer_1_T_GSHAREDVT_GetHashCode_System_Linq_Parallel_Wrapper_1_T_GSHAREDVT
is thought to be 9 bytes also, which overlaps System_Linq_Parallel_WrapperEqualityComparer_1_T_GSHAREDVT_GetHashCode_System_Linq_Parallel_Wrapper_1_T_GSHAREDVT.

So the binary search finds that, which goes wrong somehow -- mono_aot_find_jit_info returns NULL (for reasons not debugged).

And then we fail to wrap System_Linq_Parallel_WrapperEqualityComparer_1_T_GSHAREDVT_GetHashCode_System_Linq_Parallel_Wrapper_1_T_GSHAREDVT
with a gsharedvt trampoline.

In the normal course when things work, calling System_Linq_Parallel_WrapperEqualityComparer_1_T_GSHAREDVT_GetHashCode_System_Linq_Parallel_Wrapper_1_T_GSHAREDVT
goes through both gsharedvt_out_trampoline and gsharedvt_trampoline.

The first turns a byref into a byvalue, the second turns it back into a byref.
When the second is skipped, we end up treating the value as a pointer and SIGSEGV.
This can be seen using https://github.com/mono/mono/pull/10582.

mini amd64 unbox trampolines are always 9 bytes -- 4 byte add, 5 byte jmp
LLVM amd64 unbox trampolines vary 6 or 9 -- 4 byte add, 2 or 5 byte jmp.

There are *many* possible ways to fix this.

1. Runtime disassembly to measure the trampoline size, each trampoline, allowing just two variations. This was written, tested, works. Downside is inhibits breakpoints, at an unlikely time and place, and inhibits execute only memory protection, also unlikely. Looks a little gnarly, but really is not.

2. Get the assembler to output fixed size trampolines.
This is known for GNU assembler -- (disp32) jmp and jmp.d32.
This is not known for Apple assembler, either the older cctools or LLVM, but maybe.
The problem *seemed* to be Linux only, but the underlying causes do not.
If this were looked into more closely and a Linux-specificity actually found, then depending on GNU as is more reasonable.

3. Output object files instead of assembly text. Good and bad idea otherwise. Super non-trivial.

4. Construct the tramp_info at compile time, with compiler/assembler/linker-computed size. This should be possible and otherwise beneficial, but not trivial, and not super beneficial, only mildly.
const static data/code is generally prefer over dynamic.

5. Don't bother with the trampinfo at all. It should not be needed, even for stackwalk, as these are leaf functions (don't change nonvolatiles), so stackwalk is just *rsp++.
Good idea for another day, as it is a simple net reduction in code, pending testing a not easy  to test case -- need to make a function that just jmps to self, point a thread at it, wait till it gets there, suspend it, and stackwalk it. A good exercise, for another time.

6. Pad out trampolines to at least 9 bytes by adding 3x 0xcc.
Sometimes 12 bytes.
And hardcoding size as 9 at runtime -- don't use the actual computed size, as it could be 12, apply that to a 9 byter, and back with the same problem.

That is one incorrect solution in there -- just merely adding 3 bytes of padding seemed at first like a good idea, but would not likely work.

7. Or rather, no need to pad, hardcode to 6 at runtime.

8. Or rather, hardcoding to 5 suffices. Interior bytes of last instruction need not be described, pretend it is of size 1. 2 is no more accurate than 1, when some of them are actually 5.

9. Can hardcode in compiler or runtime.
Both developed, easy.

10. Try current assemblers. Maybe the original reason to switch from 0xe9 to jmp is moot.
But continue to work with old assemblers? (in a test-only scenario?)
Not attempted.

11. Use separate source files to help achieve distance or assembler ignorance of distance.
Not attempted.

12. Move all the trampolines adjacent, with 128 bytes of padding on either end.
Not attempted.

13. Asserting the trampolines are 16-aligned would maybe work. And/or following them with a 16-aligned entity.

Here we option 9, hardcode to 5 in the compiler. It is essentially a one line change.

Removing the trampinfo and testing async stack walk is left as a future change.
This is really the best option but has more significant test burden.

* Increment MONO_AOT_FILE_VERSION to invalidate old bad images.
The badness is borderline -- limited to FullAOT+AMD64+LLVM, which is nonexistant outside test environments. This version should probably be a guid also.
2018-09-15 00:03:22 -07:00
Rodrigo Kumpera c954819325 [wasm] Move test-suite to be ninja based. 2018-09-14 17:09:29 -04:00
Rodrigo Kumpera 9d7d7702d8 [wasm] Don't copy assemblies when emitting ninja plus handle --assets with it. 2018-09-14 17:07:20 -04:00
Zoltan Varga 6174666e47 [llvm] Fix a crash when trying to pass a vtype of size 0 on arm64. Fixes generic-constrained.2.exe. 2018-09-14 22:14:05 +02:00
Kenneth Pouncey 240407a06f Update the sdks WebAssembly build instructions after recent AOT changes. (#10618)
- Update the gitignore for wasm-runtime
- Document automake 1.16.1 dependency. resolves https://github.com/mono/mono/issues/10446

closes https://github.com/mono/mono/issues/10614
2018-09-14 14:48:31 -04:00
Rodrigo Kumpera 1dcdbee477 [wasm] Switch to mkbundle style mono_register_bundled_assemblies instead of relying on emcc filesystem emulation. Fixes #10603.
This saves us from using twice as much memory for assemblies due to emcc filesystem retention polity and it avoid bugs in its
mmap emulation code.
2018-09-14 14:06:24 -04:00
Jay Krell 776e311414 Fix possible bug where empty array is not nul-terminated. (#9723)
It is not clear how this should be represented.

https://docs.microsoft.com/en-us/windows/desktop/api/processthreadsapi/nf-processthreadsapi-createprocessa

"Note that an ANSI environment block is terminated by two zero bytes: one for the last string,
one more to terminate the block.
A Unicode environment block is terminated by four zero bytes: two for the last string,
two more to terminate the block."

Is unambiguous however.
2018-09-14 10:16:35 -04:00
Kenneth Pouncey 7babdc92ea [WASM] [bindings] Add support for an HttpMessageHandler that works for WASM. (#10464)
* Add support for:

- Get global object - This allows developers access to variables of javascripts global space.  For example the window object in the Browser.
- Add reference counting to the javascript object registry in the bindings.  This can prevent a javascript object that is in the object registry from being removed unexpectedly.
- Add AddRef and ReleaseRef to manage object registry reference counting if it is needed.

* Add support for an HttpMessageHandler that works for WASM.

- Needs real world testing before we decide to make this a default.
- Depends on the delivered bindings.dll and the bindings support built.
- Due to the bindings dependency there is no need to add extra javascript library to the build.
- Works only through a browser session at this time as it works directly with window.fetch.

* Free the Task Completion Source after the promise completes.

* There are some headers that can only be attached to the Content's Headers.

- If the header returned from fetch can not be added to the response header then try to add it to the Content headers.
- Fix misspelling in binding_support.js

* Remove reference counting from bindings.

- Remove object disposal from WasmHttpMessageHandler.

* Add bindings.dll requirement to wasmhttp.dll build.

* Clear the HttpResponseMessage after setting the TaskCompletionSource so it can be garbage collected.
2018-09-14 08:25:23 -04:00
Bernhard Urban 500746f0dd [interp] move thread attach to interpreter entry (#10579)
* [interp] move thread attach to interpreter entry

We want to attach a thread before any TLS operation is done by the
interpreter. In the JIT this happens inside the native-to-managed
wrapper via `mono_threads_attach_coop ()`. Unfortunately, this is too
late for the interpreter as it already requires a working TLS before
even calling into the wrapper.

Also, fixup naming of locals in the native-to-managed wrapper.

* [interp] do not propagate uninitialized ThreadContext to JIT TLS

* [interp] fix memory corruption around pinvoke wrapper allocation

* [interp/jit] fix memory leak in pinvoke wrapper allocation
2018-09-14 08:24:16 -04:00
Zoltan Varga 99ae0cc076 [amd64] Increase max size of OP_LMUL_IMM. (#10593) 2018-09-14 08:22:43 -04:00
Zoltan Varga 866997e5ab [runtime] Fix Marshal.SizeOf (typeof (void)). (#10599)
Fixes https://github.com/mono/mono/issues/10303.
2018-09-14 08:21:50 -04:00
Kenneth Pouncey 8fe989cb70 [WASM] Make test-suite use generated driver and bindings. (#10558)
* Make test.js use generated driver and bindings.

- bindings_tests.dll uses the generated bindings.dll.
- Modify packager to accept a template parameter that overrides the default `runtime.g.js`.
- Modify the tests to call runtime.js in the test-suite directory
- The runtime.js is automatically created in the test-suite library so no need to do extra copies.
- resolves https://github.com/mono/mono/issues/10244

* Add -template option to packager

- Part of merge conflict resolution

* Add -asset option that allows an extra asset to be copied to the output directory.

-   --asset=x       Add specified asset 'x' to list of assets to be copied
- An asset option needs to be specified for each asset to be copied.
2018-09-13 10:10:31 -04:00
monojenkins 15bcc4f55d Merge pull request #10472 from Unity-Technologies/debugger-ref-returns
Handle ref returns in runtime invoke wrappers.

Indirectly load ref return values in invoke wrappers and return by value.
Don't share wrappers with ref returns since indirect load is used.
Add soft debugger support for methods with ref returns.
2018-09-13 07:55:03 -04:00
Martin Baulig 6e75b0c5aa [System]: Fix WebResponseStream.ReadAllAsyncInner() return value.
We need to call `ToArray()` instead of `GetBuffer()` to truncate the buffer
to the amount of bytes that we actually read.
2018-09-13 13:14:46 +02:00
monojenkins bcb547a54b [csproj] Update project files 2018-09-13 09:55:06 +02:00
monojenkins 56a3c651bd Bump API snapshot submodule 2018-09-13 09:55:06 +02:00
Marek Safar e3eff6f2a6 [Facades] Adds System.Buffers mobile facade
and sets up facades without corresponding nuget _._ for conflict
resolution done by msbuild
2018-09-13 09:55:06 +02:00
Marek Safar e830b55f05 [mcs] Adds cloning for default literals 2018-09-13 09:49:54 +02:00
Maxim Lipnin ef7b83779d [System.Reflection] Fix the issue with constructing DllImportAttribute data (#10568)
* [System.Reflection] Fix the issue with constructing DllImportAttribute data

* Remove redundant cast; update default case in switch-blocks
2018-09-13 09:44:52 +02:00
Jay Krell 06e79ffb16 Make enum values obvious. (#10553) 2018-09-13 00:19:40 -07:00
Aleksey Kliger (λgeek) c2a94b3bab [interp] Add declaration for set_context (#10575) 2018-09-12 15:07:03 -04:00
Aleksey Kliger (λgeek) 766dacef22 Drop JIT attach: use coop attach in mini, aot and interp (#10545)
* [metadata] Hack - get mono_use_interpreter from metadata

Don't use this, it's a mistake.  The granularity is all wrong, for one: in the
future the interpreter may not be an all-or-nothing deal.

* [marshal] Don't emit CEE_MONO_JIT_ATTACH except for interpreter

Always use the mono_threads_coop_attach/mono_threads_coop_detach pair.

* [aot] Drop MONO_PATCH_INFO_JIT_THREAD_ATTACH

We always emit the mono_threads_attach_coop icalls now.

Bump MONO_AOT_FILE_VERSION

* [mini] mark mono_jit_thread_attach external only

It's used by Xamarin.Mac and possibly other embedders.

Interpreter still used mono_jit_thread_attach_interp until it's fixed to work
with coop.

There shouldn't be any other callers.

* [interp] Add a thread attach EE callback

Use it to set the interpreter thread context on the JIT tls value

* [marshal] Always emit mono_threads_attach_coop instead of CEE_MONO_JIT_ATTACH

Use the coop icall for the interpreter, too.

* [interp] Drop MINT_MONO_JIT_ATTACH and detach opcodes

* [metadata] Drop CEE_MONO_JIT_ATTACH and detach opcodes

* Revert "[metadata] Hack - get mono_use_interpreter from metadata"

This reverts commit c3d2f488b824dcdfa261f8292013c805740f353f.

* [mini] Drop unused mini_jit_thread_attach_interp

It was a temporary workaround for the interpreter; no longer needed.

* [coop] Switch to GC Safe in mono_jit_thread_attach.

It's an external-only function that's not called by the runtime on any
threads.  So the only calls are explicit uses by Mono API clients.  Leave the
thread in GC Safe mode and leave it to the n2m invoke wrappers or MONO_API
entry points to switch to GC Unsafe.

* [interp] Add MINT_MONO_THREADS_ATTACH_COOP opcode

Because this icall can be called from detached threads, don't go through
do_icall () which needs initialized tls keys

* fixup for c++ build

* fixup indentation and comments

* fixup C++ a bit more

* [mini] Bump MONO_EE_API_VERSION

* Revert "[interp] Add a thread attach EE callback"

This reverts commit 8a343d6ce15f0475a62936f28264f638ebf0344f.

* [interp] sync jittls context before entering EH machinery
2018-09-12 14:57:54 -04:00
Zoltan Varga 49cd56f0d1 [arm64] Fix the alignment of valuetypes passed after small primitive types on IOS. (#10525)
Fixes https://github.com/xamarin/xamarin-macios/issues/4347.
2018-09-12 14:01:03 -04:00
Katelyn Gadd 2abb347ffa Fix forceBuild not working for projects with unknown platform names (i.e. jay) (#10485)
* Fix forceBuild not working for projects with unknown platform names (i.e. jay)

* Clean up error messages
2018-09-12 13:58:34 -04:00
Filip Navara c5ffbed4a9 Treat EXDEV from clonefile the same way as ENOTSUP. (#10528) 2018-09-12 13:56:09 -04:00
Zoltan Varga c16d994d31 [jit] Add an intrinsics for BitConverter.IsLittleEndian. (#10531) 2018-09-12 13:55:40 -04:00
Zoltan Varga 5db745545a [wasm] Pass ac_cv_func_shm_open_working_with_mmap=no to the wasm runtime's configure. Fixes compilation on linux. (#10563) 2018-09-12 13:36:11 -04:00
Bernhard Urban b6f4cc72b8 [interp] get context refactor (#10561) 2018-09-12 13:34:27 -04:00
Bernhard Urban cfa5e8d535 [ci] do not hardcode CPU count (#10560)
getconf should work on both, macOS and linux.

Fixes https://github.com/mono/mono/issues/10506
2018-09-12 13:32:59 -04:00
monojenkins f4df4c8422 Merge pull request #10552 from lewurm/wasm-enable-test_0_arm64_dyncall_vtypebyrefonstack
[wasm] enable test_0_arm64_dyncall_vtypebyrefonstack

It works on my machine. Test was introduced by https://github.com/mono/mono/pull/10517/
2018-09-12 12:15:04 -04:00
Jonathan Chambers ce0a5c4d79 Handle ref returns in runtime invoke wrappers.
Indirectly load ref return values in invoke wrappers and return by value.
Don't share wrappers with ref returns since indirect load is used.
Add soft debugger support for methods with ref returns.
2018-09-12 10:55:42 -04:00
Zoltan Varga 370d740f5f [llvm] Make sure OP_LSHL_IMM is transformed to a 64 bit shift even if the input is 32 bit, which can happen because the JIT IR is not regular. Fixes bug-17590.exe on arm64+fullaot+llvm. 2018-09-11 22:52:27 +02:00
Zoltan Varga 350d063e2a [wasm] Ongoing AOT work. (#10541)
* [wasm] Rename 'wasm-aot' to 'wasm-cross' for consistency with the other SDKs.

* [wasm] Use the separate libmono-ee-interp.a library for linking in the interpreter.

* [wasm] Unify interp and aot runtimes.

* [wasm] Avoid cleaning the emscripten toolchain when cleaning the runtime or cross compilers.

* [wasm] Use the sdk llvm targets to build the cross compiler, so it can use a downloaded llvm instead of building its own.

* [offset-tool] Add WASM support.

* [wasm] Generate offsets file for wasm.

* [wasm] Switch packager.exe to use Mono.Options, add a --mono-sdkdir option to specify the path to the mono sdk.

* [wasm] Emit a ninja build file from the packager when the --builddir argument is given.

* [wasm] Auto generate the aot registration code by generating a driver-gen.c file and including it into driver.c.

* [wasm] Add emcc link step to the ninja build script.

* zoltan's changes.

* [wasm] Fix merge conflicts from picking Zoltan's patches.

* [sdks] Fix the wasm build so the package target doesn't build 394839840 llvms.

* [wasm] Fix mono_arch_create_specific_trampoline to work with the AOT compiler reverse lookup of icalls

* [wasm] Don't set minimum memory size, let it dynamically grow.

* [wasm] Remove old aot targets. Now do-aot-sample does the whole magic.

* [wasm] Attept at making the offsets-tool work on linux.

* [wasm] Cleanup the hacks early in this PR.

* [wasm] Fix rebase issue.

* Fix rebase

* Fix rebase

* [llvm] Only emit the dummy arg when targeting wasm.
2018-09-11 16:32:53 -04:00
Nikolay Sivov 9f0099ea1f [mini] Fix some of unused variable warnings. (#10500)
* [mini] Fix unused variable warning.

* [aot] Remove unused variables.

* [mini] Remove unused block.

* [mini] Fix unused variable warning in aot-runtime.c.

Failed returned value implies that error info has been set.

* [mini] Remove unused variable.
2018-09-11 16:28:49 -04:00
Jay Krell f32cca7b6d [cxx] Jenkins support for Windows C++. (#10515) 2018-09-11 12:24:01 -07:00
Bernhard Urban 55360b50e6 [wasm] enable test_0_arm64_dyncall_vtypebyrefonstack 2018-09-11 21:10:53 +02:00
monojenkins b8c8305104 Merge pull request #10428 from jaykrell/mono_pages_not_faulted
Remove unused mono_pages_not_faulted, autoconf for mlock instead of mincore.
2018-09-11 15:05:04 -04:00
Maxim Lipnin d733790420 [System.Reflection] CoreFX import for PropertyInfo type. (#10537)
Part of #9660.

The changes:
- included corefx version of PropertyInfo type;
- included related xunit tests from corefx System.Reflection;
- moved `GetPropertyFromHandle `method to MonoProperty type;
- moved `internal_from_handle_type `extern method and related icall to MonoProperty type;
- fixed some edge cases where exception is expected;
- removed obsolete System.Reflection/PropertyInfo.cs.
2018-09-11 14:41:36 +02:00
Zoltan Varga 37c5f35ed2 [bcl] Move the mono specific code in BitConverter to a partial class. (#10534)
* Move the mono specific code in BitConverter to a partial class. Depends on https://github.com/mono/corefx/pull/134.

* Bump corefx.

* Update BitConverter.cs

* Update BitConverter.cs

* Update BitConverter.cs

* [csproj] Update project files
2018-09-11 14:32:43 +02:00
Marek Safar f86d17c0b9 [build] Clean up no longer needed rules and conversions (#10546)
* [build] Clean up no longer needed rules

* [build] Add at least basic dependency tracking to .dep_dirs-

* Update rules.make
2018-09-11 14:05:55 +02:00
Zoltan Varga c0b8bdc809 [arm64] Add dyncall support for ArgVtypeByRefOnStack arguments.
Fixes https://github.com/mono/mono/issues/10483.
2018-09-11 08:58:06 +02:00
Jay Krell 1d8954083f [cxx] Leave output directory alone as other places run it. (#10520) 2018-09-10 01:16:08 -07:00
Marek Safar e872684c4d [build] Enable more BCL build parallelization (#10486)
<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->
2018-09-09 09:16:41 +02:00
Aleksey Kliger (λgeek) bd15b2dbee [ci] run tests if building with C++ (#10519) 2018-09-08 09:00:09 -04:00
Ludovic Henry 97f207a569 [MonoAotOffsetsDumper] Remove --monodroid argument (#10512)
It's dead now
2018-09-08 08:58:39 -04:00
Alexis Christoforides 1b163d62d0 [System.IO] Enable CoreFX FilesystemWatcher on Android (#9766)
* [System.IO] Enable CoreFX FilesystemWatcher on Android
This was the last user of the 'InotifyWatcher' Mono implementation, so this is also removed.

* [csproj] Update project files
2018-09-07 23:33:03 -04:00
Marek Safar 08426bcd19 [System.Net.Http] Allow empty value in ProductHeaderValue (#10511)
Fixes #10227
2018-09-07 23:52:39 +02:00
Jasonsjiang 8e95a2e508 fix timeout when poll fail with the error EINTR (#10017) 2018-09-07 16:38:04 -04:00
Maxim Lipnin 2f8a6b5bdd [System.Reflection] Make GetFieldOffset method virtual to fix issue with custom FieldInfo type. 2018-09-07 08:57:03 +02:00
Zoltan Varga 64bfec630b [offsets-tool] Remove the obsolete '--maccore=' argument, its not used anymore. (#9910)
* [offsets-tool] Remove the obsolete '--maccore=' argument, its not used anymore.

* Fix indentation.
2018-09-06 18:59:43 -04:00
Nikolay Sivov bac2da316d [monograph] Fix unused variable warning. (#9920) 2018-09-06 18:57:24 -04:00
Zoltan Varga 8ab6291f34 [sdb] Disable an assert to avoid breaking debugging. (#9981)
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-09-06 18:55:41 -04:00
Filip Navara fe98c3b9a1 Ensure the finalization in DeflateStream is performed in the correct order. (#10330)
* Ensure the finalization of SafeHandle and GCHandle in DeflateStreamNative is performed in the correct order.

* Do not access BaseStream from finalizer.
2018-09-06 18:50:50 -04:00
Johan Lorensson 0f3af38ee4 Fix Mono Windows cross compiler using mono LLVM release_60 branch. (#10413)
* Fix Mono Windows cross compiler using mono LLVM release_60 branch.

For scenario where llvm-config.exe can't be run (none WSL/CygWin build target)
Build will fallback to hard coded libraries not working with mono LLVM release_60
branch.

Added an exact mirror of what llvm-config.exe is returning for different components
on mono LLVM master and mono LLVM release_60 branch.

The selected codegen libraries (passed in as extra_libs) was not handled in any cases
so added them into the build script as well.

* Split parameter between lvm codegen libs and llvm extra libs.

Need to explicit pass -lz in case where configure have detected zlib availability
and llvm-config.exe can't be executed. In cases where zlib is not available, default
in mingw installs, this check make sure link step won't fail due to missing library.

* Fix inversion of aarch64codegen libs.

* Enable package-android-cross-{arm,arm64,x86,x86_64}-win builds on CI.

* Fix incorrect checks when compiling Windows cross compiler.

Windows cross compiler could have a target that is !TARGET_WIN32 but still
running on a Windows host, so check needs to look at !HOST_WIN32 to determine
if Unix source files can be included or not.
2018-09-06 18:47:58 -04:00
Jérémie Laval 362d1d94e1 [wasm] Misc fixes/improvements (#10471)
* [metadata] Fix Thread.Yield icall function signature

The signature exposed on the C# side has a boolean return but the actual C implementation used to be marked as void.

This caused an issue with the WASM backend as the interpreter would try to jump to the icall using an `MINT_ICALL_V_P` opcode. Since emscripten does function pointer jumps based on a function signature key and the signature mismatched on the C side, the jump would fail triggering the `nullFunc_i(x)` on the mono.js side.

* [wasm] Add facade resolving to packager tool

* [wasm] Use correct mono_bindings_init syntax to initialize bindings library
2018-09-06 18:47:17 -04:00
Vlad Brezae 837a9ae981 [interp] Don't abort in critical wrappers (#10484)
* [interp] Remove some duplicated code

* [interp] Don't abort in critical wrappers

Fixes premature exiting of special threads due to aborts (like threadpool threads), instead of catching exception and resuming to native code.
2018-09-06 18:46:02 -04:00
Johan Lorensson 4acd1419c8 Add C++ compiler support option for some msvc build projects. (#10487)
By default, all projects are build using "default" compiler based on source
file extension. There is a property in mono.props, MONO_COMPILE_AS_CPP
 that could change this and build selected projects (eglib, libgcmonosgen,
libmini, libmono-dynamic, libmono-static, libmonodac, libmonoruntime,
libmonoutils, mono, monodis, monograph and pedump) using C++ compiler.

MONO_COMPILE_AS_CPP property could be set when calling msbuild
or through VS property manager IDE. Default value is false building using
"default" compiler (current behavior). When setting MONO_COMPILE_AS_CPP=true
the build prefix will be altered to make sure the C++ build gets its own build
folder, parallel to default build folders.

Example of building using C++ compiler from msbuild:

msbuild /p:PlatformToolset=v140 /p:Platform=x64 /p:Configuration=Release /p:MONO_TARGET_GC=sgen /p:MONO_COMPILE_AS_CPP=true msvc/mono.sln
2018-09-06 18:45:35 -04:00
Egor Bogatov 16f554307f [corlib] Replace System and other namespaces with CoreFX sources (#9744)
Simple types for now just to see the API-DIFF, more types later.

Part of #8131
2018-09-06 19:41:56 +02:00
monojenkins 5147d4863f [csproj] Update project files 2018-09-06 18:53:55 +02:00
monojenkins 1943d7bf60 Bump API snapshot submodule 2018-09-06 18:53:55 +02:00
Maxim Lipnin d372582256 Bump corert 2018-09-06 18:53:55 +02:00
Maxim Lipnin 8e09242807 [System.Reflection] CoreFX import for CustomAttributeNamedArgument type. 2018-09-06 18:53:55 +02:00
Filip Navara c63e12669d Fix DeflateStream handling of zero-length reads from underlying stream. 2018-09-06 18:38:22 +02:00
Rodrigo Kumpera d21d00b366 [corlib] Don't decrement ConditionalWeakTable::size on remove. (#10477)
We can't decrement the size on removal as we use tombstones.
When using tombstones, the invariant to keep is on the number of null entries as those
are used as search stop-marks.

Without this change, it's possible that a long series of add/remove operations could leave the array with no null entries,
just tombstones and filled entries. In that case, search would degenerate into a linear search that would look into all array elements.

This change fixes worst-case perf of not-found searches to be bound to the load factor.

Additionally, clear the array to null entries, otherwise we fall into the above trap even more easily.
2018-09-06 11:08:07 -04:00
Martin Baulig 0c7e4b378e [sdb]: Properly version the CMD_TYPE_GET_METHODS_BY_NAME_FLAGS change.
This adds proper versioning to the wire change that was introduced in #9762.

Fixes #10412.
2018-09-06 13:52:13 +02:00
monojenkins b4961c559e [bcl] Update BCL Linked Size 2018-09-06 12:12:01 +02:00
Jay Krell 40c785c918 [cxx] More extern "C" per errors and a missed cast. (#10474)
* [cxx] Add more extern "C".
This is triggered largely from  https://jenkins.mono-project.com/job/test-mono-pull-request-amd64-osx-products-sdks-ios/4452/consoleFull
and look for "referenced from".

* [cxx] Missed a cast due to late change.

* PR: Restore mono_fmod to extern C++.
2018-09-05 22:34:46 -04:00
Jay Krell 2c8569acf6 [cxx] A few fixes for Microsoft Visual C++ (#10444)
* gmisc-win32.c(136): error C2664: 'HRESULT SHGetKnownFolderPath(const KNOWNFOLDERID&,DWORD,HANDLE,PWSTR *)': cannot convert argument 1 from 'const GUID *' to 'const KNOWNFOLDERID
REGUID is const GUID& in C++, const GUID* in C*.
It is impossible to have portable C/C++ that deals with this.
This feels like a mistake, but it is ancient and not changing.

* gpath.c(102): error C2440: '=': cannot convert from 'const char *' to 'char *'
Add const, like in the non-Windows case right before.

* sgen-gc.c(1381): error C4576: a parenthesized type followed by an initializer list is a non-standard explicit type conversion syntax
A inline function would trivially portably standardly solve this,
but wrap in compiler-specific pragma to suppress.

* [cxx] abi.c(60): error C2059: syntax error: '.'
Remove designated initializer.
2018-09-05 12:46:48 -07:00
Vlad Brezae 958a639b12 [tests] Bump timeout for System.Numerics with interpreter
New tests were included recently
2018-09-05 11:21:12 -04:00
Jonathan Chambers 7c19f9d443 Avoid deadlock during GC. Check for GC_DONT_GC environment variable at startup rather than during collection with world stopped since g_hasenv may take OS locks and encounter deadlock. (#10466) 2018-09-05 07:23:22 -04:00
monojenkins 1feb9eeb4c Merge pull request #9961 from nsivov/warning_fixes
[mono] Compiler warnings fixes

This fixes a bunch of warnings in threads.c. Compare-exchange cast is unfortunate because it would do without if we had platform long sized cas helper around - tid is always u32 on Windows (DWORD), and pthread_t is always long int, which could be 32 or 64 bit.
2018-09-05 07:15:09 -04:00
Jay Krell cff5aefe1d [cxx] Adapt typesafe coop handles for standard/Visual C++. (#10443)
* Adapt typesafe coop handles to be valid standard C++. i.e. valid for Visual
C++, w/o gcc/clang language extension __typeof__. This is not meant to be
long term idiomatic C++, just enough to get us by for now.

The solution does not quite work for type unsafe handles, because
checking for this == NULL is not defined. A non-member function
would be needed.

C++11 decltype could be used instead at the MONO_TYPEOF_CAST level,
but this solution is trivial C++98.

Visual C++ historically was seen to have trouble giving names
to member functions of anonymous types -- an unusual construct.
So the previously anonymous structs are given a name here.

* Go back to anonymous type.

https://jenkins.mono-project.com/job/test-mono-pull-request-amd64-osx-products-sdks-ios/4408/parsed_console/log.html

  CC       libmonoruntimesgen_la-method-builder-ilgen.lo
/Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-ios/mono/metadata/marshal-ilgen.c:6403:29: error: use of undeclared identifier 'MONO_OFFSET_MonoObjectHandlePayload___raw'; did you mean 'MONO_OFFSET_MonoObjectHandle___raw'?
                        mono_mb_emit_ldflda (mb, MONO_HANDLE_PAYLOAD_OFFSET (MonoObject));
                                                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
                                                 MONO_OFFSET_MonoObjectHandle___raw
/Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-ios/mono/metadata/handle.h:426:42: note: expanded from macro 'MONO_HANDLE_PAYLOAD_OFFSET'
                                         ^
/Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-ios/mono/metadata/handle.h:425:50: note: expanded from macro 'MONO_HANDLE_PAYLOAD_OFFSET_'
                                                 ^
/Users/builder/jenkins/workspace/test-mono-pull-request-amd64-osx-products-sdks-ios/mono/metadata/abi-details.h:56:42: note: expanded from macro 'MONO_STRUCT_OFFSET'
                                         ^
<scratch space>:89:1: note: expanded from here
2018-09-05 01:08:53 -07:00
Alexander Köplinger 64a2075d37 [ci] Fixup last commit to run-test-mac-sdk.sh
Actually for this we shouldn't pass CFLAGS etc at all since that is
handled by bockbuild.
2018-09-05 09:59:39 +02:00
Alexander Köplinger 0e5a7816e7 [ci] Fix run-test-mac-sdk.sh build
0dbcdd5c28 added CFLAGS etc in front of the
command but that's not something the TESTCMD can execute.

We need to pass those variables to the whole process.
2018-09-05 09:57:43 +02:00
Maxim Lipnin d5a419f6c8 [System.Reflection] CoreFX import for CustomAttributeTypedArgument type. (#10450)
Part of https://github.com/mono/mono/issues/9660

The changes:
- included corert version of CustomAttributeTypedArgument type;
- included related xunit tests from corefx System.Runtime;
- updated corert/Type.cs to have some required properties from corert Type.Internal.cs;
- removed obsolete System.Reflection/CustomAttributeTypedArgument.cs;
- moved back "array case" handling in CustomAttributeTypedArgument ctor (via related PR);
- re-enabled "Arrays" test in CustomAttributeDataTest on mobile.
2018-09-05 09:51:01 +02:00
Jay Krell 1521da3b1e [cxx] [metadata] Convert to be valid C and C++. (#10432)
* [cxx][metadata] Cast from void.

* [cxx][metadata] Casts, mostly from void*.

* [cxx] [metadata] MONO_BEGIN_DECLS / MONO_END_DECLS only in public headers.
G_BEGIN_DECLS / G_END_DECLS are ok in private headers (and .c), but the vast majority of uses are not needed. In this case, every function is MONO_API anyway.

* [cxx] [metadata] Add template for mono_mb_emit_native_call under #ifdef __cplusplus.

* [cxx] [metadata] Loosen the parameter type in mono_vtype_get_field_addr from guint8* to gpointer.

* [cxx][metadata][profiler] Add G_ENUM_FUNCTIONS (MonoProfilerCallInstrumentationFlags), outside of the public header MonoProfilerCallInstrumentationFlags is defined in.

* [cxx][metadata][profiler] Cast void* to function pointer MonoProfilerCallInstrumentationFilterCallback.

* [cxx][metadata] Cast from void*.

* [cxx][metadata][sgen] Change sgen_client_root_registered(source) from int to enum MonoGCRootSource.

* [cxx][metadata][sgen] Change report_conservative_roots(root_report_address) from char* to void*.

* [cxx][metadata][sgen] In mono_gc_register_obj_with_weak_fields, cast parameter from void* to MonoObject*.

* [cxx][metadata][sgen] In sgen_client_gchandle_created and sgen_client_gchandle_destroyed, cast handle_type from int to MonoGCHandleType. This could be better.

* [cxx][metadata][sre] In mono_dynimage_encode_constant, change local box_val from char* to void*.

* [cxx][metadata][sre] Change  swap_with_size(dest, val) from {,const}char* to {,const}void*. Move function starting brace to its own line.

* [cxx][metadata][sre] encode_cattr_value(argval) from char* to const void*.

* [cxx][metadata][sre] Add ICALL_EXPORT to ves_icall_TypeBuilder_create_runtime_class.

* [cxx][metadata] Templatize mono_thread_create_internal and mono_thread_create_checked. FIXME: Fix the parameter type and inputs.

* [cxx][metadata][threads] Cast from void* to MonoCoopMutex*.

* [cxx] Fix return type of  start_wrapper_internal -- guint32 vs. gulong.

* [cxx][metadata] In start_wrapper_internal, cast function pointer to void*. Later we should get all the types correct.

* [cxx][metadata] Fix return type of start_wrapper from gsize to mono_thread_start_return_t.

* [cxx][metadata] create_thread: Remove cast on first parameter to mono_thread_platform_create_thread.

* [cxx][metadata] Add ICALL_EXPORT on ves_icall_System_Threading_Thread_GetPriority.

* [cxx][metadata] g_cast does not allow for ternary operator though it could with one line; add casts to workaround; remove cycle optimization from error path, favoring smaller code.

* [cxx][metadata] ves_icall_System_IO_MonoIO_Read, ves_icall_System_IO_MonoIO_Write: Change relatively untyped data from char* to void*.

* [cxx][metadata] Add parentheses around define INVALID_HANDLE_VALUE to avoid surprises.

* [cxx][metadata] In mono_w32handle_convert_wait_ret, cast between int and enum MonoW32HandleWaitRet. We could also give up on enums for this type.

* [cxx][metadata]ves_icall_System_Diagnostics_Process_ShellExecuteEx_internal: Add cast to HWND.

* [cxx][metadata] Cast to HMODULE. Add const.

* [cxx] w32process.h: Add missing ICALL_EXPORT.

* [cxx][metadata] w32socket-win32.c: add const on string literals.

* [cxx] mono_w32socket_recvbuffers: cast to LPWSAOVERLAPPED and LPWSAOVERLAPPED_COMPLETION_ROUTINE.

* [cxx] mono_w32socket_send: cast from void* to char*.

* [cxx]mono_w32socket_sendbuffers cast to LPWSAOVERLAPPED and LPWSAOVERLAPPED_COMPLETION_ROUTINE.

* [cxx] mono_w32socket_getsockopt cast from void* to char*.

* [cxx] mono_w32socket_setsockopt cast from const void* to const char*.

* [cxx] mono_w32socket_ioctl fix out parameter written from glong* to DWORD* to avoid casts.

* [cxx] [w32socket] Remove casts on calls to mono_w32socket_getsockopt and mono_w32socket_setsockopt since they nicely accept void*  and const void*.

* [cxx][w32socket] Change output_bytes from glong to the correct DWORD to avoid casts.

* [cxx] Add ICALL_EXPORT to ves_icall_cancel_blocking_socket_operation.

* [cxx] Remove keyword 'template'.

* PR: Revert "[cxx] Fix return type of  start_wrapper_internal -- guint32 vs. gulong."
This reverts commit 8e02c9cf732a80b77af59b9a11fceaca7490a87c.
https://github.com/mono/mono/pull/10432#discussion_r215009888

This area of thread creation needs work.
1. We have function pointers with almost gratuitous casts,
2. inconsistent return types (motivating function pointer casts)
3. return values ignored

https://github.com/mono/mono/issues/10467
https://github.com/mono/mono/issues/10319#issuecomment-417739621
and more.
2018-09-05 00:33:12 -07:00
Jay Krell 22108e5f53 [cxx] [mini] Convert to be valid C and C++. (#10437)
* [cxx][mini] compile_methods: cast function pointer passed to mono_thread_create_internal to void*. This should be improved in future.

* [cxx][mini] mono_read_method_cache: C++ does not allow goto around initialization.

* [cxx][mini] mono_read_method_cache: C++ does not allow goto around initialization.

* [cxx][mini] decode_exception_debug_info: Use Enum a |= b instead of a = (Enum)(a | b); one of these might be have recent damage.

* [cxx][mini] init_method: C++ does not allow goto around initialization.

* [cxx][mini] get_new_trampoline_from_page: cast twice to guint8* instead of void*.

* [cxx][mini]Strengthen MonoAotFileInfo.runtime_version from void* to char*.

* [cxx][mini] Weaken decode_vtype(addr, buf) from guint8* to void*, but then assign right back to guint8* locals for easy to author and read diff.

* [cxx][mini] Weaken decode_value(addr, buf) from guint8* to void*, but then assign right back to guint8* locals for easy to author and read diff. (like previous but decode_vtype vs. decode_value)

* [cxx][mini] vm_commands: standard C++ has no designated initializers; actual support by compilers varies, but effectively no support and trivial to do without. (current clang++ good support, current g++ some support, g++4.4 no support, msvc presumed no support).

* [cxx][mini] Cast function pointer from void* to correct type.

* [cxx][mini] exceptions-amd64.c: mono_arch_ip_from_context: cast from integer to void*.

* [cxx][mini] exceptions-amd64.c: mono_arch_ip_from_context: cast from void* to MonoContext*.

* [cxx][mini] exceptions-amd64.c: fast_find_range_in_table_no_lock_ex: Cast from void* to DynamicFunctionTableEntry* twice. On the second one, it might be clearer to put the cast further to the left, i.e. just after =.

* [cxx][mini] exceptions-amd64.c: initialize_unwind_info_internal: Cast parameter to mono_arch_unwindinfo_create to void**.

* [cxx][mini] exceptions-arm.c: mono_arm_get_exception_trampolines: Change local variable tramp from guint8* to void*.

* [cxx][mini]exceptions-wasm.c: Cast returned function pointers to void* a few times.

* [cxx][mini] exceptions-x86: Fix win32_handle_stack_overflow(sctx) to be CONTEXT* instead of struct sigcontext *.

* [cxx][mini] exceptions-x86: win32_seh_init: Cast mono_win32_get_handle_stackoverflow() from void* to correct function type.

* [cxx][mini]mono_arch_exceptions_init: Cast GetProcAddress() to correct function pointer type and call through correctly typed function pointers.

* [cxx][mini]exceptions-x86.c: mono_arch_ip_from_context: Cast from integer to void*.

* [cxx][mini]exceptions-x86.c: mono_arch_handle_exception: Cast from void* to struct sigcontext*.

* [cxx][interp] C++ deprecates the register keyword, remove it.

* [cxx][interp] C++ deprecates the register keyword, remove it.

* [cxx][mini] liveness.c: Change MonoPtrSet to a union and then use GHashTable* instead of void* instead of casting from void*.

* [cxx][mini] main.c: probe_embedded: Change local item_size from uint64_t to uint32_t to fix error about it being truncated when initializing MonoBundledAssembly. Could cast instead.

* [cxx][mini] C++ does not allow goto around initialization.

* [cxx][mini]Do not mixup enum types between MONO_CEE_ and CEE_. This fixes an error. We might wanto have the one set of values alias the other, but this wasn't a big problem actually.

* [cxx][mini] C++ does not allow goto around initialization.

* [cxx][mini] Cast from void*.

* [cxx][mini] Cast pointer to pointer-sized integer before casting
to integer or enum. Otherwise errored.

* [cxx][mini] Cast function pointer to void* to mono_arch_instrument_prolog() and mono_arch_instrument_epilog().

* [cxx][mini] Change get_delegate_invoke_impl() from void* to guint8* -- probably reduced need for additional casts.

* [mini] A field per line (MonoCompileArch.omit_fp, omit_fp_computed).

* [cxx][mini] Cast mono_aot_get_trampoline() to guint8* from void*.

* [cxx][mini] Cast parameters to __builtin___clear_cache from guint8* to char*.

* [cxx][mini] Remove casts on mono_arch_get_seq_point_info().

* [cxx][mini] Cast g_hash_table_lookup() from void* to SeqPointInfo*.

* [cxx][mini] Cast integer to enum MonoJumpInfoType. Could maybe change the incoming type to MonoJumpInfoType.

* [mini] A field per line (MonoCompileArch.omit_fp, omit_fp_computed).

* [cxx][mini] Remove cast to CallInfo*.

* [cxx][mini]mini-arm64.c: Cast pointer to pointer-sized integer before casting to other integer or enum.

* [cxx][mini] Cast from void* to guint8*, though this one is now covered by g_cast.

* [cxx][mini] Change types and add casts due to void*/non-void* mix.

* [cxx][mini] mini-exceptions.c: first_managed change local data from void*** to void**, and likewise the cast on its assignment.

* [cxx][mini][profiler] Cast integer to enum MonoExceptionEnum multiple times.

* [cxx][mini] Weaken mono_handle_exception(obj) from MonoObject* to void*, and then store it right into a local MonoObject*. This alleviates casts elsewhere.

* [cxx][mini] Cast g_hash_table_lookup() from void* a few times.

* [cxx][mini] More pointer casts.

* [cxx][mini] Change get_delegate_invoke_impl() from void* to guint8* to alleviate casts.

* [cxx][mini] Cast result of mono_arch_instrument_prolog() and mono_arch_instrument_epilog().

* [cxx][mini]Change MagicTypeInfo.{big_stack_type,small_stack_type,stack_type} from short to enum MonoStackType : 16, under #ifdef __cplusplus, to allevate casts and strengthen types.

* [cxx][mini] Cast from integer to enum MonoStackType. This can probably be improved, i.e. by changing the source type to enum.

* [cxx][mini]emit_intrinsics: Change local stack_type from int to MonoStackType to alleviate casts and strengthen  types.

* [cxx][mini] Cast from integer to enum MonoStackType. This can probably be improved, i.e. by changing the source type to enum.

* [cxx][mini] Cast pointers g_hash_table_lookup() and profiler input (byte* instead of void*).

* [cxx][mini] Fix the function pointer parameter type to add_signal_handler so avoid casts, but add one cast from function pointer to function pointer for systems lacking MONO_ARCH_USE_SIGACTION.

* [cxx][mini] mini-posix.c: sampling_thread_func: Remove designated initializer.

* [cxx][mini] Change get_delegate_invoke_impl() from void* to guint8*() to reduce casts at its callers.

* [cxx][mini] Undo g_cast support on mono_arch_instrument_prolog() and mono_arch_instrument_epilog(), probably a mistake from a recent other PR, harmless. i.e. remove parens from around that suppress macro expanstion

* [cxx][mini] Cast return of mono_arch_instrument_prolog and mono_arch_instrument_epilog to guint8*.

* [cxx][mini] Remove a layer from some TLS access -- macro vs. function that might not inline.

* [cxx][mini] Strengthen the parameter to mono_set_lmf_addr() from void* to MonoLMF**.

* [cxx][mini] Provide a typedef MonoAbortFunction for MonoJitTlsData.abort_func.

* [cxx][mini] Strengthen the output of setup_jit_tls_data from void* to MonoJitTlsData* and the input function pointer from void* to MonoAbortFunction, eliminating existing and future casts.

* [cxx][mini] A few pointer and enum/int casts.

* [cxx][mini] Change mini_llvmonly_initial_imt_tramp locals from gpointer* to IMTTrampFunc** to alleviate casts.

* [cxx][mini] Cast some function pointers to void*.

* [cxx][mini] Cast void* to MONO_SIG_HANDLER_INFO_TYPE* for the non-HAVE_SIG_INFO case. We could maybe change the void* local to MONO_SIG_HANDLER_INFO_TYPE*, since we are casting it to that anyway.

* [cxx][mini] Cast function pointer to void*.

* [cxx][mini] Cast void* to GSList* twice.

* [cxx][mini] Cast function pointer to mono_runtime_init_checked. In future we should  get all these types and parameters to match.

* [cxx][mini] Cast result of mono_arch_instrument_prolog/mono_arch_instrument_epilog to guint8*.

* [cxx][mini]Change return type of get_delegate_invoke_impl from void* to guint8*.

* [cxx][mini] Cast result of mono_arch_instrument_prolog/mono_arch_instrument_epilog to guint32*.

* [cxx][mini] Cast function pointers to void*.

* [cxx][mini] Cast from void* to non-void*.

* [cxx][mini] Change types and add casts due to void*/non-void* mix.

* [cxx][mini] Pointer casts.

* [cxx][mini] Pointer and int/enum casts, and widen pointer before casting to smaller integer.

* [cxx][mini] Strengthen types from void* to non-void* within x86 MonoCompileArch. (void *cinfo, *ss_tramp_var, *bp_tramp_var; => CallInfo *cinfo; MonoInst *ss_tramp_var; MonoInst *bp_tramp_var;)

* [cxx][mini] int/enum casts

* [cxx][mini] create_jit_info: Use Enum a |= b instead of a = (Enum)(a | b); one of these might be have recent damage.

* [cxx][mini] Pointer/int/enum casts.

* [cxx][mini] Change mono_cfg_set_exception(int) to mono_cfg_set_exception(MonoExceptionType) to reduce casts elsewhere.

* [cxx][mini] Pointer cast.

* [cxx][mini] Change mono_cfg_set_exception(int) to mono_cfg_set_exception(MonoExceptionType) to reduce casts elsewhere.

* [cxx][mini] Pointer casts.

* [cxx][mini] recursively_make_pred_seq_points: Fix parameter to g_array_index from void* to MonoInst*.

* [cxx][mini] Change parameter to decompose_vtype_opt_load_arg from guint32* to gint32*, and assign right back to local guint32*, to avoid casts, and limit diff, and obviously preserve semantics.

* [cxx][tasklets] Add include loader-internals.h.

* [cxx][mini]Fix cast mono_win32_get_handle_stackoverflow() to function pointer restore_stack.

* [cxx][mini] Casts. See https://jenkins.mono-project.com/job/test-mono-pull-request-amd64-osx-products-sdks-android/4480/parsed_console/log.html.

* PR: Replace goto up with goto down, and split decl/init instead.
2018-09-04 22:48:12 -07:00
Jay Krell 34b5b4c4e2 [cxx] mono_context_get_current is extern "C" because it is assembly. (#10457)
See https://jenkins.mono-project.com/job/x/13345/parsed_console/log.html.
2018-09-04 16:11:59 -07:00
Jay Krell a7b9128bf1 [cxx][wasm] Fix mismatched extern "C". (#10439)
https://jenkins.mono-project.com/job/test-mono-pull-request-wasm/4437/parsed_console/log.html
WASM-ERR: missing function: mono_attach_init

https://jenkins.mono-project.com/job/w/15060/parsed_console/log.html
attach.c:600:1: warning: no previous declaration for 'void mono_attach_parse_options(char*)' [-Wmissing-declarations]
attach.c:605:1: warning: no previous declaration for 'void mono_attach_init()' [-Wmissing-declarations]
attach.c:610:1: warning: no previous declaration for 'gboolean mono_attach_start()' [-Wmissing-declarations]
attach.c:616:1: warning: no previous declaration for 'void mono_attach_maybe_start()' [-Wmissing-declarations]
attach.c:621:1: warning: no previous declaration for 'void mono_attach_cleanup()' [-Wmissing-declarations]

https://jenkins.mono-project.com/job/test-mono-pull-request-wasm/4437/parsed_console/log.html
warning: unresolved symbol: mono_attach_cleanup
warning: unresolved symbol: mono_attach_init
warning: unresolved symbol: mono_attach_maybe_start
warning: unresolved symbol: mono_w32file_get_volume_information
2018-09-04 11:54:20 -07:00
Jay Krell aa0b1d3440 [cxx] mono_thread_info_current extern "C" on Windows. (#10456)
See https://jenkins.mono-project.com/job/w/15104/parsed_console/log.html
2018-09-04 11:53:22 -07:00
Jay Krell 24c1f2a40c Linker-supplied __ImageBase must be extern "C". (#10454)
https://jenkins.mono-project.com/job/w/15083/parsed_console/log.html
assembly.obj : error LNK2001: unresolved external symbol "struct _IMAGE_DOS_HEADER __ImageBase" (?__ImageBase@@3U_IMAGE_DOS_HEADER@@A) [d:\j\workspace\w\msvc\libmono-dynamic.vcxproj]
d:\j\workspace\w\msvc/./build/boehm/Win32\bin\ReleaseCxx\mono-2.0-boehm.dll : fatal error LNK1120: 1 unresolved externals [d:\j\workspace\w\msvc\libmono-dynamic.vcxproj]
Since it is data, extern "C" w/o braces is confusing, but maybe valid, so begin/end form is used.
2018-09-04 09:26:42 -07:00
Alexander Köplinger 3c2396bf0d [tools] Ignore .a files in monograph and pedump
They showed up after https://github.com/mono/mono/commit/9cee98fe36b15467b1b056af152a8fded193a3d5
2018-09-04 16:19:09 +02:00
Matthew Leibowitz 6d6c046d36 [mono-api-tools] Split properly for cross-platform (#9918)
When creating a diff on windows, the lines are split on the `\n` so the `\r\n` results in multiple lines:

**START SNIP**
Obsoleted methods:

```diff
 [Obsolete ("Use AddRoundRect instead.")]

 public void AddRoundedRect (SKRect rect, float rx, float ry, SKPathDirection dir);
```
**END SNIP**

This PR makes sure to use the platform line endings everywhere. When adding line endings, use the same that `StringBuilder` uses - platform endings. This makes it easy to split - just use the platform as that is what everyone is using.
2018-09-04 16:14:14 +02:00
Alexander Kyte f463581b2c [runtime] Declare mono_aot_register_module in mkbundle stub (#10170)
* [runtime] Declare mono_aot_register_module in mkbundle stub

* [runtime] Fix inconsistent types for exported API

Thank you to @batmaninpink
2018-09-04 09:41:01 -04:00
Alexander Kyte 914408d355 [runtime] Fix configure flag typos (#10390)
This doesn't make any functional change right now, but it clears
this up for readers and future users.
2018-09-04 09:35:08 -04:00
Rolf Bjarne Kvinge aa25ab45fc [mono-cil-strip] Add support for -q to be quiet. (#10421) 2018-09-04 13:30:42 +02:00
Alexander Köplinger 3e841bf089 Update framework assemblies list in assembly.c (#10214)
Fixes https://github.com/mono/mono/issues/9973
2018-09-04 13:16:15 +02:00
monojenkins 0a4aa46fbb Bump API snapshot submodule 2018-09-04 09:59:46 +02:00
EgorBo 6233948173 Add tests 2018-09-04 09:59:46 +02:00
EgorBo 6ab52c9a99 Add old String.Concat with __arglist 2018-09-04 09:59:46 +02:00
Jay Krell c310ae0489 Fix mkbundle alignment to work with Windows. See https://github.com/mono/mono/issues/8225. (#8884)
* Fix mkbundle alignment to work with Windows. See https://github.com/mono/mono/issues/8225.
Consider doing this only for Windows.

* Align only first file at 64K, the rest the previous 4K.

* Ensure strings are nul terminated, if alignment doesn't handle it.
StringPairs already are.

* Save 30K on average on Unix, for an entire bundle (not per file within, but the entire bundle).

* Probe runtime for for MZ signature to determine if target
is Windows. "Style" is about host.
2018-09-03 18:39:16 -04:00
Ludovic Henry 0dbcdd5c28 [sdks] Add cross-{arm,arm64,x86,x86_64}{,-win} runtimes for XA + Unify provisioning of LLVM for both Android and iOS. (#10445)
* [sdks] Add CrossRuntimeTemplate

* [sdks] Add cross-{arm,arm64,x86,x86_64}{,-win} runtimes for XA

* [sdks] Use CrossRuntimeTemplate for iOS

* [sdks] Factor various variables for RuntimeTemplate

* [sdks] Use MonoRuntime template for desktop-x86_64

* [sdks] Unify provisioning of LLVM for both Android and iOS.

A global CFLAGS would be set in `run-jenkins.sh`, and that would screw up with LLVM. The global CFLAGS makes sense as long as we are only building Mono, but that's not the case with LLVM anymore.

* [sdks] Remove android-armeabi, it's been removed from XA already and the target has been deprecated in the NDK
2018-09-03 17:30:31 -04:00
Jay Krell 24e4dfec08 Use AC_CHECK_FUNCS(mincore mlock munlock). 2018-09-03 12:00:31 -07:00
Zoltan Varga f25f9e5f2b [jit] Add intrinsics for Math.Round/Floor/Cecil () on SSE41. (#10039)
* [jit] Add intrinsics for Math.Round/Floor/Cecil () on SSE41.

* Add LLVM support.

* Fix the build.

* Move the code to mono_arch_emit_inst_for_method ().

* Fix the build.
2018-09-03 12:13:43 -04:00
Marek Safar 066a7c206e [Facades] Clean up no longer needed references (#10434)
and build more facades in parallel
2018-09-03 18:05:03 +02:00
Jonathan Pryor 19fef52c18 [Mono.Options] Add CommandSet.GetCompletions() (#10426)
* [Mono.Options] Add `CommandSet.GetCompletions()`

Add a `Mono.Options.CommandSet.GetCompletions()` method, which returns
all possible commands which match a given "completion prefix".

This is intended for e.g. bash completion support.

* Bump API snapshot submodule
2018-09-03 18:01:33 +02:00
Maxim Lipnin faaa9a41c6 [System.Reflection] CoreFX import for FieldInfo type. (#10370)
Part of #9660.

The changes:
- included FieldInfo type from CoreFX + related xunit tests;
- made Mono-implemented class partial; removed duplicated code;
- moved GetOptionalCustomModifiers and GetRequiredCustomModifiers methods to MonoField type;
- moved GetTypeModifiers extern method and related icall to MonoField type;
- updated ToString method in CustomAttributeTypedArgument type with CoreFX implementation;
2018-09-03 11:48:39 +02:00
Katelyn Gadd 84af5b235e Move the PreBuild dependency property later in the file so targets can't override it (#10429)
* Move the PreBuild dependency property later in the file so targets can't override it

* [csproj] Update project files
2018-09-02 17:54:01 +02:00
Alexander Köplinger 707bddeaff [mini] Prevent automake from generating a default mono_SOURCES
It was caused by https://github.com/mono/mono/commit/3912412f5059337724199cc132658e5ebd401b68
and broke the tarball build because the default mono.c didn't exist to be disted.
2018-09-02 17:43:28 +02:00
Jay Krell aeb965e0d8 Replace check for mincore with check for mlock. 2018-09-01 15:07:58 -07:00
Jay Krell 1f6d6ef582 mono_pages_not_faulted is not used, remove it. 2018-09-01 15:07:58 -07:00
Jay Krell e42e7fddee [cxx] [sgen] [utils] [jit] Casts, some type change. (#10425)
* [cxx] Add const, and static while there.
* [cxx] Auto cast in ARM_EMIT
* [cxx] Cast from int to enum.
* [cxx] Cast from void*.
* [cxx] Cast function pointer to void*.
* [cxx] Cast int to GCHandleType.
* [cxx] Cast to GCObject*.
* [cxx] Cast unsigned char* [cxx] to char*.
* [utils] Cast void* [cxx] to function pointer (FIXME) and remove extra parens (former macro?).
* [cxx] Change int parameter to enum MonoGCRootSource.
* [cxx] Do not goto around init.
* [cxx] Fix cast -- void* [cxx] vs. void**, and volatile per error but it is optional.
* [cxx] Fix type for pointer to array element -- void** [cxx] vs. void*.
* [cxx] Remove duplicate line from Makefile.
* [cxx] Remove incorrect cast.
* [cxx] Remove unneeded cast.
* [cxx] Spell out enum values for easier to read headers.
* [cxx] Split up compound initialization with NULL because the types vary, i.e. remove implicit conversion from void* that would need a cast.
* [cxx] Static thread locals fail to link on Linux; make them extern. FIXME?
* [cxx] Strengthen void* [cxx] to SGenFinalizationProc.
* [cxx] Templatize mono_native_thread_create (FIXME).
* [cxx] Use G_BEGIN_DECLS not MONO_BEGIN_DECLS in non-public headers, for brevity and subtle extra annotation.
* [cxx] Widen integer to pointer-size before casting to pointer.
* [cxx] Wordsmith comment.
* [cxx] Wrapping a bunch of includes in extern "C" is generally in poor form and unnecessary.
* [cxx] [sgen] Remove unnecessary cast.
* [cxx] [sgen] casts
* [cxx] [utils] Add const with a string literal.
* [cxx] [utils] Casts from void* [cxx] and between int/enum.
* [cxx] [utils] Clarify empty macros.
* [cxx] [utils] Compile more as C++ if enabled.
* [cxx] [utils] extern "C" mono_file_map_error. (FIXME?)
* [cxx] [utils] Remove autocast from mono_lock_free_alloc.
* [cxx] [utils] ifdef wasm the type in unused mono_pages_not_faulted so it compiles, remove incorrect comment, add FIXME.
2018-09-01 14:37:15 -07:00
Jay Krell 919772e008 [cxx] Add LDFLAGS -no-undefined to catch missing extern "C". (#10422) 2018-09-01 11:13:37 -07:00
Jay Krell 5b164bdaf0 [cxx] Add missing ICALL_EXPORTs, esp. but not only if excess G_BEGIN_DECLS is removed. (#10401) 2018-09-01 02:00:00 -07:00
Jay Krell 72c376706e Fix test dependencies build problem. (#10388)
* Dependencies work better with .lo.
2018-09-01 00:28:18 -07:00
Alexis Christoforides d49d32da19 [MacSDK] Go back to incluging opt/llc after change in LLVM install process
Fixes https://github.com/mono/mono/issues/10243
2018-09-01 06:10:27 +03:00
Jay Krell d850f1d0ba [cxx] Some required extern "C" and some cleanup. (#10382)
* Use typedefs of structs in the usual fashion.

* [cxx] externC to the 'operating system'

* [cxx] Add externC for debugger interop.

* Fix indentation.

* [cxx] externC on chkstk.

* [cxx] externC on sys_icache_invalidate.

* [cxx] externC on __aeabi_read_tp.

* [cxx] externC on sys_icache_invalidate.

* Remove exactly duplicated license.
2018-08-31 18:48:01 -07:00
Jay Krell bb0d0f4181 Minor cleanup. (#10407)
* __EGLIB_X11 is defined but never used.

* Let compiler decide inline.

* Get ves_icall_System_Environment_GetOSVersionString declaration from environment-internal.h.

* Put ves_icall_System_Reflection_Assembly_GetCallingAssembly at start of line for grep ^foo.

* Remove accidental space.

* Remove casts and error_init.

* Fix warning: sgen-mono.c:959:36: warning: incompatible pointer to integer conversion passing
      'void *' to parameter of type 'MonoGCDescriptor'
      (aka 'unsigned long long') [-Wint-conversion]
        return mono_gc_alloc_fixed (size, NULL, source, key, msg);

* Add a comment and associate comment more closely with code.

* Remove gratuitous pragma -- header is only included once, fix the include.
2018-08-31 14:38:30 -07:00
Jay Krell 27a32b0d20 g_malloc/g_calloc instead of malloc/calloc (#10229) 2018-08-31 13:13:13 -07:00
Jay Krell 181a63b7b0 [cxx] Just enough extern "C" for profilers, libtest, MonoSupportW, Mo… (#10403)
* [cxx] Just enough extern "C" for profilers, libtest, MonoSupportW, MonoPosixHelper, THREAD_INFO_TYPE, WebAssembly interop.
Some of this is redundant, i.e. in glib.h and mono-threads-coop.h.
But if someone removes otherwise unnecessary header wrappers, these become meaningful.

This is an alternative to:
https://github.com/mono/mono/pull/10160 Remove most G_BEGIN_DECLS but add back to make things work.
https://github.com/mono/mono/pull/10284 Port libtest to C++
https://github.com/mono/mono/pull/10294 Rework mono-threads.h THREAD_INFO_TYPE parameterization to not violate C++ typesafe linkage.
https://github.com/mono/mono/pull/10297 Fix typesafe linkage problem in gc-internals.h THREAD_INFO_TYPE parameterization.
https://github.com/mono/mono/pull/10341 Port all of MonoPosixHelper MonoSupportW to C++, including K&R zlib.
https://github.com/mono/mono/pull/10342 Port profilers to C++
https://github.com/mono/mono/pull/10378 Port all of MonoPosixHelper MonoSupportW to C++, except K&R zlib.
https://github.com/mono/mono/pull/10375 Eliminate THREAD_INFO_TYPE by suggestion, to fix typesafe linkage.
https://github.com/mono/mono/pull/10379 Mark the 14 functions used by MonoPosixHelper as extern "C" (basically this PR)

Most of the alternatives are very reasonable and remain viable, except porting K&R zlib.
Hopefully in future, SgenThreadInfo will derive from MonoThreadInfo, improving the THREAD_INFO_TYPE fixes.

* [cxx] Replace invalid two extern "C" with just one.
2018-08-31 13:12:20 -07:00
Jay Krell 5ec266d8bb [cxx] Char literals are now chars, not ints (sizeof changes) and indexing by them warns. Cast. (#10118) 2018-08-31 11:30:47 -07:00
monojenkins 01f5781b33 Merge pull request #10240 from frebib/fix-strerror_r
[runtime] Use AC_FUNC_STRERROR_R() in Mono.Posix

Hopefully this is less of a disaster than #9691 

Inspired by https://github.com/mono/mono/commit/3b3b48dbb4cdbda44ffa2f10e74f819acb78bd96
Fixes https://github.com/mono/mono/issues/9532

Signed-off-by: Joe Groocock <[email protected]>



<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->
2018-08-31 14:25:05 -04:00
Jay Krell baa3ab7334 [cxx] Wrap fmod in mono_fmod for stronger future-proofing. (#10178) 2018-08-31 11:11:30 -07:00
Jay Krell fa09dfb814 Strengthen several fields and TLS and functions from void*. (#10269)
* Strengthen MonoImage.aot_module and _MonoJitInfo.aot_info to be MonoAotModule* instead of void*.

* Strengthen thread locals away from void*.

* Strengthen _MonoThreadInfo from void* to HandleStack*.

* Elminate "struct".
Introduce mono-forward.h and mono-forward-internal.h.
Add cast for profiler.

* Strengthen tramp_info; remove struct on JitInfo; remove a cast.

* Tweak and add #includes accordingly.
Any header that was providing a typedef, or forward declaring a struct and now
using typedef instead must include a header to get it.
Internal types must come from internal header.
Internal header may include internal header.
Public header must not include internal header.
foo.c does not have to include what foo.h must include to declare foo.c's functions (mono-tls.c
  does not need to include mono-forward-internal.h)

I misssed mono/metadata/metadata-internals.h:     void *image_info; do it later.
2018-08-31 10:21:53 -07:00
Katelyn Gadd b97b890334 Update corlib post-build event to run ilasm for Unsafe.il, then pass it to cil-stringreplacer (#10381)
This ensures that System.CompilerServices.Unsafe has implemented method bodies, necessary for Span and similar use cases.
2018-08-31 17:48:07 +02:00
Katelyn Gadd a6a8abde09 Kill sln dependencies (#10406)
* Remove use of sln dependencies and use csproj project references instead

* Rewrite jay.vcxproj so it builds correctly even without help from the sln file

* Force pre-build event to run after references are resolved. Change how culevel.exe path is computed to be more resilient.

* [csproj] Update project files
2018-08-31 17:44:27 +02:00
Martin Baulig 8ac5b8e544 [System]: Fix MonoBtlsProvider.CheckValidationResult () logic. (#10396)
See my comments in https://github.com/mono/mono/pull/10134 for details.

The problem was that
1. It is wrong to assume that `chain != null`.  In fact, it likely won't be if `wantsChain == false`.
2. Similarly, the `storeCtx` should only be used if `storeCtx != NULL && wantsChain == true`.
3. It was missing `MonoBtlsX509Error.HOSTNAME_MISMATCH`.
4. I reformatted and re-indented the method to match Mono's style.
2018-08-31 17:12:16 +02:00
Martin Baulig 0d7f5778ec [System]: Make `MobileAuthenticatedStream's read buffer large enough to hold a full TLS record. (#10393) 2018-08-31 16:55:26 +02:00
monojenkins 5c6233d813 [bcl] Update BCL Linked Size 2018-08-31 11:52:05 +02:00
Egor Bogatov ba24bc4ace Bump CoreCLR to fix two math acceptance tests (#10399)
Includes mono/coreclr#1
2018-08-31 10:58:12 +02:00
Aleksey Kliger (λgeek) 88efee700d [coop] Fixup dump_threads () legend to match thread state enum values (#10264) 2018-08-30 19:16:49 -04:00
Nikolay Sivov a7705851aa [mono] Fix maybe-uninitialized warning. 2018-08-31 02:10:27 +03:00
Nikolay Sivov 46de5b7283 [mono] Add default case for thread_summary_state_to_str(). 2018-08-31 02:10:07 +03:00
Nikolay Sivov adf862b8e1 [mono] Remove unused variable.
It was used to addref appdomain at some point, but this logic was removed since then.
2018-08-31 02:09:43 +03:00
Aleksey Kliger 637c07a18b [coop] Use unbalanced transition to GC Unsafe in mono_raise_exception
Since `mono_raise_exception_deprecated` never returns, the transition won't be
balanced.  This fixes a cookie-counting problem (assert on mono shutdown) in
coop and hybrid checked builds using the new test case:

    MONO_THREADS_SUSPEND=coop MONO_CHECK_MODE=thread,gc mono mono/tests/install_eh_callback.exe
2018-08-30 18:12:42 -04:00
Bernhard Urban 3b50755628 [exceptions] ftnptr_eh_callback test that stresses n2m transitions
on Xamarin.iOS it happens that the ftnptr_eh_callback calls into managed
code, that is yet another native-to-managed transition.
2018-08-30 18:12:42 -04:00
monojenkins f5a8683462 Merge pull request #10314 from lewurm/remove-mono-init-context-from-current
[mini] cleanup around MONO_INIT_CONTEXT_FROM_CURRENT and MONO_INIT_CONTEXT_FROM_FUNC
2018-08-30 15:15:56 -04:00
Jay Krell 3912412f50 [cxx] Port mono main to be C++, and externC some Windows exports (#10345)
* [cxx] Port mono main to be in C++.
This allows to remove more extern "C" from glib.

* [cxx] DllMain should be extern "C".

* [cxx] Make OutOfProcessFunctionTableCallback and OutOfProcessFunctionTableCallbackEx externC.

* Remove do-nothing line and change .o to $(OBJEXT).
2018-08-30 11:57:38 -07:00
Jay Krell 0605cd2f74 Remove gratituious ifdef -- just have one portable form -- alloca and no variable length arrays. (#10288) 2018-08-30 11:26:48 -07:00
monojenkins 609f65371c Merge pull request #10355 from BrzVlad/fix-sgen-string
[sgen] Fix string size inconsistency between alloc/scan

This could lead to crashes when having strings with size at the LOS boundary.

https://github.com/mono/mono/issues/10309



<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->
2018-08-30 13:56:06 -04:00
Rémi BOURGAREL bab9779e34 Changed http: to https: (#9769)
I changed all the link for going to the https version as there is no redirect in some of them (.net foundation and monoproject)
2018-08-30 11:46:24 -04:00
Ludovic Henry 5a3f086954 [sdks] Allow for overwriting llvm-{llvm32,llvm64} CC, CXX, CFLAGS and CXXFLAGS (#10364) 2018-08-30 11:28:04 -04:00
Jay Krell 479ade2212 [cxx] Port sgen-grep-binprot to C++, to reduce externC in glib. (#10368) 2018-08-30 08:27:40 -07:00
monojenkins dfa55e2331 Merge pull request #10357 from lewurm/interp-whitelistisnan
[interp] white list nfloat::IsNaN ()

needs backport to `2018-06` and `2018-08`
2018-08-30 11:05:06 -04:00
monojenkins 177f5d4d25 Merge pull request #10261 from EgorBo/llvm-llc-cli
Pass arguments to LLVM's LLC via --aot=llvmllc

Currently we can override arguments passed to llvm's `opt` via `--aot=llvm,llvmopts="some args"`, this PR introduces a similar capability for `llc` - `llvmllc` parameter.
E.g. for my environment Mono uses the following arguments for llc:
```
-march=x86-64 -mattr=sse4.1 -asm-verbose=false -disable-gnu-eh-frame 
-enable-mono-eh-frame -mono-eh-frame-symbol=_mono_aot_fffff_eh_frame 
-disable-tail-calls -no-x86-call-frame-opt -relocation-model=pic 
-filetype=obj -o "mono_aot_IWvNWm/temp-llvm.o" "mono_aot_IWvNWm/temp.opt.bc"
```
what if I want to test some avx stuff, e.g. `-march=core-avx2 -O2` and test other parameters.
2018-08-30 10:40:25 -04:00
Ankit Jain ae4f6dd35c Bump NuGet.BuildTasks to upstream dev branch (#10334) 2018-08-30 12:08:34 +02:00
Alexander Köplinger 9a1cda1882 Follow up to bump target requirement to OSX 10.9 Mavericks
After another grep with different search terms I found a few more matches.
2018-08-30 12:46:43 +03:00
Jay Krell 3f1a1fd2aa [cxx] Add loader-internals.h missed in https://github.com/mono/mono/pull/10252. (#10377) 2018-08-30 10:51:39 +02:00
Katelyn Gadd bfc35fc6e6 Fix issue #9452: Add a cache for CustomMarshaler instances (#10090)
Extracted custom marshaler logic into managed code.
Fixed crash when using mono_verbose_method
Fixed free of zero desc ptr in mini_method_compile when verbose method variable doesn't resolve to a method
If the cfg is in verbose mode emit a brief message on abnormal termination of IR generation
Use CEE_MONO_CLASSCONST to store the type of the custom marshaler since it appears to work with AOT
Handle various error conditions in Marshaler.GetInstance and produce exceptions that roughly match .net framework
Use ValueTuple instead of a custom tuple type. Use LazyInitializer to init dictionary for marshalers on demand.
Add test case for custom marshalers in linker tests (disabled because the linker does not understand custom marshalers yet)
2018-08-29 20:56:43 -07:00
Jay Krell 29cfaa70a3 [cxx] Make some code valid C++, esp. adding casts and esp. not touching allocators. alternative to 10036 (#10252)
* [cxx] Make some code valid C++, esp. adding casts and esp. not touching allocators.

* [cxx] PR: Update comment on MonoThreadPriority.

* [cxx] PR: Provide templates for register_icall mono_mb_emit_icall
mono_register_jit_icall mono_register_jit_icall_full mono_aot_register_jit_icall
to cast from arbitrary type to gpointer or gconstpointer.
Ideally this would be limited to function pointers but anything is progress here.

* [cxx] Move C++ template mono_add_internal_call from loader.h to new loader-internals.h.
[cxx] Add C++ template register_opcode_emulation.
[cxx] Add C++ template register_icall.
[cxx] Add C++ template register_icall_no_wrapper.
[cxx] Add C++ template register_icall_with_wrapper.
[cxx] Add C++ template mono_emit_jit_icall.
[cxx] Add C++ template mini_register_opcode_emulation.
[cxx] Add #include loader-internals.h.
[cxx] Remove preemptive extern "C++" until/unless needed.

* [cxx] Change preexisting #define register_icall to C++ templates.
2018-08-29 20:03:50 -07:00
Jay Krell 9cee98fe36 [cxx] Port pedump, monograph, monodis, unit-tests to C++. (#10271)
- #define HAVE_SGEN_GC in order to get missing prototype of sgen_sort.
 - Move main to static libraries, in order to compile as C++ but not link as C++.
   Linking pedump as C++ in particular broke running it in Windows x64 CI.
 - Some const fix.
 - "class" => "klass"

There are advantages and disadvantages here.

adv: No file rename.
dis: Not linking to libc++ -- which broke Windows x64 CI running pedump.
adv: Linking with -xc++ incorrectly treats .o/.a files as C++ text and fails to link; avoids that.

Moving these to C++ enables the runtime to not need extern "C" sprinkled around
on internals -- which was done but not accepted (https://github.com/mono/mono/pull/10160#pullrequestreview-148551783).
2018-08-29 19:05:32 -07:00
Jay Krell 817b479540 [cxx] Allow mono_gc_alloc_fixed subset outside of metadata (mini/tasklets.c), without breaking with C++ typesafe linkage. (#10293)
This enables avoiding externC workaround here:
  https://github.com/mono/mono/pull/10160/files#diff-bd3a3d5c2bfd6af46373b3844de9c1d0R163
2018-08-29 18:59:43 -07:00
Jay Krell fffa083292 [cxx] Add ICALL_EXPORT in sysmath.c (#10333)
* [cxx] sysmath.c add ICALL_EXPORT.
* Add #include icalls.h.
2018-08-29 13:03:14 -07:00
Rodrigo Kumpera 9de1d6c12a Merge pull request #10338 from jaykrell/norestrict
[cxx] C++ does not have restrict.
2018-08-29 14:34:13 -04:00
Katelyn Gadd 2d77536617 Bump target requirement to OSX 10.9 Mavericks (#10286)
Fixes #9581
2018-08-29 20:04:43 +02:00
Michael DeRoy 3decb63270 - Free the thread_info_key and thread_exited_key during unload to avoid crash when pthread_key_clean_all (#10063)
Free the thread_info_key and thread_exited_key during unload

Fixes a crash where pthread_key_clean_all will call destructors that should have been freed before unload.
2018-08-29 11:55:22 -04:00
Alexander Köplinger b75cf300c2 [eglib] Add the test subdir to DIST_SUBDIRS
779ee79081 broke the .deb/.rpm build
because the Makefile.in in the subdir didn't make it into the tarball.
2018-08-29 15:31:22 +02:00
Bernhard Urban 48e3e8ab12 [interp] white list nfloat::IsNaN () 2018-08-29 15:03:50 +02:00
Jay Krell 348cc41dc4 Disable tailcall of gsharedvt. (#10323)
* Revert "Revert "[jit] Disable tail calls from gsharedvt code for now.""

This reverts commit ce3c8ec3f2.

* Disable FullAOT tailcall/interface-conservestack/20.exe if MONO_ARCH_GSHAREDVT_SUPPORTED.

* Fix indent.
2018-08-29 13:01:38 +02:00
Vlad Brezae 16fa2e9b6d [sgen] Fix string size inconsistency between alloc/scan
This could lead to crashes when having strings with size at the LOS boundary.

https://github.com/mono/mono/issues/10309
2018-08-29 13:46:53 +03:00
Bernhard Urban 6118015744 [mini] fix memory dumping on devices (#10316)
[mini] fix memory dumping on devices

also, guard for `IP == NULL`: I haven't seen it in the wild, but when messing with EH I have seen it happen and then we have a segfault in the signal handler, which is... bad 😄 

we should backport this to `2018-06` and `2018-08`.
2018-08-29 05:40:08 -04:00
Bernhard Urban 3bd6d2f372 [interp] turn off optimizations for callers of INTERP_PUSH_LMF_WITH_CTX 2018-08-29 04:55:19 -04:00
Bernhard Urban cbc2f4eb77 [interp] attach LMF with MonoContext in interp2native transition
this is needed so that EH can resume into the interpreter when the
exception was raised via mono_raise_exception from native code.
2018-08-29 04:55:19 -04:00
Bernhard Urban 80c0969486 [exceptions] pop lmf stack before executing ftnptr_eh_callback 2018-08-29 04:55:19 -04:00
Kenneth Pouncey a237e972cc [wasm] Modify HttpClient to use a default handler provider. (#10152)
- Add a private static variable to HttpClient called `Func<HttpMessageHandler> GetHttpMessageHandler` that will be used to obtain the default message handler and can be set for example as follows:

```
		var httpMessageHandler = typeof(HttpClient).GetField("GetHttpMessageHandler", 
                            BindingFlags.Static | 
                            BindingFlags.NonPublic);

                httpMessageHandler.SetValue(null, (Func<HttpClientHandler>) (() => {
			return new MyHttpClientHandler ();
		}));
```

- If a handler is not set or returns null the default implementation HttpClientHandler will be returned.

- Add HttpClient.wasm.cs implementation to handle the default HttpClient
- Add simple test to the wasm test harness bindings-test.
- Reference https://github.com/mono/mono/issues/9941



<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->
2018-08-29 10:15:21 +02:00
Johan Lorensson 2fc3c3a939 Merge pull request #10321 from lateralusX/lateralusX/fix-cross-windows-llvm-support
Fix Windows LLVM mono cross compiler build.
2018-08-29 08:51:19 +02:00
Jay Krell 779ee79081 [cxx] int vs. enum -- bit overload version (#10274)
* [cxx] int vs. enum.

There are at least three or so approaches to this.

1. Sprinkle around casts.
2. Overload operators.
2a. Bit-only (| & ^ |= &= ^=)   This PR.
2b.  Also math (+ - ++ -- == !=)
3. typedef to int instead (https://github.com/mono/mono/pull/10231)

They all have tradeoffs.

1. Casts: The most line damage. Not huge, but the most.

2. Overloads: New idiom to some but an old idiom. Supported in this way by windows.h even.
  This is the most "C++y solution".

3. int: Highest level of source compat and semantic compat. Least line damage (just
change the declarations). Least debuggable and least typesafe.

In terms of semantic compat, even in C the guarantees aren't particularly strong.
Some enums will be int, some unsigned, depending on the values and the compiler.
Perhaps even other types, but I doubt it.

I observe C++ compilers don't tend toward unsigned the same way, so switching
to C++ will on some platforms lose unsignedness. Given we didn't have it portably
anyway, should be ok.

A typesafe enum has the properties that enum A cannot be silently assigned to enum B (ok,
there might be a warning), or from an integer.

A typesafe enum, bitfield or otherwise, can/will be shown symbolically by a debugger.
 (lldb does not handle bitfields, only strict enums)

A C enum might be debuggable, w/o typesafety.

A C enum can be freely mixed with other enums and integers.

A C++ enum is more restricted.

Using typedef int, is a maybe surprising option, but does provide the closest meaning to C enum.

Per guidance, this PR also changes one enum to #defines + int.

* PR: "mono" => "g"
"T" => "type"
static_cast where it works (not to reference)
Use templatized typedef instead of macro, if it works on g++4.4.
Add test.
Provide to build eglib tests.
Borrow CXXFLAGS_COMMON from https://github.com/mono/mono/pull/10271.
Add some const to test harness.

* g++4.4 compat (not quite C++11) -- use macro, not template typedef.

* Fix real problem with aliasing seen with g++4.4.
Use attribute(may_alias) when casting pointers/references.

* Add mono/eglib/test/enum.cpp.
2018-08-28 19:50:38 -07:00
Jay Krell 79d7029ef7 [cxx] C++ does not have restrict.
gcc/clang do have __restrict and/or __restrict__.
On MacOSX, __restrict is preprocessed out of the headers for C++.
On Linux, __restrict is used and preserved for C++.
I didn't check others.

__restrict does not appear to be part of the function signature.
You cannot overload on it.
It is not in the mangled name.
If you declare one way and implement the other, there is no warning or error.

Therefore, remove restrict.

There are alternatives.
One could preserve it for C only.
One could preserve it for C and for Linux/C++.
One could preserve it based on autoconf, and autoconf results on Mac and Linux.

Perhaps as well we will autoconf or ifdef wasm away use of these functions?
 If we merely if them away, we still need them.
2018-08-28 12:16:19 -07:00
Alexander Köplinger f0966dcd91 [metadata] Remove sysmath.h from Makefile.am
It was removed in c16ff9ab23.
2018-08-28 20:36:33 +02:00
Rodrigo Kumpera bd5cfc830b Merge pull request #10266 from kumpera/wasm-cleanup-4
[wasm] Another batch of AOT work. Now we crash when running AOT'd code!
2018-08-28 11:33:25 -04:00
Jay Krell 2dfa87f027 Fix misplaced const in mono_w32socket_setsockopt. (#10208) 2018-08-28 08:02:48 -07:00
Jay Krell 6a98a952df [Coop] Convert mono_TypedReference_ToObject. (#10296) 2018-08-28 10:54:19 -04:00
lateralusX 2f0a5a5526 Fix Windows LLVM mono cross compiler build.
This commit re-enables Windows LLVM mono cross compiler build + adjust to
new changes done in mono LLVM build system.
2018-08-28 15:26:16 +02:00
Egor Bogatov 76df02fb68 [corlib] Registry from CoreFX on Windows (#9855)
Needed for TimeZoneInfo.
Imports CoreFX's Registry API for Windows. Other platforms use old mono file-based Registry API implementation because CoreFX doesn't support it yet, see: https://github.com/dotnet/corefx/issues/14896
(however, some basic types such as enums are imported for all platforms)
Part of #8131
2018-08-28 14:30:48 +02:00
Martin Baulig a2515a0869 [System]: MonoTlsStream is now IDisposable and cleans up on error. (#10254)
When the TLS Handshake fails in `MonoTlsStream.CreateStream()`, then we must dispose
the `SslStream` to avoid a memory leak.

In addition to this, `MonoTlsStream` now implements `IDisposable` and is disposes
in `WebConnection.CloseSocket()`.

Fixes #8689
2018-08-28 14:29:31 +02:00
Maxim Lipnin 1450bde147 [System.Reflection] CoreFX import for MemberInfo (#9746)
Part of #9660.

The imported CoreFX types:
- MemberInfo;

The changes:
- used MemberInfo type from CoreFX;
- moved MetadataToken property from MemberInfo to leaf classes; added unit tests.
- updated icall-def.h for related types;
- updated corlib version;
- added overridings for new HasSameMetadataDefinitionAs property to leaf classes; 
- included more MemberInfo xunit tests to verify HasSameMetadataDefinitionAs property;
- renamed MemberInfoExtensions class to DbLinqMemberInfoExtensions in System.Data.Linq assembly to avoid a conflict with the class imported to System.Reflection namespace.
- [acceptance-tests] removed AssemblyExtensions class which duplicates the same functionality introduced in System.Reflection.
2018-08-28 12:26:57 +02:00
Marek Safar ce3c8ec3f2 Revert "[jit] Disable tail calls from gsharedvt code for now."
This reverts commit 6c47574ce3.
2018-08-28 11:30:47 +02:00
Zoltan Varga 6c47574ce3 [jit] Disable tail calls from gsharedvt code for now.
Fixes https://github.com/mono/mono/issues/9870.
2018-08-28 11:29:14 +02:00
Jay Krell 1e4b141286 [Coop] System.Threading.NativeEventCalls two NOHANDLES(). (#10051) 2018-08-27 20:41:44 -07:00
Egor Bogatov c16ff9ab23 [corlib] Math from CoreFX (#10033)
* Math from CoreFX

* bump corefx, delete sysmath.h

* update icall-def.h

* bring back native Math.Round

* uncomment System.Runtime.Numerics tests (~1.5k of tests)

* undo reorder in sysmath.c

* ignore ComplexTests.cs

* Bump API snapshot submodule

* [csproj] Update project files
2018-08-27 21:52:56 +02:00
Per Allansson 06ea7efeee mkbundle: fix warning about unsigned char vs char 2018-08-27 21:41:57 +02:00
Per Allansson fbe5c8ad34 mkbundle: fix warnings about unused functions 2018-08-27 21:41:57 +02:00
Bernhard Urban 20f1d2194f [mini] callers of MONO_INIT_CONTEXT_FROM_FUNC are expected to flush register windows 2018-08-27 21:21:48 +02:00
Bernhard Urban 917639ecba [mini] remove unused MONO_INIT_CONTEXT_FROM_CURRENT 2018-08-27 21:21:40 +02:00
Jay Krell a99a4a9da8 Add parens missed in recent 784b2c715f. (#10291)
Add parens missed in recent 784b2c715f.
2018-08-27 13:25:47 -04:00
Zoltan Varga 717e13ec5a [llvm] Clean llvm/llvm_config.mk on configure since it can become stale. 2018-08-27 18:16:48 +02:00
Johan Lorensson ed5562bd0b Merge pull request #9138 from Unity-Technologies/upstream-fix-ip-exceptions
Fix IndexOutOfRangeException: No adapter found for index when getting network information
2018-08-27 16:42:06 +02:00
Rodrigo Kumpera 88b715136a [wasm] Bump emscripten version to latest. 2018-08-27 10:24:29 -04:00
Rodrigo Kumpera 6ccdec9c13 [cross] Fix offsets. 2018-08-27 10:23:42 -04:00
Rodrigo Kumpera 1622d69994 Merge pull request #9837 from nsivov/eglib_fixes
[eglib] Fix compilation warnings.
2018-08-27 09:52:58 -04:00
Filip Navara 1b5ebf2649 System.Windows.Forms: Fix regressions in layout code and TextBox Font handling (#10238)
* Fix layout of scrollbars in combobox.

* Fix TextBox height fixup to work properly inside TableLayout.

* Fix changing TextBox font before the Control handle has been created.

* Add test case.

* Reintroduce fix for TextBoxTest.Bug82749. We need to save the user requested control bounds outside of ExplicitBounds since ExplicitBounds are used by table layout engine.
2018-08-27 15:35:01 +02:00
monojenkins b058bb2ab9 [csproj] Update project files 2018-08-27 13:53:39 +02:00
Katelyn Gadd 3a9a69dc63 Fix broken finally blocks in the binaryreader tests 2018-08-27 13:53:39 +02:00
Katelyn Gadd 764e23e4e1 Add win32+net_4_x specific sources files that pull in the win32 ones 2018-08-27 13:53:39 +02:00
Katelyn Gadd 46d2506036 Change platform specific sources overrides from hostplatform_libname to hostplatform_defaultprofile_libname 2018-08-27 13:53:39 +02:00
Jay Krell 3e35b1d251 Strengthen mono_arch_get_seq_point_info() & CallInst.call_info from void*. (#10275) 2018-08-26 21:07:56 -07:00
Joe Groocock 6462ec09a1 [runtime] Use AC_FUNC_STRERROR_R() in Mono.Posix
Inspired by https://github.com/mono/mono/commit/3b3b48dbb4cdbda44ffa2f10e74f819acb78bd96
Fixes https://github.com/mono/mono/issues/9532

Signed-off-by: Joe Groocock <[email protected]>
2018-08-26 23:21:24 +01:00
Jay Krell 4bb29fdf21 [cxx] [jit] [arm64] Make ARM64 JIT valid C++ -- mostly casts, and small amount of type change. (#9950)
[cxx] [jit] [arm64] Make ARM64 JIT valid C++ -- mostly casts, and small amount of type change.
2018-08-26 15:01:40 -07:00
Jay Krell 50ed34972b Remove unused mono_tls_lmf. (#10267) 2018-08-26 11:53:35 -07:00
Rodrigo Kumpera 2cf4550cbd [wasm] Fix compilation due to changes in master. 2018-08-24 13:45:55 -04:00
Rodrigo Kumpera a7bd4621ea Fix windows build. 2018-08-24 11:47:45 -04:00
Rodrigo Kumpera f6604e5bf2 [runtime] Fix race in abi.c and cleanup abi-details.h 2018-08-24 11:16:49 -04:00
Vlad Brezae 055573cc22 [llvm] Use curl as fallback for wget (#10263) 2018-08-24 10:44:18 +02:00
Marek Habersack 105256cc0c [eglib] Fix URI to file name conversion
Hexadecimal ASCII to decimal integer conversion must be 10-based.
2018-08-24 09:21:53 +02:00
Zoltan Varga 88c9ee04b1 [llvm] Emit volatile loads in emit_volatile_load (), otherwise llvm might optimize the loads away.
Fixes https://github.com/mono/mono/issues/10035.
2018-08-24 09:17:18 +02:00
Egor Bogatov b0ac4701d3 Add llvmopts to helpstring 2018-08-24 00:58:31 +03:00
Rodrigo Kumpera 53917b2e2a Add -llvmllc to --aot=help 2018-08-23 17:42:14 -04:00
Rodrigo Kumpera 600a8b03ac [wasm] Improve the experimental AOT setup. Improve documentation. 2018-08-23 17:29:17 -04:00
Egor Bogatov 616f346a91 update mono.1 for llc 2018-08-24 00:19:42 +03:00
Rodrigo Kumpera 3e28c43d1e [wasm] Disable reliance on llvm_code_start and llvm_code_end under wasm. 2018-08-23 17:18:26 -04:00
Rodrigo Kumpera 147dc0d0e9 [wasm] Fix typo. 2018-08-23 17:16:10 -04:00
Rodrigo Kumpera 89f5423018 [runtime] Move offsets to abi.c and Make them avaiable without the offsets file. 2018-08-23 17:15:11 -04:00
Rodrigo Kumpera 68ba3edd38 [wasm] Compute pending ahead of loop to handle non-standard eager evaluated promises. 2018-08-23 17:14:59 -04:00
Rodrigo Kumpera 7ddc9edbda [wasm] Fix a signature. 2018-08-23 17:14:50 -04:00
Rodrigo Kumpera ca2b5c9228 [wasm] Host and target layout can differ even under the same bitness. 2018-08-23 17:14:32 -04:00
Rodrigo Kumpera 622ef91b0c [wasm] Fix mono_arch_cpu_optimizations. 2018-08-23 17:14:10 -04:00
Rodrigo Kumpera 0096507cb2 [wasm] Register the wasm icalls even under AOT so they can be found. 2018-08-23 17:14:00 -04:00
Rodrigo Kumpera b3952d370d [mini] Fix this code to follow our guidelines. 2018-08-23 17:13:53 -04:00
Rodrigo Kumpera ec054f873c [wasm] Make the wasm sdk not depends on desktop sdk.
The issue was that packager.exe was using Mono.Cecil from net_4_x, which is only built/installed if the desktop sdk is built. We replace

Finally, we change the CI script to disable desktop as well to ensure we don't regress in that scenario.
2018-08-23 17:09:17 -04:00
Rodrigo Kumpera f147414dd7 [wasm] Disable dedup with llvm-only and remove it from wasm aot flag soup. 2018-08-23 17:05:44 -04:00
Egor Bogatov b829de7c4d make llc configurable 2018-08-23 23:11:54 +03:00
Rodrigo Kumpera d001c50666 [cross] Fix MONO_STRUCT_SIZE when an offsets file is used. (#10236)
[cross] Fix MONO_STRUCT_SIZE when an offsets file is used.
2018-08-23 15:40:06 -04:00
Aleksey Kliger cbd861f544 [mini] Don't regen Makefile.am if llvm/llvm_config.mk changes
The llvm/llvm_config.mk makefile fragment just includes make (not automake)
variable definitions.  So there is no need to regenerate the mini/Makefile.am
file if the fragment updates - the include will pick it up.
2018-08-23 17:46:22 +02:00
Jay Krell 9dc3ae6be5 Pass the correct boolean type to FreeAssemblyName -- MonoBoolean(byte) not gboolean(int32). (#10234) 2018-08-22 23:56:48 -07:00
Alexis Christoforides e2e3d67c94 [System.Native] Build a reduced library on Android and iOS 2018-08-23 05:31:57 +02:00
Jay Krell c72823b085 Refactor ves_icall_System_Net_Sockets_Socket_LocalEndPoint_internal and ves_icall_System_Net_Sockets_Socket_RemoteEndPoint_internal into common mono_w32socket_getname. (#10206)
* [w32socket] Refactor ves_icall_System_Net_Sockets_Socket_LocalEndPoint_internal and ves_icall_System_Net_Sockets_Socket_RemoteEndPoint_internal into common mono_w32socket_getname.

* [w32socket] Zero consistently. Note that a statically sized struct sockaddr_storage would be appropriate here.

* [cxx] Remove goto around init.

* PR: [w32socket] Use gboolean local instead of function-pointer/string to mono_w32socket_getname.
Restore lost comment.

* [cxx] [w32socket] Remove ternary operator on allocators so that rvalue constructor
can be removed here: https://github.com/mono/mono/pull/10027#issuecomment-414848498
2018-08-22 17:08:25 -07:00
Jay Krell 784b2c715f [cxx] [glib] [coop] Auto void* to non-void*, some casts, remove register. (#10027)
Provide for void* to non-void* conversion on common allocators (g_malloc, etc.) to "just work", via perhaps a bit of a surprising twist ("hack" or "technique"?).
This greatly reduces the churn of C to C++ conversion.
This helps handle.h in 3 places, at least 2 of which could use C++11 `auto` instead.

Ternary operator has reduced functionality as a result.
Either:
 1. Put in rvalue constructor, omitted here.
 2. Cast both sides of the ternary.
 3. Don't ternary.
This impacted only here:
https://github.com/mono/mono/pull/10206/commits/b543f3f0fd71e5801af059663b4d7b01a6390707

Add some explicit casts.

Remove `register`, as it is deprecated (warning or error) and means little (it does prevent taking-address, which helps optimizers).

Add parens missing in macros.

Favor `gssize` over `long` for consistency on Win64.
2018-08-22 17:07:42 -07:00
Michael DeRoy f93c1362c6 Fix issue where getting network information from loopback causes IndexOutOfRangeException: No adapter found for index 2018-08-22 14:02:13 -04:00
Alexander Kyte 196eb7c123 Merge pull request #9928 from alexanderkyte/crash_privacy_toggle
[runtime] Fix crash reporting configure options
2018-08-22 13:50:35 -04:00
Jay Krell d1c4b786df [cxx] Prefer gpointer/gconstpointer over char*, guint8* for untyped data -- fewer casts generally. (#9881)
This  tends to be more C++ compatible, and really is in this case.
2018-08-22 12:17:29 -04:00
Alexander Kyte da319465e7 [runtime] Add pipeline to convert managed exception into telemetry format (#10133)
* [runtime] Expose merp sender to icall

* [runtime] Add initial support for Exc -> Telemetry

In order to allow managed crash reporting using the existing telemetry
format, I have added initial support for converting a MonoException into
a json blob for telemetry.

* [runtime] Zero out stack memory for mono-state dumper

* [runtime] Add test for managed telemetry reporting

To test the proprietary bits, you must first have a copy of MERP
installed somewhere.

Then run the following test:

using System;
using System.Reflection;

public class MinimalTelemetry {

	static MinimalTelemetry ()
	{
		var merp_path = "/xxx/xxx/xxx/Microsoft Error Reporting.app";
		var monoType = Type.GetType ("Mono.Runtime", false);
		var m = monoType.GetMethod("EnableMicrosoftTelemetry", BindingFlags.NonPublic | BindingFlags.Static);
		var m_params = new object[] {"com.xamarin.MinimalTelemetry", "Test.Xam.MinimalTelemetry", "1337001", merp_path, "AppleAppCrash", "/Library/Frameworks/Mono.framework/Versions/Current/bin/mono"};
		m.Invoke(null, m_params);

		AppDomain.CurrentDomain.UnhandledException += new UnhandledExceptionEventHandler(HandleException);
	}

	public static void HandleException (object sender, UnhandledExceptionEventArgs e)
	{
		var exc = e.ExceptionObject as Exception;

		var monoType = Type.GetType ("Mono.Runtime", false);
		var send = monoType.GetMethod("SendExceptionToTelemetry", BindingFlags.NonPublic | BindingFlags.Static);
		var send_params = new object[] {exc};
		send.Invoke(null, send_params);

		// Now the MERP GUI should pop up
		// Click "More Information"
		// You should see something like this:
		// {
		//  "payload" : {
		//  "protocol_version" : "0.0.1",
		//  "configuration" : {
		//    "version" : "5.19.0 (managed_telemetry_pipeline/d342c73e320 Wed Aug 15 14:40:40 EDT 2018)",
		//    "tlc" : "normal",
		//    "sigsgev" : "altstack",
		//    "notifications" : "kqueue",
		//    "architecture" : "amd64",
		//    "disabled_features" : "none",
		//    "smallconfig" : "disabled",
		//    "bigarrays" : "disabled",
		//    "softdebug" : "enabled",
		//    "interpreter" : "enabled",
		//    "llvm_support" : "disabled",
		//    "suspend" : "hybrid"
		//  },
		//  "memory" : {
		//    "Resident Size" : "16306176",
		//    "Virtual Size" : "4491988992",
		//    "minor_gc_time" : "0",
		//    "major_gc_time" : "0",
		//    "minor_gc_count" : "0",
		//    "major_gc_count" : "0",
		//    "major_gc_time_concurrent" : "0"
		//  },
		//  "threads" : [
		//    {
		//      "is_managed" : false,
		//      "managed_thread_ptr" : "0x0",
		//      "thread_info_addr" : "0x0",
		//      "native_thread_id" : "0x0",
		//      "managed_frames" : [
		//        {
		//          "is_managed" : "true",
		//          "guid" : "4F72FB1B-1E99-47BA-91CE-9515783DC174",
		//          "token" : "0x6000004",
		//          "native_offset" : "0x6a",
		//          "il_offset" : "0x00000"
		//        }
		//      ]
		//    }
		//  ]},
		//  "parameters" : {
		//    "ApplicationBundleId:" : "Test.Xam.MinimalTelemetry",
		//    "ApplicationVersion:" : "1337001",
		//    "ApplicationBitness:" : "x64",
		//    "ApplicationName:" : "com.xamarin.MinimalTelemetry",
		//    "BlameModuleName:" : "Mono Exception",
		//    "BlameModuleVersion:" : "5.19.0 (managed_telemetry_pipeline/d342c73e320 Wed Aug 15 14:40:40 EDT 2018)",
		//    "BlameModuleOffset:" : "0x0",
		//    "ExceptionType:" : "0x02000000",
		//    "StackChecksum:" : "0x60114aa",
		//    "StackHash:" : "0x6011514",
		//    "OSVersion:" : "17.4.0",
		//    "LanguageID:" : "0x7f",
		//    "SystemManufacturer:" : "apple",
		//    "SystemModel:" : "MacBookPro14,3",
		//    "EventType:" : "AppleAppCrash"
		//    }
		//  }

	}

	public static void Main (string[] args)
	{
		//AppDomain.CurrentDomain.LoadFrom ("something that's not a valid path")
		throw new Exception ("MinimalTelemetrybar MinimalTelemetrybar");
	}
}

* [runtime] Create more ergonomic API for Exc to Telemetry

* [runtime] Consistently zero summarizer state memory

* [runtime] Stub out exception summarizer when crash reporting is disabled

* [runtime] Add interpreter support for walking Exception stacks
2018-08-22 11:36:00 -04:00
Alexis Christoforides 805556ca09 [runtime] Use getprotobyname_r() where needed and available
Fixes https://github.com/mono/mono/issues/7087
2018-08-22 16:40:52 +03:00
Calvin 7561ff4100 Fix runtime test suite with mcs (#10219)
mcs doesn't have a -langversion:7.3 yet but -langversion:latest implies 7.3 (at the moment).
2018-08-22 10:54:10 +02:00
Johan Lorensson 39d1961b58 Merge pull request #9476 from lateralusX/lateralusX/issue8708
Fix race condition in WaitAnyWithSecondMutexAbandoned test.
2018-08-22 09:19:33 +02:00
Zoltan Varga abcf884db3 [runtime] Fix the invocation of update_submodules.sh during configure so it works for out-of-tree builds as well. 2018-08-22 08:49:51 +03:00
Jay Krell dcf89fa098 [cxx] wchar_t is not guint16, on Windows (#10112)
[cxx] wchar_t is not guint16, on Windows

https://jenkins.mono-project.com/job/x/12791/parsed_console/log.html

icall-windows.c: In function 'MonoStringHandle mono_icall_get_machine_name(MonoError*)':
icall-windows.c:65:75: error: invalid conversion from 'gunichar2* {aka wchar_t*}' to 'const guint16* {aka const short unsigned int*}' [-fpermissive]
   return mono_string_new_utf16_handle (mono_domain_get (), buf, len, error);
                                                                           ^
In file included from ../../mono/metadata/icall-internals.h:11:0,
                 from ../../mono/metadata/icall-windows-internals.h:13,
                 from icall-windows.c:14:
../../mono/metadata/object-internals.h:1963:1: note:   initializing argument 2 of 'MonoStringHandle mono_string_new_utf16_handle(MonoDomain*, const guint16*, gint32, MonoError*)'
 mono_string_new_utf16_handle (MonoDomain *domain, const guint16 *text, gint32 len, MonoError *error);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
icall-windows.c: In function 'MonoArray* mono_icall_get_environment_variable_names(MonoError*)':
icall-windows.c:136:101: error: invalid conversion from 'WCHAR* {aka wchar_t*}' to 'const guint16* {aka const short unsigned int*}' [-fpermissive]
     str = mono_string_new_utf16_checked (domain, env_string, (gint32)(equal_str - env_string), error);
                                                                                                     ^
In file included from ../../mono/metadata/icall-internals.h:11:0,
                 from ../../mono/metadata/icall-windows-internals.h:13,
                 from icall-windows.c:14:
../../mono/metadata/object-internals.h:1960:1: note:   initializing argument 2 of 'MonoString* mono_string_new_utf16_checked(MonoDomain*, const guint16*, gint32, MonoError*)'
 mono_string_new_utf16_checked (MonoDomain *domain, const guint16 *text, gint32 len, MonoError *error);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
icall-windows.c: In function 'void mono_icall_set_environment_variable(MonoString*, MonoString*)':
icall-windows.c:162:20: error: invalid conversion from 'mono_unichar2* {aka short unsigned int*}' to 'gunichar2* {aka wchar_t*}' [-fpermissive]
  utf16_name = name ? mono_string_chars (name) : NULL;
                    ^
icall-windows.c:168:34: error: invalid conversion from 'mono_unichar2* {aka short unsigned int*}' to 'gunichar2* {aka wchar_t*}' [-fpermissive]
  utf16_value = mono_string_chars (value);
                ~~~~~~~~~~~~~~~~~~^~~~~~~
icall-windows.c: In function 'MonoStringHandle mono_icall_get_windows_folder_path(int, MonoError*)':
icall-windows.c:188:76: error: invalid conversion from 'WCHAR* {aka wchar_t*}' to 'const guint16* {aka const short unsigned int*}' [-fpermissive]
   return mono_string_new_utf16_handle (mono_domain_get (), path, len, error);
                                                                            ^
In file included from ../../mono/metadata/icall-internals.h:11:0,
                 from ../../mono/metadata/icall-windows-internals.h:13,
                 from icall-windows.c:14:
../../mono/metadata/object-internals.h:1963:1: note:   initializing argument 2 of 'MonoStringHandle mono_string_new_utf16_handle(MonoDomain*, const guint16*, gint32, MonoError*)'
 mono_string_new_utf16_handle (MonoDomain *domain, const guint16 *text, gint32 len, MonoError *error);
 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

* PR: Move the 'g' vs. 'mono' boundary slightly.
2018-08-21 19:26:26 -07:00
Jay Krell 2c32ed847a [cxx] Favor gpointer for weakly typed data, vs. guint8*, gchar*, etc. to reduce casts. (#10211) 2018-08-21 18:40:44 -07:00
Jay Krell 06dd38a520 [cxx] Make WebAssembly to native transitions valid C++. (#10120)
Function pointers do not convert silently to void*. Cast them.
2018-08-21 15:49:12 -07:00
Jay Krell 1e33fec085 [cxx] Use -std=gnu++0x for Centos6/g++4.4. (#10111) 2018-08-21 15:00:52 -07:00
Jay Krell 593e15cc18 Fix return values in error paths of mono_w32socket_transmit_file. (#10205) 2018-08-21 16:42:10 -04:00
Jay Krell 81594cc471 [cxx] Port cominterop.c to C++ -- just add some casts. (#10209) 2018-08-21 13:06:41 -07:00
Aleksey Kliger (λgeek) a98264a1c4 Two phase STW for hybrid suspend (#10140)
Implement a two-phase hybrid suspend scheme:
1. In the _entente phase_ put all threads in the suspend request state (either `ASYNC_SUSPEND_REQUESTED` or `BLOCKING_SUSPEND_REQUESTED`).  Wait for pending operations (but only wait for the async ones) and let all threads try to self-suspend.
2. In the _aggressive mop-up phase_ - preemptively suspend any threads that are still in `BLOCKING_SUSPEND_REQUESTED`.
2018-08-21 14:45:35 -04:00
Aleksey Kliger (λgeek) 68d518a09f [coop] Check async suspend status in ReqSuspendInitSuspendBlocking case (#10161)
* [coop] Check async suspend status in ReqSuspendInitSuspendBlocking case

So the issue is that calling begin_suspend_for_blocking_thread under hybrid
suspend will perform a preemptive suspension of the victim thread.

The preemptive suspend doesn't always succeed.
In particular, thread_state_init_from_sigctx or thread_state_init_from_handle
could return FALSE and into->suspend_can_continue will be set to FALSE.
When the thread_state_init_* functions return FALSE, they also set the
MonoThreadUnwindState:valid to FALSE.

So it is important to check the value of MonoThreadInfo:suspend_can_continue
before proceeding with a suspension.

As a result in suspend_sync in the ReqSuspendInitSuspendRunning case we call
check_async_suspend which checks (for preemptively suspended threads) whethere
suspend_can_continue is true.  If it isn't, we resume the victim thread and
loop once more in suspend_sync_nolock and try again.

We didn't have a check_async_suspend call in the ReqSuspendInitSuspendBlocking
case, so a thread could be considered suspended even if we couldn't capture a
valid MonoThreadUnwindState for it.

That breaks the assertion the call to mono_thread_info_get_last_managed in
async_suspend_critical which needs a valid MonoThreadUnwindState.

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

* fixup - remove coop assertion in check_async_suspend

result for coop could be iether BeginSuspendOkCooperative or
BeginSuspendOkNoWait depending on whether the thread was running (Ok) or
blocking (OkNoWait)

* [coop] suspend_can_continue if async raced with self-suspend (osx + win32)

Companion to 006d6ce097 from earlier this year
which applied this fix for POSIX signal based suspend.  This is the
corresponding OSX and Win32 fix.

In hybrid suspend, in the case where a suspend initiator needs to preemptively
suspend a thread, but the thread self-suspended while after the suspend
initiator put it into the blocking_suspend_requested state, we want to allow
the suspend to continue.  We do have to call the syscall to undo the native
async suspend, but after that, we can leave the victim to continue waiting for
a resume.

This should not have any effect on full cooperative or full preemptive suspend
- in the full coop case we never call async suspend, in the full preemptive
case the thread never self-suspends in blocking.
2018-08-21 14:14:45 -04:00
Neale Ferguson d8a5d891be An implementation of the ChainStatus property for Btls. (#10134)
When we execute the certificate verification callback we just don't test for success and set status11. Now we get the error (if any) and map the error code to those defined by ChainStatusFlags and add it to a list of X509ChainStatus objects for that chain. Now when get_ChainStatus is called we convert that list to an array of X509ChainStatus and return it.
2018-08-21 16:40:08 +02:00
Calvin 9ba87eaf1a IsDebuggerPresent for AIX (#9995)
IsDebuggerPresent for AIX

checks self for the "process is traced" flag
2018-08-21 08:25:49 -04:00
Maxim Lipnin f74b39a298 [System.Reflection] CoreFX import fot Pointer type (#10194)
Part of #9660
2018-08-21 11:53:42 +02:00
Calvin 8ca0305e8b Use argv for cli_launcher on OSes that don't return full path for process names; fix mono_w32process_get_path on Free/NetBSD (#9860)
Use argv for cli_launcher on OSes that don't return full path for process names; fix mono_w32process_get_path on Free/NetBSD

Should fix process-leak test on AIX, maybe more. Also tested that it fixes the
same behaviour on FreeBSD. Other OSes may be affected; consult and test with the
files `w32process-unix-*.c`.

From comments:

```c
/*
 * XXX: verify if other OSes need it; many platforms seem to have it so that
 * mono_w32process_get_path -> mono_w32process_get_name, and the name is not
 * necessarily a path instead of just the program name
 */

/*
 * mono_w32process_get_path on these can only return a name, not a path;
 * which may not be good for us if the mono command name isn't on $PATH,
 * like in CI scenarios. chances are argv based is fine if we inherited
 * the environment variables.
 */
```
2018-08-21 05:40:08 -04:00
lateralusX b3a524e421 Fix race condition in WaitAnyWithSecondMutexAbandoned test.
There is a small race condition during the completion of a native thread join
call. During that period of time the tid is no longer included on the
internal list tracking joinable threads so a thread that will join on the
tid while another thread (like the finalizer thread) is waiting on native
join to complete for the same tid, will cause the managed Thread.Join call
to complete before the native join call has completed. This race could cause
issues on some OS:es that clear's up some thread resources, like abandoned
mutexes when the thread has exited. This race is hit by WaitAnyWithSecondMutexAbandoned
since the call to Thread.Join will return before the thread owning the mutex
has terminated meaning that it doesn't get ownership of the abandoned mutex
as assumed by the test.

Fix makes sure Thread.Join won't complete until native thread join is complete.
Increasing the join timeouts in the test also eliminates a timeout error making it
harder to hit the problematic code path, primarily during reproduction
in the debugger.

Fix also switch to coop mutex for joinable threads.
2018-08-21 11:28:05 +02:00
Jay Krell 80a064a912 HOST_WIN32 and HAVE_UNISTD_H are not mutually exclusive. (#10077)
And they are not checked in a consistent order, leading to bugs, or at least
somewhat surprises. This incorrect/unintended code fails to compiles as C++.

We should check them in a consistent order.
This favors Win32 over unistd.h but the opposite is probably ok too.

Also fix infinite loop in error path.

See https://jenkins.mono-project.com/job/x/12739/parsed_console/log.html
```
sgen-protocol.c: In function 'void binary_protocol_open_file(gboolean)':
sgen-protocol.c:101:31: error: invalid conversion from 'int' to 'HANDLE {aka void*}' [-fpermissive]
   binary_protocol_file = open (filename, O_CREAT | O_WRONLY, 0644);
                          ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
sgen-protocol.c:102:32: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
   if (binary_protocol_file == -1) {
                                ^
sgen-protocol.c:114:38: error: invalid conversion from 'HANDLE {aka void*}' to 'int' [-fpermissive]
    ftruncate (binary_protocol_file, 0);
                                      ^
In file included from ../../mono/utils/mono-compiler.h:14:0,
                 from sgen-gc.h:30,
                 from sgen-protocol.c:16:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/unistd.h:65:18: note:   initializing argument 1 of 'int ftruncate(int, off32_t)'
 __CRT_INLINE int ftruncate(int __fd, off32_t __length)
                  ^~~~~~~~~
sgen-protocol.c:116:36: error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
  } while (binary_protocol_file == -1);
                                    ^
sgen-protocol.c: In function 'void close_binary_protocol_file()':
sgen-protocol.c:164:36: error: invalid conversion from 'HANDLE {aka void*}' to 'int' [-fpermissive]
  while (close (binary_protocol_file) == -1 && errno == EINTR)
                                    ^
In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/unistd.h:10:0,
                 from ../../mono/utils/mono-compiler.h:14,
                 from sgen-gc.h:30,
                 from sgen-protocol.c:16:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/io.h:328:15: note:   initializing argument 1 of 'int close(int)'
   int __cdecl close(int _FileHandle) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
               ^~~~~
sgen-protocol.c: In function 'void binary_protocol_flush_buffer(BinaryProtocolBuffer*)':
sgen-protocol.c:229:82: error: invalid conversion from 'HANDLE {aka void*}' to 'int' [-fpermissive]
   ret = write (binary_protocol_file, buffer->buffer + written, to_write - written);
                                                                                  ^
In file included from /usr/x86_64-w64-mingw32/sys-root/mingw/include/unistd.h:10:0,
                 from ../../mono/utils/mono-compiler.h:14,
                 from sgen-gc.h:30,
                 from sgen-protocol.c:16:
/usr/x86_64-w64-mingw32/sys-root/mingw/include/io.h:344:15: note:   initializing argument 1 of 'int write(int, const void*, unsigned int)'
   int __cdecl write(int _Filehandle,const void *_Buf,unsigned int _MaxCharCount) __MINGW_ATTRIB_DEPRECATED_MSVC2005;
               ^~~~~
```
2018-08-21 02:23:15 -07:00
Jay Krell 27fafcf65b Change mono_dynamic_image_add_to_blob_cached and mono_dynstream_add_data to accept gconstpointer instead of char* or const char* -- fewer casts. (#10203) 2018-08-21 02:08:56 -07:00
Jay Krell f4c5a56047 [cxx] Strengthen some types away from gpointer. (#9888) 2018-08-21 00:17:35 -07:00
Jay Krell 6be875c89e Abstract out CAS of MonoNativeThreadId and accomodate 4 bytes or pointer-sized, (#10037)
i.e. Windows is always 4 bytes.
2018-08-20 22:20:49 -07:00
Jay Krell 1555e3fb5f [cxx] Change large constants to unsigned to avoid truncation warning/error in some configuration. (#10053)
That is, >=0x80000000 does not fit in a signed 32bit long.

Linux manpage acknowledges the mess and says "unsigned int" will work "for most systems".
So let's do that and hope, "most systems" and other C runtimes besides glibc.

http://man7.org/linux/man-pages/man2/statfs.2.html

The __fsword_t type used for various fields in the statfs structure
definition is a glibc internal type, not intended for public use.
This leaves the programmer in a bit of a conundrum when trying to
copy or compare these fields to local variables in a program.  Using
unsigned int for such variables suffices on most systems.

Remove excess const and add more meaningful const.
2018-08-20 21:51:13 -07:00
Rodrigo Kumpera 92df599f13 [wasm] First code drop of the LLVM backend. (#10171)
* [wasm] Add no-opt aot compiler option to skip running opt.

* [wasm] Add initial scafold to support AOT'ing wasm modules.

* [wasm/llvm] Fix some wasm+llvm issues.

* [aot] Disable trampoline initialization if AOT compiling.

* [docs] Update manpage for new aot option.

* [wasm] Make mono_arch_emit_inst_for_method not assert.
2018-08-20 19:11:06 +02:00
Rodrigo Kumpera a05ee71e1b [sdks] Fix iOS SDK recent regression. (#10193)
* [sdks] Ensure out is created before we unpack llvm.

* [cross] Fix abi-details when offset files are used.
2018-08-20 19:00:43 +02:00
Jonathan Chambers a4ca0e01cf Properly inflate pointer types in inflate_generic_type. Generic pointer types are encountered with 'unmanaged' constraint. (#10145)
Properly inflate pointer types in inflate_generic_type. 

Generic pointer types are encountered with 'unmanaged' constraint.

Fixes #10144
2018-08-20 17:40:07 +02:00
Calvin e1651e85fa Truncate MachineName (and UserDomainName) at first period (#9843)
* Truncate MachineName (and UserDomainName) at first period

Unix machines often put their FQDN as the host name, and domain
name is used for things such as yp. As such, truncate the FQDN to
just the hostname, as other Unix utilities seem to do.

Matches the .NET Core and .NET Framework behaviour, and MS seems to
require this for a future project. Fixes #9839.

* Add a unit test for bug

* Formatting tweaks
2018-08-20 17:21:07 +02:00
Calvin 396559769d [System.Runtime.InteropServices] Detect Arm/Arm64 in RuntimeInformation (#10088)
* For ProcessArchitecture, use the DllMap arch of the runtime.

* For OSArchitecture, make an educated guess combining ProcessArchitecture and Environment.Is64BitOperatingSystem.

* For non-Intel/ARM architectures, (supported by Mono and not on the chopping block are PPC32/64, z, and WebAssembly) please dogpile onto dotnet/corefx#30706.
2018-08-20 17:18:06 +02:00
Alexander Kyte ddda3063e4 [runtime] Test GetPid for Mono.Posix (#9039) 2018-08-20 17:15:19 +02:00
Maxim Lipnin 69aa5ad38d [System.Reflection] CoreFX import for ModuleResolveEventHandler (#10190)
* [System.Reflection] CoreFX import for ModuleResolveEventHandler

* Bump API snapshot submodule

* [csproj] Update project files
2018-08-20 17:10:20 +02:00
monojenkins 28b2bf9471 [bcl] Update BCL Linked Size (#10089) 2018-08-20 13:03:15 +02:00
Alexander Köplinger 8f67fb9fb1 Bump nunitlite to get NUnit2 xml output fix and failure on file not found fix (#10188)
See mono/NUnitLite#11 and mono/NUnitLite#12
2018-08-20 12:59:23 +02:00
Alexander Kyte ffe1866b81 Revert "[runtime] Cache culture locale name in managed" (#10172)
This reverts commit ae4bd53944.
2018-08-20 12:35:26 +02:00
Rolf Bjarne Kvinge a60c082cd7 [System.Xml.Linq] Fix namespace conflict with new Xamarin.Mac namespace in test code. (#10164)
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:07:29 +02:00
Vlad Brezae bbd6a6a286 [arm64] Unwind info for generic trampoline (#10149)
Fixes https://github.com/mono/mono/issues/9566
2018-08-20 13:05:14 +03:00
Jay Krell e89e9a5975 [cxx] C++ constants must be initialized, even if to zeros (mono_null_value_handle). (#10146)
```
$ cat constants-must-be-initialized-error.cpp

const struct { char a; } b;

$ cc -c constants-must-be-initialized-error.cpp
constants-must-be-initialized-error.cpp:2:26: error: default initialization of an object of const type 'const struct (anonymous struct at
      constants-must-be-initialized-error.cpp:1:7)' without a user-provided default constructor
const struct { char a; } b;
                         ^
                           = {}
1 error generated.

$ cat constants-must-be-initialized-fixed.cpp
const struct { char a; } b = { 0 };

$ cc -c constants-must-be-initialized-fixed.cpp
```
2018-08-17 15:27:56 -07:00
Ludovic Henry a1aa022dca [sdks] Fix local testing for Android (#10169) 2018-08-17 15:10:39 -04:00
Alexander Kyte 9bc111e2f4 Merge pull request #9911 from alexanderkyte/merp_timeout_detached
[runtime] Speed-up MERP timeout
2018-08-17 13:45:17 -04:00
Rodrigo Kumpera ddf5ab2f78 [wasm] Enough scafold to enable AOT work with the SDKs (#10136)
* [wasm] add wasm-aot and wasm-aot-runtime

* [runtime] Add MONO_STRUCT_SIZE that works similarly to MONO_STRUCT_OFFSET and handles mini types.

* [wasm] Add enough scafold for the AOT compiler.

* [wasm] Make some functions available for the interp to satisfy the linker.

* [wasm] Add aot-sample and link-sample helper targets for AOT development.

* [wasm/sdks] Update documentation.

* Update README.md
2018-08-17 19:11:42 +02:00
Jay Krell c4d2d34c4f Fix process leak in process enumeration. (#10156)
Dispose rejected ones.
https://github.com/mono/mono/issues/10143
2018-08-17 10:07:53 -07:00
Rodrigo Kumpera a01b8ee09a [llvm] Fix non-wasm build configure string. 2018-08-17 17:08:17 +03:00
Alexis Christoforides 51e8d322c0 Merge pull request #10153 from kumpera/fix-the-build
Reapply #10068 and fix the sdk build.
2018-08-17 16:49:31 +03:00
Jay Krell c62bdca50a [cxx] fmod is overloaded, assign to local to disambiguate. (#10147)
broken:
```c
#include <math.h>

void * pmod = fmod;

fmod-broken.cpp:3:15: error: address of overloaded function 'fmod' does not match required type 'void'
void * pmod = fmod;
              ^~~~
```

fixed:
```c
#include <math.h>

typedef double (*fmod_t)(double, double);

fmod_t pfmod = fmod;
```

A wrapper function would  also work:
```c
double mono_fmod (double a, double b)
{
  return fmod (a, b);
}

fmod_t pfmod = mono_fmod;
```

This may be advantagous, if the standard allows fmod to be a macro ("cannot take address of macros") or its signature to not match this.
However this would veer even further from apparent C compatibility (if our previous code was portable), so probably not.
2018-08-17 00:20:21 -07:00
Jay Krell 81815997bf [cxx] C++ does not allow goto around initialization. (#10132) 2018-08-16 23:36:23 -07:00
Jay Krell cf29d6eb7a [cxx] LLVM-specific C++ fixes -- just some casts. (#10045)
mini-llvm.c: In function 'void process_call(EmitContext*, MonoBasicBlock*, LLVMOpaqueBuilder**, MonoInst*)':
mini-llvm.c:3278:50: error: invalid conversion from 'gpointer {aka void*}' to 'LLVMValueRef {aka LLVMOpaqueValue*}' [-fpermissive]
     LLVMValueRef tramp_var = g_hash_table_lookup (ctx->jit_callees, call->method);

mini-llvm.c:5946:30: error: invalid conversion from 'gpointer {aka void*}' to 'LLVMValueRef {aka LLVMOpaqueValue*}' [-fpermissive]
    var = g_hash_table_lookup (ctx->module->objc_selector_to_var, name);

mini-llvm.c:6893:46: error: invalid conversion from 'void*' to 'void**' [-fpermissive]
  while (g_hash_table_iter_next (&iter, NULL, (gpointer)&l))
					      ^~~~~~~~~~~~

mini-llvm.c:7560:40: error: invalid conversion from 'gpointer {aka void*}' to 'GSList* {aka _GSList*}' [-fpermissive]
    GSList *addrs = g_hash_table_lookup (domain_info->llvm_jit_callees, callee);

mini-llvm.c: In function 'void add_intrinsic(LLVMModuleRef, int)':
mini-llvm.c:8146:29: error: invalid conversion from 'gpointer {aka void*}' to 'const char*' [-fpermissive]
  name = g_hash_table_lookup (intrins_id_to_name, GINT_TO_POINTER (id));

and there was one other error, fixed here.
2018-08-16 23:34:41 -07:00
Jay Krell c114ff59d9 [glib] About half of glib does not use config.h. (#10105) 2018-08-16 15:53:56 -07:00
Aleksey Kliger (λgeek) c636efec40 [reflection] Assembly.LoadFile should throw ArgumentException for relative paths (#10081)
* [reflection] Assembly.LoadFile should throw ArgumentException for relative paths

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

* [mcs/tests] Use full path in the compiler-tester

   Otherwise the call to LoadFile will fail

* [mono/tests] Use full path in LoadFile in test-multi-netmodule-4-exe

* [mono/tests] Use the test runner for a couple of tests

* [fullaot] Disable test-multi-netmodule-4-exe and custom-attr-errors.exe

* [tests] Use Path.GetFullPath and Path.Combine in AssemblyTest

   Fix windows test failures
2018-08-16 17:43:50 -04:00
Jay Krell 5b918bf880 gcc/win32 emulates __thread, which is not clearly worthwhile. (#9672) 2018-08-16 13:11:29 -07:00
Alexander Kyte f6a66d50bd [runtime] Shorten merp timeout 2018-08-16 14:54:26 -04:00
Vlad Brezae 0fd0f172d6 [tests] Enable old test that seems to pass now 2018-08-16 21:28:49 +03:00
Vlad Brezae cc108cbfe0 [interp] Restore frame ip after running finally handler
EH still uses the original ip for determining whether there are any abort protected blocks to be exited, once the frame is unwinded.

Fixes delegate2.exe
2018-08-16 21:28:49 +03:00
Alexander Kyte 58258e8f23 [runtime] Add verbose/non-private crashes on CI 2018-08-16 13:53:37 -04:00
Alexander Kyte 80e600016f [runtime] Fix crash reporting configure options 2018-08-16 13:53:37 -04:00
Rodrigo Kumpera 9f495889ae [wasm] Fix llvm scripts for the sdks 2018-08-16 10:01:26 -04:00
Rodrigo Kumpera 933ddeb0ac Revert "Revert "Merge pull request #10068 from kumpera/wasm-target-cleanup""
This reverts commit 3dd1e1d92a.
2018-08-16 09:31:34 -04:00
Alexander Köplinger 3dd1e1d92a Revert "Merge pull request #10068 from kumpera/wasm-target-cleanup"
This reverts commit 5553faffcb, reversing
changes made to 790e6f6ff9.
2018-08-16 13:27:20 +02:00
Alexander Köplinger 6b92aef33b Revert "Fix llvm build"
This reverts commit bb8a7f4bda.
2018-08-16 13:26:49 +02:00
Alexander Köplinger bb8a7f4bda Fix llvm build 2018-08-16 12:45:46 +02:00
Aleksey Kliger (λgeek) b7a5575209 [sdks] Fix typo in ios template (#10130)
[sdks] Fix typo in ios template
2018-08-16 12:10:12 +02:00
Jay Krell 6d495bd4a6 [cxx] C++ does not have designated initializers. (#10109)
Current clang supports them, current g++ has partial support, Centos6 g++ 4.4 has no support.
2018-08-16 02:22:15 -07:00
Jay Krell fbfd1bff88 [cxx] More build support -- compile more as C++ if configure -enable-cxx. (#10115) 2018-08-15 17:59:03 -07:00
Jay Krell f892f95843 Fix bug -- dupe and dup are quite different. (#10117)
https://jenkins.mono-project.com/job/x/12802/parsed_console/log.html

ves_icall_System_Security_Principal_WindowsImpersonationContext_DuplicateToken(gpointer, MonoError*)':
mono-security-windows.c:214:62: error: invalid conversion from 'int (*)(int)' to 'gpointer {aka void*}' [-fpermissive]
  return DuplicateToken (token, SecurityImpersonation, &dupe) ? dup : NULL;
                                                              ^
The code is confusing the local variable dupe with an 'e' at the end
with the function dup.
2018-08-16 00:05:27 +02:00
Jay Krell aaac994ddc [cxx] Use __typeof__ instead of typeof for Centos6/g++4.4. (#10110) 2018-08-15 14:56:34 -07:00
Maxim Lipnin 47cb859775 [System.Reflection] CoreFX import for ManifestResourceInfo and ResourceLocation types (#10098)
* [System.Reflection] CoreFX import for ManifestResourceInfo and ResourceLocation types.

Part of #9660.

* Bump API snapshot submodule

* [csproj] Update project files
2018-08-15 20:50:12 +02:00
Jay Krell c14491aaff [cxx] One more MONO_API ahead of MONO_RT_EXTERNAL_ONLY. (#9964) 2018-08-15 09:37:31 -07:00
Jay Krell d6becb07e2 Bump corlib version (#10122)
Missed in e26c958.
2018-08-15 18:33:53 +02:00
Alexander Köplinger 5553faffcb Merge pull request #10068 from kumpera/wasm-target-cleanup
[wasm] Cleanup build system plus some required stubs.
2018-08-15 18:09:42 +02:00
Jay Krell 790e6f6ff9 mono_thread_info_set_is_async_context assert that setting to false is correct, i.e. no nesting
mono_thread_info_set_is_async_context assert that setting to false is correct, i.e. no nesting
Possibly related to #9566
2018-08-15 08:13:42 -07:00
Alexander Kyte bf0e9fac2b [merp] Fix json formatting bug (symbolicator already has workaround) (#9927) 2018-08-15 00:24:43 -04:00
Alexander Kyte 7e2b62cbbb [runtime] Remove O(N) traversal in class init (#9985) 2018-08-15 00:10:56 -04:00
Aleksey Kliger (λgeek) e26c958f3b [reflection] Implement RuntimeType.IsSubclassOf in native (#10012)
* [reflection] Implement RuntimeType.IsSubclassOf in native

Fixes a performance regression https://github.com/mono/mono/issues/10000

* fixup - byref and reflexive IsSubclassOf
2018-08-15 00:07:49 -04:00
Vlad Brezae 32d9b9ec3a [interp] Fix missing InvalidProgramException (#10095)
* [interp] Throw proper exception instead of warning

Fix code causing wrong stack state.

* [interp] Compile method for errors when needed

Delegate creation doesn't require compiling the method.

* [interp] Enable System.Core xunit tests
2018-08-15 00:05:01 -04:00
Filip Navara 583bae5a0a Use clonefile instead of copyfile on macOS. (#10020)
* Use clonefile instead of copyfile on macOS.

* Address PR review comments.

* Address PR review comments (if -> assert).

* RTLD_DEFAULT - > libc_handle
2018-08-14 23:52:47 -04:00
Zoltan Varga 3b30f85ab8 [bcl] Disable a test which fails with linking. (#10103)
Fixes https://github.com/xamarin/xamarin-macios/issues/4617.
2018-08-15 01:05:10 +02:00
Jay Krell 566b81fe7f [cxx] Better types at the mono_gc_alloc layer per https://github.com/mono/mono/pull/6695#discussion-diff-167398359L5601. (#10042)
This allows for fewer casts from void* to non-void* elsewehere.
2018-08-14 14:18:11 -07:00
Jay Krell 675c94ec7a [cxx] Make gunichar2==wchar_t on Windows. (#10056) 2018-08-14 13:45:57 -07:00
Jay Krell 8d47ae9ee3 [cxx] CentOS 6/gcc 4.4 and Android stdint.h/inttypes.h do not give everything without asking. (#9802) 2018-08-14 12:37:01 -07:00
Alon Zakai 7cb477cc1b fix a typo in scripts/mono-test-install (#10099) 2018-08-14 20:54:13 +02:00
Jay Krell 4d5af36293 Move icalls from utils to metadata. (#10052)
Functions added here https://github.com/mono/mono/commit/58efe9419268250709a6694abfa519b9b5d2c05c#diff-eba0fd0052bf3ec9dd60f2f3e90f19e1R8483
but icall-def.h entries missed.
2018-08-14 14:17:30 -04:00
Jay Krell ce3f4f5ebc [cxx] Types need to be unique in Wasm. (#10091)
https://jenkins.mono-project.com/job/test-mono-pull-request-wasm/3652/parsed_console/log.html

invalid enum type
!19255 = distinct !DICompileUnit(language: DW_LANG_C_plus_plus, file: !7355, producer: "clang version 5.0.0  (emscripten 1.37.36 : 1.37.36)", isOptimized: false, runtimeVersion: 0, emissionKind: FullDebug, enums: !19256, retainedTypes: !19257, imports: !19263)
!19256 = !{!7363, !6973, !168}
!7363 = distinct !DICompositeType(tag: DW_TAG_structure_type, file: !7364, line: 192, size: 128, elements: !7365, identifier: "_ZTS10ParseState")
/mnt/jenkins/workspace/test-mono-pull-request-wasm/sdks/builds/toolchains/emsdk/clang/e1.37.36_64bit/llvm-link: error: linked module is broken!
2018-08-14 10:58:39 -07:00
Zoltan Varga df266dec2d [aot] Emit ref instances of the InternalArray methods only in corlib. (#10086)
* [aot] Emit ref instances of the InternalArray methods only in corlib.

* [aot] Use strncmp ().
2018-08-14 18:16:30 +02:00
Alexander Köplinger b70ea694c6 [xbuild] Ignore test-config-file-* 2018-08-14 18:07:02 +02:00
Jay Krell 3af676035b [cxx] Cast function pointers to gpointer esp. for thread create. (#9992)
Longer term some functions accepting function pointers can/should take
a stronger type, and the parameters match w/o casting.
Also cast int to enum one same line.
One of these is under if 0.

Should fix the following:

attach.c:494:13: error: no matching function for call to 'mono_thread_create_internal'
        internal = mono_thread_create_internal (mono_get_root_domain (), receiver_thread, NULL, MONO_THREAD_CREATE_FLAGS_NONE, error);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../mono/metadata/threads-types.h:82:1: note: candidate function not viable: no known conversion from 'gsize (void *)' (aka 'unsigned long (void *)') to 'gpointer' (aka 'void *') for 2nd argument
mono_thread_create_internal (MonoDomain *domain, gpointer func, gpointer arg, MonoThreadCreateFlags flags, MonoError *error);
^

threadpool-io.c:585:7: error: no matching function for call to 'mono_thread_create_internal'
        if (!mono_thread_create_internal (mono_get_root_domain (), selector_thread, NULL, MONO_THREAD_CREATE_FLAGS_THREADPOOL | MONO_THREAD_CREATE_FLAGS_SMALL_STACK, error))
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../mono/metadata/threads-types.h:82:1: note: candidate function not viable: no known conversion from 'gsize (gpointer)' (aka 'unsigned long (void *)') to 'gpointer' (aka 'void *') for 2nd argument
mono_thread_create_internal (MonoDomain *domain, gpointer func, gpointer arg, MonoThreadCreateFlags flags, MonoError *error);
^

gc.c:957:14: error: no matching function for call to 'mono_thread_create_internal'
        gc_thread = mono_thread_create_internal (mono_domain_get (), finalizer_thread, NULL, MONO_THREAD_CREATE_FLAGS_NONE, error);
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../mono/metadata/threads-types.h:82:1: note: candidate function not viable: no known conversion from 'gsize (gpointer)' (aka 'unsigned long (void *)') to 'gpointer' (aka 'void *') for 2nd argument
mono_thread_create_internal (MonoDomain *domain, gpointer func, gpointer arg, MonoThreadCreateFlags flags, MonoError *error);
^

attach.c:494:13: error: no matching function for call to 'mono_thread_create_internal'
        internal = mono_thread_create_internal (mono_get_root_domain (), receiver_thread, NULL, MONO_THREAD_CREATE_FLAGS_NONE, error);
                   ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../mono/metadata/threads-types.h:82:1: note: candidate function not viable: no known conversion from 'gsize (void *)' (aka 'unsigned long (void *)') to 'gpointer' (aka 'void *') for 2nd argument
mono_thread_create_internal (MonoDomain *domain, gpointer func, gpointer arg, MonoThreadCreateFlags flags, MonoError *error);
^

threadpool-io.c:585:7: error: no matching function for call to 'mono_thread_create_internal'
        if (!mono_thread_create_internal (mono_get_root_domain (), selector_thread, NULL, MONO_THREAD_CREATE_FLAGS_THREADPOOL | MONO_THREAD_CREATE_FLAGS_SMALL_STACK, error))
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~
../../mono/metadata/threads-types.h:82:1: note: candidate function not viable: no known conversion from 'gsize (gpointer)' (aka 'unsigned long (void *)') to 'gpointer' (aka 'void *') for 2nd argument
mono_thread_create_internal (MonoDomain *domain, gpointer func, gpointer arg, MonoThreadCreateFlags flags, MonoError *error);
^

:411:24: error: no matching function for call to 'mono_create_ftnptr'
                                func = (TestMethod)mono_create_ftnptr (mono_get_root_domain (), func);
                                                   ^~~~~~~~~~~~~~~~~~
../../mono/mini/mini-runtime.h:432:11: note: candidate function not viable: no known conversion from 'TestMethod' (aka 'int (*)()') to 'gpointer' (aka 'void *') for 2nd argument; take the address of the argument with &
gpointer  mono_create_ftnptr                (MonoDomain *domain, gpointer addr);

driver.c:1170:2: error: no matching function for call to 'mono_thread_create_checked'
        mono_thread_create_checked (mono_domain_get (), compile_all_methods_thread_main, &args, error);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~
../../mono/metadata/threads-types.h:441:1: note: candidate function not viable: no known conversion from 'void (CompileAllThreadArgs *)' to 'gpointer' (aka 'void *') for 2nd argument
mono_thread_create_checked (MonoDomain *domain, gpointer func, gpointer arg, MonoError *error);
^
2018-08-14 08:51:20 -07:00
Alexander Kyte 7edc1024db [runtime] Make mini-llvm use only mono_aot_can_dedup (#10084)
LLVM was using the helper for the abandoned prototype linkonce work that
much predated when I picked up the project.

This is a problem because it can lead to aot-compiler thinking a method
is dedupable, while llvm thinking it's not. When this happens, the
symbol does not have the Assembly baked into it's name to ensure
uniqueness.
2018-08-14 17:10:50 +02:00
Alexander Köplinger 6ef65c3246 Disable unhandled-exception-4.exe test too
See https://github.com/mono/mono/issues/10031
2018-08-14 16:34:57 +02:00
Alexander Köplinger ff89616792 Add .gitignore for mono/tests/assembly-load-reference 2018-08-14 13:51:01 +02:00
Alexander Köplinger ab19ebffc8 [ci] Bump timeout for bockbuild in run-test-mac-sdk.sh 2018-08-14 13:32:15 +02:00
Maxim Lipnin 54380f84e3 [System.Reflection] CoreFX import for ConstructorInfo type (#9970)
Part of #9660
2018-08-14 10:54:47 +02:00
Jay Krell 2d5fb7b497 Strengthen the type of mono_gc_get_range_copy_func -- return a typed function pointer (#10057)
instead of a void*. And add const on the source of a memcpy.
2018-08-13 23:01:01 -07:00
Calvin 2bf8bb5a87 Fix mono_string_from_blob for big endian systems (#10072)
(Commit attributed to @kumpera because he wrote this quick fix, thanks!)

Fixes #10070
2018-08-14 02:28:37 +02:00
monojenkins daeab45ebb Bump API snapshot submodule 2018-08-13 19:56:31 +02:00
Martin Baulig d033472473 X509Certificate is now immutable.
We now adopt CoreFX's behavior in `X509Certificate` regarding serialization and immutability.

* All serialization APIs now throws `PlatformNotSupportedException`.
  (this was initially part of #9650, but had to be taken out due to problems with Xunit 2.4).

* All `Import()` overloads now throw `PlatformNotSupportedException`.

* The property setter of `X509Certificate2.PrivateKey` now also throws `PlatformNotSupportedException`.
2018-08-13 19:56:31 +02:00
monojenkins db2e884f00 [bcl] Update BCL Linked Size 2018-08-13 18:52:12 +02:00
Rodrigo Kumpera e5dc8fff6c [wasm] We can't build the debugger under the AOT compiler. 2018-08-13 11:21:04 -04:00
Rodrigo Kumpera a00fe46467 [wasm] Add some missing stubs required by the AOT compiler. 2018-08-13 11:19:27 -04:00
Rodrigo Kumpera eece4e8d86 [wasm] Switch to wasm32 triplet instead of configure hack. Depends on automake 1.16.1. 2018-08-13 11:14:44 -04:00
Aleksey Kliger (λgeek) d36902effd [mini] Don't assert on MONO_PATCH_INFO_GC_SAFE_POINT_FLAG if coop is disabled (#9974)
If an AOT library is loaded that was compiled with safepoints, but currently
we're running with preemptive suspend (e.g. MONO_THREADS_SUSPEND=preemptive is
set), don't assert.  `mono_polling_required` will always be false, so the
safepoint will be ignored.

Fixes https://github.com/mono/mono/issues/9947
2018-08-13 16:23:39 +02:00
Alexander Köplinger d8918ebd4a Merge pull request #9999 from kumpera/cleanup_p1
[wasm] First round of changes for the AOT compiler to handle WASM.
2018-08-13 15:31:02 +02:00
Rodrigo Kumpera 592e2a04cb Merge pull request #10048 from NattyNarwhal/iconv-fixes
Fix iconv in eglib, remove GNU libiconv-ism
2018-08-13 09:03:58 -04:00
Marek Safar d4e9972577 [corlib] Tweaks DependencyInjector to work with default linker setups 2018-08-13 13:27:28 +02:00
Filip Navara c3112e17cc Minor corlib cleanups (#10060)
- Remove two unused types from corlib (DecoupledTask is not used since migrating to StreamReader/StreamWriter from referencesources).
- Fix indentation in System.Security.Policy/Site.cs which mixed tabs and spaces.
- Fix comment in Test/System.Diagnostics/DebuggerTypeProxyAttribute.cs (to avoid false results when using grep on the source code).
2018-08-13 13:03:47 +02:00
Kenneth Pouncey 6db65716f3 [wasm] Add support for marshalling ArrayBuffer and TypeArrays (#10023)
* Add support for marshalling ArrayBuffer and TypeArrays from JavaScript to C#.

-  The ArrayBuffer object is used to represent a generic, fixed-length raw binary data buffer.   More Info ---> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays#ArrayBuffer
-  JavaScript typed arrays are array-like objects and provide a mechanism for accessing raw binary data. (...).  More Info ---> https://developer.mozilla.org/en-US/docs/Web/JavaScript/Typed_arrays
-  Some examples of API's that use these are Fetch, WebGL, Canvas, Web Audio API, XMLHttpRequests, WebSockets, Web Workers, Media Source API and File APIs.

| ArrayBuffer		| uint8_t	| byte[]	| byte or Byte (unsigned byte)
| Int8Array 		| int8_t	| sbyte[]	| byte or SByte (signed byte)
| Uint8Array		| uint8_t	| byte[]	| byte or Byte (unsigned byte)
| Uint8ClampedArray| uint8_t	| byte[]	| byte or Byte (unsigned byte)
| Int16Array		| int16_t	| short[]	| short (signed short)
| Uint16Array		| uint16_t	| ushort[]	| ushort (unsigned short)
| Int32Array		| int32_t	| int[]		| int (signed integer)
| Uint32Array		| uint32_t	| uint[]	| uint (unsigned integer)
| Float32Array		| floa	t	| float[]	| float
| Float64Array		| double	| double[]	| double

- Added tests to the bindings-test test harness.

* Add support for marshalling TypeArrays from C# to JavaScript.

- Add tests to test harness.
2018-08-13 11:41:38 +02:00
Marek Safar 3d4ba670f1 Bump linker to fix reflection deps (#9929)
<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->
2018-08-13 08:30:49 +02:00
Calvin Buckley b0ab59fa93 Fix iconv in eglib, remove GNU libiconv-ism
iconv in eglib was broken due to a broken define. Also fix linking
of iconv when iconv isn't in libc.

Also remove the usage of a GNU libcharset specific function and rely
on a standard POSIX function that outputs the same value on every
modern Unixoid I've tried it on. (Ubuntu/macOS/i/FreeBSD)

This comment explains a lot of things for the latter:

```c
/*
 * This function used used to use the "locale_charset" call in
 * libiconv's libcharset library. However, this isn't always
 * available on some systems, including ones with GNU libc. So,
 * instead use a function that's a standard part of POSIX2008.
 *
 * nl_langinfo is in POSIX2008 and should be on any sane modern
 * Unix. With a UTF-8 locale, it should return "UTF-8" - this
 * has been verified with Ubuntu 18.04, FreeBSD 11, and i 7.3.
 *
 * The motivation for using locale_charset was likely due to
 * the cruftiness of Unices back in ~2001; where you had to
 * manually query environment variables, and the values were
 * inconsistent between each other. Nowadays, if Linux, macOS,
 * AIX/PASE, and FreeBSD can all return the same values for a
 * UTF-8 locale, we can just use the value directly.
 *
 * It should be noted that by default, this function will give
 * values for the "C" locale, unless `setlocale (LC_ALL, "")`
 * is ran to init locales - driver.c in mini does this for us.
 */
```
2018-08-11 20:02:34 -04:00
Neale Ferguson 6d07dd66f1 Fix s390x build broken by incorrect specification of the msgfi instuc… (#10026)
Fix s390x build broken by incorrect specification of the msgfi instruction used in MUL_IMM type operations. The instruction had been encoded as its 32-bit counterpart (msfi). 

In addition, the s390x microcode makes the mono_strength_reduction_division unnecessary so this can be bypassed.

The change to basic.make is just to avoid error messages when basic-profile-check.exe hasn't been built yet.
2018-08-12 01:33:58 +02:00
Filip Navara 9343d6a2b6 Remove unnecessary Mono.Security references from corlib. (#10022)
<!--
Thank you for your Pull Request!

If you are new to contributing to Mono, please try to do your best at conforming to our coding guidelines http://www.mono-project.com/community/contributing/coding-guidelines/ but don't worry if you get something wrong. One of the project members will help you to get things landed.

Does your pull request fix any of the existing issues? Please use the following format: Fixes #issue-number
-->
2018-08-11 23:01:17 +02:00
Alexander Köplinger 37b78f0640 [ci] Disable unhandled-exception-2.exe
See https://github.com/mono/mono/issues/10031
2018-08-10 23:27:51 +02:00
Alexander Köplinger 7a9264c95d [linker] Fixup html template 2018-08-10 23:20:19 +02:00
Alexander Köplinger 40d2c8d663 [linker] Add BCL size diff for wasm profile 2018-08-10 22:45:49 +02:00
Aleksey Kliger (λgeek) 86d67fce03 [ci] Disable sgen-new-threads-collect.exe until #9959 is addressed (#10028)
The test times out due to an issue in hyrbid suspend.  Turn off the test
temporarily while we work on a solution.

https://github.com/mono/mono/issues/9959
https://github.com/mono/mono/issues/9921
2018-08-10 22:35:03 +02:00
Alexander Köplinger 22c9616fe2 [System.ServiceModel] Replace SynchronizedCollection with referencesource (#10021)
* [System.ServiceModel] Replace SynchronizedCollection with referencesource

This fixes a bug in the old implementation where we didn't have proper
locking in Add().

Fixes https://bugzilla.xamarin.com/show_bug.cgi?id=43447
Closes https://github.com/mono/mono/pull/10007

* Bump API snapshot submodule

* [csproj] Update project files
2018-08-10 21:47:14 +02:00
Alexander Köplinger b15f577ef3 [utils] Include complex.c in the tarball
It's being included directly since 36956720f7
2018-08-10 18:50:03 +02:00
Alexander Köplinger 86f11bf8f6 Revert "Add default msbuild parameters so 'msbuild bcl.sln' will succeed (#9990)"
This reverts commit 4b7f40931c.

It broke a bunch of stuff because all msbuild projects picked up the new
command line args, not just bcl.sln.
2018-08-10 17:53:11 +02:00
Jay Krell 49bf2b31e8 [cxx] [boehm] extern "C" and interface void* instead of char* for use by C++ (#9953)
* [cxx] Add extern "C" to libgc so that it can be C, and used from C++.
This tracks mainline https://github.com/ivmai/bdwgc, barely.
See https://github.com/ivmai/bdwgc/commit/f4fbef0f7f0e3446856d2177535080158e16e403#diff-74e77959a62b8a560274f69789f50a94

* [cxx] [boehm] favor void* over char* interface for easier use from C++.
This tracks, barely.
See https://github.com/ivmai/bdwgc/blob/ae3d724f3645af119e1b2c2cefbb71c97d467546/mark.c#L1337

Mainline and Unity Boehm are valid C++, which is not the case here.
2018-08-10 08:46:35 -07:00
Calvin ffad4eb52d autotools fixes for AIX, FreeBSD and some stuff for Haiku (#9967)
* Fix build on AIX

	* crash reporting requires dladdr, a function AIX (at least
	  the version on CI) lacks

	* fix build with a powerpc64-*-(aix|os400)* triplet as IBM
	  wishes to do

* Fix some stuff for Haiku

Some stuff requires CoreFX PAL changes that haven't been merged and
thus one or two more items for configure to detect.

	* sigaltstack is broken for haiku

	* getifaddrs is available and PAL would like it, so fix it

* Fix detection of flock64

This erroneously detected flock64 on platforms that lacked it.
Fixes the build of CoreFX PAL on FreeBSD and Haiku.

* Fix flock64 define

* Fix define for flock64 in PAL block

* Remove nonsense comment that only applied to an older unreleased version of the patch
2018-08-10 15:19:06 +02:00
Alexander Köplinger 1dd7629f25 [metadata] Add nullfs to list of recognized filesystems (#9969)
Noticed this today when the corlib test which checks for unknown filesystems failed. Turned out it was because of a .dmg I had mounted:

```
$ mount | grep nullfs
/Volumes/Skype Meetings App/Skype Meetings App.app on /private/var/folders/cs/kt8x25p14g9dlk_p192rd7th0000gn/T/AppTranslocation/957CCB05-C113-4897-9C80-700C2CE4809E (nullfs, local, nodev, nosuid, read-only, noowners, quarantine, nobrowse, mounted by alexander)
```
2018-08-10 12:57:01 +02:00
Katelyn Gadd 4b7f40931c Add default msbuild parameters so 'msbuild bcl.sln' will succeed (#9990)
By default ```msbuild bcl.sln``` will fail because of our non-standard platform names and the need to restore nuget packages. Add a default response file so it just works. (Response files can be suppressed)
2018-08-10 01:14:31 +02:00
Rodrigo Kumpera 70d4d59e27 [wasm] Import the debugger proxy and split it into a pair of projects. (#9626)
This imports github.com/kumpera/ws-proxy into mono.
It facilitates distribution and coordination of upstream as there's a clean version connect between the two bits.
The proxy is currently version locked with the runtime.
2018-08-10 01:13:08 +02:00
Rodrigo Kumpera 4d45f25a38 [wasm] Call the correct single step trampoline. Fixes some step-into scenarios. (#9611)
* [wasm] Call the correct single step trampoline. Fixes some step-into scenarios.

* [wasm] Make the debugging sample a bit more complicated.

* [wasm] Add debugger support for removing breakpoints.
2018-08-10 01:12:19 +02:00
Rodrigo Kumpera 2f748975f8 [runtime] Sprinkle more mono_runtime_get_no_exec to make it work. 2018-08-09 19:06:51 -04:00
Ludovic Henry 5e96ce8f0d [w32file] Fix typo (#10001) 2018-08-09 18:01:13 -04:00
Jay Krell 67906d3118 [cxx] Mostly port utils. (#9819)
* [cxx] mono-logger.c int vs. enum and casts void* to non-void*

mono-logger.c:18:16: error: cannot initialize a variable of type 'GLogLevelFlags' with an rvalue of type 'int'
GLogLevelFlags mono_internal_current_level      = INT_MAX;
               ^                                  ~~~~~~~
mono-logger.c:19:16: error: cannot initialize a variable of type 'MonoTraceMask' with an rvalue of type 'int'
MonoTraceMask  mono_internal_current_mask       = ~((MonoTraceMask)0);
               ^                                  ~~~~~~~~~~~~~~~~~~~
mono-logger.c:305:17: error: cannot initialize a member subobject of type 'const MonoTraceMask' with an rvalue of type 'int'
                { "io-layer", MONO_TRACE_IO_LAYER_PROCESS
                              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
mono-logger.c:315:12: error: cannot initialize a member subobject of type 'const MonoTraceMask' with an rvalue of type 'int'
                { "all", ~((MonoTraceMask)0) },
                         ^~~~~~~~~~~~~~~~~~~
mono-logger.c:316:11: error: cannot initialize a member subobject of type 'const MonoTraceMask' with an rvalue of type 'int'
                { NULL, 0 },
                        ^
mono-logger.c:392:30: error: cannot initialize a variable of type 'UserSuppliedLoggerUserData *' with an lvalue of type 'void *'
        UserSuppliedLoggerUserData *ll =logCallback.user_data;
                                    ^   ~~~~~~~~~~~~~~~~~~~~~
mono-logger.c:400:30: error: cannot initialize a variable of type 'UserSuppliedLoggerUserData *' with an lvalue of type 'void *'
        UserSuppliedLoggerUserData *ll = logCallback.user_data;
                                    ^    ~~~~~~~~~~~~~~~~~~~~~
mono-logger.c:451:30: error: cannot initialize a variable of type 'UserSuppliedLoggerUserData *' with an rvalue of type 'gpointer' (aka 'void *')
        UserSuppliedLoggerUserData *ll = g_malloc (sizeof (UserSuppliedLoggerUserData));
                                    ^    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
8 errors generated.

* [cxx] Add missing cast from void* to non-void* in g_renew.

* [cxx] mono-flight-recorder.c:97:22: error: cannot initialize a variable of type 'MonoFlightRecorder *' with an rvalue of type 'gpointer' (aka 'void *')
        MonoFlightRecorder *recorder = g_malloc0 (size_of_recorder_prefix + size_of_item_ptrs + size_of_items);
                            ^          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 error generated.

add cast

* [cxx] mono-error.c:769:18: error: cannot initialize a variable of type 'MonoErrorBoxed *' (aka '_MonoErrorBoxed *') with an rvalue of type 'gpointer' (aka 'void *')
        MonoErrorBoxed* box = mono_image_alloc (image, sizeof (MonoErrorBoxed));
                        ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

cast from void* to non-void*

* [cxx] lock-free-alloc.c:358:27: error: no viable overloaded '='
                new_anchor = old_anchor = *(volatile Anchor*)&desc->anchor.value;
                             ~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lock-free-alloc.c:90:9: note: candidate function (the implicit copy assignment operator) not viable: 1st argument ('volatile Anchor') would lose volatile qualifier
typedef union {
        ^
lock-free-alloc.c:90:9: note: candidate function (the implicit move assignment operator) not viable: 1st argument ('volatile Anchor') would lose volatile qualifier
typedef union {
        ^
lock-free-alloc.c:465:27: error: no viable overloaded '='
                new_anchor = old_anchor = *(volatile Anchor*)&desc->anchor.value;
                             ~~~~~~~~~~ ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
lock-free-alloc.c:90:9: note: candidate function (the implicit copy assignment operator) not viable: 1st argument ('volatile Anchor') would lose volatile qualifier

C++ does not by default allow copying volatile aggregates (struct, union, class).
This is mostly reasonable because, imagine the struct does not fit in a register. How would it work?
Here, and it is probably common, the struct does fit in a register and the intent and implementation
is pretty obvious.
Anyway, you can provide operator= or copy the constituents (i.e. one integer that unions over the rest).

* [cxx] mono-threads.c strengthen type from gpointer to actual type,
add casts from void* to non-void*, add casts between int and enum,
remove excess GSList type that caused some errors.

mono-threads.c:568:2: error: no matching function for call to 'mono_threads_signal_thread_handle'
        mono_threads_signal_thread_handle (handle);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mono-threads.c:491:1: note: candidate function not viable: cannot convert argument of incomplete type 'gpointer' (aka 'void *') to 'MonoThreadHandle *' for 1st argument
mono_threads_signal_thread_handle (MonoThreadHandle* thread_handle);
^
mono-threads.c:570:2: error: no matching function for call to 'mono_threads_close_thread_handle'
        mono_threads_close_thread_handle (handle);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./mono-threads.h:516:1: note: candidate function not viable: cannot convert argument of incomplete type 'gpointer' (aka 'void *') to 'MonoThreadHandle *' for 1st argument
mono_threads_close_thread_handle (MonoThreadHandle *handle);
^
mono-threads.c:776:12: error: cannot initialize return object of type 'MonoThreadInfoFlags' with an rvalue of type 'gint32' (aka 'int')
    return mono_atomic_load_i32 (&info->flags);
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mono-threads.c:783:22: error: cannot initialize a variable of type 'MonoThreadInfoFlags' with an rvalue of type 'gint32' (aka 'int')
        MonoThreadInfoFlags old = mono_atomic_load_i32 (&info->flags);
                            ^     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mono-threads.c:794:8: error: definition of type 'GSList' conflicts with typedef of the same name
struct GSList {
       ^
../../mono/eglib/glib.h:330:24: note: 'GSList' declared here
typedef struct _GSList GSList;
                       ^
mono-threads.c:811:22: error: assigning to 'GSList *' (aka '_GSList *') from incompatible type 'gpointer' (aka 'void *')
        wait_request.next = old;
                            ^~~
mono-threads.c:852:10: error: assigning to 'GSList *' (aka '_GSList *') from incompatible type 'gpointer' (aka 'void *')
                        old = old_read;
                              ^~~~~~~~
mono-threads.c:866:3: error: no matching function for call to 'mono_os_sem_post'
                mono_os_sem_post (curr->data);
                ^~~~~~~~~~~~~~~~
./mono-os-semaphore.h:166:1: note: candidate function not viable: cannot convert argument of incomplete type 'gpointer' (aka 'void *') to 'MonoSemType *' (aka 'unsigned int *') for 1st argument
mono_os_sem_post (MonoSemType *sem)
^
mono-threads.c:1865:10: error: cannot initialize return object of type 'MonoThreadInfoWaitRet' with an rvalue of type 'int'
                return MONO_THREAD_INFO_WAIT_RET_SUCCESS_0 + (res - MONO_OS_EVENT_WAIT_RET_SUCCESS_0);
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
9 errors generated.

* [cxx] mono-threads-coop.c In C++, enums are not quite ints.
Their default underlying type (you can change it, per type, nice!), is int,
but they are unique types not automatically interchangable with int.

mono-threads-coop.c:530:9: error: cannot initialize return object of type 'MonoThreadsSuspendPolicy' with an rvalue of type 'int'
        return 0; /* unset */
               ^
mono-threads-coop.c:558:27: error: cannot initialize a variable of type 'MonoThreadsSuspendPolicy' with an rvalue of type 'int'
        MonoThreadsSuspendPolicy policy = 0;
                                 ^        ~
mono-threads-coop.c:571:27: error: cannot initialize a variable of type 'MonoThreadsSuspendPolicy' with an rvalue of type 'int'
        MonoThreadsSuspendPolicy policy = 0;
                                 ^        ~
mono-threads-coop.c:590:34: error: cannot initialize a variable of type 'MonoThreadsSuspendPolicy' with an rvalue of type 'int'
        static MonoThreadsSuspendPolicy policy = -1;
                                        ^        ~~
4 errors generated.

* [cxx] mono-utility-thread.c; cast from void* to non-void*.

mono-utility-thread.c:85:21: error: cannot initialize a variable of type 'MonoUtilityThread *' with an rvalue of type 'gpointer' (aka 'void *')
        MonoUtilityThread *thread = g_malloc0 (sizeof (MonoUtilityThread));
                           ^        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mono-utility-thread.c:128:27: error: cannot initialize a variable of type 'UtilityThreadQueueEntry *' with an rvalue of type 'gpointer' (aka 'void *')
        UtilityThreadQueueEntry *entry = mono_lock_free_alloc (&thread->message_allocator);
                                 ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mono-utility-thread.c:154:27: error: cannot initialize a variable of type 'UtilityThreadQueueEntry *' with an rvalue of type 'gpointer' (aka 'void *')
        UtilityThreadQueueEntry *entry = mono_lock_free_alloc (&thread->message_allocator);
                                 ^       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3 errors generated.

* [cxx] Fix assignment of volatile aggregate without raising specter of ifdef __cplusplus.
Does this violate the abstraction? i.e. wouldn't it be better to assign entire aggregate
at the caller than to dig into its constituent member data?


All the casts of (x) can be replace with G_CAST (x) that I developed this morning and am working through.
2018-08-09 12:59:55 -07:00
Rodrigo Kumpera 7f786b2c13 [runtime] Rewrite mono_get_corlib_version to not allocate objects. 2018-08-09 13:33:00 -04:00
Rodrigo Kumpera 5651654795 [wasm/aot] Sprinkle some mono_runtime_get_no_exec to make sure we don't alloc objects during AOT. 2018-08-09 13:32:24 -04:00
Rodrigo Kumpera c96cbf6bd9 [runtime] Add mono_metadata_read_constant_value and mono_string_from_blob.
mono_metadata_read_constant_value was extracted from mono_get_constant_value_from_blob
but removing the bits that require GC interaction. This function will be used to read corlib version without allocating strings.

mono_string_from_blob decodes a string from a blob pointer, returns g_malloc'd memory.
2018-08-09 13:29:02 -04:00
Rodrigo Kumpera b0aaec2154 [wasm]Add --enable-wasm-aot hack to autocrap. 2018-08-09 13:15:56 -04:00
Rodrigo Kumpera de8bbe47f9 [wasm] Add support in utils for TARGET_WASM. 2018-08-09 13:06:46 -04:00
Jay Krell 36956720f7 [cxx] Port complex math to small portable C and C++. (#9821)
* [cxx] Port complex math to small portable C and C++ with the only dependency being hypot and non-complex math, and small preexisting code we already had for msvc.

I.e. we already had two versions, with varying portability.
Use one of them, adding about three lines to it.

There was some debate back and forth about macros/renames here.
This version significantly reduces line damage and is much easier to read.
Doing the rename as a separate step may still be advisable, to erase any doubt as to portable semantics, i.e. namespace isolation.

Mono style divergence is also left unfixed to avoid further line damage.
i.e. consider `double_complex` => `MonoComplex`.
`mono_double_complex_` => `mono_complex_`.
2018-08-08 22:52:56 -07:00
Katelyn Gadd 14d20074ff Move to generating msbuild choose elements to get if-else selection behavior for sources in projects so that we don't get erroneous duplicate files in cases where there are both profile and host platform criteria (#9952)
A recent commit revealed that in cases where we select based on a mix of host platform and profile, genproj csproj files can end up with duplicate sources because the existing <ItemGroup Condition= approach could make multiple groups match for a given compile when we really just want one.

This PR changes to generating a cascade of msbuild <Choose> elements, which give if-else selection to ensure that we only ever build a single set of files.
2018-08-09 02:52:37 +02:00
Marek Safar bd50f070bd [Facades] Adds System.Threading.Tasks.Extensions for mobile profiles (#9968)
* [Facades] Adds System.Threading.Tasks.Extensions for mobile profile

* Bump API snapshot submodule

* [csproj] Update project files
2018-08-09 00:01:18 +02:00
Jay Krell bcd0864ed4 [cxx] C++ esp. clang does not allow goto around initialization. (#9785)
* [cxx] C++ does not allow goto around initialization.
The result would be undefined/uninitialized -- presumably that is what we get in C,
not as safe as it seems. Though, since variable not typically/ever used after goto target, it is ok. A little bit of language requirement for the compiler to do such analysis would have gone a long way, not sophisticated analysis, just used/not-used.

Not a problem in C89 because variables only at top.
Not a problem in idiomatic C++ because, often, early return + destructors.
But definitely a problem with C99, and goto for error handling.
Not a problem with msvc in default permissive mode.
Not likely a problem with gcc due to permissive option.
But a problem with clang.

* [cxx] Split declaration from initialization, instead of go up to within if (0).
2018-08-08 14:07:35 -07:00
Alexander Kyte a29ad08d00 [runtime] Add a reference queue cleanup for MonoInternalThread (#9914) 2018-08-08 22:13:28 +02:00
Jay Krell 64d7a6e57a [cxx] Remove two excess toplevel consts in structs, one a C++ problem, one very obscure/hypothetical. (#9955)
* [cxx] mono-merp.c:83:9: error: implicit default constructor for 'MERPStruct' must explicitly initialize the const member 'systemModel'

There are possible other solutions involving initializing up front, and later casting away const for additional initialization. Having public-const private-mutable is a good-seeming interface, but is pretty rare. Maybe in [cxx]future can restore const, add a constructor,  etc.

* Remove toplevel const in struct for extremely obscure reasons, again pretty rare pattern.

The obscure reason:

given:
```
typedef struct foo
{
  const int i; // remove const to fix
} foo;

foo global = { 1 };
```
compiled as C++, with some recent versions of Visual C++, there is a regression
where it thinks this is a dynamic initialization. Which is usually ok, but can be a problem in unusual cases (true story..delayload implementation..).
2018-08-08 11:45:28 -07:00
Aleksey Kliger (λgeek) e8c3dc775b [coop] Thread.JoinInternal should not call mono_error_set_pending_exception (#9948)
The icall was converted to use HANDLES(), so the icall wrapper will set the
pending exception from the MonoError.  If the icall does it, too, the second
use (in the wrapper) will assert that the MonoError is being reused after
cleanup without being reinitialized.

Also add an assertion in mono_error_get_message that we're not trying to get a
message from a cleaned up MonoError.

Fixes https://github.com/mono/mono/issues/9935
2018-08-08 12:07:19 -04:00
Zoltan Varga b3c9487377 [llvmonly] Fix a regression caused by 55950a0608. (#9942) 2018-08-08 10:49:28 -04:00
Jay Krell 80d7861331 [cxx] various fixes in mono/metadata (#9815)
* console-unix.c:221:21: error: cannot initialize a variable of type 'MonoMethod *' (aka '_MonoMethod *') with an rvalue of type 'gpointer' (aka 'void *')
        static MonoMethod *System_Console_DoConsoleCancelEventBackground_method = ((gpointer)-1);
                           ^                                                      ~~~~~~~~~~~~~~

* ../../mono/metadata/opcodes.h:27:14: error: ISO C++ forbids forward references to 'enum' types
typedef enum _MonoOpcodeEnum MonoOpcodeEnum;

* w32socket-unix.c:601:9: error: no matching function for call to 'mono_w32socket_send'
                ret = mono_w32socket_send (((MonoFDHandle*) sockethandle)->fd, buffers->Head, buffers->HeadLength, 0, FALSE);

Change parameter from char* to void*.

* In file included from console-unix.c:479:2: error: no matching function for call to 'set_control_chars'
        set_control_chars (MONO_ARRAY_HANDLE_PIN (control_chars_arr, gchar, 0, &h), mono_attr.c_cc);
        ^~~~~~~~~~~~~~~~~
             ^
console-unix.c:362:1: note: candidate function not viable: cannot convert argument of incomplete type 'gpointer' (aka 'void *') to 'gchar *' (aka 'char *') for 1st argument
set_control_chars (gchar *control_chars, const guchar *cc)

add cast in MONO_ARRAY_HANDLE_PIN

* w32socket-unix.c:635:11: error: assigning to 'gchar *' (aka 'char *') from incompatible type 'gpointer' (aka 'void *')
        buffer = g_malloc (SF_BUFFER_SIZE);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~

Change buffer to gpointer, and another similar.

* w32socket-unix.c:1136:99: error: cannot initialize a member subobject of type 'gpointer' (aka 'void *') with an lvalue of type 'gboolean (SOCKET, OVERLAPPED *, guint32, guint32)' (aka 'int (int, OVERLAPPED *, unsigned int, unsigned int)')
        { {0x7fda2e11,0x8630,0x436f,{0xa0,0x31,0xf5,0x36,0xa6,0xee,0xc1,0x57}} /* WSAID_DISCONNECTEX */, extension_disconect },
                                                                                                         ^~~~~~~~~~~~~~~~~~~
w32socket-unix.c:1137:99: error: cannot initialize a member subobject of type 'gpointer' (aka 'void *') with an lvalue of type 'gboolean (SOCKET, gpointer, guint32, guint32, OVERLAPPED *, TRANSMIT_FILE_BUFFERS *, guint32)' (aka 'int (int, void *, unsigned int, unsigned int, OVERLAPPED *, TRANSMIT_FILE_BUFFERS *, unsigned int)')
        { {0xb5367df0,0xcbac,0x11cf,{0x95,0xca,0x00,0x80,0x5f,0x48,0xa1,0x92}} /* WSAID_TRANSMITFILE */, extension_transmit_file },

Add cast to gpointer.
Also add const while there.

* w32process-unix.c:2189:14: error: no matching function for call to 'process_wait'
                        waitret = process_wait (process_info->process_handle, MONO_INFINITE_WAIT, NULL);

Add cast from void* to non-void*.

* w32process-unix.c:2099:3: error: cannot jump from this goto statement to its label
                goto done;
                ^
w32process-unix.c:2111:13: note: jump bypasses variable initialization
        gunichar2 *args = utf16_concat (utf16_quote, lpFile, utf16_quote, lpParameters ? utf16_space : NULL, lpParameters, (const gunichar2 *)NULL);
                   ^
w32process-unix.c:2104:19: note: jump bypasses variable initialization
        const gunichar2 *lpDirectory = coop.length.working_directory ? coop.working_directory : NULL;
                         ^
w32process-unix.c:2103:19: note: jump bypasses variable initialization
        const gunichar2 *lpParameters = coop.arguments;
                         ^
w32process-unix.c:2102:19: note: jump bypasses variable initialization
        const gunichar2 *lpFile = coop.filename;
                         ^
w32process-unix.c:2285:3: error: cannot jump from this goto statement to its label
                goto exit;
                ^
w32process-unix.c:2291:13: note: jump bypasses variable initialization
        gunichar2 *dir = coop.length.working_directory ? coop.working_directory : NULL;
                   ^
w32process-unix.c1 error generated.
:2288:13: note: jump bypasses variable initialization
        gunichar2 *args = coop.length.arguments ? coop.arguments : NULL;

etc.

Separate declaration from initialization.

* appdomain.c:554:22: note: jump bypasses variable initialization
        MonoAppDomainHandle ad = mono_domain_create_appdomain_internal (friendly_name, setup, error);
                            ^
appdomain.c:590:2: error: cannot jump from this goto statement to its label
        goto_if_nok (error, leave);
        ^
etc.

Split local declaration from initialization.

* w32process-unix.c:1914:27: error: no matching function for call to 'mono_handle_new'

and error on every typesafe MONO_HANDLE_NEW call

Have MONO_HANDLE_TYPECHECK_FOR return MonoObject* instead of gpointer, by casting.
Could probably also change mono_handle_new to accept gpointer.

* class-accessors.c:247:9: error: cannot initialize return object of type 'MonoMarshalType *' with an rvalue of type 'void *'
        return mono_property_bag_get (m_class_get_infrequent_data (klass), PROP_MARSHAL_INFO);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class-accessors.c:265:18: error: cannot initialize a variable of type 'Uint32Property *' with an rvalue of type 'void *'
        Uint32Property *prop = mono_property_bag_get (m_class_get_infrequent_data (klass), PROP_REF_INFO_HANDLE);
                        ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class-accessors.c:273:19: error: cannot initialize a variable of type 'Uint32Property *' with an rvalue of type 'void *'
                Uint32Property *prop = mono_property_bag_get (m_class_get_infrequent_data (klass), PROP_REF_INFO_HANDLE);
                                ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class-accessors.c:279:18: error: cannot initialize a variable of type 'Uint32Property *' with an rvalue of type 'gpointer' (aka 'void *')
        Uint32Property *prop = mono_class_alloc (klass, sizeof (Uint32Property));
                        ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class-accessors.c:294:19: error: cannot initialize a variable of type 'PointerProperty *' with an rvalue of type 'gpointer' (aka 'void *')
        PointerProperty *prop = mono_class_alloc (klass, sizeof (PointerProperty));
                         ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class-accessors.c:334:9: error: cannot initialize return object of type 'MonoClassPropertyInfo *' with an rvalue of type 'void *'
        return mono_property_bag_get (m_class_get_infrequent_data (klass), PROP_PROPERTY_INFO);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class-accessors.c:347:9: error: cannot initialize return object of type 'MonoClassEventInfo *' with an rvalue of type 'void *'
        return mono_property_bag_get (m_class_get_infrequent_data (klass), PROP_EVENT_INFO);
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class-accessors.c:372:18: error: cannot initialize a variable of type 'Uint32Property *' with an rvalue of type 'void *'
        Uint32Property *prop = mono_property_bag_get (m_class_get_infrequent_data (klass), PROP_DECLSEC_FLAGS);
                        ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class-accessors.c:379:18: error: cannot initialize a variable of type 'Uint32Property *' with an rvalue of type 'gpointer' (aka 'void *')
        Uint32Property *prop = mono_class_alloc (klass, sizeof (Uint32Property));
                        ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class-accessors.c:412:18: error: cannot initialize a variable of type 'WeakBitmapData *' with an rvalue of type 'gpointer' (aka 'void *')
        WeakBitmapData *info = mono_class_alloc (klass, sizeof (WeakBitmapData));
                        ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class-accessors.c:423:18: error: cannot initialize a variable of type 'WeakBitmapData *' with an rvalue of type 'void *'
        WeakBitmapData *prop = mono_property_bag_get (m_class_get_infrequent_data (klass), PROP_WEAK_BITMAP);
                        ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class-accessors.c:454:19: error: cannot initialize a variable of type 'DimConflictData *' with an rvalue of type 'gpointer' (aka 'void *')
        DimConflictData *info = mono_class_alloc (klass, sizeof (DimConflictData));
                         ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class-accessors.c:469:19: error: cannot initialize a variable of type 'DimConflictData *' with an rvalue of type 'void *'
        DimConflictData *info = mono_property_bag_get (&klass->infrequent_data, PROP_DIM_CONFLICTS);
                         ^      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Cast from void* to non-void*.

* class.c:3005:16: error: assigning to 'char *' from incompatible type 'const char *'
        if ((nested = strchr (name, '/'))) {
                      ^~~~~~~~~~~~~~~~~~
class-init.c:437:11: error: assigning to 'MonoClass *' (aka '_MonoClass *') from incompatible type 'gpointer' (aka 'void *')
                klass = mono_image_alloc0 (image, sizeof (MonoClassGtd));
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class-init.c:442:11: error: assigning to 'MonoClass *' (aka '_MonoClass *') from incompatible type 'gpointer' (aka 'void *')
                klass = mono_image_alloc0 (image, sizeof (MonoClassDef));
                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class-init.c:500:5: error: cannot jump from this goto statement to its label
                                goto parent_failure;
                                ^
class-init.c:599:6: note: jump bypasses variable initialization
        int first_method_idx = cols [MONO_TYPEDEF_METHOD_LIST] - 1;
            ^
class-init.c:597:6: note: jump bypasses variable initialization
        int first_field_idx = cols [MONO_TYPEDEF_FIELD_LIST] - 1;
            ^
class-init.c:496:5: error: cannot jump from this goto statement to its label
                                goto parent_failure;
                                ^
class-init.c:599:6: note: jump bypasses variable initialization
        int first_method_idx = cols [MONO_TYPEDEF_METHOD_LIST] - 1;
            ^
class-init.c:597:6: note: jump bypasses variable initialization
        int first_field_idx = cols [MONO_TYPEDEF_FIELD_LIST] - 1;
            ^
class-init.c:490:4: error: cannot jump from this goto statement to its label
                        goto parent_failure;
                        ^
class-init.c:599:6: note: jump bypasses variable initialization
        int first_method_idx = cols [MONO_TYPEDEF_METHOD_LIST] - 1;
            ^
class-init.c:597:6: note: jump bypasses variable initialization
        int first_field_idx = cols [MONO_TYPEDEF_FIELD_LIST] - 1;
            ^
class-init.c:838:14: error: no matching function for call to 'class_kind_may_contain_generic_instances'
        image_set = class_kind_may_contain_generic_instances (eclass->class_kind) ? mono_metadata_get_image_set_for_class (eclass) : NULL;
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

* class.c:3005:16: error: assigning to 'char *' from incompatible type 'const char *'
        if ((nested = strchr (name, '/'))) {
                      ^~~~~~~~~~~~~~~~~~

class.c:427:10: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *'
                        char *s = strchr (klass_name, '`');
                              ^   ~~~~~~~~~~~~~~~~~~~~~~~~

add const, add cast, and also fix adjacent integer truncation

* assembly.c:2964:8: error: cannot initialize a variable of type 'char *' with an rvalue of type 'const char *'
        char *eqsign = strchr (pair, '=');

add cast

* cominterop.c:664:2: error: no matching function for call to 'register_icall'
        register_icall (cominterop_get_method_interface, "cominterop_get_method_interface", "ptr ptr", FALSE);
        ^~~~~~~~~~~~~~

repeatedly

Add cast in macro.

Also another need for a cast on a string (error not recorded).

* [cxx] icall.c:
 casts
 change char* to void*
 split local declaration from initialization
 add extern "C" around external code (environ -- probably merged to master already)

* image.c:726:8: error: no matching function for call to 'strcmp'
                        if (strcmp (list_iter->data, name) == 0) {
                            ^~~~~~
image.c:1184:20: error: constant expression evaluates to 2218203019 which cannot be narrowed to type 'int' [-Wc++11-narrowing]
        IGNORED_ASSEMBLY (0x8437178B, SYS_NET_HTTP, "C0E04D9C-70CF-48A6-A179-FBFD8CE69FD0", "4.3.0 net46"),
                          ^~~~~~~~~~
 repeatedly

add casts

* [cxx] marshal.c

marshal.c:224:3: error: no matching function for call to 'register_icall'
                register_icall (mono_marshal_string_to_utf16, "mono_marshal_string_to_utf16", "ptr obj", FALSE);

repeatedly; add cast in macro

Also possible int/enum mixup -- add cast.

* [cxx] property-bag.c

property-bag.c:44:37: error: cannot initialize a variable of type 'MonoPropertyBagItem *' (aka '_MonoPropertyBagItem *') with an lvalue of type 'void *'
        MonoPropertyBagItem *cur, **prev, *item = value;

Add cast here, and another.

* [cxx] metadata.c
add casts from void* to non-void*
indicate future enum instead of int
remove designated intitializers

* [cxx] more appdomain.c

* PR: Repatriate orphaned comment.

* PR: include opcodes.h instead of duplicating MonoOpcodeEnum
2018-08-08 01:48:13 -07:00
Jay Krell b8416e942e Remove extern "C" from MONO_LLVM_INTERNAL.
Consider also putting it at start of prototype instead of end, like MONO_API.
2018-08-08 10:29:01 +02:00
Jay Krell 6e6b4740f6 Remove gratuitous ifdef and variable-length array. (#9896)
We might as well just have one more portable form here.
2018-08-08 01:16:10 -07:00
Zoltan Varga da89b32e14 [sdks] Use separate temporary dirs for llvm36/llvm. 2018-08-08 09:15:18 +02:00
Jay Krell 7f4b669ec1 [cxx] MONO_API before MONO_RT_EXTERNAL_ONLY per 58efe94192. (#9884) 2018-08-07 20:03:47 -07:00
nsivov d7cb4f260e [corlib] Fix method access failures for __ComObject instances hosted in dummy assembly. (#9936)
Otherwise I get consistent access failures for CALLVIRT from mono_method_to_ir().

Stacktrace looks like this:

```
System.InvalidOperationException: WinForms_SeeInnerException ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an        invocation. ---> System.MethodAccessException: Method `System.__ComObject..ctor()' is inaccessible from method `System.__ComObject..ctor()'
445286   at (wrapper managed-to-native) System.Object.__icall_wrapper_mono_throw_method_access(intptr,intptr)
445287   at System.__ComObject..ctor () [0x00000] in <430892d2beef407ea6b21748b72c1144>:0
445288   at (wrapper cominterop-invoke) System.__ComObject..ctor()
445289   at (wrapper managed-to-native) System.Reflection.MonoCMethod.InternalInvoke(System.Reflection.MonoCMethod,object,object[],System.Exception&)
445290   at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00002] in <b683bf5ced8643af8ec2e589dfb23c2b>:0
445291    --- End of inner exception stack trace ---
445292   at System.Reflection.MonoCMethod.InternalInvoke (System.Object obj, System.Object[] parameters) [0x00014] in <b683bf5ced8643af8ec2e589dfb23c2b>:0
445293   at System.RuntimeType.CreateInstanceMono (System.Boolean nonPublic) [0x000a8] in <b683bf5ced8643af8ec2e589dfb23c2b>:0
445294   at System.RuntimeType.CreateInstanceSlow (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00009] in <b683bf5ced8643af8ec       2e589dfb23c2b>:0
445295   at System.RuntimeType.CreateInstanceDefaultCtor (System.Boolean publicOnly, System.Boolean skipCheckThis, System.Boolean fillCache, System.Threading.StackCrawlMark& stackMark) [0x00027] in <b683bf5ced86       43af8ec2e589dfb23c2b>:0
445296   at System.Activator.CreateInstance (System.Type type, System.Boolean nonPublic) [0x00020] in <b683bf5ced8643af8ec2e589dfb23c2b>:0
445297   at System.Activator.CreateInstance (System.Type type) [0x00000] in <b683bf5ced8643af8ec2e589dfb23c2b>:0
```

My understanding is that misleading exception message is due to exact same name used for dynamic type, in fact it means that some type in dummy assembly can't access internal method from corlib.
2018-08-08 01:18:51 +02:00
Jay Krell d73de73f59 Replace many uses of alloca with g_newa. (#9894) 2018-08-07 14:45:27 -07:00
Jay Krell 02e166e361 Fix overallocate by factor of four -- this was len * sizeof(guint8*) instead of len * sizeof(guint8), which devolves here to just alloca(len). (#9885)
* Fix overallocate by factor of four -- this was len * sizeof(guint8*) instead
of len * sizeof(guint8), which devolves here to just alloca(len).
2018-08-07 14:09:29 -07:00
Alexander Kyte 413a185f4c Merge pull request #8654 from alexanderkyte/enable_linux_dumping
Enable mono-state-based telemetry for crashing on CI
2018-08-07 15:35:48 -04:00
Jay Krell bcd3b53f04 [cxx] threadpool-worker-default.c other than complex math: casts on functions and ints/enums (#9822) 2018-08-07 14:50:32 -04:00
Marek Safar 9e592d3483 [corlib] Update linker descriptors 2018-08-07 19:39:25 +02:00
Jo Shields 7c50c6ac26 Merge pull request #9937 from directhex/fix-mkbundle-gen
Allow override of mkbundle generation library extension
2018-08-07 11:10:46 -04:00
Jo Shields d02cf68f3e Allow override of mkbundle generation library extension 2018-08-07 11:09:40 -04:00
Aleksey Kliger (λgeek) 8690d0aeb0 [threads] switch to GC Safe around pthread calls in mono_thread_internal_set_priority (#9916)
* [threads] switch to GC Safe around pthread calls in mono_thread_internal_set_priority

   Observed pthread_getschedparam taking a lock on OSX

* [win32] Capture GetLastError before MONO_EXIT_GC_SAFE
2018-08-07 10:47:15 -04:00
Kenneth Pouncey 00f64d2998 Wasm Bindings enhancements (#9865)
* Fix Tasks and Promises in bindings.

- Tasks were not being marshalled correctly in some circumstances.  The only place that I could reproduce this was in the bindings tests.  Running from outside the test harness would not reproduce this error.
- Promises would intermittently throw Exceptions:  NullReferenceException, ArrayIndex out of bounds.
- When using Promises from JS to CS there were random Memory access exceptions.  Looks like memory was being trampled on.  Adding an integer variable to the create_task_completion_source call fixed these problems as the CreateTaskSource is defined as receiving an int variable.  This also fixed the NullReferenceExceptions and ArrayIndex out of bounds exceptions.

* Make JSObject disposable

- Add the ability to dispose of a JSObject.
- The dispose will remove the object from the tracked object list and will allow the reference counter to be recycled later.
- By keeping a recycled list of references and reusing those will keep the tracked objects array from growing out of hand.
- Add test to the Test Harness.
- Modifiy the way the bindings init works by passing in of the Assembly and Class `[asm]namespace.class`.  Modfiy test.js to use the new format.

* Add support for Get and Set of javascript properties on a JSObject.

* The namespace problem was fixed in https://github.com/mono/mono/pull/9836

* Cleanup unused and duplicate definitions
2018-08-07 11:50:16 +02:00
Zoltan Varga 371de430b6 [sdks] Rename LLVM_VERSION make var to LLVM_RELEASE, LLVM_VERSION is already used by versions.mk. (#9919) 2018-08-07 05:16:48 -04:00
Marek Safar ad219e63bc [linker] Pass more profile flags to calculate size 2018-08-07 10:20:13 +02:00
Steve Pfister 4dfc22398a Modified most of the reflection member lookup methods to support prefix searches (PropertyName*). This matches the refsrc behavior. 2018-08-07 09:12:50 +02:00
Jay Krell 8a15c5f722 [cxx] Fix enum/int mixup in new code. (#9886) 2018-08-06 20:46:08 -07:00
Alexander Kyte 65582de451 [runtime] Disable crash reporting on the SDKS 2018-08-06 23:32:49 -04:00
Jay Krell 61fbc7fee2 Remove unconditional alloca by a constant. (#9895) 2018-08-06 19:51:46 -07:00
Aleksey Kliger (λgeek) 4aa4c01274 [loader] Determine assembly load context from path (#9858)
* [runtime] Add mono_runtime_get_caller_no_system_or_reflection

   Exposes an already existing stackwalk that we use to find out who called a corlib API.

* [loader] Consult asmctx of executing assembly for Assembly.Load

   if an assembly in LoadFrom context calls Assembly.Load, the given assembly name
   should be tried in the basedir of the executing assembly, and the resulting
   loaded assembly should be in LoadFrom context.

* [loader] Assemblies in individual asmctx can reference assemblies in application base

   If an assembly was loaded with LoadFile, it can reference assemblies from the
   application base, the GAC or MONO_PATH.

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

* [loader] Pass requesting assembly to mono_assembly_open_predicate

   In LoadFrom and LoadFile icalls, pass the currently executing assembly as the
   requesting assembly.

* [utils] Add mono_path_filename_in_basedir

* [loader] Add mono_install_asmctx_from_path_hook

   Add a hook that can be used to check whether a given path belongs to some
   assembly load context.

   For example if a given path is in the application base of the current
   appdomain, an appdomain hook would set out_asmctx to MONO_ASMCTX_DEFAULT and
   return TRUE.

* [loader] Use appdomain base dir and loadfrom asmctx hooks

   1. If an assembly filename is in the GAC, always open the assembly in default
     context.
   2. If an assembly filename is in the appdomain search path (base directory or
     private bin path) always open the assembly in default context.
   3. If an assembly filename is in the base dir of the requesting assembly and
     the requesting assembly was in LoadFrom context, always open the assembly in
     LoadFrom context.

   Fixes https://github.com/mono/mono/issues/9753
   and Fixes https://github.com/mono/mono/issues/9542

* [tests] Test loading references from LoadFrom and LoadFile contexts

   The LoadFrom assembly loading context and the individual assembly loading
   context (aka LoadFile aka "no context") behave differently when requesting a
   referenced assembly - for LoadFile we expect the runtime to probe the appdomain
   base, the GAC + MONO_PATH but not the basedir of the requesting assembly.  For
   LoadFrom the basedir of the requesting assembly _is_ included.  So the tests
   here try all the possible variations.

* [tests] AOT assembly-load-reference tests
2018-08-06 19:05:55 -04:00
Vlad Brezae 60643fccb4 [metadata] Fix use after free of signatures of some dynamic methods (#9863)
* [metadata] Cache method signature in correct image hash

When freeing dynamic methods in mono_free_method, we remove entries in the method image's hashtables, hashed by the soon to be freed method signature.

* [metadata] Avoid unnecessary alloc
2018-08-06 22:18:53 +02:00
Jo Shields a8a7c146e4 Merge pull request #9907 from directhex/master
Bump version to 5.19.0
2018-08-06 14:36:22 -04:00
nsivov 830c726b7c Add missing return from the function. (#9836)
Was accidentally removed in 3780114620.
2018-08-06 20:04:16 +02:00
Alexander Kyte d5d68eff8a [runtime] Speed-up MERP timeout 2018-08-06 12:46:11 -04:00
Alexander Kyte 4d22561f8c Merge pull request #9862 from alexanderkyte/culture_speedup
[runtime] Cache culture locale name in managed
2018-08-06 12:36:23 -04:00
Jo Shields 29f3ad4c9a Bump version to 5.19.0 2018-08-06 11:46:01 -04:00
Alexander Kyte ae4bd53944 [runtime] Cache culture locale name in managed
Every different locale getter in unmanaged attempts to
cache the result from this icall. Some of them fail to do so in a manner
that is correct.

CFLocaleCopyCurrent (); in get_darwin_locale ends up being called
thousands of times. In an app with a few dozen printfs, it's easy to see
18mb of leaked memory through this.

Rather than trying to fix them all in unmanaged in a perfect manner, I
thought it better to also avoid the icall overhead and to cache it in
C#.

Without this fix, a memory traffic stress test (debian shootout's pidigits) leads to 66% of
memory pressure being due to this  icall. With this fix, it is 4.3%.

If this caching is wrong for correctness reasons (we expect it to change?),
I would like to point out that we have similar caching done in unmanaged
and that we should then bring both into a correct design.
2018-08-02 17:02:46 -04:00
Nikolay Sivov b7a2d5d61c [eglib] Fix compilation warning, remove unused and broken functions. 2018-08-01 13:53:01 +03:00
Nikolay Sivov 8a936cde3a [eglib] Fix misleading indentation warning. 2018-08-01 13:53:01 +03:00
Alexander Kyte 1d4f4ac1b8 Revert "[runtime] Make unhandled state dumper OSX-specific"
This reverts commit f72d9b0529.
2018-07-30 14:38:19 -04:00
1719 changed files with 52394 additions and 39462 deletions

No files matched your search

+6
View File
@@ -42,17 +42,21 @@
/mcs/build @marek-safar @akoeplinger
/mcs/class @marek-safar @akoeplinger
/mcs/class/corlib/Mono @baulig
/mcs/class/corlib/System.Reflection*/ @vargaz @lambdageek
/mcs/class/corlib/System.Security.Cryptography.X509Certificates @baulig
/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 @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/System.Security.Cryptography.X509Certificates @baulig
/mcs/class/System.Data* @egorbo
/mcs/errors @marek-safar
@@ -87,6 +91,8 @@
/mono/mini/*profiler* @alexrp
/mono/mini/debugger-agent.c @DavidKarlas
/mono/native @baulig
/mono/profiler @alexrp @kumpera
/mono/sgen @BrzVlad @kumpera
+4
View File
@@ -58,3 +58,7 @@
[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
+12 -12
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](http://www.dotnetfoundation.org/)
The Mono project is part of the [.NET Foundation](https://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)
@@ -66,15 +66,15 @@ Building the Software
---------------------
Please see our guides for building Mono on
[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/).
[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/).
Note that building from Git assumes that you already have Mono installed,
so please download and [install the latest Mono release](http://www.mono-project.com/download/)
so please download and [install the latest Mono release](https://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](http://en.wikipedia.org/wiki/Bootstrapping_(compilers))).
(also known as [bootstrapping](https://en.wikipedia.org/wiki/Bootstrapping_(compilers))).
If you don't have a working Mono installation
---------------------------------------------
@@ -203,9 +203,9 @@ Contributing to Mono
====================
Before submitting changes to Mono, please review the [contribution
guidelines](http://www.mono-project.com/community/contributing/).
guidelines](https://www.mono-project.com/community/contributing/).
Please pay particular attention to the [Important
Rules](http://www.mono-project.com/community/contributing/#important-rules)
Rules](https://www.mono-project.com/community/contributing/#important-rules)
section.
Reporting bugs
@@ -215,7 +215,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](http://www.mono-project.com/community/bugs/make-a-good-bug-report/)
[guidelines](https://www.mono-project.com/community/bugs/make-a-good-bug-report/)
on how to make a good bug report.
Configuration Options
@@ -435,7 +435,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 http://www.mono-project.com/docs/advanced/mono-llvm/ for the
* See https://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 +504,7 @@ also, see the man page.
* This configures the Mono compiler to generate code
suitable to be used by Google's Native Client:
http://code.google.com/p/nativeclient/
https://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 +578,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](http://www.dotnetfoundation.org/legal/mono-tm).
The use of trademarks and logos for Mono can be found [here](https://www.dotnetfoundation.org/legal/mono-tm).
Maintaining the Class Library Solution Files
============================================
@@ -1,14 +0,0 @@
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 ();
}
}
}
+2 -2
View File
@@ -2,7 +2,7 @@
{
"name": "roslyn",
"url": "git://github.com/mono/roslyn.git",
"rev": "380eec412868464a132cdcd3a45ef457fab6e060",
"rev": "7a840bd5697ef6ea41f554a09d837636fba9d88d",
"remote-branch": "origin/mono-testing",
"branch": "mono-testing",
"directory": "roslyn"
@@ -10,7 +10,7 @@
{
"name": "coreclr",
"url": "git://github.com/mono/coreclr.git",
"rev": "aa62c0382ae79562293f3ea1a94ef0f16f80f498",
"rev": "f3d9c9f742f9dcb5faf40080db5e7f464dab7e7c",
"remote-branch": "origin/mono",
"branch": "mono",
"directory": "coreclr"
+2 -3
View File
@@ -3689,9 +3689,8 @@ 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/AssemblyExtensions.cs
GCStressTests/AssemblyLoadContext.cs
CORECLR_TESTLIBRARY_CS_SRC = \
$(CORECLR_PATH)/tests/src/Common/CoreCLRTestLibrary/TestFramework.cs \
$(CORECLR_PATH)/tests/src/Common/CoreCLRTestLibrary/Utilities.cs \
+1 -1
View File
@@ -1,5 +1,5 @@
check-roslyn:
@$(MAKE) validate-roslyn RESET_VERSIONS=1
cd $(ROSLYN_PATH); \
./mono-testing.sh "$(XUNIT)" || exit; \
./build.sh --restore --build --test --mono || exit; \
echo "done"
+1129 -1161
View File
File diff suppressed because it is too large. Load diff
+430 -187
View File
@@ -1,7 +1,7 @@
# Process this file with autoconf to produce a configure script.
#AC_PREREQ([2.62])
AC_INIT(mono, [5.17.0],
AC_INIT(mono, [5.21.0],
[https://github.com/mono/mono/issues/new])
AC_CONFIG_SRCDIR([README.md])
@@ -46,7 +46,7 @@ MONO_VERSION_BUILD=`echo $VERSION | cut -d . -f 3`
# There is no ordering of corlib versions, no old or new,
# the runtime expects an exact match.
#
MONO_CORLIB_VERSION=40525B4A-F860-49BF-936E-6B29CBBF357C
MONO_CORLIB_VERSION=5F2CEB7B-13B1-4694-A0D5-3DD7EDE81388
#
# Put a quoted #define in config.h.
@@ -57,7 +57,7 @@ AC_SUBST(MONO_CORLIB_VERSION)
case $host_os in
*cygwin* )
echo "Run configure using ./configure --host=i686-pc-mingw32"
echo "Run configure using ./configure --host=i686-w64-mingw32 or --host=x86_64-w64-mingw32"
exit 1
esac
@@ -105,12 +105,6 @@ need_link_unlink=no
#Set to extra linker flags to be passed to the runtime binaries (mono /mono-sgen)
extra_runtime_ldflags=""
# Hack for WASM
# Current autotools (v1.15) doesn't have a triplet we can use for wasm so the kludge we do is to
# work around it by using a feature flag instead
AC_ARG_ENABLE(wasm,[ --enable-wasm Hack to set the current runtime to target wasm], enable_wasm=$enableval)
# Thread configuration inspired by sleepycat's db
AC_MSG_CHECKING([host platform characteristics])
@@ -127,17 +121,15 @@ platform_ios=no
host_darwin=no
host_linux=no
if test "x$enable_wasm" = "xyes"; then
CFLAGS="$CFLAGS -D_REENTRANT -D_GNU_SOURCE -DNO_UNALIGNED_ACCESS -s WASM=1"
CPPFLAGS="$CPPFLAGS -D_REENTRANT -DUSE_MMAP -D_GNU_SOURCE -DNO_UNALIGNED_ACCESS -s WASM=1"
libdl="-ldl"
libgc_threads=pthreads
platform_wasm=yes
else
case "$host" in
wasm32*)
CFLAGS="$CFLAGS -D_REENTRANT -D_GNU_SOURCE -s WASM=1"
CPPFLAGS="$CPPFLAGS -D_REENTRANT -DUSE_MMAP -s WASM=1"
libdl="-ldl"
libgc_threads=pthreads
platform_wasm=yes
MONO_DEV_RANDOM=/dev/mono_random
;;
*-mingw*|*-*-cygwin*)
AC_DEFINE(DISABLE_PORTABILITY,1,[Disable the io-portability layer])
AC_DEFINE(HOST_NO_SYMLINKS,1,[This platform does not support symlinks])
@@ -153,9 +145,12 @@ case "$host" in
fi
fi
HOST_CC="gcc"
# Windows 7 or later is required
CPPFLAGS="$CPPFLAGS -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024"
LDFLAGS="$LDFLAGS -lbcrypt -lmswsock -lws2_32 -lole32 -loleaut32 -lpsapi -lversion -ladvapi32 -lwinmm -lkernel32 -liphlpapi"
WIN32_CPPFLAGS="-DWINVER=0x0601 -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -D_UNICODE -DUNICODE -DWIN32_THREADS -DFD_SETSIZE=1024"
CPPFLAGS="$CPPFLAGS $WIN32_CPPFLAGS"
WIN32_LDFLAGS="-lbcrypt -lmswsock -lws2_32 -lole32 -loleaut32 -lpsapi -lversion -ladvapi32 -lwinmm -lkernel32 -liphlpapi"
LDFLAGS="$LDFLAGS $WIN32_LDFLAGS"
libmono_cflags="-mms-bitfields -mwindows"
libmono_ldflags="-mms-bitfields -mwindows"
libdl=
@@ -192,6 +187,8 @@ case "$host" in
with_sgen_default_concurrent=yes
;;
*-*-*freebsd*)
dnl For close_my_fds
LDFLAGS="$LDFLAGS -lutil"
if test "x$PTHREAD_CFLAGS" = "x"; then
CPPFLAGS="$CPPFLAGS -DGC_FREEBSD_THREADS"
libmono_cflags=
@@ -206,7 +203,7 @@ case "$host" in
LDFLAGS="$LDFLAGS $PTHREAD_LIBS -L/usr/local/lib"
libmono_ldflags="$PTHREAD_LIBS"
fi
CPPFLAGS="$CPPFLAGS -DHOST_BSD"
CPPFLAGS="$CPPFLAGS -DHOST_BSD -D_WITH_GETLINE"
need_link_unlink=yes
AC_DEFINE(PTHREAD_POINTER_ID, 1, [pthread is a pointer])
libdl=
@@ -254,7 +251,7 @@ case "$host" in
support_boehm=no
with_gc=sgen
# isinf(3) requires -lm; see isinf check below
# isinf(3) requires -lm
LDFLAGS="$LDFLAGS -lm"
# Bionic's <pthread.h> sets PTHREAD_STACK_MIN=2*PAGE_SIZE; doesn't define
@@ -374,7 +371,8 @@ case "$host" in
esac
;;
*-*-haiku*)
CPPFLAGS="$CPPFLAGS -D_REENTRANT -D_THREAD_SAFE"
dnl BSD_SOURCE is for getifaddrs
CPPFLAGS="$CPPFLAGS -D_BSD_SOURCE -D_REENTRANT -D_THREAD_SAFE"
libmono_cflags="-D_REENTRANT -D_THREAD_SAFE"
libdl=
LIBS="$LIBS -lnetwork -ltextencoding"
@@ -384,6 +382,7 @@ case "$host" in
with_tls=pthread
libgc_threads=pthreads
use_sigposix=yes
with_sigaltstack=no
;;
*-*-aix*|*-*-os400*)
dnl Set up a 64-bit build
@@ -414,9 +413,6 @@ case "$host" in
;;
esac
# WASM hack
fi
AC_MSG_RESULT(ok)
if test x$need_link_unlink = xyes; then
@@ -580,23 +576,6 @@ AC_CHECK_FUNCS(vsyslog)
# for mono/dis
AC_CHECK_HEADERS(wchar.h)
AC_CHECK_HEADERS(ieeefp.h)
AC_MSG_CHECKING(for isinf)
AC_TRY_LINK([#include <math.h>], [
int f = isinf (1.0);
], [
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_ISINF, 1, [isinf available])
], [
# We'll have to use signals
AC_MSG_RESULT(no)
])
# mingw
AC_CHECK_FUNCS(_finite, , AC_MSG_CHECKING(for _finite in math.h)
AC_TRY_LINK([#include <math.h>],
[ _finite(0.0); ],
AC_DEFINE(HAVE__FINITE, 1, [Have _finite in -lm]) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)))
# for Linux statfs support
AC_CHECK_HEADERS(linux/magic.h)
@@ -668,15 +647,8 @@ if test x$platform_android = xyes; then
fi # Android
# not 64 bit clean in cross-compile
if test "x$enable_wasm" = "xyes"; then
AC_DEFINE(SIZEOF_VOID_P,4)
AC_DEFINE(SIZEOF_LONG,4)
ac_cv_sizeof_void_p="4"
ac_cv_sizeof_long="4"
else
AC_CHECK_SIZEOF(void *)
AC_CHECK_SIZEOF(long)
fi
AC_CHECK_SIZEOF(int)
AC_CHECK_SIZEOF(long long)
@@ -1000,10 +972,11 @@ fi
#--with-crash_privacy=no --with-structured_crashes=no means you want to see no crash dumps on failure and you don't care about privacy. This is how you'd set a "don't want it, don't care" configuration.
#--with-crash_privacy=no --with-structured_crashes=yes means you want full crashes and you want to see them in the terminal, not on telemetry. This is going to be how we build for CI.
AC_ARG_WITH(crash-privacy, [ --with-crash_privacy=yes,no If you want your crashes to not include names of symbols present in the binary. ], [], [with_crash_privacy=no])
AC_ARG_WITH(crash-privacy, [ --with-crash_privacy=yes,no If you want your crashes to not include names of symbols present in the binary. ], [], [with_crash_privacy=yes])
AC_ARG_WITH(structured-crashes, [ --with-structured_crashes=yes,no If you want your unmanaged crashes to result in a small crash dump file. ], [], [with_structured_crashes=yes])
AC_ARG_ENABLE(crash-reporting, [ --disable-crash-reporting Enable or Disable crash reporting subsystem], [crash_reporting=$enableval], [crash_reporting=yes])
if test "x$with_crash_privacy" = "xno"; then
if test "x$with_crash_privacy" = "xyes"; then
AC_DEFINE(MONO_PRIVATE_CRASHES,1,[Do not include names of unmanaged functions in the crash dump])
fi
@@ -1011,6 +984,17 @@ if test "x$with_structured_crashes" = "xno"; then
AC_DEFINE(DISABLE_STRUCTURED_CRASH,1,[Do not create structured crash files during unmanaged crashes])
fi
case "$host" in
*-mingw*|*-*-cygwin*|*-*-aix*|*-*-os400*)
crash_reporting=no
;;
esac
if test "x$crash_reporting" != "xyes"; then
CFLAGS="$CFLAGS -DDISABLE_CRASH_REPORTING=1"
CXXFLAGS="$CXXFLAGS -DDISABLE_CRASH_REPORTING=1"
fi
AC_ARG_ENABLE(monodroid, [ --enable-monodroid Enable runtime support for Monodroid (Xamarin.Android)], enable_monodroid=$enableval, enable_monodroid=no)
AM_CONDITIONAL(ENABLE_MONODROID, test x$enable_monodroid = xyes)
@@ -1027,11 +1011,17 @@ fi
AC_ARG_ENABLE(cxx, [ --enable-cxx compile some code as C++])
# mono/corefx/native has a lot of invalid C++98 in its headers
# dotnet/corefx/native looks a lot better, i.e. 44e5bdafb8d989a220c9cf1b94f31a64a6e4f052
#CXXFLAGS_COMMON=' -std=gnu++98 -fno-exceptions -fno-rtti '
CXXFLAGS_COMMON=' -std=gnu++0x -fno-exceptions -fno-rtti '
# "c++0x" instead of C++11, for compat with Centos6/gcc4.4
AC_SUBST(CXXFLAGS_COMMON)
if test "x$enable_cxx" = "xyes"; then
# FIXME Centos6 requires a different flag for prerelease C++11.
#CXX_ADD_CFLAGS=' -xc++ -std=gnu++98 -fno-exceptions -fno-rtti '
CXX_ADD_CFLAGS=' -xc++ -std=gnu++11 -fno-exceptions -fno-rtti '
CXX_ADD_CFLAGS=" -xc++ $CXXFLAGS_COMMON "
# -std=gnu99 -xc++ is not allowed and errors.
CXX_REMOVE_CFLAGS=-std=gnu99
@@ -1774,6 +1764,49 @@ if test x$platform_android = xyes; then
AC_DEFINE(HAVE_SIGNAL,1)
fi
dnl ***********************************
dnl *** Checks for availability of GSS dependencies (krb5, gss.framework, etc)
dnl ***********************************
enable_gss=no;
AC_MSG_CHECKING(for GSS/GSS.h)
AC_TRY_COMPILE([
#include <GSS/GSS.h>
], [
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GSSFW_HEADERS, 1, [GSS/GSS.h])
AC_DEFINE(HAVE_GSS_SPNEGO_MECHANISM, 1, [GSS_SPNEGO_MECHANISM])
enable_gss=yes
], [
AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(for gssapi/gssapi_ext.h)
AC_TRY_COMPILE([
#include <gssapi/gssapi_ext.h>
], [
],[
AC_MSG_RESULT(yes)
enable_gss=yes
], [
AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(for GSS_SPNEGO_MECHANISM)
AC_TRY_COMPILE([
#include <gssapi/gssapi_ext.h>
#include <gssapi/gssapi_krb5.h>
gss_OID_set_desc gss_mech_spnego_OID_set_desc = {.count = 1, .elements = GSS_SPNEGO_MECHANISM};
], [
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GSS_SPNEGO_MECHANISM, 1, [GSS_SPNEGO_MECHANISM])
], [
AC_MSG_RESULT(no)
])
AM_CONDITIONAL(ENABLE_GSS, test x$enable_gss = xyes)
if test x$host_win32 = xno; then
dnl *************************************
dnl *** Checks for time capabilities ***
@@ -1890,6 +1923,7 @@ if test x$host_win32 = xno; then
AC_CHECK_FUNCS(getrlimit)
AC_CHECK_FUNCS(prctl)
AC_CHECK_FUNCS(arc4random)
AC_CHECK_FUNCS(nl_langinfo)
AC_CHECK_FUNCS(sched_getaffinity)
AC_CHECK_FUNCS(sched_setaffinity)
@@ -2290,6 +2324,23 @@ if test x$host_win32 = xno; then
AC_MSG_RESULT(no)
])
dnl **********************************
dnl *** Check for getprotobyname_r ***
dnl **********************************
AC_MSG_CHECKING(for getprotobyname_r)
AC_TRY_LINK([
#include <stdio.h>
#include <netdb.h>
], [
getprotobyname_r(NULL, NULL, NULL, 0, NULL);
], [
# Yes, we have it...
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_GETPROTOBYNAME_R, 1, [Have getprotobyname_r])
], [
AC_MSG_RESULT(no)
])
dnl **********************************
dnl *** Check for getnameinfo ***
dnl **********************************
@@ -2378,7 +2429,7 @@ if test x$host_win32 = xno; then
AC_CHECK_HEADERS(pthread.h)
AC_CHECK_HEADERS(pthread_np.h)
AC_CHECK_FUNCS(pthread_mutex_timedlock)
AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np pthread_setname_np pthread_cond_timedwait_relative_np)
AC_CHECK_FUNCS(pthread_getattr_np pthread_attr_get_np pthread_getname_np pthread_setname_np pthread_cond_timedwait_relative_np)
AC_CHECK_FUNCS(pthread_kill)
AC_MSG_CHECKING(for PTHREAD_MUTEX_RECURSIVE)
AC_TRY_COMPILE([ #include <pthread.h>], [
@@ -2393,24 +2444,7 @@ if test x$host_win32 = xno; then
AC_CHECK_FUNCS(pthread_attr_setstacksize)
AC_CHECK_FUNCS(pthread_attr_getstack pthread_attr_getstacksize)
AC_CHECK_FUNCS(pthread_get_stacksize_np pthread_get_stackaddr_np)
dnl **********************************
dnl *** Check for mincore ***
dnl **********************************
AC_MSG_CHECKING(for mincore)
AC_TRY_LINK([
#include <stdio.h>
#include <sys/types.h>
#include <sys/mman.h>
], [
mincore(NULL, 0, NULL);
], [
# Yes, we have it...
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_MINCORE, 1, [Have mincore])
], [
AC_MSG_RESULT(no)
])
AC_CHECK_FUNCS(mincore mlock munlock)
dnl ***********************************
dnl *** Checks for working __thread ***
@@ -2610,18 +2644,6 @@ if test x$host_win32 = xno; then
dnl *** Checks for math functions ***
dnl *********************************
AC_SEARCH_LIBS(sqrtf, m)
if test "x$has_broken_apple_cpp" != "xyes"; then
AC_CHECK_FUNCS(finite, , AC_MSG_CHECKING(for finite in math.h)
AC_TRY_LINK([#include <math.h>],
[ finite(0.0); ],
AC_DEFINE(HAVE_FINITE, 1, [Have finite in -lm]) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)))
fi
AC_CHECK_FUNCS(isfinite, , AC_MSG_CHECKING(for isfinite in math.h)
AC_TRY_LINK([#include <math.h>],
[ isfinite(0.0); ],
AC_DEFINE(HAVE_ISFINITE, 1, [Have isfinite]) AC_MSG_RESULT(yes),
AC_MSG_RESULT(no)))
dnl ****************************************************************
dnl *** Checks for working poll() (macosx defines it but doesn't ***
@@ -2629,19 +2651,6 @@ if test x$host_win32 = xno; then
dnl ****************************************************************
AC_CHECK_FUNCS(poll)
dnl *************************
dnl *** Check for signbit ***
dnl *************************
AC_MSG_CHECKING(for signbit)
AC_TRY_LINK([#include <math.h>], [
int s = signbit(1.0);
], [
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SIGNBIT, 1, [Have signbit])
], [
AC_MSG_RESULT(no)
])
dnl **********************************
dnl *** epoll ***
dnl **********************************
@@ -2959,7 +2968,7 @@ if test x$host_win32 = xno; then
fi
dnl *********************************
dnl *** Checks for System.Native ***
dnl *** Checks for Mono.Native ***
dnl *********************************
AC_MSG_CHECKING(for linux/in.h)
@@ -3009,17 +3018,7 @@ if test x$host_win32 = xno; then
])
if test x$host_darwin = xno; then
AC_MSG_CHECKING(for struct flock64)
AC_TRY_COMPILE([
#include <fcntl.h>
], [
struct flock64;
],[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_FLOCK64, 1, struct flock64)
], [
AC_MSG_RESULT(no)
])
AC_CHECK_TYPES([struct flock64], [AC_DEFINE(HAVE_FLOCK64, 1, struct flock64)], , [#include <fcntl.h>])
fi
AC_CHECK_FUNC(lseek64, [AC_DEFINE(HAVE_LSEEK64, 1, [lseek64])])
@@ -3588,33 +3587,6 @@ ac_cv_c_socklen_t=yes
AC_MSG_RESULT(no)
])
AC_MSG_CHECKING(for array element initializer support)
AC_TRY_COMPILE([#include <sys/socket.h>], [
const int array[] = {[1] = 2,};
], [
# Yes, we have it...
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_ARRAY_ELEM_INIT,1,[Supports C99 array initialization])
], [
# We'll have to use signals
AC_MSG_RESULT(no)
])
AC_CHECK_FUNCS(trunc, , AC_MSG_CHECKING(for trunc in math.h)
# Simply calling trunc (0.0) is no good since gcc will optimize the call away
AC_TRY_LINK([#include <math.h>],
[ static void *p = &trunc; ],
[
AC_DEFINE(HAVE_TRUNC)
AC_MSG_RESULT(yes)
ac_cv_trunc=yes
],
AC_MSG_RESULT(no)))
if test "x$ac_cv_truncl" != "xyes"; then
AC_CHECK_LIB(sunmath, aintl, [ AC_DEFINE(HAVE_AINTL, 1, [Has the 'aintl' function]) LIBS="$LIBS -lsunmath"])
fi
AC_CHECK_FUNCS(execvp)
dnl ****************************
@@ -3651,6 +3623,10 @@ esac
AC_DEFINE_UNQUOTED(NAME_DEV_RANDOM, "$NAME_DEV_RANDOM", [Name of /dev/random])
if test "x$MONO_DEV_RANDOM" != "x"; then
AC_DEFINE_UNQUOTED(MONO_DEV_RANDOM, "$MONO_DEV_RANDOM", [Name of random device])
fi
dnl Now check if the device actually exists
if test "x$try_dev_random" = "xyes"; then
@@ -3787,41 +3763,42 @@ internal_llvm="no"
if test "x$enable_llvm" = "xyes"; then
if test "x$with_llvm" != "x"; then
EXTERNAL_LLVM_CONFIG=$with_llvm/bin/llvm-config
if test x$host_win32 = xyes; then
EXTERNAL_LLVM_CONFIG=$EXTERNAL_LLVM_CONFIG.exe
fi
if test ! -x $EXTERNAL_LLVM_CONFIG; then
AC_MSG_ERROR([LLVM executable $EXTERNAL_LLVM_CONFIG not found.])
fi
else
AC_PATH_PROG(EXTERNAL_LLVM_CONFIG, llvm-config, no)
if test x$host_win32 = xyes; then
AC_PATH_PROG(EXTERNAL_LLVM_CONFIG, llvm-config.exe, no)
else
AC_PATH_PROG(EXTERNAL_LLVM_CONFIG, llvm-config, no)
fi
if test "x$EXTERNAL_LLVM_CONFIG" = "xno"; then
internal_llvm=yes
else
with_llvm=`$EXTERNAL_LLVM_CONFIG --prefix`
fi
fi
if test "x$host_win32" != "xyes"; then
LLVM_CODEGEN_LIBS="x86codegen"
case "$target" in
arm*)
LLVM_CODEGEN_LIBS="armcodegen"
;;
aarch64*)
LLVM_CODEGEN_LIBS="aarch64codegen"
;;
powerpc*)
LLVM_CODEGEN_LIBS="powerpccodegen"
;;
esac
if test "x$host" != "x$target"; then
# No need for jit libs
LLVM_CODEGEN_LIBS=
fi
AC_SUBST(LLVM_CODEGEN_LIBS)
AC_SUBST(EXTERNAL_LLVM_CONFIG)
else # is win32
AC_MSG_ERROR([LLVM for Windows only supported using Visual Studio build mono runtime, see http://www.mono-project.com/docs/advanced/mono-llvm/ for more details.])
fi # win32
LLVM_CODEGEN_LIBS="x86codegen"
case "$target" in
arm*)
LLVM_CODEGEN_LIBS="armcodegen"
;;
aarch64*)
LLVM_CODEGEN_LIBS="aarch64codegen"
;;
powerpc*)
LLVM_CODEGEN_LIBS="powerpccodegen"
;;
esac
if test "x$host" != "x$target"; then
# No need for jit libs
LLVM_CODEGEN_LIBS=
fi
AC_SUBST(LLVM_CODEGEN_LIBS)
AC_SUBST(EXTERNAL_LLVM_CONFIG)
AC_DEFINE(ENABLE_LLVM, 1, [Enable the LLVM back end])
fi # ENABLE_LLVM
@@ -3833,7 +3810,7 @@ if test "x$internal_llvm" != "xno"; then
fi
AM_CONDITIONAL(INTERNAL_LLVM_ASSERTS, [test "x$enable_llvm_asserts" != "xno"])
if test "x$internal_llvm_asserts" != "xno"; then
if test "x$enable_llvm_asserts" != "xno"; then
AC_DEFINE(INTERNAL_LLVM_ASSERTS, 1, [Build LLVM with assertions])
fi
@@ -3871,19 +3848,14 @@ boehm_supported=true
BTLS_SUPPORTED=no
BTLS_PLATFORM=
if test "x$enable_wasm" = "xyes"; then
TARGET=WASM
HOST=WASM
arch_target=wasm
AC_DEFINE(TARGET_WASM, 1, [Target wasm])
AC_DEFINE(HOST_WASM, 1, [Host wasm])
BTLS_SUPPORTED=no
with_tls=pthread
target_mach=no
else
case "$host" in
wasm32*)
TARGET=WASM
arch_target=wasm
BTLS_SUPPORTED=no
ACCESS_UNALIGNED="no"
with_tls=pthread
;;
mips*)
TARGET=MIPS;
arch_target=mips;
@@ -3927,7 +3899,9 @@ case "$host" in
have_visibility_hidden=no
;;
mingw*|cygwin*)
have_visibility_hidden=no
have_visibility_hidden=no
BTLS_SUPPORTED=no
BTLS_PLATFORM=i386
;;
haiku*)
LIBC=libroot.so
@@ -3975,7 +3949,9 @@ case "$host" in
BTLS_SUPPORTED=yes
BTLS_PLATFORM=x86_64
;;
mingw*)
mingw*|cygwin*)
BTLS_SUPPORTED=no
BTLS_PLATFORM=x86_64
;;
esac
;;
@@ -4008,7 +3984,7 @@ case "$host" in
;;
macppc-*-openbsd* | powerpc*-*-linux* | powerpc-*-openbsd* | \
powerpc-*-sysv* | powerpc-*-darwin* | powerpc-*-netbsd* | \
powerpc-*-freebsd* | powerpc-*-aix* | powerpc-*-os400* )
powerpc-*-freebsd* | powerpc*-*-aix* | powerpc*-*-os400* )
if test "x$ac_cv_sizeof_void_p" = "x8"; then
TARGET=POWERPC64;
CPPFLAGS="$CPPFLAGS -D__mono_ppc__ -D__mono_ppc64__"
@@ -4104,6 +4080,11 @@ if test "x$host" != "x$target"; then
with_tls=pthread
target_mach=no
case "$target" in
wasm32*)
TARGET=WASM
arch_target=wasm
AC_DEFINE(TARGET_WASM, 1, [Target wasm])
;;
arm*-darwin*)
TARGET=ARM;
CPPFLAGS="$CPPFLAGS -D__ARM_EABI__"
@@ -4179,6 +4160,11 @@ if test "x$host" != "x$target"; then
fi
case "$TARGET" in
WASM)
AC_DEFINE(TARGET_WASM, 1, [...])
arch_target=wasm
target_sizeof_void_p=4
;;
X86)
AC_DEFINE(TARGET_X86, 1, [...])
arch_target=x86
@@ -4220,6 +4206,9 @@ SPARC64)
esac
case "$HOST" in
WASM)
AC_DEFINE(HOST_WASM, 1, [...])
;;
X86)
AC_DEFINE(HOST_X86, 1, [...])
;;
@@ -4253,9 +4242,6 @@ SPARC64)
;;
esac
#WASM hack
fi
MONO_ARCH_GSHAREDVT_SUPPORTED=0
case "$HOST" in
X86 | AMD64 | ARM | ARM64)
@@ -4264,6 +4250,7 @@ X86 | AMD64 | ARM | ARM64)
esac
AM_CONDITIONAL(MONO_ARCH_GSHAREDVT_SUPPORTED, test $MONO_ARCH_GSHAREDVT_SUPPORTED = 1)
AM_CONDITIONAL(TARGET_WASM, test $arch_target = wasm)
dnl *************
dnl *** VTUNE ***
@@ -4326,6 +4313,7 @@ if test "x$target_mach" = "xyes"; then
CPPFLAGS_FOR_LIBGC="$CPPFLAGS_FOR_LIBGC -DTARGET_IOS"
CFLAGS_FOR_LIBGC="$CFLAGS_FOR_LIBGC -DTARGET_IOS"
BTLS_SUPPORTED=no
target_ios=yes
else
AC_TRY_COMPILE([#include "TargetConditionals.h"],[
#if TARGET_IPHONE_SIMULATOR == 1 || TARGET_OS_IPHONE == 1
@@ -4589,8 +4577,9 @@ if test $found_export_dynamic = no; then
LDFLAGS="${old_ldflags}"
fi
AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h sys/wait.h pwd.h iconv.h localcharset.h sys/types.h sys/resource.h)
AC_CHECK_LIB([iconv], [locale_charset],[],[AC_CHECK_LIB([charset], [locale_charset],[LIBS+=" -liconv -lcharset"])])
AC_CHECK_HEADERS(getopt.h sys/select.h sys/time.h sys/wait.h pwd.h iconv.h sys/types.h sys/resource.h)
dnl giconv.c will check on HAVE_ICONV_H but we need this for link time
AC_CHECK_LIB(iconv, iconv_open)
AC_CHECK_HEADER(alloca.h, [HAVE_ALLOCA_H=1], [HAVE_ALLOCA_H=0])
AC_SUBST(HAVE_ALLOCA_H)
@@ -5057,6 +5046,30 @@ AM_CONDITIONAL([ENABLE_HYBRID_SUSPEND], [test x$enable_hybrid_suspend != xno])
dnl End of thread suspend policy
dnl ***************************
dnl *** feature experiments ***
dnl ***************************
dnl When adding experiments, also add to mono/utils/mono-experiments.def
AC_ARG_ENABLE(experiment, [ --enable-experiment=LIST Enable experimental fatures from the comma-separate LIST. Available experiments: null],[
if test x$enable_experiment != x ; then
AC_DEFINE(ENABLE_EXPERIMENTS,1,[Enable feature experiments])
fi
for feature in `echo "$enable_experiment" | sed -e "s/,/ /g"`; do
eval "mono_experiment_test_enable_$feature='yes'"
done
if test "x$mono_experiment_test_enable_all" = "xyes"; then
eval "mono_experiment_test_enable_null='yes'"
true
fi
if test "x$mono_experiment_test_enable_null" = "xyes"; then
AC_DEFINE(ENABLE_EXPERIMENT_null, 1, [Enable experiment 'null'])
fi
],[])
dnl **********************
dnl *** checked builds ***
dnl **********************
@@ -5156,10 +5169,21 @@ if test "x$enable_btls" = "xyes"; then
case $host_os in
darwin*)
btls_cflags="$btls_cflags -arch i386"
;;
mingw*|cygwin*)
btls_cflags="$btls_cflags -DNOCRYPT $WIN32_CPPFLAGS"
BTLS_CMAKE_ARGS="-D OPENSSL_NO_ASM=1"
;;
esac
;;
x86_64)
btls_arch=x86_64
case $host_os in
mingw*|cygwin*)
btls_cflags="$btls_cflags -DNOCRYPT $WIN32_CPPFLAGS"
BTLS_CMAKE_ARGS="-D OPENSSL_NO_ASM=1"
;;
esac
;;
arm)
btls_arch=arm
@@ -5477,6 +5501,7 @@ AC_CONFIG_COMMANDS([runtime/etc/mono/4.5/web.config],
AC_CONFIG_COMMANDS([quiet-libtool], [sed -e 's/echo "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool; sed -e 's/$ECHO "copying selected/# "copying selected/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
AC_CONFIG_COMMANDS([nolock-libtool], [sed -e 's/lock_old_archive_extraction=yes/lock_old_archive_extraction=no/g' < libtool > libtool.tmp && mv libtool.tmp libtool && chmod a+x libtool])
AC_CONFIG_COMMANDS([clean-llvm], [rm -f llvm/llvm_config.mk])
# Anything involving -Werror must be done late because autoconf depends on compiling with warnings to be success.
if test x"$GCC" = xyes; then
@@ -5496,8 +5521,203 @@ if test x"$GCC" = xyes; then
])
fi
#
# Mono.Native Support
# -------------------
# Mono.Native is the new name for both System.Native and System.Security.Cryptography.Apple.
# It is built as a stand-alone shared library and not bundled with the runtime because we
# may need to build two different versions of it.
#
# Starting with macOS 10.12+ and iOS 10+, Apple introduced a new Unified API for some of the
# crypto primitives that we're using as part of System.Security.Cryptography.Apple.
#
# On Desktop, we can check at runtime whether the OS version is recent enough and switch
# implementation accordingly. We build a single `libmono_native` shared library.
#
# However, on Mobile we cannot have any undefined symbols as this would break Bitcode.
#
# During the mobile build, we are called with `CC` containing an explicit minium version flag,
# which is eiter `-mmacosx-version-min=`, `-mios-simulator-version-min=` or `-miphoneos-version-min=`
# depending on platform.
#
# We build two versions of the shared library:
# - `libmono_native_compat` is built with whichever minimum version is passed to us via `CC`.
# - `libmono_native_unifed` is built with the minimum version set to macOS 10.12+ / iOS 10+.
#
# For testing purpuses, there is a function called `mono_native_get_platform_type ()`
# (see mono/native/mono-native-platform.c), which returns a `MonoNativePlatformType` enum value.
# There is also `Mono.MonoNativePlatform.GetPlatformType ()` (see mcs/class/System/Mono/MonoNativePlatform.cs).
#
# This can be called by automated tests both to ensure that the library has been correctly installed and also
# to verify that it's the correct version of it.
#
# `target_ios=yes` does not detect watch devices and fails when cross-compiling
AC_MONO_APPLE_TARGET(TARGET_OS_IPHONE, [mono_native_platform_ios=yes])
sed_version_pattern='[[0-9]]\{1,2\}\(\.[[0-9]]\{1,2\}\)'
if test x$target_osx = xyes; then
sed_remove_mac_version_pattern="s/-mmacosx-version-min=$sed_version_pattern//g"
grep_find_mac_version_pattern="-mmacosx-version-min=$sed_version_pattern"
mono_native_compat_version=`echo $CC | grep -o -e $grep_find_mac_version_pattern`
MONO_NATIVE_CC=`echo $CC | sed -e $sed_remove_mac_version_pattern`
MONO_NATIVE_CXX=`echo $CXX | sed -e $sed_remove_mac_version_pattern`
MONO_NATIVE_CPPFLAGS=`echo $CPPFLAGS | sed -e $sed_remove_mac_version_pattern`
MONO_NATIVE_CFLAGS=`echo $CFLAGS | sed -e $sed_remove_mac_version_pattern`
MONO_NATIVE_CXXFLAGS=`echo $CXXFLAGS | sed -e $sed_remove_mac_version_pattern`
MONO_NATIVE_LDFLAGS=`echo $LDFLAGS | sed -e $sed_remove_mac_version_pattern`
mono_native=yes
MONO_NATIVE_PLATFORM=macos
MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_MACOS"
AC_MSG_CHECKING([Mono.Native support])
AC_MSG_RESULT(macos)
AC_MONO_APPLE_AVAILABLE(mono_native_compat, [whether we need the compatibility layer],
[!(MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_12)])
if test x$mono_native_compat = xyes; then
mono_native_compat=yes
mono_native_text="Mac OSX (compat+unified)"
MONO_NATIVE_COMPAT_CFLAGS="$CFLAGS $mono_native_compat_version"
MONO_NATIVE_COMPAT_LDFLAGS="$LDFLAGS $mono_native_compat_version"
MONO_NATIVE_UNIFIED_CFLAGS="$MONO_NATIVE_CFLAGS -mmacosx-version-min=10.12"
MONO_NATIVE_UNIFIED_LDFLAGS="$MONO_NATIVE_LDFLAGS -mmacosx-version-min=10.12"
else
mono_native_compat=no
mono_native_text="Mac OSX"
fi
elif test x$mono_native_platform_ios = xyes; then
AC_MONO_APPLE_TARGET(TARGET_OS_SIMULATOR, [mono_native_ios_sim=yes], [mono_native_ios_sim=no])
AC_MONO_APPLE_TARGET(TARGET_OS_IOS, [
if test x$mono_native_ios_sim = xyes; then
mono_native_ios_target=ios-simulator
mono_native_text="iOS Simulator"
MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_IOS | MONO_NATIVE_PLATFORM_TYPE_IPHONE | MONO_NATIVE_PLATFORM_TYPE_SIMULATOR"
else
mono_native_ios_target=iphoneos
mono_native_text="iOS Device"
MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_IOS | MONO_NATIVE_PLATFORM_TYPE_IPHONE | MONO_NATIVE_PLATFORM_TYPE_DEVICE"
fi
mono_native_unified_version="10.0"
mono_native_compat_check="__IPHONE_OS_VERSION_MIN_REQUIRED >= __IPHONE_10_0"
], [
AC_MONO_APPLE_TARGET(TARGET_OS_TV, [
if test x$mono_native_ios_sim = xyes; then
mono_native_ios_target=tvos-simulator
mono_native_text="AppleTV Simulator"
MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_IOS | MONO_NATIVE_PLATFORM_TYPE_TV | MONO_NATIVE_PLATFORM_TYPE_SIMULATOR"
else
mono_native_ios_target=tvos
mono_native_text="AppleTV Device"
MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_IOS | MONO_NATIVE_PLATFORM_TYPE_TV | MONO_NATIVE_PLATFORM_TYPE_DEVICE"
fi
mono_native_unified_version="10.0"
mono_native_compat_check="__TV_OS_VERSION_MIN_REQUIRED >= __TVOS_10_0"
], [
AC_MONO_APPLE_TARGET(TARGET_OS_WATCH, [
if test x$mono_native_ios_sim = xyes; then
mono_native_ios_target=watchos-simulator
mono_native_text="Apple Watch Simulator"
MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_IOS | MONO_NATIVE_PLATFORM_TYPE_WATCH | MONO_NATIVE_PLATFORM_TYPE_SIMULATOR"
else
mono_native_ios_target=watchos
mono_native_text="Apple Watch Device"
MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_IOS | MONO_NATIVE_PLATFORM_TYPE_WATCH | MONO_NATIVE_PLATFORM_TYPE_DEVICE"
fi
mono_native_unified_version="5.0"
mono_native_compat_check="__WATCH_OS_VERSION_MIN_REQUIRED >= __WATCHOS_5_0"
], [
AC_MSG_ERROR([Unknown iOS Target])
])
])
])
AC_MSG_CHECKING([Mono.Native support])
AC_MSG_RESULT([$mono_native_ios_target])
AC_MONO_APPLE_AVAILABLE(mono_native_compat, [whether we need the compatibility layer], [!($mono_native_compat_check)])
sed_remove_ios_version_pattern="s/-m\(.*\)-version-min=$sed_version_pattern//g"
grep_find_ios_version_pattern="-m$mono_native_ios_target-version-min=$sed_version_pattern"
mono_native_compat_version=`echo $CC | grep -o -e $grep_find_ios_version_pattern`
mono_native_ldflags="-framework CoreFoundation -framework Foundation -no-undefined -fatal_warnings"
MONO_NATIVE_CC=`echo $CC | sed -e $sed_remove_ios_version_pattern`
MONO_NATIVE_CXX=`echo $CXX | sed -e $sed_remove_ios_version_pattern`
MONO_NATIVE_CPPFLAGS=`echo $CPPFLAGS | sed -e $sed_remove_ios_version_pattern`
MONO_NATIVE_CXXFLAGS=`echo $CXXFLAGS | sed -e $sed_remove_ios_version_pattern`
MONO_NATIVE_CFLAGS=`echo $CFLAGS | sed -e $sed_remove_ios_version_pattern`
MONO_NATIVE_LDFLAGS=`echo $LDFLAGS $mono_native_ldflags | sed -e $sed_remove_ios_version_pattern`
if test x$mono_native_compat = xyes; then
mono_native_text="$mono_native_text (compat+unified)"
MONO_NATIVE_COMPAT_CFLAGS="$CFLAGS $mono_native_compat_version"
MONO_NATIVE_COMPAT_LDFLAGS="$LDFLAGS $mono_native_compat_version"
MONO_NATIVE_UNIFIED_CFLAGS="$MONO_NATIVE_CFLAGS -m$mono_native_ios_target-version-min=$mono_native_unified_version"
MONO_NATIVE_UNIFIED_LDFLAGS="$MONO_NATIVE_LDFLAGS -m$mono_native_ios_target-version-min=$mono_native_unified_version"
fi
mono_native=yes
MONO_NATIVE_PLATFORM=ios
elif test x$host_linux = xyes; then
mono_native_text="Linux"
MONO_NATIVE_CC=$CC
MONO_NATIVE_CXX=$CXX
MONO_NATIVE_CPPFLAGS=$CPPFLAGS
MONO_NATIVE_CXXFLAGS=$CXXFLAGS
MONO_NATIVE_CFLAGS=$CFLAGS
MONO_NATIVE_LDFLAGS=$LDFLAGS
mono_native=yes
mono_native_compat=no
MONO_NATIVE_PLATFORM=linux
AC_MSG_CHECKING([Mono.Native support])
AC_MSG_RESULT(linux)
MONO_NATIVE_PLATFORM_TYPE="MONO_NATIVE_PLATFORM_TYPE_LINUX"
else
mono_native=no
mono_native_text="no"
AC_MSG_CHECKING([Mono.Native support])
AC_MSG_RESULT(no)
fi
if test x$mono_native_compat = xyes; then
MONO_NATIVE_LIBRARY_NAME=libmono-native-compat
else
MONO_NATIVE_LIBRARY_NAME=libmono-native
fi
AC_SUBST(MONO_NATIVE_PLATFORM)
AC_SUBST(MONO_NATIVE_CC)
AC_SUBST(MONO_NATIVE_CXX)
AC_SUBST(MONO_NATIVE_CPPFLAGS)
AC_SUBST(MONO_NATIVE_CXXFLAGS)
AC_SUBST(MONO_NATIVE_CFLAGS)
AC_SUBST(MONO_NATIVE_COMPAT_CFLAGS)
AC_SUBST(MONO_NATIVE_UNIFIED_CFLAGS)
AC_SUBST(MONO_NATIVE_LDFLAGS)
AC_SUBST(MONO_NATIVE_COMPAT_LDFLAGS)
AC_SUBST(MONO_NATIVE_UNIFIED_LDFLAGS)
AC_SUBST(MONO_NATIVE_LIBRARY_NAME)
AM_CONDITIONAL(MONO_NATIVE, test x$mono_native = xyes)
AM_CONDITIONAL(MONO_NATIVE_COMPAT, test x$mono_native_compat = xyes)
AM_CONDITIONAL(MONO_NATIVE_PLATFORM_MACOS, test x$MONO_NATIVE_PLATFORM = xmacos)
AM_CONDITIONAL(MONO_NATIVE_PLATFORM_IOS, test x$MONO_NATIVE_PLATFORM = xios)
AM_CONDITIONAL(MONO_NATIVE_PLATFORM_LINUX, test x$MONO_NATIVE_PLATFORM = xlinux)
MONO_NATIVE_PLATFORM_TYPE_COMPAT="$MONO_NATIVE_PLATFORM_TYPE | MONO_NATIVE_PLATFORM_TYPE_COMPAT"
MONO_NATIVE_PLATFORM_TYPE_UNIFIED="$MONO_NATIVE_PLATFORM_TYPE | MONO_NATIVE_PLATFORM_TYPE_UNIFIED"
AC_SUBST(MONO_NATIVE_PLATFORM_TYPE)
AC_SUBST(MONO_NATIVE_PLATFORM_TYPE_COMPAT)
AC_SUBST(MONO_NATIVE_PLATFORM_TYPE_UNIFIED)
# Update all submodules recursively to ensure everything is checked out
$srcdir/scripts/update_submodules.sh
(cd $srcdir && scripts/update_submodules.sh)
AC_OUTPUT([
Makefile
@@ -5509,6 +5729,7 @@ scripts/mono-find-requires
mk/Makefile
mono/Makefile
mono/btls/Makefile
mono/native/Makefile
mono/utils/Makefile
mono/utils/jemalloc/Makefile
mono/metadata/Makefile
@@ -5524,7 +5745,11 @@ mono/arch/arm/Makefile
mono/arch/arm64/Makefile
mono/arch/mips/Makefile
mono/sgen/Makefile
mono/native/platform-type.c
mono/native/platform-type-compat.c
mono/native/platform-type-unified.c
mono/tests/Makefile
mono/tests/assembly-load-reference/Makefile
mono/tests/tests-config
mono/tests/gc-descriptors/Makefile
mono/tests/testing_gac/Makefile
@@ -5534,6 +5759,7 @@ mono/mini/Makefile
mono/profiler/Makefile
mono/eglib/Makefile
mono/eglib/eglib-config.h
mono/eglib/test/Makefile
m4/Makefile
ikvm-native/Makefile
scripts/Makefile
@@ -5703,6 +5929,21 @@ fi
echo "HAVE_BTLS=1" >> $srcdir/$mcsdir/build/config.make
fi
if test "x$mono_native" = "xyes"; then
echo "MONO_NATIVE_SUPPORTED=true" >> $srcdir/$mcsdir/build/config.make
else
echo "MONO_NATIVE_SUPPORTED=false" >> $srcdir/$mcsdir/build/config.make
fi
if test x$mono_native_compat = xyes; then
echo "MONO_NATIVE_USING_COMPAT=true" >> $srcdir/$mcsdir/build/config.make
else
echo "MONO_NATIVE_USING_COMPAT=false" >> $srcdir/$mcsdir/build/config.make
fi
echo "MONO_NATIVE_PLATFORM_TYPE=$MONO_NATIVE_PLATFORM_TYPE" >> $srcdir/$mcsdir/build/config.make
echo "MONO_NATIVE_PLATFORM=$MONO_NATIVE_PLATFORM" >> $srcdir/$mcsdir/build/config.make
fi
)
@@ -5745,6 +5986,7 @@ echo "
DTrace: $enable_dtrace
LLVM Back End: $enable_llvm (dynamically loaded: $enable_loadedllvm, built in-tree: $internal_llvm, assertions: $enable_llvm_asserts)
Spectre: $spectre_mitigation_status
Mono.Native: $mono_native_text
Libraries:
.NET 4.x: $with_profile4_x
@@ -5763,6 +6005,7 @@ echo "
zlib: $zlib_msg
BTLS: $enable_btls$btls_platform_string
jemalloc: $with_jemalloc (always use: $with_jemalloc_always)
crash reporting: $crash_reporting (private crashes: $with_crash_privacy)
$disabled
"
if test x$with_static_mono = xno -a "x$host_win32" != "xyes"; then
+3 -1
View File
@@ -11,7 +11,9 @@
<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/libmono-system-native@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"/>
+1 -1
+1 -1
+1 -1
+1 -1
Vendored Submodule
+1
Submodule external/llvm added at 8415fd85ce.
+37 -9
View File
@@ -42,11 +42,6 @@
# 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 */
@@ -66,6 +61,10 @@
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. */
@@ -501,7 +500,17 @@ 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
@@ -965,7 +974,17 @@ 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) || \
@@ -985,8 +1004,17 @@ 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
@@ -1081,6 +1109,10 @@ extern void GC_thr_init(void); /* Needed for Solaris/X86 */
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"
@@ -1090,8 +1122,4 @@ extern void GC_thr_init(void); /* Needed for Solaris/X86 */
# include "gc_local_alloc.h"
#endif
#ifdef __cplusplus
} /* end of extern "C" */
#endif
#endif /* _GC_H */
+8
View File
@@ -44,6 +44,10 @@
# include "gc.h"
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* The following allocators signal an out of memory condition with */
/* return GC_oom_fn(bytes); */
@@ -110,4 +114,8 @@ 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,6 +49,10 @@
#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);
@@ -62,6 +66,10 @@ 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,6 +15,11 @@
/* 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);
@@ -26,11 +31,22 @@
# 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);
@@ -39,6 +55,11 @@
# 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)
@@ -51,6 +72,10 @@
# 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);
@@ -87,6 +112,10 @@
# define dlopen GC_dlopen
#endif
#ifdef __cplusplus
} // extern "C"
#endif
#endif /* GC_xxxxx_THREADS */
#endif /* GC_PTHREAD_REDIRECTS_H */
+10
View File
@@ -43,7 +43,17 @@
*
*/
# 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"
+20 -1
View File
@@ -366,6 +366,10 @@ 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
@@ -413,7 +417,18 @@ void GC_print_callers GC_PROTO((struct callinfo info[NFRAMES]));
* 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, \
@@ -1315,7 +1330,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 GC_PROTO((ptr_t bottom, ptr_t top));
void GC_push_all (void* bottom, void* top);
/* Push everything in a range */
/* onto mark stack. */
void GC_push_selected GC_PROTO(( \
@@ -1960,6 +1975,10 @@ 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 */
+6 -4
View File
@@ -1191,11 +1191,13 @@ void GC_mark_init()
* Should only be used if there is no possibility of mark stack
* overflow.
*/
void GC_push_all(bottom, top)
ptr_t bottom;
ptr_t top;
void GC_push_all(void_bottom, void_top)
void* void_bottom;
void* void_top;
{
register word length;
ptr_t bottom = (ptr_t)void_bottom;
ptr_t top = (ptr_t)void_top;
word length;
bottom = (ptr_t)(((word) bottom + ALIGNMENT-1) & ~(ALIGNMENT-1));
top = (ptr_t)(((word) top) & ~(ALIGNMENT-1));
+22 -3
View File
@@ -1,7 +1,20 @@
EXTRA_DIST=SUBMODULES.json build.mk build_llvm_config.sh
EXTRA_DIST=build.mk build_llvm_config.sh
if ENABLE_LLVM
if HOST_WIN32
llvm_config=llvm-config.exe
else
llvm_config=llvm-config
endif
if HAVE_ZLIB
llvm_extra_libs=-lz
else
llvm_extra_libs=
endif
if INTERNAL_LLVM
all-local: configure-llvm build-llvm install-llvm llvm_config.mk
@@ -9,7 +22,7 @@ all-local: configure-llvm build-llvm install-llvm llvm_config.mk
clean-local: clean-llvm clean-llvm-config
$(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) > $@
$(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
@@ -17,7 +30,7 @@ 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) > $@
$(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
@@ -34,4 +47,10 @@ 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
-18
View File
@@ -1,18 +0,0 @@
[
{
"name": "llvm",
"url": "git://github.com/mono/llvm.git",
"rev": "fc854b8ec5873d294b80afa3e6cf6a88c5c48886",
"remote-branch": "origin/release_60",
"branch": "release_60",
"directory": "llvm"
},
{
"name": "llvm36",
"url": "git://github.com/mono/llvm.git",
"rev": "0b3cb8ac12cd839f8110775d4085e822e8af4d7b",
"remote-branch": "origin/master",
"branch": "master",
"directory": "llvm36"
}
]
+14 -38
View File
@@ -1,44 +1,23 @@
#
# 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.
#
abs_top_srcdir ?= $(abspath $(CURDIR)/..)
top_srcdir ?= $(abspath $(CURDIR)/..)
LLVM_BUILD ?= $(abspath $(abs_top_srcdir)/llvm/build)
LLVM_PREFIX ?= $(abspath $(abs_top_srcdir)/llvm/usr)
LLVM_PATH ?= $(abspath $(top_srcdir)/external/llvm)
LLVM_BUILD ?= $(abspath $(top_srcdir)/llvm/build)
LLVM_PREFIX ?= $(abspath $(top_srcdir)/llvm/usr)
LLVM_VERSION ?= llvm
# 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)
SUBMODULES_CONFIG_FILE = $(top_srcdir)/llvm/SUBMODULES.json
include $(top_srcdir)/scripts/submodules/versions.mk
$(eval $(call ValidateVersionTemplate,llvm,LLVM))
$(eval $(call ValidateVersionTemplate,llvm36,LLVM36))
# 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
# 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
# Bump the given submodule to its current GIT version
# If COMMIT is 1, commit the change
bump-current-llvm: __bump-current-version-llvm
$(LLVM_BUILD) $(LLVM_PREFIX):
mkdir -p $@
$(LLVM_PATH)/CMakeLists.txt: | reset-$(LLVM_VERSION)
EXTRA_LLVM_ARGS = $(if $(filter $(LLVM_TARGET),wasm32), -DLLVM_BUILD_32_BITS=On -DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD="WebAssembly",)
$(LLVM_BUILD)/$(if $(NINJA),build.ninja,Makefile): $(LLVM_PATH)/CMakeLists.txt | $(LLVM_BUILD)
$(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)" \
@@ -49,9 +28,11 @@ $(LLVM_BUILD)/$(if $(NINJA),build.ninja,Makefile): $(LLVM_PATH)/CMakeLists.txt |
-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) \
-DHAVE_FUTIMENS=0 \
$(LLVM_CMAKE_ARGS) \
$(dir $<)
$(abs_top_srcdir)/external/llvm
.PHONY: configure-llvm
configure-llvm: $(LLVM_BUILD)/$(if $(NINJA),build.ninja,Makefile)
@@ -67,14 +48,9 @@ build-llvm: configure-llvm
install-llvm: build-llvm | $(LLVM_PREFIX)
DESTDIR="" $(if $(NINJA),$(NINJA),$(MAKE)) -C $(LLVM_BUILD) install
# FIXME: URL should be http://xamjenkinsartifact.blob.core.windows.net/build-package-osx-llvm-$(NEEDED_LLVM_BRANCH)/llvm-osx64-$(NEEDED_LLVM_VERSION).tar.gz
.PHONY: download-llvm
download-llvm:
wget --no-verbose -O - http://xamjenkinsartifact.blob.core.windows.net/build-package-osx-llvm-release60/llvm-osx64-$(NEEDED_LLVM_VERSION).tar.gz | tar xzf -
.PHONY: download-llvm36
download-llvm36:
wget --no-verbose -O - http://xamjenkinsartifact.blob.core.windows.net/build-package-osx-llvm/llvm-osx64-$(NEEDED_LLVM36_VERSION).tar.gz | tar xzf -
(wget --no-verbose -O - $(LLVM_DOWNLOAD_LOCATION) || curl -L $(LLVM_DOWNLOAD_LOCATION)) | tar -xzf - -C $(dir $(LLVM_PREFIX))
.PHONY: clean-llvm
clean-llvm:
+155 -30
View File
@@ -1,47 +1,172 @@
#!/bin/bash
llvm_config=$1
extra_libs="${@:2}"
llvm_codegen_libs="$2"
llvm_extra_libs="${@:3}"
llvm_api_version=`$llvm_config --mono-api-version` || "0"
with_llvm=`$llvm_config --prefix`
use_llvm_config=1
llvm_host_win32=0
llvm_host_win32_wsl=0
llvm_host_win32_cygwin=0
llvm_config_cflags=`$llvm_config --cflags`
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++"
llvm_libc_c="-stdlib=libc++"
llvm_libc_link="-lc++"
else
llvm_libc_c=""
llvm_libc_link="-lstdc++"
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
shared_llvm_cflags="-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"
cxxflag_additions="-std=c++11 -fno-rtti -fexceptions"
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_system=`$llvm_config --system-libs`
llvm_core_components=`$llvm_config --libs analysis core bitwriter`
llvm_old_jit=`$llvm_config --libs mcjit jit 2>>/dev/null`
llvm_new_jit=`$llvm_config --libs orcjit 2>>/dev/null`
llvm_extra=`$llvm_config --libs $extra_libs`
llvm_lib_components="$llvm_core_components $llvm_old_jit $llvm_new_jit $llvm_extra"
echo "LLVM_CFLAGS_INTERNAL=$shared_llvm_cflags"
echo "LLVM_CXXFLAGS_INTERNAL=$shared_llvm_cflags $cxxflag_additions"
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"
+40
View File
@@ -0,0 +1,40 @@
# 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
])
+6 -1
View File
@@ -2,12 +2,17 @@
.SH NAME
Mono CIL strip
.SH SYNOPSIS
.B mono-cil-strip assembly [output-assembly]
.B mono-cil-strip [options] 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
+36
View File
@@ -221,6 +221,13 @@ obtained by calling the bundled
.I opt
program that comes with Mono.
.TP
.I llvmllc=[options]
Use this option to override 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
@@ -374,6 +381,9 @@ 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
@@ -1628,6 +1638,32 @@ 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
.TP
\fBMONO_TLS_SESSION_CACHE_TIMEOUT\fR
The time, in seconds, that the SSL/TLS session cache will keep it's entry to
avoid a new negotiation between the client and a server. Negotiation are very
-1
View File
@@ -15,7 +15,6 @@ 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
+2 -4
View File
@@ -4,8 +4,7 @@ SUBDIRS := build jay mcs class nunit24 ilasm tools tests errors docs packages
# Resgen is corlib specific tool
basic_SUBDIRS := build jay class
build_SUBDIRS := build class class/aot-compiler tools ilasm
build_SUBDIRS := build jay tools/gensources class class/aot-compiler tools
monodroid_SUBDIRS := build class tools
monodroid_tools_SUBDIRS := build class tools
monotouch_SUBDIRS := build class tools
@@ -36,7 +35,7 @@ all-local $(STD_TARGETS:=-local):
@:
dir-check:
@if [ "$(NO_DIR_CHECK)" = "" -a "$(PROFILE)" != "basic" ]; then $(MAKE) -C ../runtime; fi
@if [ "$(NO_DIR_CHECK)" = "" ]; then $(MAKE) -C ../runtime; fi
# fun specialty targets
@@ -83,7 +82,6 @@ $(_boot_:%=profile-do--winaot--%): profile-do--winaot--%:
$(_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--build--%): profile-do--build--%: profile-do--basic--%
testcorlib:
@cd class/corlib && $(MAKE) test run-test
+18 -4
View File
@@ -2,7 +2,7 @@ thisdir = build
SUBDIRS =
include ../build/rules.make
BUILT_FILES = common/Consts.cs
BUILT_FILES = common/Consts.cs $(topdir)/class/lib/$(PROFILE_DIRECTORY)/Consts.cs common/MonoNativeConfig.cs
all-local install-local test-local run-test-local csproj-local run-test-ondotnet-local uninstall-local doc-update-local: $(BUILT_FILES)
@:
@@ -10,14 +10,28 @@ all-local install-local test-local run-test-local csproj-local run-test-ondotnet
clean-local:
-rm -f $(BUILT_FILES) deps/*
common/Consts.cs: common/Consts.cs.in $(wildcard config.make)
$(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)
test -n '$(MONO_VERSION)'
test -n '$(MONO_CORLIB_VERSION)'
sed -e 's,@''MONO_VERSION@,$(MONO_VERSION),' -e 's,@''MONO_CORLIB_VERSION@,$(MONO_CORLIB_VERSION),' $< > $@
#
# This is only used by corlib/Test/Mono/NativePlatformTest.cs, to ensure that we're using the correct native library.
# The test is disabled on all Windows platforms.
#
common/MonoNativeConfig.cs: common/MonoNativeConfig.cs.in $(wildcard config.make)
test -n '$(MONO_NATIVE_SUPPORTED)'
sed -e 's,@''MONO_NATIVE_SUPPORTED@,$(MONO_NATIVE_SUPPORTED),' \
-e 's,@''MONO_NATIVE_USING_COMPAT@,$(MONO_NATIVE_USING_COMPAT),' \
-e 's,@''MONO_NATIVE_PLATFORM_TYPE@,$(MONO_NATIVE_PLATFORM_TYPE),' \
-e 's,@''MONO_NATIVE_PLATFORM@,$(MONO_NATIVE_PLATFORM),' \
$< > $@
PLATFORMS = macos linux win32 unix
PROFILES = \
basic \
build \
binary_reference_assemblies \
net_4_x \
@@ -26,6 +40,7 @@ PROFILES = \
COMMON_SRCS = \
Consts.cs.in \
MonoNativeConfig.cs.in \
Locale.cs \
MonoTODOAttribute.cs \
basic-profile-check.cs \
@@ -40,7 +55,6 @@ DISTFILES = \
corcompare.make \
corcompare-api.xsl \
executable.make \
gensources.cs \
library.make \
rules.make \
tests.make \
+1
View File
@@ -1 +1,2 @@
/Consts.cs
/MonoNativeConfig.cs
+10
View File
@@ -0,0 +1,10 @@
namespace Mono
{
static class MonoNativeConfig
{
internal const bool IsSupported = @MONO_NATIVE_SUPPORTED@;
internal const bool UsingCompat = @MONO_NATIVE_USING_COMPAT@;
internal const string PlatformTypeString = "@MONO_NATIVE_PLATFORM_TYPE@";
internal const string PlatformName = "@MONO_NATIVE_PLATFORM@";
}
}
+1 -1
View File
@@ -41,7 +41,7 @@ class X
Version min_mono_version;
#if __MonoCS__
min_mono_version = new Version (5, 16);
min_mono_version = new Version (5, 19);
#else
min_mono_version = new Version (5, 10);
#endif
+3 -3
View File
@@ -32,10 +32,10 @@ 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)
TEST_RUNTIME = MONO_PATH="$(TEST_MONO_PATH)$(PLATFORM_PATH_SEPARATOR).$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) --debug
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
# In case you want to add MCS_FLAGS, this lets you not have to
# keep track of the default value
+7 -27
View File
@@ -14,13 +14,12 @@
# command line.
#
# 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)) $(DEFAULT_REFERENCES)
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)))
@@ -61,11 +60,9 @@ 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)
@@ -75,17 +72,6 @@ endif
endif
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)
ifdef LIBRARY_USE_INTERMEDIATE_FILE
@@ -298,18 +284,12 @@ endif
# The library
# If the directory contains the per profile include file, generate list file.
# TODO: depend on all *.sources for now and figure out how to list only needed files later
PROFILE_sources = $(wildcard *.sources)
ifneq "x" "x$(PROFILE_RUNTIME)"
GENSOURCES_RUNTIME=$(PROFILE_RUNTIME)
else
GENSOURCES_RUNTIME=MONO_PATH="$(GENSOURCES_LIBDIR)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME)
endif
# 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))
sourcefile = $(depsdir)/$(PROFILE_PLATFORM)_$(PROFILE)_$(LIBRARY_SUBDIR)_$(LIBRARY).sources
$(sourcefile): $(PROFILE_sources) $(PROFILE_excludes) $(depsdir)/.stamp $(GENSOURCES_CS)
$(GENSOURCES_RUNTIME) --debug $(GENSOURCES_EXE) --strict "$@" "$(LIBRARY)" "$(PROFILE_PLATFORM)" "$(PROFILE)"
$(sourcefile): $(PROFILE_sources) $(PROFILE_excludes) $(depsdir)/.stamp
$(GENSOURCES) --strict --platformsdir:$(topdir)/build "$@" "$(LIBRARY)" "$(PROFILE_PLATFORM)" "$(PROFILE)"
library_CLEAN_FILES += $(sourcefile)
-129
View File
@@ -1,129 +0,0 @@
# -*- 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
ILASM = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/ilasm.exe
STRING_REPLACER = $(PROFILE_RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/tmp/cil-stringreplacer.exe
MCS = $(BOOTSTRAP_MCS)
GENSOURCES_CS = $(topdir)/build/gensources.cs
GENSOURCES_DIR = $(topdir)/build
GENSOURCES_EXE = $(GENSOURCES_DIR)/gensources.exe
DEFAULT_REFERENCES = mscorlib
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:WIN_PLATFORM -d:BOOTSTRAP_BASIC -nowarn:1699 -nostdlib
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 $(GENSOURCES_CS)
$(MAKE) $(MAKE_Q) -C $(topdir)/packages
$(BOOTSTRAP_MCS) /warn:0 /noconfig /langversion:latest /r:System.dll /r:mscorlib.dll /out:[email protected] $<
$(BOOTSTRAP_MCS) /noconfig /langversion:latest /r:mscorlib.dll /r:System.dll /r:System.Core.dll /out:$(GENSOURCES_EXE).tmp $(GENSOURCES_CS)
- rm $(GENSOURCES_EXE)
mv $(GENSOURCES_EXE).tmp $(GENSOURCES_EXE)
- rm $@
mv [email protected] $@
$(PROFILE_OUT): $(PROFILE_EXE)
$(PROFILE_RUNTIME) $< > $@ 2>&1
+114 -10
View File
@@ -1,25 +1,129 @@
# -*- makefile -*-
BOOTSTRAP_PROFILE = basic
BUILD_TOOLS_PROFILE = basic
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_MCS = MONO_PATH="$(topdir)/class/lib/$(BOOTSTRAP_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(INTERNAL_CSC)
MCS = $(BOOTSTRAP_MCS)
PLATFORMS = macos linux win32 unix
# nuttzing!
profile-check:
@:
DEFAULT_REFERENCES = mscorlib
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:WIN_PLATFORM -nowarn:1699 -nostdlib
PROFILE_MCS_FLAGS = -d:NET_4_0 -d:NET_4_5 -d:MONO -d:WIN_PLATFORM -d:BOOTSTRAP_BASIC -nowarn:1699 -nostdlib
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
# 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
View File
@@ -2,3 +2,5 @@ include $(topdir)/build/profiles/monotouch_runtime.make
PROFILE_MCS_FLAGS += \
-d:FULL_AOT_RUNTIME
NO_SRE=1
@@ -39,3 +39,4 @@ NO_CONSOLE = yes
PROFILE_DISABLE_BTLS=1
MONO_FEATURE_APPLETLS=1
ONLY_APPLETLS=1
ENABLE_GSS=1
+1
View File
@@ -7,3 +7,4 @@ NO_THREAD_ABORT=1
NO_THREAD_SUSPEND_RESUME=1
NO_MULTIPLE_APPDOMAINS=1
NO_PROCESS_START=1
NO_VTS_TEST=1
+1
View File
@@ -12,3 +12,4 @@ NO_MONO_SECURITY=1
MONO_FEATURE_APPLETLS=
ONLY_APPLETLS=
MONO_FEATURE_APPLE_X509=1
NO_VTS_TEST=1
+1
View File
@@ -23,4 +23,5 @@ ENFORCE_LIBRARY_WARN_AS_ERROR = yes
ifdef PLATFORM_MACOS
MONO_FEATURE_APPLETLS=1
ENABLE_GSS=1
endif
+1
View File
@@ -39,6 +39,7 @@ MOBILE_PROFILE = yes
NO_VTS_TEST = yes
NO_CONSOLE = yes
PROFILE_DISABLE_BTLS = yes
NO_SRE=1
# Note need for trailing comma. If you add, keep it
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking,PKITS,
+1
View File
@@ -36,6 +36,7 @@ AOT_FRIENDLY_PROFILE = yes
MOBILE_PROFILE = yes
NO_VTS_TEST = yes
NO_CONSOLE = yes
NO_SRE=1
# Note need for trailing comma. If you add, keep it
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking,PKITS,
+1
View File
@@ -39,3 +39,4 @@ ALWAYS_AOT = yes
MOBILE_PROFILE = yes
NO_VTS_TEST = yes
NO_CONSOLE = yes
NO_SRE=1
+1
View File
@@ -37,6 +37,7 @@ AOT_FRIENDLY_PROFILE = yes
ALWAYS_AOT = yes
MOBILE_PROFILE = yes
NO_VTS_TEST = yes
NO_SRE=1
# Note need for trailing comma. If you add, keep it
PROFILE_TEST_HARNESS_EXCLUDES = MobileNotWorking,PKITS,
+1
View File
@@ -35,6 +35,7 @@ MOBILE_DYNAMIC = yes
MOBILE_PROFILE = yes
NO_CONSOLE = yes
ENABLE_GSS=1
PROFILE_DISABLE_BTLS=1
MONO_FEATURE_APPLETLS=1
ONLY_APPLETLS=1
+1
View File
@@ -23,3 +23,4 @@ NO_SYSTEM_DIRECTORY_SERVICES_DEPENDENCY=1
PROFILE_DISABLE_BTLS=1
MONO_FEATURE_APPLETLS=1
ONLY_APPLETLS=1
ENABLE_GSS=1
+15 -12
View File
@@ -27,12 +27,8 @@ Q_MCS=$(if $(V),,@echo "$(if $(MCS_MODE),MCS,CSC) [$(intermediate)$(PROFILE_
Q_AOT=$(if $(V),,@echo "AOT [$(intermediate)$(PROFILE_DIRECTORY)] $(notdir $(@))";)
ifndef BUILD_TOOLS_PROFILE
ifeq ($(PROFILE),basic)
BUILD_TOOLS_PROFILE = basic
else
BUILD_TOOLS_PROFILE = build
endif
endif
USE_MCS_FLAGS = /codepage:$(CODEPAGE) /nologo /noconfig /deterministic $(LOCAL_MCS_FLAGS) $(PLATFORM_MCS_FLAGS) $(PROFILE_MCS_FLAGS) $(MCS_FLAGS)
USE_MBAS_FLAGS = /codepage:$(CODEPAGE) $(LOCAL_MBAS_FLAGS) $(PLATFORM_MBAS_FLAGS) $(PROFILE_MBAS_FLAGS) $(MBAS_FLAGS)
@@ -56,9 +52,7 @@ INTERNAL_CSC = CSC_SDK_PATH_DISABLED= $(RUNTIME) $(RUNTIME_FLAGS) $(CSC_RUNTIME_
RESGEN = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/resgen.exe
STRING_REPLACER = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/cil-stringreplacer.exe
ILASM = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/ilasm.exe
GENSOURCES_LIBDIR = $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)
GENSOURCES_CS = $(topdir)/build/gensources.cs
GENSOURCES_EXE = $(topdir)/build/gensources.exe
GENSOURCES = MONO_PATH="$(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME) $(RUNTIME_FLAGS) $(topdir)/class/lib/$(BUILD_TOOLS_PROFILE)/gensources.exe
depsdir = $(topdir)/build/deps
@@ -74,9 +68,6 @@ export MKINSTALLDIRS
export BOOTSTRAP_MCS
export DESTDIR
export RESGEN
export GENSOURCES_LIBDIR
export GENSOURCES_CS
export GENSOURCES_EXE
# Get this so the platform.make platform-check rule doesn't become the
# default target
@@ -243,6 +234,9 @@ endif
$(if $(filter $*,all), \
$(MAKE) $(PROFILE_PARALLEL_SUBDIRS) ENABLE_PARALLEL_SUBDIR_BUILD=1 || { final_exit="exit 1"; $$dk; };, \
$(foreach subdir,$(PROFILE_PARALLEL_SUBDIRS),$(MAKE) -C $(subdir) $* || { final_exit="exit 1"; $$dk; };))) \
$(if $(FACADES_FOLDER), \
$(MAKE) -C $(FACADES_FOLDER) $* || { final_exit="exit 1"; $$dk; }; \
) \
$$final_exit
ifdef ENABLE_PARALLEL_SUBDIR_BUILD
@@ -264,15 +258,24 @@ endif
# directories it depends on.
#
ifneq ($(PROFILE_PARALLEL_SUBDIRS),)
dep_dirs = .dep_dirs-$(PROFILE)
$(dep_dirs):
@echo "Creating $@..."
#
# This should track dependencies better but the variable can be defined in any
# Makefile dependency. On top of that we should also regenerate when any of the
# PROFILE_PARALLEL_SUBDIRS Makefile's are changed
#
$(dep_dirs): Makefile
$(if $(V),@echo "Creating $(abspath $@)...",)
list='$(PROFILE_PARALLEL_SUBDIRS)'; \
echo > $@; \
for d in $$list; do \
$(MAKE) -C $$d gen-deps DEPS_TARGET_DIR=$$d DEPS_FILE=$(abspath $@); \
done
-include $(dep_dirs)
endif
.PHONY: gen-deps
+50 -40
View File
@@ -19,13 +19,22 @@ TEST_RUNTIME_WRAPPERS_PATH = $(shell dirname $(RUNTIME))/_tmpinst/bin
## Unit test support
ifndef NO_TEST
test_lib_dir = $(topdir)/class/lib/$(PROFILE)/tests
test_nunit_lib = nunitlite.dll
xunit_core := xunit.core xunit.execution.dotnet xunit.abstractions xunit.assert Xunit.NetCore.Extensions
xunit_deps := netstandard System.Runtime
xunit_src := $(patsubst %,$(topdir)/../external/xunit-binaries/%,BenchmarkAttribute.cs BenchmarkDiscover.cs) $(topdir)/../mcs/class/test-helpers/PlatformDetection.cs
ifeq ($(USE_XTEST_REMOTE_EXECUTOR), YES)
XTEST_REMOTE_EXECUTOR = $(topdir)/class/lib/$(PROFILE)/RemoteExecutorConsoleApp.exe
XTEST_REMOTE_EXECUTOR = $(test_lib_dir)/RemoteExecutorConsoleApp.exe
ifeq ($(BUILD_PLATFORM), win32)
XTEST_REMOTE_EXECUTOR_ABSPATH = $(shell cygpath -w $(abspath $(XTEST_REMOTE_EXECUTOR)))
else
XTEST_REMOTE_EXECUTOR_ABSPATH = $(abspath $(XTEST_REMOTE_EXECUTOR))
endif
xunit_src += $(topdir)/../mcs/class/test-helpers/AdminHelper.cs \
$(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/IO/FileCleanupTestBase.cs \
$(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.cs \
@@ -35,8 +44,15 @@ $(topdir)/../external/corefx/src/Common/src/System/PasteArguments.Unix.cs
ifeq ($(PROFILE),monodroid)
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mobile.cs
else
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mono.cs \
$(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.Process.cs
ifeq ($(PROFILE),monotouch_tv)
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mobile.cs
else
ifeq ($(PROFILE),monotouch_watch)
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mobile.cs
else
xunit_src += $(topdir)/../mcs/class/test-helpers/RemoteExecutorTestBase.Mono.cs $(topdir)/../external/corefx/src/CoreFx.Private.TestUtilities/src/System/Diagnostics/RemoteExecutorTestBase.Process.cs
endif
endif
endif
endif
@@ -62,6 +78,7 @@ test_sourcefile = $(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll.sources)
endif
test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_test.dll)
test_lib_output = $(test_lib_dir)/$(test_lib)
test_sourcefile_excludes = $(test_lib).exclude.sources
@@ -73,12 +90,13 @@ ifndef NO_BUILD
test_flags += -r:$(the_assembly)
test_assembly_dep = $(the_assembly)
endif
tests_CLEAN_FILES += $(ASSEMBLY:$(ASSEMBLY_EXT)=_test*.dll) $(ASSEMBLY:$(ASSEMBLY_EXT)=_test*.pdb) $(test_response) $(test_makefrag)
tests_CLEAN_FILES += $(test_lib_output) $(test_lib_output:$(ASSEMBLY_EXT)=.pdb) $(test_response) $(test_makefrag)
xtest_sourcefile = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
xtest_sourcefile = $(PROFILE_PLATFORM)_$(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
xtest_sourcefile_excludes = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.exclude.sources)
xunit_test_lib = $(PROFILE)_$(ASSEMBLY:$(ASSEMBLY_EXT)=_xunit-test.dll)
xtest_lib_output = $(test_lib_dir)/$(xunit_test_lib)
xtest_response = $(depsdir)/$(xunit_test_lib).response
xtest_makefrag = $(depsdir)/$(xunit_test_lib).makefrag
@@ -86,7 +104,7 @@ xtest_flags = -r:$(the_assembly) $(xunit_libs_ref) $(XTEST_MCS_FLAGS) $(XTEST_LI
ifeq ($(wildcard $(xtest_sourcefile)),)
xtest_sourcefile = $(ASSEMBLY:$(ASSEMBLY_EXT)=_xtest.dll.sources)
tests_CLEAN_FILES += $(xunit_test_lib) $(xtest_response) $(xtest_makefrag)
tests_CLEAN_FILES += $(xtest_lib_output) $(xtest_response) $(xtest_makefrag)
endif
ifndef HAVE_CS_TESTS
@@ -113,10 +131,6 @@ endif
test_assemblies :=
test_lib_dir = $(topdir)/class/lib/$(PROFILE)/tests
test_lib_output = $(topdir)/class/lib/$(PROFILE)/tests/$(test_lib)
ifdef HAVE_CS_TESTS
test_assemblies += $(test_lib_output)
@@ -136,11 +150,11 @@ TEST_HARNESS_EXCLUDES_ONDOTNET = /exclude:$(PLATFORM_TEST_HARNESS_EXCLUDES)$(PRO
NOSHADOW_FLAG =
ifdef FIXTURE
FIXTURE_ARG = -test=MonoTests.$(FIXTURE)
FIXTURE_ARG = -test=$(FIXTURE)
endif
ifdef TESTNAME
TESTNAME_ARG = -test=MonoTests.$(TESTNAME)
TESTNAME_ARG = -test=$(TESTNAME)
endif
ifdef TEST_HARNESS_VERBOSE
@@ -162,14 +176,20 @@ endif
NUNITLITE_CONFIG_FILE=$(topdir)/class/lib/$(PROFILE)/$(PARENT_PROFILE)nunit-lite-console.exe.config
patch-nunitlite-appconfig:
cp -f $(topdir)/tools/nunit-lite/nunit-lite-console/nunit-lite-console.exe.config.tmpl $(NUNITLITE_CONFIG_FILE)
$(test_lib_output).nunitlite.config: $(topdir)/tools/nunit-lite/nunit-lite-console/nunit-lite-console.exe.config.tmpl $(TEST_NUNITLITE_APP_CONFIG_GLOBAL) $(TEST_NUNITLITE_APP_CONFIG_RUNTIME) $(TEST_NUNITLITE_APP_CONFIG_SUPPLEMENTAL) | $(test_lib_dir)
cp -f $(topdir)/tools/nunit-lite/nunit-lite-console/nunit-lite-console.exe.config.tmpl $(test_lib_output).nunitlite.config
ifdef TEST_NUNITLITE_APP_CONFIG_GLOBAL
sed -i -e "/__INSERT_CUSTOM_APP_CONFIG_GLOBAL__/r $(TEST_NUNITLITE_APP_CONFIG_GLOBAL)" $(NUNITLITE_CONFIG_FILE)
sed -i -e "/__INSERT_CUSTOM_APP_CONFIG_GLOBAL__/r $(TEST_NUNITLITE_APP_CONFIG_GLOBAL)" $(test_lib_output).nunitlite.config
endif
ifdef TEST_NUNITLITE_APP_CONFIG_RUNTIME
sed -i -e "/__INSERT_CUSTOM_APP_CONFIG_RUNTIME__/r $(TEST_NUNITLITE_APP_CONFIG_RUNTIME)" $(NUNITLITE_CONFIG_FILE)
sed -i -e "/__INSERT_CUSTOM_APP_CONFIG_RUNTIME__/r $(TEST_NUNITLITE_APP_CONFIG_RUNTIME)" $(test_lib_output).nunitlite.config
endif
ifdef TEST_NUNITLITE_APP_CONFIG_SUPPLEMENTAL
cp -f $(TEST_NUNITLITE_APP_CONFIG_SUPPLEMENTAL) $(test_lib_output).nunitlite.config.$(TEST_NUNITLITE_APP_CONFIG_SUPPLEMENTAL)
endif
copy-nunitlite-appconfig: $(test_lib_output).nunitlite.config
cp -f $(test_lib_output).nunitlite.config $(NUNITLITE_CONFIG_FILE)
ifdef PLATFORM_AOT_SUFFIX
@@ -215,7 +235,7 @@ TEST_HARNESS_EXEC=$(TEST_RUNTIME) $(TEST_RUNTIME_FLAGS) $(TEST_COVERAGE_FLAGS) $
endif
## FIXME: i18n problem in the 'sed' command below
run-test-lib: test-local test-local-aot-compile patch-nunitlite-appconfig
run-test-lib: test-local test-local-aot-compile copy-nunitlite-appconfig
ok=:; \
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" MONO_REGISTRY_PATH="$(HOME)/.mono/registry" MONO_TESTS_IN_PROGRESS="yes" DBG_RUNTIME_ARGS="$(TEST_RUNTIME_FLAGS)" $(TEST_HARNESS_EXEC) $(test_assemblies) $(NOSHADOW_FLAG) $(TEST_HARNESS_FLAGS) $(LOCAL_TEST_HARNESS_FLAGS) $(TEST_HARNESS_EXCLUDES) $(LABELS_ARG) -format:nunit2 -result:TestResult-$(PROFILE).xml $(FIXTURE_ARG) $(TESTNAME_ARG)|| ok=false; \
if [ ! -f "TestResult-$(PROFILE).xml" ]; then echo "<?xml version='1.0' encoding='utf-8'?><test-results failures='1' total='1' not-run='0' name='bcl-tests' date='$$(date +%F)' time='$$(date +%T)'><test-suite name='$(strip $(test_assemblies))' success='False' time='0'><results><test-case name='$(notdir $(strip $(test_assemblies))).crash' executed='True' success='False' time='0'><failure><message>The test runner didn't produce a test result XML, probably due to a crash of the runtime. Check the log for more details.</message><stack-trace></stack-trace></failure></test-case></results></test-suite></test-results>" > TestResult-$(PROFILE).xml; fi; \
@@ -242,25 +262,15 @@ ifdef HAVE_CS_TESTS
$(test_lib_dir):
mkdir -p $@
$(test_lib_output): $(test_assembly_dep) $(test_response) $(test_nunit_dep) $(test_lib_dir)
$(test_lib_output): $(test_assembly_dep) $(test_response) $(test_nunit_dep) $(test_lib_output).nunitlite.config | $(test_lib_dir)
$(TEST_COMPILE) $(LIBRARY_FLAGS) -target:library -out:$@ $(test_flags) $(LOCAL_TEST_COMPILER_ONDOTNET_FLAGS) @$(test_response)
test_response_preprocessed = $(test_response)_preprocessed
ifneq "x" "x$(PROFILE_RUNTIME)"
GENSOURCES_RUNTIME=$(PROFILE_RUNTIME)
else
ifneq "x" "x$(TEST_RUNTIME)"
GENSOURCES_RUNTIME=$(TEST_RUNTIME)
else
GENSOURCES_RUNTIME=MONO_PATH="$(GENSOURCES_LIBDIR)$(PLATFORM_PATH_SEPARATOR)$$MONO_PATH" $(RUNTIME)
endif
endif
# This handles .excludes/.sources pairs, as well as resolving the
# includes that occur in .sources files
$(test_response_preprocessed): $(test_sourcefile) $(wildcard $(test_sourcefile_excludes)) $(GENSOURCES_CS)
$(GENSOURCES_RUNTIME) --debug $(GENSOURCES_EXE) --basedir:./Test --strict "$@" "$(test_sourcefile)" "$(test_sourcefile_excludes)"
$(test_response_preprocessed): $(test_sourcefile) $(wildcard *_test.dll.sources) $(wildcard *_test.dll.exclude.sources)
$(GENSOURCES) --basedir:./Test --strict --platformsdir:$(topdir)/build "$@" "$(test_sourcefile)" "$(test_sourcefile_excludes)"
$(test_response): $(test_response_preprocessed)
# @echo Creating $@ ...
@@ -305,35 +315,35 @@ XTEST_COVERAGE_FLAGS = -O=-aot --profile=coverage:output=$(topdir)/class/lib/$(P
endif
check: run-xunit-test-local
xunit-test-local: $(xunit_test_lib)
xunit-test-local: $(xtest_lib_output)
run-xunit-test-local: run-xunit-test-lib
# cp -rf is a HACK for xunit runner to require xunit.execution.dOTNET.dll file in local folder on .net only
run-xunit-test-lib: xunit-test-local $(XTEST_REMOTE_EXECUTOR)
@cp -rf $(XTEST_HARNESS_PATH)/xunit.execution.dotnet.dll xunit.execution.dotnet.dll
run-xunit-test-lib: xunit-test-local
@cp -rf $(XTEST_HARNESS_PATH)/xunit.execution.dotnet.dll $(test_lib_dir)/xunit.execution.dotnet.dll
ok=:; \
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" REMOTE_EXECUTOR=$(XTEST_REMOTE_EXECUTOR) $(TEST_RUNTIME) $(TEST_RUNTIME_FLAGS) $(XTEST_COVERAGE_FLAGS) $(AOT_RUN_FLAGS) $(XTEST_HARNESS) $(xunit_test_lib) $(XTEST_HARNESS_FLAGS) $(XTEST_TRAIT) $(XTEST_TRAIT_PLATFORM) || ok=false; \
PATH="$(TEST_RUNTIME_WRAPPERS_PATH):$(PATH)" REMOTE_EXECUTOR="$(XTEST_REMOTE_EXECUTOR_ABSPATH)" $(TEST_RUNTIME) $(TEST_RUNTIME_FLAGS) $(XTEST_COVERAGE_FLAGS) $(AOT_RUN_FLAGS) $(XTEST_HARNESS) $(xtest_lib_output) $(XTEST_HARNESS_FLAGS) $(XTEST_TRAIT) $(XTEST_TRAIT_PLATFORM) || ok=false; \
if [ -n "$$MONO_BABYSITTER_NUNIT_XML_LIST_FILE" ]; then echo "$(abspath $(XTEST_RESULT_FILE))" >> "$$MONO_BABYSITTER_NUNIT_XML_LIST_FILE"; fi; \
$$ok
@rm -f xunit.execution.dotnet.dll
@rm -f $(test_lib_dir)/xunit.execution.dotnet.dll
# Some xunit tests want to be executed in a separate process (see RemoteExecutorTestBase)
$(XTEST_REMOTE_EXECUTOR): $(topdir)/../external/corefx/src/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/RemoteExecutorConsoleApp.cs
$(XTEST_REMOTE_EXECUTOR): $(topdir)/../external/corefx/src/Common/tests/System/Diagnostics/RemoteExecutorConsoleApp/RemoteExecutorConsoleApp.cs | $(test_lib_dir)
$(TEST_COMPILE) -r:$(topdir)/class/lib/$(PROFILE)/mscorlib.dll $< -out:$@
$(xunit_test_lib): $(the_assembly) $(xtest_response) $(xunit_libs_dep) $(xunit_src)
$(xtest_lib_output): $(the_assembly) $(xtest_response) $(xunit_libs_dep) $(xunit_src) $(XTEST_REMOTE_EXECUTOR) | $(test_lib_dir)
$(TEST_COMPILE) $(LIBRARY_FLAGS) $(XTEST_LIB_FLAGS) -target:library -out:$@ $(xtest_flags) @$(xtest_response) $(xunit_src)
xtest_response_preprocessed = $(xtest_response)_preprocessed
# This handles .excludes/.sources pairs, as well as resolving the
# includes that occur in .sources files
$(xtest_response): $(xtest_sourcefile) $(wildcard $(xtest_sourcefile_excludes)) $(GENSOURCES_CS)
$(GENSOURCES_RUNTIME) --debug $(GENSOURCES_EXE) --strict "$@" "$(xtest_sourcefile)" "$(xtest_sourcefile_excludes)"
$(xtest_response): $(xtest_sourcefile) $(wildcard *xtest.dll.sources) $(wildcard $(xtest_sourcefile_excludes))
$(GENSOURCES) --strict --platformsdir:$(topdir)/build "$@" "$(xtest_sourcefile)" "$(xtest_sourcefile_excludes)"
$(xtest_makefrag): $(xtest_response)
@echo Creating $@ ...
@sed 's,^,$(xunit_test_lib): ,' $< >$@
@sed 's,^,$(xtest_lib_output): ,' $< >$@
-include $(xtest_makefrag)
+12 -5
View File
@@ -19,10 +19,10 @@
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -44,6 +44,7 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="..\..\build\common\Consts.cs" />
<Compile Include="Accessibility\IAccessible.cs" />
@@ -54,10 +55,10 @@
<Project>{702AE2C0-71DD-4112-9A06-E4FABCA59986}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
<Private>False</Private>
<Private>false</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<!-- @COMMON_PROJECT_REFERENCES@ -->
<ItemGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -65,4 +66,10 @@
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -19,10 +19,10 @@
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>../mono.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -47,6 +47,7 @@
<Compile Include="Commons.Xml.Relaxng.Rnc\RncParser.cs" />
</ItemGroup>
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="..\..\build\common\Consts.cs" />
<Compile Include="..\..\build\common\Locale.cs" />
@@ -92,10 +93,17 @@
<Project>{702AE2C0-71DD-4112-9A06-E4FABCA59986}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
<Private>False</Private>
<Private>false</Private>
</ProjectReference>
<ProjectReference Include="$(SolutionDir)\mcs\jay\jay.vcxproj">
<Name>jay</Name>
<Project>{5d485d32-3b9f-4287-ab24-c8da5b89f537}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
<Private>false</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<!-- @COMMON_PROJECT_REFERENCES@ -->
<ItemGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -110,6 +118,12 @@
</EmbeddedResource>
</ItemGroup>
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
<PropertyGroup>
<PreBuildEvent Condition=" '$(OS)' != 'Windows_NT' ">$(ProjectDir)\..\..\jay\jay -ct &lt; $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.jay &gt; $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.cs</PreBuildEvent>
<PreBuildEvent Condition=" '$(OS)' == 'Windows_NT' ">$(ProjectDir)\..\..\jay\jay.exe -ct &lt; $(ProjectDir)\..\..\jay\skeleton.cs $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.jay &gt; $(ProjectDir)\Commons.Xml.Relaxng.Rnc\RncParser.cs</PreBuildEvent>
@@ -1,3 +1,4 @@
../../test-helpers/TestResourceHelper.cs
RdpPatternTests.cs
RelaxngDatatypeProviderTests.cs
RelaxngReaderTests.cs
+10 -5
View File
@@ -11,15 +11,20 @@ LIB_REFS = System System.Xml
KEYFILE = ../mono.pub
LIB_MCS_FLAGS = \
$(foreach r, $(OTHER_RES), /resource:$(r),$(notdir $(r)))
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169
EXTRA_DISTFILES = \
Commons.Xml.Relaxng.Rnc/RncParser.jay \
TEST_RESOURCE_FILES = \
$(wildcard Test/XmlFiles/*.rng) \
$(wildcard Test/XmlFiles/*.rnc) \
$(wildcard Test/XmlFiles/*.nvdl) \
$(wildcard Test/XmlFiles/*.xml) \
$(wildcard Test/XmlFiles/*.xml)
TEST_MCS_FLAGS = $(LIB_MCS_FLAGS) -nowarn:0618 -nowarn:219 -nowarn:169 $(foreach r, $(TEST_RESOURCE_FILES), -resource:$(r),$(r))
EXTRA_DISTFILES = \
Commons.Xml.Relaxng.Rnc/RncParser.jay \
$(wildcard Test/standalone_tests/*.cs) \
$(RESOURCE_FILES)
$(RESOURCE_FILES) \
$(TEST_RESOURCE_FILES)
Commons.Xml.Relaxng.Rnc/RncParser.cs: Commons.Xml.Relaxng.Rnc/RncParser.jay $(topdir)/jay/skeleton.cs
$(topdir)/jay/jay -ctv -o Commons.Xml.Relaxng.Rnc/RncParser.cs $< < $(topdir)/jay/skeleton.cs
@@ -13,6 +13,8 @@ using System.Xml;
using Commons.Xml.Nvdl;
using NUnit.Framework;
using MonoTests.Helpers;
namespace MonoTests.Commons.Xml.Relaxng
{
[TestFixture]
@@ -21,7 +23,7 @@ namespace MonoTests.Commons.Xml.Relaxng
[Test]
public void ReadNvdlNvdl ()
{
using (TextReader r = File.OpenText ("Test/XmlFiles/nvdl.nvdl")) {
using (TextReader r = File.OpenText (TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/nvdl.nvdl"))) {
NvdlRules rules = NvdlReader.Read (
new XmlTextReader (r));
}
@@ -31,7 +33,7 @@ namespace MonoTests.Commons.Xml.Relaxng
public void ValidateNvdlNvdl ()
{
NvdlRules rules = null;
string path = "Test/XmlFiles/nvdl.nvdl";
string path = TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/nvdl.nvdl");
using (TextReader r = File.OpenText (path)) {
rules = NvdlReader.Read (
new XmlTextReader (path, r));
@@ -12,6 +12,8 @@ using Commons.Xml.Relaxng;
using Commons.Xml.Relaxng.XmlSchema;
using NUnit.Framework;
using MonoTests.Helpers;
namespace MonoTests.Commons.Xml.Relaxng
{
[TestFixture]
@@ -23,7 +25,7 @@ namespace MonoTests.Commons.Xml.Relaxng
var datatypeLibrary = SetupMyDataProvider ();
XmlDocument xml = new XmlDocument ();
xml.LoadXml ("<root> <v1>mytype</v1> <v2>1</v2> </root>");
XmlDocument schemaXml = ReadDoc ("Test/XmlFiles/463264.rng");
XmlDocument schemaXml = ReadDoc (TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/463264.rng"));
XmlReader reader = new RelaxngValidatingReader (new XmlNodeReader (xml), new XmlNodeReader (schemaXml), datatypeLibrary);
while (reader.Read ())
;
@@ -35,7 +37,7 @@ namespace MonoTests.Commons.Xml.Relaxng
var datatypeLibrary = SetupMyDataProvider ();
XmlDocument xml = new XmlDocument ();
xml.LoadXml ("<root> <v2>1</v2> <v1>mytype</v1> </root>");
XmlDocument schemaXml = ReadDoc ("Test/XmlFiles/463267.rng");
XmlDocument schemaXml = ReadDoc (TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/463267.rng"));
XmlReader reader = new RelaxngValidatingReader (new XmlNodeReader (xml), new XmlNodeReader (schemaXml), datatypeLibrary);
while (reader.Read ())
;
@@ -13,6 +13,8 @@ using System.Xml;
using Commons.Xml.Relaxng;
using NUnit.Framework;
using MonoTests.Helpers;
namespace MonoTests.Commons.Xml.Relaxng
{
[TestFixture]
@@ -33,7 +35,7 @@ namespace MonoTests.Commons.Xml.Relaxng
[Test]
public void SimpleRead ()
{
loadGrammarFromUrl ("Test/XmlFiles/SimpleElementPattern1.rng");
loadGrammarFromUrl (TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/SimpleElementPattern1.rng"));
RelaxngPattern p = reader.ReadPattern ();
Assert.AreEqual (RelaxngPatternType.Element, p.PatternType);
@@ -42,7 +44,7 @@ namespace MonoTests.Commons.Xml.Relaxng
[Test]
public void CompileRelaxngGrammar ()
{
loadGrammarFromUrl ("Test/XmlFiles/relaxng.rng");
loadGrammarFromUrl (TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/relaxng.rng"));
RelaxngPattern p = reader.ReadPattern ();
Assert.AreEqual (RelaxngPatternType.Grammar, p.PatternType);
@@ -14,6 +14,7 @@ using Commons.Xml.Relaxng;
using NUnit.Framework;
using RVR = Commons.Xml.Relaxng.RelaxngValidatingReader;
using MonoTests.Helpers;
namespace MonoTests.Commons.Xml.Relaxng
{
@@ -45,8 +46,8 @@ namespace MonoTests.Commons.Xml.Relaxng
[Test]
public void SimpleElementPattern1 ()
{
SetupReaderFromUrl ("Test/XmlFiles/SimpleElementPattern1.xml",
"Test/XmlFiles/SimpleElementPattern1.rng");
SetupReaderFromUrl (TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/SimpleElementPattern1.xml"),
TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/SimpleElementPattern1.rng"));
while (!reader.EOF)
reader.Read ();
@@ -55,8 +56,8 @@ namespace MonoTests.Commons.Xml.Relaxng
[Test]
public void SimpleElementPattern2 ()
{
SetupReaderFromUrl ("Test/XmlFiles/SimpleElementPattern2.xml",
"Test/XmlFiles/SimpleElementPattern2.rng");
SetupReaderFromUrl (TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/SimpleElementPattern2.xml"),
TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/SimpleElementPattern2.rng"));
while (!reader.EOF)
reader.Read ();
@@ -65,7 +66,7 @@ namespace MonoTests.Commons.Xml.Relaxng
[Test]
public void ReadPracticalSample1 ()
{
SetupReaderFromUrl ("Test/XmlFiles/team.xml", "Test/XmlFiles/team.rng");
SetupReaderFromUrl (TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/team.xml"), TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/team.rng"));
while (!reader.EOF)
reader.Read ();
}
@@ -75,8 +76,8 @@ namespace MonoTests.Commons.Xml.Relaxng
{
// validate relaxng.rng with relaxng.rng
RVR r = new RVR (
new XmlTextReader ("Test/XmlFiles/relaxng.rng"),
new XmlTextReader ("Test/XmlFiles/relaxng.rng"));
new XmlTextReader (TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/relaxng.rng")),
new XmlTextReader (TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/relaxng.rng")));
while (!r.EOF)
r.Read ();
}
@@ -15,6 +15,8 @@ using Commons.Xml.Relaxng;
using Commons.Xml.Relaxng.Rnc;
using NUnit.Framework;
using MonoTests.Helpers;
namespace MonoTests.Commons.Xml.Relaxng
{
[TestFixture]
@@ -43,19 +45,19 @@ namespace MonoTests.Commons.Xml.Relaxng
[Test]
public void TestRelaxngRnc ()
{
Compile ("Test/XmlFiles/relaxng.rnc");
Compile (TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/relaxng.rnc"));
}
[Test]
public void TestAtomRnc ()
{
Compile ("Test/XmlFiles/atom.rnc");
Compile (TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/atom.rnc"));
}
[Test]
public void TestInfocardRnc ()
{
Compile ("Test/XmlFiles/schemas-xmlsoap-or-ws-2005-05-identity.rnc");
Compile (TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/schemas-xmlsoap-or-ws-2005-05-identity.rnc"));
}
[Test]
@@ -85,8 +87,8 @@ start = mine";
[Test]
public void InheritDefaultNamespace ()
{
RelaxngPattern g = Compile ("Test/XmlFiles/include-default-namespace.rnc");
XmlReader xtr = new XmlTextReader ("Test/XmlFiles/include-default-namespace.xml");
RelaxngPattern g = Compile (TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/include-default-namespace.rnc"));
XmlReader xtr = new XmlTextReader (TestResourceHelper.GetFullPathOfResource ("Test/XmlFiles/include-default-namespace.xml"));
RelaxngValidatingReader r = new RelaxngValidatingReader (xtr, g);
try {
while (!r.EOF)
+12 -5
View File
@@ -19,10 +19,10 @@
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -44,6 +44,7 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="..\..\build\common\Consts.cs" />
<Compile Include="..\..\build\common\Locale.cs" />
@@ -57,10 +58,10 @@
<Project>{702AE2C0-71DD-4112-9A06-E4FABCA59986}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
<Private>False</Private>
<Private>false</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<!-- @COMMON_PROJECT_REFERENCES@ -->
<ItemGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -69,4 +70,10 @@
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -19,10 +19,10 @@
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -44,6 +44,7 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="..\..\build\common\Consts.cs" />
<Compile Include="..\..\build\common\Locale.cs" />
@@ -58,10 +59,10 @@
<Project>{702AE2C0-71DD-4112-9A06-E4FABCA59986}</Project>
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<CopyToOutputDirectory>Never</CopyToOutputDirectory>
<Private>False</Private>
<Private>false</Private>
</ProjectReference>
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<!-- @COMMON_PROJECT_REFERENCES@ -->
<ItemGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -70,4 +71,10 @@
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
+3 -3
View File
@@ -37,10 +37,10 @@ doc-update-local:
doc-update-recursive:
@echo "do not recurse the Facades folder"
System System.Core System.ComponentModel.DataAnnotations System.Numerics System.Numerics.Vectors System.Runtime.Serialization System.Transactions System.XML \
System System.Core System.ComponentModel.DataAnnotations System.Numerics System.Numerics.Vectors System.Runtime.Serialization System.Transactions System.Xml \
System.ComponentModel.Composition System.ServiceModel System.Xml.Linq System.Data System.IO.Compression.FileSystem System.Runtime.InteropServices.RuntimeInformation \
System.ServiceProcess System.Security System.Net.Http.WebRequest System.Net.Http System.ServiceProcess System.IO.Compression \
System.Web.Services:
System.ServiceProcess System.Security System.Net.Http.WebRequest System.Net.Http System.ServiceProcess System.IO.Compression System.IdentityModel System.Web \
Facades/System.Drawing.Primitives System.Drawing System.Web.Services:
all-local-aot:
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,23 +95,24 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="..\..\..\..\external\corefx\src\Microsoft.Win32.Registry.AccessControl\src\Microsoft\Win32\RegistryAclExtensions.cs" />
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -0,0 +1,35 @@
//
// Copyright (c) 2018 Microsoft
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
using System;
using System.Reflection;
using System.Runtime.CompilerServices;
[assembly: AssemblyTitle ("System.Buffers")]
[assembly: AssemblyDescription ("System.Buffers")]
[assembly: AssemblyDefaultAlias ("System.Buffers")]
[assembly: AssemblyCompany ("Mono development team")]
[assembly: AssemblyProduct ("Mono Common Language Infrastructure")]
[assembly: AssemblyCopyright ("(c) Various Mono authors")]
[assembly: AssemblyVersion ("4.0.99.0")]
[assembly: AssemblyInformationalVersion ("4.0.99.0")]
[assembly: AssemblyFileVersion ("4.0.99.0")]
@@ -0,0 +1,106 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- WARNING: this file is autogenerated, don't modify it. Edit the .sources file of the corresponding assembly instead if you want to add/remove C# source files. -->
<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">net_4_x</Platform>
<ProjectGuid>{CA080440-700C-46F4-B8F9-56D2507909D3}</ProjectGuid>
<OutputType>Library</OutputType>
<NoWarn>1699,1616,1699</NoWarn>
<LangVersion>latest</LangVersion>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Windows_NT'">win32</HostPlatform>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix' and $([System.IO.File]::Exists('/usr/lib/libc.dylib'))">darwin</HostPlatform>
<HostPlatform Condition=" '$(HostPlatform)' == '' and '$(OS)' == 'Unix'">linux</HostPlatform>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
<NoStdLib>True</NoStdLib>
<NoConfig>True</NoConfig>
<AssemblyName>System.Buffers</AssemblyName>
<TargetFrameworkVersion>v2.1</TargetFrameworkVersion>
<SignAssembly>true</SignAssembly>
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../Open.snk</AssemblyOriginatorKeyFile>
</PropertyGroup>
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'monodroid' ">
<OutputPath>./../../../class/lib/monodroid/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;MOBILE_DYNAMIC;MONODROID;ANDROID</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'monotouch' ">
<OutputPath>./../../../class/lib/monotouch/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_watch' ">
<OutputPath>./../../../class/lib/monotouch_watch/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;FEATURE_NO_BSD_SOCKETS;MONOTOUCH_WATCH</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'monotouch_tv' ">
<OutputPath>./../../../class/lib/monotouch_tv/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM;WIN_PLATFORM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'xammac' ">
<OutputPath>./../../../class/lib/xammac/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_DYNAMIC;XAMMAC;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;XAMARIN_MODERN</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'orbis' ">
<OutputPath>./../../../class/lib/orbis/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;ORBIS;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'unreal' ">
<OutputPath>./../../../class/lib/unreal/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;MOBILE;MOBILE_DYNAMIC;NET_3_5;NET_4_0;NET_4_5;MONO</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'wasm' ">
<OutputPath>./../../../class/lib/wasm/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;WASM;DISABLE_REMOTING;DISABLE_COM;FEATURE_NO_BSD_SOCKETS</DefineConstants>
</PropertyGroup>
<!-- @ALL_PROFILE_PROPERTIES@ -->
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<!-- TRACE is set only for Debug configuration, so inherit from platform-specific value -->
<DefineConstants>TRACE;$(DefineConstants)</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
+24
View File
@@ -0,0 +1,24 @@
MCS_BUILD_DIR = ../../../build
thisdir = class/Facades/System.Buffers
SUBDIRS =
include $(MCS_BUILD_DIR)/rules.make
LIBRARY_SUBDIR = Facades
LIBRARY_INSTALL_DIR = $(mono_libdir)/mono/$(FRAMEWORK_VERSION)/Facades
LIBRARY = System.Buffers.dll
KEYFILE = ../../Open.snk
LIBRARY_SNK = $(KEYFILE)
SIGN_FLAGS = /delaysign /nowarn:1616,1699
LIB_REFS =
LIB_MCS_FLAGS = $(SIGN_FLAGS)
PLATFORM_DEBUG_FLAGS =
NO_TEST = yes
include $(MCS_BUILD_DIR)/library.make
@@ -0,0 +1,3 @@
TypeForwarders.cs
AssemblyInfo.cs
@@ -0,0 +1,23 @@
//
// Copyright (c) 2018 Microsoft
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
// in the Software without restriction, including without limitation the rights
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
// copies of the Software, and to permit persons to whom the Software is
// furnished to do so, subject to the following conditions:
//
// The above copyright notice and this permission notice shall be included in
// all copies or substantial portions of the Software.
//
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
// THE SOFTWARE.
//
[assembly:System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Buffers.ArrayPool<>))]
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,23 +95,24 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../System.Core/System.Core.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System.ComponentModel.DataAnnotations/System.ComponentModel.DataAnnotations.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,11 +95,12 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
@@ -112,12 +108,12 @@
<ProjectReference Include="../../System.XML/System.Xml.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,11 +95,12 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
@@ -112,12 +108,12 @@
<ProjectReference Include="../../System.XML/System.Xml.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,21 +95,22 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
@@ -20,10 +20,10 @@
<DelaySign>true</DelaySign>
<AssemblyOriginatorKeyFile>../../msfinal.pub</AssemblyOriginatorKeyFile>
</PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<PropertyGroup>
<!-- Set AddAdditionalExplicitAssemblyReferences to false, otherwise if targetting .NET4.0,
Microsoft.NETFramework.props will force a dependency on the assembly System.Core. This
is a problem to compile the Mono mscorlib.dll -->
<AddAdditionalExplicitAssemblyReferences>false</AddAdditionalExplicitAssemblyReferences>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'net_4_x' ">
@@ -51,11 +51,6 @@
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MOBILE;MOBILE_LEGACY;MONO;MONOTOUCH;DISABLE_REMOTING;DISABLE_COM;FEATURE_INTERCEPTABLE_THREADPOOL_CALLBACK;FULL_AOT_RUNTIME;MONOTOUCH_TV</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<OutputPath>./../../../class/lib/testing_aot_full/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
<DefineConstants>NET_1_1;NET_2_0;NET_2_1;NET_3_5;NET_4_0;NET_4_5;MONO;MOBILE;MOBILE_LEGACY;FULL_AOT_DESKTOP;FULL_AOT_RUNTIME;DISABLE_REMOTING;DISABLE_COM</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Platform)' == 'winaot' ">
<OutputPath>./../../../class/lib/winaot/Facades</OutputPath>
<IntermediateOutputPath>./../../../class/obj/$(AssemblyName)-Facades</IntermediateOutputPath>
@@ -100,22 +95,23 @@
</PropertyGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- @BUILT_SOURCES@ -->
<!--Common files-->
<ItemGroup>
<Compile Include="AssemblyInfo.cs" />
<Compile Include="TypeForwarders.cs" />
</ItemGroup>
<ItemGroup></ItemGroup>
<!--End of common files-->
<!-- @ALL_SOURCES@ -->
<ItemGroup>
<ProjectReference Include="../../System/System.csproj" />
<ProjectReference Include="../../corlib/corlib.csproj" />
</ItemGroup>
<ItemGroup Condition=" '$(Platform)' == 'testing_aot_full' ">
<Reference Include="nunitlite">
<HintPath>..\lib\testing_aot_full\nunitlite.dll</HintPath>
<Private>False</Private>
</Reference>
</ItemGroup>
<!-- @ALL_REFERENCES@ -->
<!-- @ALL_RESOURCES@ -->
<PropertyGroup>
<!-- Force the pre-build event to run after references have been resolved. The default
behavior is to run them before resolving references, which can cause things like
culevel.exe to be used before they have been built. -->
<PreBuildEventDependsOn>ResolveReferences</PreBuildEventDependsOn>
</PropertyGroup>
</Project>
Loaded 100 of 1719 files, more files were not shown because too many files have changed in this diff. Show more