Commit Graph
102 Commits
Author SHA1 Message Date
Rikki Gibson a479e15469 Use more reliable toolexe path 2021-10-14 12:06:39 -07:00
Aleksey Kliger (λgeek) b0dce44152 Add script to run local Roslyn build on non-Windows (#60304)
tested on macOS. Shoudl work on Linux, too.

Build roslyn with
```
./build.sh --restore --build -c Release
```
then build the runtime with
```
./build.sh clr.native+mono+libs -c Release
```
(or your preferred subsets)
2021-10-12 14:26:57 -04:00
David Wrighton 1da165a45e Use local version of Roslyn to build (#60302) 2021-10-12 10:14:15 -07:00
Alexander Köplinger cab3a63fe3 Use live-built corehost on s390x for creating testhost (#58952)
This allows consuming the dotnet host that was just built instead of relying on a downloaded one.
We need to move the `host` subset build before the `libs` subset so that the artifacts are available before externals.csproj runs.
2021-10-05 17:58:40 +02:00
Aleksey Kliger (λgeek)andAnkit Jain acb00500a0 Build one MonoTargetsTasks assembly for Microsoft.NET.Runtime.MonoTargets.Sdk pack (#59720)
* Build one MonoTargetsTasks assembly for Mono.NET.Runtime.MonoTargets.Sdk pack

   Instead of 3 assemblies for some tiny tasks.

   Building a single assembly also ensures that everything in the pack depends on and bundles identical versions of dependent assemblies.  For example on net472, a single version of System.Text.Json with a single fixed version shared by both the JsonToItemsTaskFactory task factory and the RuntimeConfigParser task.

   Related to https://github.com/dotnet/runtime/issues/59619

* Update testing and wasm to use MonoTargetsTasks.dll

* Move assembly stripper to a separate assembly

   Build it with nullability checking disabled.

   Build the main MonoTargetsTasks assembly with nullability enabled

* Don't include msbuild assemblies in MonoTargets package

* re-enable analyzers for the MonoTargetsTasks assembly

* Include *.dll in the MonoTargetsTasks nupkg

   In particular, pick up all the dependent assemblies for the net472 build

* Update various READMEs

* remove unneeded target

* Switch ILStrip to use the same Parallel.ForEach logic as MonoAOTCompiler

* Remove unneeded NoWarn warnings

* rearrange package references in MonoTargetsTask.csproj for readabilty

* More ItemGroup reformatting

* fix nits

* Use SystemThreadingTasksExtensionsVersion instead of hardcoding

Co-authored-by: Ankit Jain <[email protected]>
2021-09-30 11:13:26 -04:00
Ankit Jain b7b8ef8b33 [main] WasmAppBuilder: Use $(CopyLocalLockFileAssemblies) instead of … (#59181) 2021-09-15 21:20:58 -04:00
Viktor Hofer 67354a2fb4 Upgrade to net7.0 and remove target frameworks (#58011)
* Remove EOL tfms and upgrade to net7.0

* Make linker tests net7 aware

Make installer tests run on net7.0

Don't attempt to use live apphost

Fix payloads

Regenerate test files

Fix package testing
2021-09-08 22:04:23 +02:00
cad4c6b1de Run minimal set of iOS / tvOS device tests (#58444)
With each test suite app taking up ~100MB in space, it's not practical to build the tests on the build machine. Only enable a few now as an interim step.

Co-authored-by: Steve Pfister <[email protected]>
Co-authored-by: Alexander Köplinger <[email protected]>
2021-09-04 00:01:58 +02:00
Ulrich Weigand 600bb2d213 Set default TargetArchicture when building on s390x host (#56425)
* Add missing line in CalculateArch property group
2021-08-30 15:20:44 +02:00
Stephen Toub 9ec6a203a4 Update pinned compiler version (#57585)
* Update pinned compiler version

The version that flows in automatically appears to still be old.  We need to fix that, but in the meantime, we're a month out of date on the compiler.

* Suppress CS8969 warnings

* Change several dynamic tests to use typeof(object[])
2021-08-18 20:08:06 -04:00
Anirudh Agnihotry 67fa886821 update branding to 7.0 (#57095) 2021-08-17 14:39:52 -07:00
Viktor Hofer 85441ce69b Make sure rid specific libs projs get packaged (#57193)
* Make sure rid specific libs projs get packaged

RID specific runtime.*.runtime.native.System.IO.Ports projects weren't
packaged because the GeneratePackageOnBuild property wasn't set to true
for them. The property was only true during an allconfigurations build.
As these projects are only built outside of an allconfigurations build,
the GeneratePackageOnBuild property needs to account for such as well.

Also updating the NoTargets Sdk to clean the rid specific package up.

Moving the GeneratePackageOnBuild logic into a props file and set it to
false during servicing (or runtimelab) so that devs can set the property
during servicing directly in the project file if a project should be
packaged.

* Remove the GeneratePackage property

That property was intended to enabled incremental servicing but with
now using the NuGet Pack task we can just make use of the publicl
available GeneratePackageOnBuild property.

* Fix IsPackable setting
2021-08-11 12:50:46 +02:00
Viktor Hofer 503ae5145a Replace all remaining pkgprojs with NuGet Pack task (#56712)
* Runtime specific and doc file packaging fixes

* Replace all remaining pkgprojs with NuGet Pack task

* Avoid NuGet/Home/issues/10368

* Update PackageValidation package to latest
2021-08-05 11:03:23 +02:00
Santiago Fernandez Madero 43db0fe1d4 Set DisableImplicitNamespaceImports_Dotnet=true to workaround sdk issue (#56744)
* Set `DisableImplicitNamespaceImports_Dotnet=true` to workaround sdk issue

* Disable just the imports declaration rather than the functionality
2021-08-02 17:42:37 -07:00
Adeel Mujahid 26572970a7 Fix crossgen2 build on Tizen (#55789) 2021-07-30 22:17:43 +02:00
Santiago Fernandez Madero 7545f986f9 Globally disable implicit namespaces (#56348) 2021-07-26 23:22:08 -07:00
Jo Shields e60882e137 Build VS installers for WebAssembly and Mobile workloads (#55769)
In order to support generating installers, this change adds the mono.workloads subset and the associated yml.
2021-07-21 21:37:24 -04:00
Ankit JainandLarry Ewing d953229d54 [wasm] Run Wasm.Build.Tests against workloads (#54451)
Co-authored-by: Larry Ewing <[email protected]>
2021-07-14 10:47:03 -04:00
Viktor HoferandAdeel Mujahid 566b53a66b Revive #48505 (#54914)
* Revive #48505

Revive https://github.com/dotnet/runtime/pull/48505 and try to find out why the change caused official builds to break.

* Use OutputRid when creating .nupkgs, instead of PackageRID

Co-authored-by: Adeel Mujahid <[email protected]>
2021-07-06 11:39:44 +02:00
Eric StJohn f399076cb9 Remove some redundant / unused binplace directories (#54890)
* Remove some redundant / unused binplace directories

* Fix runtime pack path

* Use OuputRid instead of PackageRID

On linux-musl, OutputRID differs from PackageRID.

* Add RuntimeOS to installer leg for musl

So that we have consistent values of $(PackageRID) for installer and libraries

* Move LibrariesConfiguration definition earlier in src/tests

This property was being defined after a number of places where it was
consumed resulting in quite a few inconsistent derived properties.
2021-06-29 22:55:22 -07:00
Viktor Hofer b056b7b6a1 Add NetCoreAppCurrent configuration to libs (Phase 1) (#54544)
* Use property to indicate NetCoreApp min version

* Add NetCoreAppCurrent to S.Numerics.Tensors

* Add NetCoreAppCurrent to S.T.AccessControl

* Add NetCoreAppCurrent to System.Memory.Data

* Add NetCoreAppCurrent to S.Composition.* projects

* Add NetCoreAppCurrent to System.IO.Packaging

* Add NetCoreAppCurrent config to System.IO.Ports

Adding a NetCoreAppCurrent configuration to System.IO.Ports and
reducing package size, build times and platform specific assets by
using runtime checks on Unix derivates for the slightly diverging
SerialPort implementation.

Contributes to https://github.com/dotnet/runtime/issues/54012

* Add NetCoreAppCurrent to System.Data.OleDb

* Add NetCoreAppCurrent to M.W32.Registry.AccessControl

* Add NetCoreAppCurrent to S.Reflection.Context

* Add NetCoreAppCurrent to S.C.Composition.Registration

* Add NetCoreAppCurrent to S.Resources.Extensions

* Add NetCoreAppCurrent to S.N.H.WinHttpHandler
2021-06-29 22:15:47 +02:00
849033aea0 ArPow stage 1: local source-build infrastructure (#53294)
* Initial arcade-powered source-build infra

* Add patches, fixup from 5.0

* Rename patches to match 6.0-p1 work

* Add source-build specific build script

* Incorporate build-source-build.sh, into eng/

* Run inner build script, through coreclr

* Initial source-build args based on live build (not props file)

* Cleanup: add RID comments, rm empty/absolute args

* Fix subsets

* Disable sourcelink in env, not args

* Fix CI NZEC

* Revert "Use same code to DetectCiphersuiteConfiguration for portable and non-portable builds"

This reverts commit 464010d9d0.

* Fix portability

* Fix AllJits build

* Fix missing crossgen2 for non-portable RID

* Create supplemental intermediate nupkgs

* Tweak category names

* Use centralized supplemental nupkg infra

* Add additional 6.0 patches

* Patch updates after merging in main

* SourceBuild.props cleanup

* Fix issue with incorrect patch merge

* Patch updates

* Edit clr.tools patch

* patch updates

* Revert patch integration

* Patch updates

* Edits per code review feedback

* ILAsm workaround

* patch updates

* Move logic to set ILAsmToolPath for source-build

* Update eng/SourceBuild.props

Co-authored-by: Viktor Hofer <[email protected]>

* Remove libraries specific patches

* Patch updates necessary with latest main merge

* Add back libraries-packages.proj harvesting patch

* Refactor intermediate package split to be chunkier

* Integrate patch 0017

* Subsets update per code review

* Remove obsolete patch

* Removed patches that were integrated into main

* Remove two additional patches

* Remove remaining patches

Co-authored-by: Davis Goodin <[email protected]>
Co-authored-by: dseefeld <[email protected]>
Co-authored-by: Viktor Hofer <[email protected]>
2021-06-22 10:14:07 +02:00
Aleksey Kliger (λgeek) 30f4269767 Allow mono samples to build and run again (#54089) 2021-06-21 09:13:44 +02:00
8698d0f345 Update dotnet SDK to 6.0 Preview 4 (#53808)
* Update dotnet SDK to 6.0 Preview 4

Update the minimum and target version of the SDK to 6.0 Preview 4.

Part of https://github.com/dotnet/runtime/issues/53411

* Switch to using eng/targetingpacks.targets for redirecting runtime pack location in src/mono/sample

* Fix binder tracing tests

* Set UseMonoRuntime property so the dotnet SDK can pull the mono runtime packs

This is necessary after the changes from https://github.com/dotnet/sdk/pull/16909.

* Move UseMonoRuntimeProperty and set it to false in coreclr

Co-authored-by: Alexander Köplinger <[email protected]>
Co-authored-by: Elinor Fung <[email protected]>
2021-06-11 18:55:09 +02:00
Viktor Hofer 293d472861 Generate targets files that throws for unsupported netstandard applicable tfms (#53244)
* Generate targets files that throw for unsupported NS tfm

For S.D.Common, S.Speech and S.Sec.Crypto.Pkcs we manually added a
targets file to mark the .NETStandard asset as not applicable.
This was done to allow defining a minimum supported .NETCoreApp
version, even though a compatible .NETStandard asset is available.
This commit automatically generates that targets file based on
items.
2021-05-26 12:09:00 +02:00
Viktor Hofer ef6096dd9e Disable workload resolver until we support it (#53226)
Unblock Preview 4 SDK usage in the repo.
2021-05-26 08:19:30 +02:00
Viktor Hofer 0d27b099bd React to MSBuild Traversal and NoTargets SDK updates (#52895)
* Remove custom rebuild entry point in Build.proj

The rebuild target was added into the Traversal SDK here: https://github.com/microsoft/MSBuildSdks/commit/fd7660d62b139f282926d98212b7aeb3e6460daa#diff-ad560c0828c6bab536a01e43bb052bfce14a959b8df2c3f89cccfca0b399681c

* Update global.json

* Update global.json

* Update native-binplace.proj

* Update externals.csproj

* Update native-binplace.proj

* Update native-binplace.proj

* Default tfm for NoTargets projects

* Don't run GenFacades on ApiCompat.proj

* ApiCompat fix and packaging cleanup

* Fixes

* Only set if not multi-targeting
2021-05-20 08:28:04 +02:00
Viktor Hofer 68c5658b93 Stop reading TargetFramework prop in props files (#52897)
* Stop reading TargetFramework prop in props files

The TargetFramework property isn't expected to be set in props files
before a project's body is evaluated.

Don't let BuildTargetFramework property fallback to TargetFramework as
BTF's sole intent is to convey the TargetFramework to filter to and not
the current selected TargetFramework. Reduce usage of BTF so that it is
only used in places where code is actually conditioned on filtering.

In addition to that, specify BuildTargetFramework as a global property for
all traversal builds so when invoking one of the traversal projects directly
(src.proj, ref.proj, etc.), BuildTargetFramework doesn't need to specified
manually to get the default behavior (filter on compatible to net6.0).
Remove the inferred BuildingNetCoreAppVertical because of that and
inline its meaning.

Make sendtohelix a normal NoTargets proj so that it has access to the
properties which were moved into the Directory.Build.targets file as
otherwise it wouldn't import that file.
2021-05-19 20:04:01 +02:00
David Wrighton c538a9b39c Move copy of Crossgen2 tasks/targets to runtime repo and build composite image for runtime repo in parallel path (#52579)
* Move all crossgen2 tasks/targets used in Runtime repo to be local to the repo

* Move ResolveReadyToRunCompilers task into the Crossgen2Tasks dll

* Create composite bundle and package
- Note that it doesn't build properly, but hopefully that's a crossgen2 task bug

* Composite image production

* Refactor how composite image creation works
- Move it to allow mixed composite and non-composite r2r in the same build, controlled by the PublishReadyToRunCompositeExclusions list
- Enhance the accuracy of how msbuild tracks which files are input vs reference for composite images
- Implement the R2R exclusion list for composite images
- Remove the always on usage of --inputbubble when compiling a composite image

* - Add a scheme to perform public signing with a PublicKeyToken to a composite of the composite image if required
  - Required adding a new parameter to crossgen2
2021-05-13 17:39:04 -07:00
Anirudh AgnihotryandViktor Hofer 28b9c72d25 Add Infra for porting lib only packages to use dotnet pack instead of pkgprojs (#51765)
* add infra and move projects to use dotnet pack

* adddress feedback

* address feedback

* donot include buildoutput from netfx during sourcebuild

* some more feedback points

* add  SuppressDependenciesWhenPacking as well

* Apply suggestions from code review

Co-authored-by: Viktor Hofer <[email protected]>

* Update src/libraries/Directory.Build.targets

Co-authored-by: Viktor Hofer <[email protected]>

* remove warn

* Update src/libraries/Directory.Build.targets

Co-authored-by: Viktor Hofer <[email protected]>

* donot set includebuild output in outerbuild

Co-authored-by: Viktor Hofer <[email protected]>
2021-04-29 15:07:46 -07:00
Omair Majid 5524f37b9e Fix ./build.sh --portableBuild false
Non-portable builds are used by source-build and also use for
testing/debugging things, like trying out upcoming versions of OpenSSL.
2021-04-19 11:38:01 -07:00
Fan Yang 9289928aa0 Create a nuget package for RuntimeConfigParser (#51240)
Fixes #51236
2021-04-14 20:24:34 -04:00
David Wrighton fccdca068b Simplify mibc usage in the build (#50536)
- Produce a merged mibc with all scenarios squished together
- Properly attach the mibc data to the incremental build for System.Private.CoreLib
  - This can't be done for the framework here. It will require mibc integration in the SDK
- Enable pgo optimization in checked builds
- Enable pgo optimization in framework compile for outerloop runs
2021-04-13 17:35:31 -07:00
Viktor Hofer 2ada920c7f Use nuget standardized properties (#51014)
* Use nuget standardized properties

Requires https://github.com/dotnet/arcade/pull/7212. Helps with the pkgproj to csproj conversion.
2021-04-12 18:37:58 +02:00
Eric StJohn 75206ed085 Make Microsoft.NETCore.Platforms pack from CSProj (#50468)
* Use CSProj for packing Platforms package

* Port GenerateRuntimeGraph task

This ports the GenerateRuntimeGraph task from arcade as of
https://github.com/dotnet/arcade/tree/d005a8ce6bb81129f9c3a4a907e1b7ccbf2504d5

* Refactor GenerateRuntimeGraph into separate files

* Add test for GenerateRuntimeGraph

* Fix up path to runtime.json

* Don't filter inner builds when building Platforms task

* Skip tests RuntimeGraph task tests on some platforms

* Exclude browser from testing instead of wasm

* Another try at suppressing testing on Browser
2021-04-02 15:42:55 -07:00
Jo Shields ded66fc97e Introduce iossimulator RIDs, and convert as needed (#49305)
Previously, we have had four iOS RIDs:

iOS-arm
iOS-arm64
iOS-x86
iOS-x64

Apple has never shipped an iOS device with an x86 or x64 processor. Instead, the x86/x64 RIDs have meant "iOS simulator with these arches" as opposed to "iOS with these arches". Amongst other things, that means building against a DIFFERENT SDK, iPhoneSimulator.platform vs iPhoneOS.platform

In the Apple Silicon future, the iOS simulator is now an ARM64 binary - so we need:

iOS-arm
iOS-arm64
iOS-arm64, but built against the simulator SDK not the device SDK
iOS-x86
iOS-x64
Clearly, there's a problem.

The solution is to move the simulators to a different RID, to avoid the overloading issue:

iOS-arm
iOS-arm64
iOSSimulator-arm64
iOSSimulator-x86
iOSSimulator-x64

This PR introduces the new entries in the RID graph, moves our existing iOS-x{86,64} to iOS-sim-x{86,64}, adds a new iOS-arm64.

The above also applies for tvOS, with a smaller set of OSes:

tvOS-arm64
tvOSSimulator-arm64
tvOSSimulator-x64

Ref: #48216
2021-03-19 12:24:10 -04:00
David Wrighton 5d4a85156c Enable the latest managed pgo data (#49793)
- Implementation is parallel to existing ibc handling, so that it can be toggled on/off by adjusting the `UsingToolIbcOptimization` property
- Use the same data for all assemblies produced in current build
- Apply data to release builds only
- Disable mismatch assertions in jit for current state where il mismatches are common
2021-03-18 21:27:51 -07:00
Viktor Hofer 2f2113ee9d Remove arcade packaging workaround (#49613) 2021-03-18 15:29:13 +01:00
ac5c33defa Add msbuild task to generate binary runtimeconfig format (#49544)
* Add msbuild task to generate binary runtimeconfig format

* Update property name due to naming conversion.

* Fixed more formatting issue

* Fixed one more naming convention

* Update src/tasks/RuntimeConfigParser/RuntimeConfigParser.cs

Co-authored-by: Ryan Lucia <[email protected]>

* Update src/tasks/RuntimeConfigParser/RuntimeConfigParser.cs

Co-authored-by: Ryan Lucia <[email protected]>

* Update src/tasks/RuntimeConfigParser/RuntimeConfigParser.cs

Co-authored-by: Ryan Lucia <[email protected]>

* Fixed comments

* Update src/tasks/RuntimeConfigParser/RuntimeConfigParser.cs

Co-authored-by: Dan Moseley <[email protected]>

* Fix error handling

Co-authored-by: Ryan Lucia <[email protected]>
Co-authored-by: Dan Moseley <[email protected]>
2021-03-17 07:39:54 -04:00
Viktor Hofer 1bf0610e30 Remove Deterministic setting which is already the default (#49021)
The SDK already enables deterministic builds by default. No need to set this property again.
2021-03-03 00:03:11 +01:00
Thad House fe1efb9316 Fix Armel crossgen failing during pack (#45058)
Armel was not treated like arm or arm64, causing the wrong folders to be used during crossgen
2021-03-02 13:54:00 +01:00
Viktor Hofer 61e56d6a84 Fix crossgen2 shared framework name and clean-up (#48917)
Fix crossgen2 RID specific package names and use more specific property
names to avoid confusion about shared framework meanings.
2021-03-01 21:22:58 +01:00
Viktor HoferandSantiago Fernandez Madero 653b3103d1 Remove duplicated ILLink PackageReference and update target version of the SDK to 6.0 (#48462)
* Remove duplicated ILLink PackageReference

The Arcade.SDK already package refrences the ILLink package. The
duplicate reference in illink.targets caused SDK errors as the Arcade
reference has IsImplicitlyDefined set which doesn't allow an additional
reference with the same identity.

Also, as the ILLink package already exposes the path to the assembly via
its props file, using that instead of manually constructing the path to
the assembly.

The SDK target version update is required as the sequencing of the
ILLink.props file was wrong and is required for this change. This isn't
considered a breaking change, as the SDK's minimum required version
isn't changed.

* Update arcade dependencies

* Remove NuGet pack tasks pkgref

* Add mega hack workaround

* Remove KnownFrameworkReference items

* Don't hardcode SDK value in helix submission...

* Update runtimeConfiguration.targets

* Fix double publishing error in mobile tests

* Set DotNetCliVersion to right version for aspnetcoreruntime

* Update sendtohelixhelp.proj

* Update sendtohelixhelp.proj

Co-authored-by: Santiago Fernandez Madero <[email protected]>
2021-02-25 11:23:21 +01:00
Viktor Hofer b7bb45fc61 Revert "Fix installer build on Alpine (#48505)" (#48651)
This reverts commit c9fe433ebb.
2021-02-23 20:06:22 +01:00
Adeel MujahidandViktor Hofer c9fe433ebb Fix installer build on Alpine (#48505)
* Fix installer build on Alpine

* Update src/tests/build.sh

Co-authored-by: Viktor Hofer <[email protected]>

Co-authored-by: Viktor Hofer <[email protected]>
2021-02-23 10:00:28 +01:00
Viktor Hofer 503a772595 Set nuspec packaging properties correctly (#48625)
Define PackageProjectUrl which is the public facing property to specify
a project url in a nuspec. Arcade defaults PackageProjectUrl to
RepositoryUrl if it isn't set. RepositoryUrl was incorrectly set to
git://github.com/dotnet/runtime instead of
https://github.com/dotnet/runtime which cause PackageProjectUrl to use
that incorrect value as well which ultimately results in nuget.org
failing package validation and refusing to add the package.

Also changing ProjectUrl to the previous https://dot.net value which is
the expected url to the dotnet project. In addition to that, specifying
Owners which aren't set anymore in 6.0.

Adding the ProjectUrl property as well as the
Microsoft.DotNet.Build.Tasks.Packaging package depends on it. That line
can be removed after the fix to not override its value unconditionally
is merged and consumed.
2021-02-23 01:37:40 +01:00
Viktor Hofer cdff28e8c4 Delete publish-final.proj and clean-up installer.tasks unused files (#48598)
* Delete publish-final.proj and delete unused installer.tasks files

* Avoid extra restore phase for tasks

The repo local tasks don't participate in the repo restore anymore,
hence avoiding the extra restore phase which should improve reliability
and build times.
2021-02-22 17:54:36 +01:00
Viktor Hofer b390a22676 Update incremental servicing condition for pkgs (#48330)
* Update incremental servicing condition for pkgs
2021-02-17 01:09:40 +01:00
Adeel Mujahid 5d04c9e9e8 Move corehost under src/native (#48071)
* Move corehost under src/native

* Move content out of cli/ directory

* Update configurations post-move

* Update docs
2021-02-13 08:33:56 -08:00
Viktor Hofer 7870a000fc Fix DisableSourceLink value (#47931) 2021-02-10 12:52:21 +01:00