platform/upstream/dotnet/runtime.git
2 years agoUpdate SDK to 6.0 RC2 (#60256)
Viktor Hofer [Wed, 3 Nov 2021 17:09:41 +0000 (18:09 +0100)]
Update SDK to 6.0 RC2 (#60256)

Co-authored-by: Rainer Sigwald <raines@microsoft.com>
Co-authored-by: Jeremy Koritzinsky <jekoritz@microsoft.com>
2 years agoRemove _validator field from ObjectCollection (#59589)
Adeel Mujahid [Wed, 3 Nov 2021 16:37:16 +0000 (18:37 +0200)]
Remove _validator field from ObjectCollection (#59589)

* Remove _validator field from ObjectCollection

* Use more specific types for fields and args

2 years agoDeduplicate tests with class name 'BringUpTest' (#61128)
Tomáš Rylek [Wed, 3 Nov 2021 15:35:36 +0000 (16:35 +0100)]
Deduplicate tests with class name 'BringUpTest' (#61128)

2 years agoDeduplicate runtime tests using the class name 'Test' (#61125)
Tomáš Rylek [Wed, 3 Nov 2021 15:35:18 +0000 (16:35 +0100)]
Deduplicate runtime tests using the class name 'Test' (#61125)

2 years agoFix invalid optimization of (-1 * -A) + A (#61091)
Jakob Botsch Nielsen [Wed, 3 Nov 2021 15:15:57 +0000 (16:15 +0100)]
Fix invalid optimization of (-1 * -A) + A (#61091)

We were hitting both transforms in this block, but the first transform
changes the node from GT_ADD to GT_SUB, while the second transform is
valid only for GT_ADD. It is difficult to have natural code that hits
both of these transforms, so I have just made them mutually exclusive
instead of rechecking the oper in the second one.

No SPMI diffs.

Fix #61077

2 years agoCredential fixes (#61114)
Jan Jahoda [Wed, 3 Nov 2021 14:05:01 +0000 (15:05 +0100)]
Credential fixes (#61114)

* fix HttpClientHandlerTest.RemoteServer.cs

* fix HttpClientHandlerTest.Authentication.cs

* fix HttpClientHandlerTest.cs

2 years ago[wasm][debugger]Add hidden attribute support (#61143)
Ilona Tomkowicz [Wed, 3 Nov 2021 13:17:36 +0000 (14:17 +0100)]
[wasm][debugger]Add hidden attribute support (#61143)

* Draft of hidden attribute decorator use.

* Removed checking custom attributes in the runtime each time the breakpoint is set and moved it to the constructor which is more efficient.

* Added test for DebuggerHidden decorator.

* By adding a line: using System.Diagnostics; IntAdd method moved down one line what resulted in CreateGoodBreakpoint tests failures. All row numbers in these tests had to be incremented.

* Reverted edition of tests not connected with HiddenAttribute.

* Added visible method to the HiddenAttribute test.

* Applying thaystg review suggestion.

2 years agoAllow nfloat to be in the ObjCRuntime namespace, and make it work for Xamarin.MacCata...
Rolf Bjarne Kvinge [Wed, 3 Nov 2021 11:45:27 +0000 (12:45 +0100)]
Allow nfloat to be in the ObjCRuntime namespace, and make it work for Xamarin.MacCatalyst.dll as well. (#60854)

Ref: https://github.com/xamarin/xamarin-macios/pull/13092
Ref: https://github.com/mono/mono/pull/21261

2 years agoSkip sys/sysctl.h on linux in mono (#61110)
Adeel Mujahid [Wed, 3 Nov 2021 10:15:41 +0000 (12:15 +0200)]
Skip sys/sysctl.h on linux in mono (#61110)

Fixes three warnings:
```sh
  [ 56%] Building C object mono/mini/CMakeFiles/monosgen-objects.dir/__/utils/mono-mmap.c.o
  In file included from /runtime/src/mono/mono/utils/mono-mmap.c:23:
  /usr/include/x86_64-linux-gnu/sys/sysctl.h:21:2: warning: #warning "The <sys/sysctl.h> header is deprecated and will be removed." [-Wcpp]
     21 | #warning "The <sys/sysctl.h> header is deprecated and will be removed."
        |  ^~~~~~~
# snip
  [ 59%] Building C object mono/mini/CMakeFiles/monosgen-objects.dir/__/utils/mono-time.c.o
  In file included from /runtime/src/mono/mono/utils/mono-proclib.c:42:
  /usr/include/x86_64-linux-gnu/sys/sysctl.h:21:2: warning: #warning "The <sys/sysctl.h> header is deprecated and will be removed." [-Wcpp]
     21 | #warning "The <sys/sysctl.h> header is deprecated and will be removed."
        |  ^~~~~~~
  [ 59%] Building C object mono/mini/CMakeFiles/monosgen-objects.dir/__/utils/mono-uri.c.o
  [ 59%] Building C object mono/mini/CMakeFiles/monosgen-objects.dir/__/utils/mono-poll.c.o
  In file included from /runtime/src/mono/mono/utils/mono-time.c:107:
  /usr/include/x86_64-linux-gnu/sys/sysctl.h:21:2: warning: #warning "The <sys/sysctl.h> header is deprecated and will be removed." [-Wcpp]
     21 | #warning "The <sys/sysctl.h> header is deprecated and will be removed."
        |  ^~~~~~~
```

With this PR: 0 warnings - http://sprunge.us/96kyq9

Like in src/libraries/Native, skip linux from sys/sysctl.h check. For other systems, `check_include_files` (instead of `check_include_file` (singular)) when a header depends on another one.

Also, simplified few conditions: "is linux" check supersedes "is android".

2 years ago[wasm] simplify startup configuration (#61072)
Pavel Savara [Wed, 3 Nov 2021 08:46:57 +0000 (09:46 +0100)]
[wasm] simplify startup configuration (#61072)

* added configSrc - path to MonoConfig json file
* added Module.onConfigLoaded callback
* added Module.onDotNetReady replacing MonoConfig.loaded_cb
* removed loaded_cb, assembly_list, runtime_assets, runtime_asset_sources from MonoConfig
* simplified all sample and test projects
* renamed no_global_exports to disableDotNet6Compatibility
* implement default Module.preInit and Module.onRuntimeInitialized which could be overriden by user code (like Blazor)

* re-enable the interp lane

2 years agoAdd TFM and version support query to marshaller interface. (#61064)
Aaron Robinson [Wed, 3 Nov 2021 04:27:34 +0000 (21:27 -0700)]
Add TFM and version support query to marshaller interface. (#61064)

* Add TFM and version support query to marshaller interface.

* If any marshaller fails to support the current tfm version, fallback
to using the built-in DllImport attribute.

* Add tests for fallback generation on downlevel or generation if marshallers
  are supported on the target framework.

* Convert CreateCompilationWithReferenceAssemblies to CreateCompilation overload.

Co-authored-by: Elinor Fung <elfung@microsoft.com>
2 years agoRemove setting CallingConvention field on GeneratedDllImport (#61130)
Elinor Fung [Wed, 3 Nov 2021 04:07:16 +0000 (21:07 -0700)]
Remove setting CallingConvention field on GeneratedDllImport (#61130)

2 years agoRemove dead code in src/coreclr/jit (#61129)
Egor Chesakov [Wed, 3 Nov 2021 03:47:26 +0000 (20:47 -0700)]
Remove dead code in src/coreclr/jit (#61129)

2 years agoFix refcount when a composite r2r image is loaded from a bundle (#61066)
Vladimir Sadov [Wed, 3 Nov 2021 01:29:05 +0000 (18:29 -0700)]
Fix refcount when a composite r2r image is loaded from a bundle (#61066)

* Fix refcount when a composite r2r image is loaded from a bundle

* PR feedback - better comments.

2 years agoMake QCalls respect the EntryPoint property (#60992)
Jeremy Koritzinsky [Tue, 2 Nov 2021 23:37:18 +0000 (16:37 -0700)]
Make QCalls respect the EntryPoint property (#60992)

Co-authored-by: Elinor Fung <elfung@microsoft.com>
2 years agoAdd back SoD Blazor Pizza Aot test (#61118)
Drew Scoggins [Tue, 2 Nov 2021 22:51:49 +0000 (15:51 -0700)]
Add back SoD Blazor Pizza Aot test (#61118)

2 years agoSwitch to run only smoke tests per PR for apple mobile configurations (#61108)
Steve Pfister [Tue, 2 Nov 2021 21:48:17 +0000 (14:48 -0700)]
Switch to run only smoke tests per PR for apple mobile configurations (#61108)

Contributes to #61017

2 years agoFix: Incorrect order of checks for TypeBuilder `GetConstructor` and `GetField` method...
Bartosz Klonowski [Tue, 2 Nov 2021 21:38:36 +0000 (22:38 +0100)]
Fix: Incorrect order of checks for TypeBuilder `GetConstructor` and `GetField` method (#53645)

* Reorder checks for TypeBuilder.GetConstructor()

* Reorder checks for TypeBuilder.GetField()

* Adjust unit test to reordered TypeBuilder checks

* Use 'not' keyword for pattern matching

* Apply the same Type checks for Mono

GetConstructor and GetField had the same incorrect checks order
comparing to GetMethod as in the CoreCLR.
To keep the consistent solution, Mono has also been adjusted.

* Check whether a declaring type isn't type's generic definition

* Make generic type if contains generic parameters

* Suppres UnrecognizedReflectionPattern for GetField and GetConstructor

* Move GetMethodType validation method at original order

* Test GetConstructor against throwing an exception

* Fix: copy-paste error  'type' -> 'constructor'

* Align Mono and CoreCLR with nameof for GetConstructor

* Use type for argument exception and test against type parameter

* Get tests passing on both coreclr and mono.

Ensure checks are consistent across GetConstructor, GetField, and GetMethod for both coreclr and mono.

* Fix mono exception messages to use SR resources.

Co-authored-by: Eric Erhardt <eric.erhardt@microsoft.com>
2 years ago[wasm] Disable failing System.Security.Cryptography tests due to http… (#61102)
Ankit Jain [Tue, 2 Nov 2021 21:02:08 +0000 (21:02 +0000)]
[wasm] Disable failing System.Security.Cryptography tests due to http… (#61102)

#61099

2 years agoDisable couple of randomly failing PerformanceCounter tests (#61101)
Krzysztof Wicher [Tue, 2 Nov 2021 20:30:22 +0000 (21:30 +0100)]
Disable couple of randomly failing PerformanceCounter tests (#61101)

* Disable couple of randomly failing PerformanceCounter tests

* fix: disabled the wrong test

2 years ago[wasm] Re-enable source generator tests failing due to OOM (#60701)
Ankit Jain [Tue, 2 Nov 2021 20:16:25 +0000 (20:16 +0000)]
[wasm] Re-enable source generator tests failing due to OOM (#60701)

This adds support for setting per-project optimization flags, and sets them for these projects so they don't OOM.

Microsoft.Extensions.Logging.Generators.Roslyn3.11.Tests
Microsoft.Extensions.Logging.Generators.Roslyn4.0.Tests
System.Text.Json.SourceGeneration.Roslyn3.11.Unit.Tests
System.Text.Json.SourceGeneration.Roslyn4.0.Unit.Tests
System.Text.RegularExpressions.Generators.Tests
Some individual ones are disabled due to
#58226, and #60899 .

Additionally, if a AOT build fails, then on linux it dumps the last few lines from dmesg, to help identify it was an oom-kill.

Fixes #51961 .

Co-authored-by: Larry Ewing <lewing@microsoft.com>
2 years ago[arm64] JIT: Fold "A * B + C" to MADD/MSUB (#61037)
Egor Bogatov [Tue, 2 Nov 2021 18:10:23 +0000 (21:10 +0300)]
[arm64] JIT: Fold "A * B + C" to MADD/MSUB (#61037)

2 years agoRemoved two unused packages from .vsconfig (#60798)
Steve Dunn [Tue, 2 Nov 2021 16:40:45 +0000 (16:40 +0000)]
Removed two unused packages from .vsconfig (#60798)

These packages are unused as described in #60794

Co-authored-by: Santiago Fernandez Madero <safern@microsoft.com>
2 years agoThrowing `FormatException` when a required property from `Microsoft.Extensions.Depend...
Filip [Tue, 2 Nov 2021 16:10:39 +0000 (17:10 +0100)]
Throwing `FormatException` when a required property from `Microsoft.Extensions.DependencyModel` is empy (#60842)

* Setting framework name as nullable.

* Setting path to nullable.

* Setting runtime to nullable.

* Setting path to nullable.

* Setting Target Name, RuntimeTargetEntrySub Path and TargetLibrary Name as nullable (string) properties.

* Adding missing line of code.

* Adding new string resource and throwing argument exception on null/empty values.
Adding unit tests to check for specific null/empty value cases

* Removing Argument from string resource.
Updating PR according to comments

* Updating unit tests to use FormatException

* Rollback of ArgumentExceptions in DependencyModels

* Added missing usings

* Updating all exceptions to FormatException

* Moving FormatException while reading target name

* Updating PR with new comments.

* Update src/libraries/Microsoft.Extensions.DependencyModel/src/DependencyContextJsonReader.cs

2 years agoHTTP2 loopback server WaitForCancellationAsync should validate error code sent (...
Badre BSAILA [Tue, 2 Nov 2021 15:55:17 +0000 (16:55 +0100)]
HTTP2 loopback server WaitForCancellationAsync should validate error code sent (#59313)

HTTP2 loopback server WaitForCancellationAsync should validate error code sent

2 years agoFix gcc warnings during mono linux-x64 build (#60675)
Adeel Mujahid [Tue, 2 Nov 2021 15:47:37 +0000 (17:47 +0200)]
Fix gcc warnings during mono linux-x64 build (#60675)

* Fix gcc warnings during mono linux-x64 build

main with Debug configuration: 822 warnings - http://sprunge.us/2GzrDE
PR with Debug configuration: 3 warnings related to deprecated sys/sysctl.h includes - http://sprunge.us/JuyA3K

after fixing Debug warnings, there were 13 additional warnings in Release configuration:
http://sprunge.us/PJCivP

PR with Release configuration: (same) 3 warnings - http://sprunge.us/NwKHNE

* Address CR feedback

2 years agoAvoid bogus cred scanning hits (#61070)
Dan Moseley [Tue, 2 Nov 2021 14:39:28 +0000 (08:39 -0600)]
Avoid bogus cred scanning hits (#61070)

* Remove quasi passwords

* oops

2 years agorevert 58594 CacheCredential change (#61069)
Tomas Weinfurt [Tue, 2 Nov 2021 14:36:53 +0000 (07:36 -0700)]
revert 58594 CacheCredential change (#61069)

2 years agoTemporarily disable scaled index on arm64 (#61090)
Egor Bogatov [Tue, 2 Nov 2021 12:17:47 +0000 (15:17 +0300)]
Temporarily disable scaled index on arm64 (#61090)

2 years agoBring up full library test CI runs on iOS / tvOS devices (#59503)
Steve Pfister [Tue, 2 Nov 2021 11:43:15 +0000 (04:43 -0700)]
Bring up full library test CI runs on iOS / tvOS devices (#59503)

This change enables device runs on CI by building each test app on the helix instance it was deployed to. In past attempts, we looked at enhancing what takes place on the build machine via build tricks, compressing / cleaning up files early, etc and we could not overcome the need for excessively long timeouts and far more disk space.

The change also adopts the patterns established in the wasm test build, giving us the opportunity to support different scenario runs as well as workloads testing in the future.

2 years agoSome VN refactoring (#61034)
SingleAccretion [Tue, 2 Nov 2021 11:16:58 +0000 (14:16 +0300)]
Some VN refactoring (#61034)

* Remove "block" from VNApplySelectorsAssign

It was unused and all the callers passed the current block anyway.

Also some renaming to make Assign and AssignTypeCoerce methods consistent.

* Improve the readability of VNForMapStore

By naming parameters properly.

* Improve the readability of VNForMapSelect

By naming parameters properly.

* Pull ASG numbering out of fgValueNumberTree

In my upcoming substantive changes to this code the unreasonable level
of nesting started to significantly degrade the readability of code.

So, move it out of the main numbering function. The result is still
pretty huge and could be split up further, but this will do for now.

* Refactor VNApplySelectors

Make it use a loop instead of recursion.

Rename parameters to match the "Assign" variants.

Add standard header comments.

2 years agoFix typo in profiler method (#60999)
David Mason [Tue, 2 Nov 2021 10:18:11 +0000 (03:18 -0700)]
Fix typo in profiler method (#60999)

2 years ago[arm64] JIT: Fix IsContainableImmed for arm64 v8.1 or higher (#61035)
Egor Bogatov [Tue, 2 Nov 2021 09:33:15 +0000 (12:33 +0300)]
[arm64] JIT: Fix IsContainableImmed for arm64 v8.1 or higher (#61035)

2 years ago[main] Update dependencies from 6 repositories (#61033)
dotnet-maestro[bot] [Tue, 2 Nov 2021 08:26:59 +0000 (09:26 +0100)]
[main] Update dependencies from 6 repositories (#61033)

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2 years agoSeed the unified System.Security.Cryptography.dll
Jeremy Barton [Tue, 2 Nov 2021 05:30:26 +0000 (22:30 -0700)]
Seed the unified System.Security.Cryptography.dll

* All of System.Security.Cryptography.Primitives has been moved
* AsymmericKeyExchangeFormatter moved from S.S.C.Algorithms
* This just starts the process to keep the infrastructure pieces separate from code layout pieces.

2 years agodisable sending NT Authority in TLS handshake if specific trust was specified (#60988)
Tomas Weinfurt [Tue, 2 Nov 2021 05:20:53 +0000 (22:20 -0700)]
disable sending NT Authority in TLS handshake if specific trust was specified (#60988)

* diable sending NT Authority if specific trust was specified

* feedback from review

* add missing file

* Apply suggestions from code review

Co-authored-by: Cory Nelson <phrosty@gmail.com>
* one more style update

Co-authored-by: Cory Nelson <phrosty@gmail.com>
2 years agoAdd Maui iOS and MacCatalyst build steps (#61068)
Parker Bibus [Tue, 2 Nov 2021 04:48:05 +0000 (23:48 -0500)]
Add Maui iOS and MacCatalyst build steps (#61068)

* Fix artifact match string.

* Completed first attempt for a complete Maui SOD run. Added ios_scenarios tests, setup file copies, uploads, and downloads; and setup perf branch to use as partner testing branch.

* Reset performance-setup.ps1 file to use main perf branch.

* Reenable yml jobs disabled for testing.

2 years agoAdd linux x86 build CI for pull request (#60817)
Dong-Heon Jung [Tue, 2 Nov 2021 04:25:56 +0000 (13:25 +0900)]
Add linux x86 build CI for pull request (#60817)

* Add linux x86 build CI for pull request

* Fix linux x86 build error

* Fix linux x86 linking error

2 years agoMake sure smoke tests aren't run on the rolling build (#61055)
Steve Pfister [Tue, 2 Nov 2021 01:57:37 +0000 (18:57 -0700)]
Make sure smoke tests aren't run on the rolling build (#61055)

The way we were trying to use isFullMatrix was not visible to the xplat-setup template. This PR makes sure we grab the value at run time as opposed to compile time.

2 years agoValidate CompressionLevel value is defined in BrotliStream ctor (#57561)
Bar Arnon [Mon, 1 Nov 2021 23:15:18 +0000 (01:15 +0200)]
Validate CompressionLevel value is defined in BrotliStream ctor (#57561)

Co-authored-by: carlossanlop <1175054+carlossanlop@users.noreply.github.com>
2 years agoFix 60597 by using genActualType (#61057)
Benjamin Hodgson [Mon, 1 Nov 2021 22:24:21 +0000 (18:24 -0400)]
Fix 60597 by using genActualType (#61057)

2 years agoDelete duplicate test projects (#61024)
Tomáš Rylek [Mon, 1 Nov 2021 22:04:39 +0000 (23:04 +0100)]
Delete duplicate test projects (#61024)

* _odbgsin / _orelsin are duplicates of the tests _dbgsin / _relsin
  in the same folder

* _speed_dbgthisnull / _speed_relthisnull are duplicates of _dbgthisnull
  and _relthisnull, respectively

* The b14368 project is a duplicate of JIT\Regression\VS-ia64-JIT\V1.2-M02\b17751\b17751.ilproj

* The jmp_opt and ldftn_opt test projects are duplicates of jmp_ret and
  ldftn_ret in the same folder

* The test and test2 projects under 575343 are duplicates of same named
  tests under JIT\Regression\CLR-x86-JIT\V2.0-RTM\b598031

* The CctorThrowStaticFieldBFI test is a duplicate of the test
  Loader\classloader\TypeInitialization\CctorsWithSideEffects\CctorThrowStaticFieldBFI.ilproj

* The tests under Variance\CoreCLR are duplicates of same-named tests
  under Loader\classloader\generics\Variance\Methods

* The nesting4 test is a duplicate of
  Loader\classloader\nesting\Tests\nesting4.ilproj

Thanks

Tomas

2 years agosupport loading versioned libmsquic (#61021)
Tomas Weinfurt [Mon, 1 Nov 2021 21:09:25 +0000 (14:09 -0700)]
support loading versioned libmsquic (#61021)

2 years agoUpdating named mutex design docs so they point to the correct location on the file...
Marcin Krystianc [Mon, 1 Nov 2021 20:18:16 +0000 (21:18 +0100)]
Updating named mutex design docs so they point to the correct location on the file system. (#60246)

These docs were moved from coreclr repository (https://github.com/dotnet/runtime/pull/43161), but they weren't updated to match the actual mutex files location (https://github.com/dotnet/runtime/blob/main/src/coreclr/pal/src/include/pal/sharedmemory.h#L17-L28).

2 years agoConsume PosixSignal in Hosting.Systemd's SystemdLifetime (#59880)
Eric Erhardt [Mon, 1 Nov 2021 17:28:23 +0000 (12:28 -0500)]
Consume PosixSignal in Hosting.Systemd's SystemdLifetime (#59880)

* Consume PosixSignal in Hosting.Systemd's SystemdLifetime

Fix #56058

* Fix TFMs to correctly include NetCoreApp

Also fixing duplicate entries in the .sln file, since it doesn't load correctly.

2 years agoFix various dump generation issues for VS4Mac (#60995)
Mike McLaughlin [Mon, 1 Nov 2021 16:11:40 +0000 (09:11 -0700)]
Fix various dump generation issues for VS4Mac (#60995)

Fix dump generation issues for VS4Mac

Fixes issue: https://github.com/dotnet/runtime/issues/60932

Fix how the load bias is calculate for shared modules

Add new generate core dump IPC command that allows the generate
crash report flag to be passed through to createdump for VS4Mac.

Issue: https://github.com/dotnet/runtime/issues/60775

VS4Mac needs to distinguish between WriteDump/no signal and unknown signal ExceptionType

Change unknown signal exception type to 0

2 years agoFix for #60340 (#60863)
Ilona Tomkowicz [Mon, 1 Nov 2021 15:03:58 +0000 (16:03 +0100)]
Fix for #60340 (#60863)

* Fix for #60340

* Fixes element access for a constant index.

* Undo changes made based on https://github.com/dotnet/runtime/pull/60873, that were not intended to be commited.

* Removed whitespaces.

* Fixed element access by local variables, added tests for element access by object member variables.

* Element access by indexing with simple object members is fixed.

* Nested element access is fixed, e.g. a[a[a[0]]].

* Added tests for nested element access. Reverted an unintentional change in EvaluateSimpleMethodCallsCheckChangedValue test.

* Change test name to enable running test batch on calling ".EvaluateExpressionsWithElementAccess" prefix.

* Fix ElementAccessByMemberVariables that was failing after previous changes.

* Removed unused namespace import. Regexes are not needed in the new approach.

* Added implementatio of evaluation for multidimentional indexing.

2 years ago[wasm][debugger] Fix debugging blazor app after ts changes. (#60873)
Thays Grazia [Mon, 1 Nov 2021 13:52:02 +0000 (10:52 -0300)]
[wasm][debugger] Fix debugging blazor app after ts changes. (#60873)

* remove runtimeHelpers.loaded_files and repace it with MONO.loaded_files
* disable too aggressive Terser minification
* keep some function names un-mangled for stack walk in debugger implementation

Co-authored-by: Thays <thaystg@gmail.com>
Co-authored-by: pavelsavara <pavel.savara@gmail.com>
2 years agoJIT: Disable implicit tailcalls for throwhelpers (#61006)
Egor Bogatov [Mon, 1 Nov 2021 08:34:55 +0000 (11:34 +0300)]
JIT: Disable implicit tailcalls for throwhelpers (#61006)

2 years agoAdd a fallback RuntimeProductVersion in runtime_version.h (#60994)
Jeremy Koritzinsky [Sat, 30 Oct 2021 18:22:30 +0000 (11:22 -0700)]
Add a fallback RuntimeProductVersion in runtime_version.h (#60994)

This fixes failures encountered when building CoreCLR using the fallback files.

2 years agoUse LastIndexOf in MSBuild for a single char (#60450)
Kirill Osenkov [Sat, 30 Oct 2021 14:50:35 +0000 (07:50 -0700)]
Use LastIndexOf in MSBuild for a single char (#60450)

2 years agoFix to run all the tests for the scheduled builds, as intended (#61029)
Ankit Jain [Sat, 30 Oct 2021 08:09:57 +0000 (08:09 +0000)]
Fix to run all the tests for the scheduled builds, as intended (#61029)

2 years agoDeduplicate class names in the type generator tests (#60990)
Tomáš Rylek [Fri, 29 Oct 2021 22:34:07 +0000 (00:34 +0200)]
Deduplicate class names in the type generator tests (#60990)

As a prerequisite to switching these tests over to the new model,
we need to get rid of class name duplications. All these tests were
originally generated with the same class name "Framework", I propose
modifying them to use the test name as the class name instead.

Thanks

Tomas

2 years agoLog more info when perf counter category is missing (#60955)
Dan Moseley [Fri, 29 Oct 2021 20:25:05 +0000 (14:25 -0600)]
Log more info when perf counter category is missing (#60955)

* Better perf ctr detail

* ypot

* Update src/libraries/System.Diagnostics.PerformanceCounter/src/System/Diagnostics/PerformanceCounterLib.cs

2 years ago[mono][s390x] Fix OP_MOVE_F_TO_I4 codegen bug (#61009)
Ulrich Weigand [Fri, 29 Oct 2021 18:37:30 +0000 (20:37 +0200)]
[mono][s390x] Fix OP_MOVE_F_TO_I4 codegen bug (#61009)

* Remove incorrect conversion in the cfg->r4fp case

* Fixes System.Threading.Tests.InterlockedTests.InterlockedExchange_Float

2 years agoAlter amount of tests that run per PR for mono mobile configurations (#60727)
Steve Pfister [Fri, 29 Oct 2021 18:33:42 +0000 (11:33 -0700)]
Alter amount of tests that run per PR for mono mobile configurations (#60727)

In an effort to better utilize CI resources, this change will only run the System.Runtime library test per PR for Android and Wasm configurations. The full libraries and runtime tests will move to only run on the post-PR validation pipeline.

The summary of changes are:

- System.Runtime tests will only trigger per PR for Android x86/x64 and Wasm AOT / EAT
- All mono runtime builds will only run on the post PR validation build (rolling build)
- WasmBuildTests will only run on the post PR validation build (rolling build)
- Wasm on Windows will only build

Note: iOS/tvOS/MacCatalyst are excluded until #59503 lands

2 years ago[main] Update dependencies from dnceng/internal/dotnet-optimization dotnet/arcade...
dotnet-maestro[bot] [Fri, 29 Oct 2021 17:10:02 +0000 (19:10 +0200)]
[main] Update dependencies from dnceng/internal/dotnet-optimization dotnet/arcade dotnet/roslyn-analyzers (#61004)

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20211028.1

optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.21527.1 -> To Version 1.0.0-prerelease.21528.1

* Update dependencies from https://github.com/dotnet/arcade build 20211028.3

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
 From Version 7.0.0-beta.21527.5 -> To Version 7.0.0-beta.21528.3

* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20211028.1

Microsoft.CodeAnalysis.NetAnalyzers
 From Version 7.0.0-preview1.21527.1 -> To Version 7.0.0-preview1.21528.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2 years agoUse Ubuntu 18.04 1ES pools and dotnet-buildtools-prereq docker images for enterprise...
Alexander Köplinger [Fri, 29 Oct 2021 17:09:32 +0000 (19:09 +0200)]
Use Ubuntu 18.04 1ES pools and dotnet-buildtools-prereq docker images for enterprise linux pipeline (#61001)

Ubuntu 16.04 is no longer available on Azure Pipelines, move to 18.04 on 1ES pool and the Docker images from dotnet-buildtools-prereq.

Also add a workaround for https://github.com/dotnet/runtime/issues/34649 which we hit during the build.

2 years agoUpdate dependencies from https://github.com/dotnet/linker build 20211028.2 (#61005)
dotnet-maestro[bot] [Fri, 29 Oct 2021 14:48:22 +0000 (16:48 +0200)]
Update dependencies from https://github.com/dotnet/linker build 20211028.2 (#61005)

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.21525.2 -> To Version 7.0.100-1.21528.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2 years ago[wasm] preparation for module encapsulation (#60928)
Pavel Savara [Fri, 29 Oct 2021 13:10:53 +0000 (15:10 +0200)]
[wasm] preparation for module encapsulation (#60928)

- simplified fetch and script loading logic/polyfil
- clarified runtime-test.js based on Daniel's draft.
- extracted mono_wasm_invoke_js and mono_wasm_compile_function out of C macro into proper .ts function
- wrapped access to API via globalThis with warning on first use
- added cwraps.mono_wasm_add_assembly and cwraps.mono_wasm_load_runtime which Blazor uses
- fixed closures for generated functions, so that they don't use global Module reference
- mono_wasm_invoke_js now uses new Function instead of eval()
- removed deprecated Blazor functions
- fixed lint issues
Co-authored-by: Daniel Genkin <genkind@gmail.com>
2 years agoJIT: "Scaled" addressing mode on ARM (#60808)
Egor Bogatov [Fri, 29 Oct 2021 11:47:52 +0000 (14:47 +0300)]
JIT: "Scaled" addressing mode on ARM (#60808)

2 years agoDisable DllImportGenerator tests on s390x (#60833)
Ulrich Weigand [Fri, 29 Oct 2021 10:41:48 +0000 (12:41 +0200)]
Disable DllImportGenerator tests on s390x (#60833)

* Runtime tests fail since App.Host package is not available

* Unit tests fail since NuGet.Packaging 5.6.0 signature verification
  does not work on big-endian systems (needs >= 5.11.0)

2 years ago[main] Update dependencies from dotnet/linker (#60619)
dotnet-maestro[bot] [Fri, 29 Oct 2021 09:23:44 +0000 (11:23 +0200)]
[main] Update dependencies from dotnet/linker (#60619)

* Update dependencies from https://github.com/dotnet/linker build 20211018.3

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.21513.1 -> To Version 7.0.100-1.21518.3

* Update dependencies from https://github.com/dotnet/linker build 20211019.3

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.21513.1 -> To Version 7.0.100-1.21519.3

* Update dependencies from https://github.com/dotnet/linker build 20211020.2

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.21513.1 -> To Version 7.0.100-1.21520.2

* Update dependencies from https://github.com/dotnet/linker build 20211025.2

Microsoft.NET.ILLink.Tasks
 From Version 7.0.100-1.21513.1 -> To Version 7.0.100-1.21525.2

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2 years agoSupport ARM64/ARM environment variables for #53122. (#60916)
Mikhail Pilin [Fri, 29 Oct 2021 03:18:14 +0000 (05:18 +0200)]
Support ARM64/ARM environment variables for #53122. (#60916)

2 years agoJIT: Improve VN for (EQ/NE (RELOP ...), 0/1) (#60943)
Andy Ayers [Fri, 29 Oct 2021 02:25:27 +0000 (19:25 -0700)]
JIT: Improve VN for (EQ/NE (RELOP ...), 0/1) (#60943)

Try and re-express these VNs in terms of the RELOP or its complement.

2 years agoMark containing type for generated stub functions as unsafe (#60979)
Elinor Fung [Fri, 29 Oct 2021 01:22:32 +0000 (18:22 -0700)]
Mark containing type for generated stub functions as unsafe (#60979)

2 years ago[mono][workload] Work around a msbuild bug in MatchOnMetadata (#60989)
Larry Ewing [Fri, 29 Oct 2021 00:30:29 +0000 (19:30 -0500)]
[mono][workload] Work around a msbuild bug in MatchOnMetadata (#60989)

* Work around a msbuild bug in MatchOnMetadata

* Reenable workload build tests and bump to a 7.0.100 sdk version

2 years agoBuild the native prereqs in the build-jit-job.yml (#60981)
Jeremy Koritzinsky [Thu, 28 Oct 2021 23:13:39 +0000 (16:13 -0700)]
Build the native prereqs in the build-jit-job.yml (#60981)

2 years agoFix Equals overload logic for some methods of an array created using MLC (#60894)
Buyaa Namnan [Thu, 28 Oct 2021 22:36:06 +0000 (15:36 -0700)]
Fix Equals overload logic for some methods of an array created using MLC (#60894)

2 years agoAccount for versioned VS in up-to-date check (#60970)
Adeel Mujahid [Thu, 28 Oct 2021 22:23:58 +0000 (01:23 +0300)]
Account for versioned VS in up-to-date check (#60970)

Co-authored-by: Juan Hoyos <juan.s.hoyos@outlook.com>
2 years agoAdd historical note on optimizing aspects of Value Numbering (#60985)
Andy Ayers [Thu, 28 Oct 2021 21:59:37 +0000 (14:59 -0700)]
Add historical note on optimizing aspects of Value Numbering (#60985)

2 years agoFix more alloc-dealloc mismatches (#60691)
Jeremy Koritzinsky [Thu, 28 Oct 2021 20:55:06 +0000 (13:55 -0700)]
Fix more alloc-dealloc mismatches (#60691)

2 years agoScript to collect asp.net benchmark method contexts for SPMI (#60953)
Andy Ayers [Thu, 28 Oct 2021 20:02:36 +0000 (13:02 -0700)]
Script to collect asp.net benchmark method contexts for SPMI (#60953)

2 years agoMake noise if trying to use the cache after it's been disposed. (#57557)
Steve Molloy [Thu, 28 Oct 2021 19:41:26 +0000 (12:41 -0700)]
Make noise if trying to use the cache after it's been disposed. (#57557)

2 years agoFix a thread local test (#60892)
Koundinya Veluri [Thu, 28 Oct 2021 18:35:58 +0000 (11:35 -0700)]
Fix a thread local test (#60892)

- Updated conditional fact to require precise GC for the test
- Fixes https://github.com/dotnet/runtime/issues/57102

2 years agoRemove some redundant threading tests, move some cases to libraries tests (#59073)
Koundinya Veluri [Thu, 28 Oct 2021 18:33:56 +0000 (11:33 -0700)]
Remove some redundant threading tests, move some cases to libraries tests (#59073)

* Remove some redundant threading tests, move some cases to libraries tests

- Went through some of the tests. Most of them appeared to be redundant. Added a few missing tests and ported a few tests from CoreRT.
- Closes https://github.com/dotnet/runtime/issues/6372, the test is being removed

2 years agoMitigate NU1103 Error showing up during Maui Builds (#60946)
Parker Bibus [Thu, 28 Oct 2021 18:09:15 +0000 (13:09 -0500)]
Mitigate NU1103 Error showing up during Maui Builds (#60946)

* Test allowing 'unstable' packages since maui is not finding stable packages for some of the extension packages.

2 years agoExplicitly emit a diagnostic for ref returns in GeneratedDllImport stubs. (#60720)
Jeremy Koritzinsky [Thu, 28 Oct 2021 17:51:55 +0000 (10:51 -0700)]
Explicitly emit a diagnostic for ref returns in GeneratedDllImport stubs. (#60720)

2 years ago[main] Update dependencies from dnceng/internal/dotnet-optimization dotnet/xharness...
dotnet-maestro[bot] [Thu, 28 Oct 2021 17:34:55 +0000 (12:34 -0500)]
[main] Update dependencies from dnceng/internal/dotnet-optimization dotnet/xharness dotnet/arcade dotnet/emsdk dotnet/roslyn-analyzers dotnet/msquic (#60954)

* Update dependencies from https://github.com/dotnet/emsdk build 20211027.1

Microsoft.NET.Workload.Emscripten.Manifest-7.0.100
 From Version 7.0.0-alpha.1.21520.2 -> To Version 7.0.0-alpha.1.21527.1

* Update dependencies from https://dev.azure.com/dnceng/internal/_git/dotnet-optimization build 20211027.1

optimization.linux-x64.MIBC.Runtime , optimization.windows_nt-x64.MIBC.Runtime , optimization.windows_nt-x86.MIBC.Runtime , optimization.PGO.CoreCLR
 From Version 1.0.0-prerelease.21525.1 -> To Version 1.0.0-prerelease.21527.1

* Update dependencies from https://github.com/dotnet/xharness build 20211027.2

Microsoft.DotNet.XHarness.CLI , Microsoft.DotNet.XHarness.TestRunners.Xunit
 From Version 1.0.0-prerelease.21527.1 -> To Version 1.0.0-prerelease.21527.2

* Update dependencies from https://github.com/dotnet/arcade build 20211027.5

Microsoft.DotNet.XUnitExtensions , Microsoft.DotNet.VersionTools.Tasks , Microsoft.DotNet.Build.Tasks.Workloads , Microsoft.DotNet.Build.Tasks.Templating , Microsoft.DotNet.Build.Tasks.TargetFramework.Sdk , Microsoft.DotNet.Build.Tasks.Packaging , Microsoft.DotNet.Build.Tasks.Installers , Microsoft.DotNet.Build.Tasks.Feed , Microsoft.DotNet.Build.Tasks.Archives , Microsoft.DotNet.Arcade.Sdk , Microsoft.DotNet.ApiCompat , Microsoft.DotNet.CodeAnalysis , Microsoft.DotNet.XUnitConsoleRunner , Microsoft.DotNet.GenFacades , Microsoft.DotNet.GenAPI , Microsoft.DotNet.RemoteExecutor , Microsoft.DotNet.PackageTesting , Microsoft.DotNet.Helix.Sdk , Microsoft.DotNet.SharedFramework.Sdk
 From Version 7.0.0-beta.21527.1 -> To Version 7.0.0-beta.21527.5

* Update dependencies from https://github.com/dotnet/roslyn-analyzers build 20211027.1

Microsoft.CodeAnalysis.NetAnalyzers
 From Version 7.0.0-preview1.21526.1 -> To Version 7.0.0-preview1.21527.1

* Update dependencies from https://github.com/dotnet/msquic build 20211027.1

System.Net.MsQuic.Transport
 From Version 6.0.0-preview.7.21526.1 -> To Version 6.0.0-preview.7.21527.1

Co-authored-by: dotnet-maestro[bot] <dotnet-maestro[bot]@users.noreply.github.com>
2 years agoFix MD array helper intrinsics for complex `this` pointers (#60958)
Bruce Forstall [Thu, 28 Oct 2021 17:14:51 +0000 (10:14 -0700)]
Fix MD array helper intrinsics for complex `this` pointers (#60958)

The implementation of the MD array helpers didn't consider the possibility
of the array object being something complex, like a function call return value.

Also, add a test case covering many cases of invoking the MD array helpers.

Fixes #60957

2 years agoMake CryptQueryObject call compliant to interop guidelines
Badre BSAILA [Thu, 28 Oct 2021 16:25:04 +0000 (18:25 +0200)]
Make CryptQueryObject call compliant to interop guidelines

2 years agoUpdate JsonNode doc (#60925)
Steve Harter [Thu, 28 Oct 2021 16:23:59 +0000 (11:23 -0500)]
Update JsonNode doc (#60925)

2 years agoExtract various changes from the invoke and custom marshaler PRs (#60877)
Katelyn Gadd [Thu, 28 Oct 2021 10:32:31 +0000 (03:32 -0700)]
Extract various changes from the invoke and custom marshaler PRs (#60877)

Various code cleanup and refactorings for the wasm bindings

2 years agoMake memory mapped stress log work for child processes. (#60828)
Peter Sollich [Thu, 28 Oct 2021 08:04:49 +0000 (10:04 +0200)]
Make memory mapped stress log work for child processes. (#60828)

Make memory mapped stress log work for child processes.

There are two kinds of changes:
- in case the stresslog file cannot be created, fall back to the in-memory implementation
- support "{pid}" embedded in the file name - this will be replaced by the PID of the current process.

This enables two modes of operation regarding child processes:

- if the stresslog filename given does not contain "{pid}", the parent process will create the file, but the child process will use the in-memory stresslog. useful when we are not interested in the child process.
- if the stresslog filename given does contain "{pid}", both parent and child will get their own stresslog file. useful when we are in fact interested in both.

2 years agoFix build-native.cmd for direct use (#60926)
SingleAccretion [Thu, 28 Oct 2021 03:46:21 +0000 (06:46 +0300)]
Fix build-native.cmd for direct use (#60926)

The parsing loop shifts away the parameters, making use of %~dp0 after
it incorrect. Fix that by caching the relevant information.

2 years agoFix some typos in corhdr.h (#60895)
Anthony Shaw [Thu, 28 Oct 2021 02:29:43 +0000 (13:29 +1100)]
Fix some typos in corhdr.h (#60895)

* Fix some typos in corhdr.h

* Remove "well known" namespace/attributes that aren't used in the CoreCLR libraries

2 years ago[mono][workloads] Workload 7.0.100 (#60893)
Larry Ewing [Thu, 28 Oct 2021 01:38:44 +0000 (20:38 -0500)]
[mono][workloads] Workload 7.0.100 (#60893)

* Update some version bits

* Substitute NetCoreAppCurrent value don't expand it

* Update the emsdk version to 7.0.x

* Disable Wasm.Build.Tests temporarily

2 years agoIFormatProvider getter refactor (#60815)
Sergei Papikian [Thu, 28 Oct 2021 01:03:50 +0000 (04:03 +0300)]
IFormatProvider getter refactor (#60815)

* refactor: IFormatProvider getter

* refactor: inline

2 years agoalways populate TargetHostName on SslStream (#60589)
Tomas Weinfurt [Thu, 28 Oct 2021 00:55:49 +0000 (17:55 -0700)]
always populate TargetHostName on SslStream (#60589)

* always populte TargetHostName on SslStream

* update check for server

2 years ago[DllImportGenerator] Don't flag methods that already have GeneratedDllImport (#60929)
Elinor Fung [Thu, 28 Oct 2021 00:42:04 +0000 (17:42 -0700)]
[DllImportGenerator] Don't flag methods that already have GeneratedDllImport (#60929)

2 years agoJIT: refactor jump threading to prepare for allowing side effects (#60884)
Andy Ayers [Thu, 28 Oct 2021 00:41:45 +0000 (17:41 -0700)]
JIT: refactor jump threading to prepare for allowing side effects (#60884)

Update jump threading so that whenever possible it re-uses the original
block, rather than bypassing it. This lays the groundwork for a subsequent
change that will allow jump threading when the block with the threadable
jump has side effects.

Also handle the case where we have both a fall through pred and an ambiguous
pred, by treating the fall through pred as ambiguous.

2 years agoMake PreferredAttributeOrder test ConditionalTheory (#60940)
Elinor Fung [Thu, 28 Oct 2021 00:39:23 +0000 (17:39 -0700)]
Make PreferredAttributeOrder test ConditionalTheory (#60940)

2 years agoClean-up crossgen's NuGet dependencies et. al. (#59914)
Theodore Tsirpanis [Wed, 27 Oct 2021 23:36:55 +0000 (02:36 +0300)]
Clean-up crossgen's NuGet dependencies et. al. (#59914)

* Remove two redundant package dependencies and update another one.
They were dragging along lots of packages, cluttering the dependency graph.

* Optimize crossgen's Program.IsValidPublicKey to use spans.

* Bring BinaryReader back in IsValidPublicKey.

And expedite a condition check that does not involve BinaryReader.

2 years agoFix issue where sometimes we would find the same module twice and cause the dotnet...
David Wrighton [Wed, 27 Oct 2021 23:25:20 +0000 (16:25 -0700)]
Fix issue where sometimes we would find the same module twice and cause the dotnet-pgo tool to fail (#60874)

2 years agoAdd 2009 Jit Architecture Plan (excerpts) (#60939)
Andy Ayers [Wed, 27 Oct 2021 22:20:22 +0000 (15:20 -0700)]
Add 2009 Jit Architecture Plan (excerpts) (#60939)

We plan to gradually open up portions of historical documents that seem
relevant to our current work on the JIT.

This PR includes a writeup that is the inspiration for the current SSA
and Value Numbering designs.

2 years agoDateTimeMaskTest depends on the region configuration of the machine (#60840)
Badre BSAILA [Wed, 27 Oct 2021 21:50:53 +0000 (23:50 +0200)]
DateTimeMaskTest depends on the region configuration of the machine (#60840)

2 years agoUpdate Codespaces configuration (#60900)
Eric Erhardt [Wed, 27 Oct 2021 19:45:08 +0000 (14:45 -0500)]
Update Codespaces configuration (#60900)

- mark onCreateCommand.sh as executable
- add more regions so users outside of West US can take advantage of prebuilt codespaces
- use v1-stable version, as recommended by docs
- use faster machines for dev productivity

2 years agoAdd analyzer assemblies to code coverage (#60859)
Viktor Hofer [Wed, 27 Oct 2021 18:03:14 +0000 (20:03 +0200)]
Add analyzer assemblies to code coverage (#60859)

* Add analyzer assemblies to code coverage

Instrument analyzer assemblies as well when measuring code coverage.
Filter out the ones which aren't referenced via the P2P protocol.

* Update coverage.targets

2 years agoDetect more XHarness exit codes, lower installation timeout (#60908)
Přemek Vysoký [Wed, 27 Oct 2021 17:46:25 +0000 (19:46 +0200)]
Detect more XHarness exit codes, lower installation timeout (#60908)

2 years agoMove optdata and version file generation up to MSBuild from build-runtime (#58674)
Jeremy Koritzinsky [Wed, 27 Oct 2021 17:03:34 +0000 (10:03 -0700)]
Move optdata and version file generation up to MSBuild from build-runtime (#58674)

* Move optdata and version file generation from the native build scripts up into the managed scripts. The native build scripts will now by default copy a fallback version file in place if the version files do not exist and will disable PGO if no pgo file path is passed in to the build-runtime scripts.

This removes all cases of build-runtime calling into MSBuild.

* Update CI to use the new prereqs model.

* Remove some old MSBuild arg pass-through that's no longer needed as build-runtime no longer calls into any MSBuild processes.

* Apply suggestions from code review

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Move some targets around based on feedback.

* Output version files in the artifacts/obj dir so they can be easily shared.

* Move native pgo into a targets file instead of being a separate project to be more static-graph friendly.

* Fix subsets.

* Share version file path by default

* Fix VER_FILEDESCRIPTION_STR

* Fix version fallback copies.

* Fix include path for the version headers.

* Update src/coreclr/dlls/mscordac/CMakeLists.txt

Co-authored-by: Juan Hoyos <19413848+hoyosjs@users.noreply.github.com>
* Enable easily sharing the fallback version files between all components of the repo.

* Remove some now-unused command-line options from our build scripts.

* Bump importance output to pass the pgo path between steps.

* Add eval statement to run copy_version_files script

* Rename some files and and standardize on a _version.c file name for Linux.

* Remove temp proj ref.

* Fix permissions

* Reference targets to produce version file in libraries native build.

* Fix CoreCLR build breaks

* Generate the version files for Mono

* include configurepaths.cmake on the Windows CoreFX build.

* Restore mono.proj when building it through monoaotcross.proj.

* Update copy script to work on macos.

* Make sure mono pulls in the shared version files.

* Add artifcats/obj dir as include dir for CoreCLR diagonstic components included in Mono

* Add artifacts/obj include for the whole mono build.

* Update CMakeLists.txt

* Fix NativeVersion.rc path on Windows.

* Fix linux version parsing to point at the right file.

* Fix mono version parsing (apparently the quotes make a difference here)

* Update src/coreclr/build-runtime.sh

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
* Update eng/native/version/copy_version_files.sh

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
* Update copy_version_files.sh to insert the current commit hash into _version.c.

* Apply suggestions from code review

Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>
* Update the _version.c writing script to only update the placeholder version file if it actually is a placeholder (not a real generated file).

* Generate the version files for wasm/browser as well.

* Fix Mono WASM cross build.

* Update eng/nativepgo.targets

Co-authored-by: Juan Hoyos <19413848+hoyosjs@users.noreply.github.com>
* Fix comparison for NativeOptimizationDataSupported.

Co-authored-by: Viktor Hofer <viktor.hofer@microsoft.com>
Co-authored-by: Jan Kotas <jkotas@microsoft.com>
Co-authored-by: Juan Hoyos <19413848+hoyosjs@users.noreply.github.com>
Co-authored-by: Adeel Mujahid <3840695+am11@users.noreply.github.com>