Commit Graph
97 Commits
Author SHA1 Message Date
01fdc9068e Add back the nethost archive. (#59847)
* Add back the nethost archive.

This archive makes it a bit easier for developers to pull down nethost in a non-.NET environment (without NuGet). We had this in 3.1, but it was lost at some point between then and now with all of the large infrastructure changes.

* Fix symbols copying.

* Create the symbols archive for nethost

* Update src/installer/pkg/archives/dotnet-nethost.proj

Co-authored-by: Juan Hoyos <[email protected]>

* Update src/installer/pkg/archives/dotnet-nethost.proj

Co-authored-by: Elinor Fung <[email protected]>

* Update src/installer/pkg/archives/dotnet-nethost.proj

* Symbols are in the PDB folder.

* Fix symbol paths for xplat.

* Update src/installer/pkg/archives/dotnet-nethost.proj

* Update src/installer/pkg/archives/dotnet-nethost.proj

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

* Update src/installer/pkg/archives/dotnet-nethost.proj

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

Co-authored-by: Juan Hoyos <[email protected]>
Co-authored-by: Elinor Fung <[email protected]>
Co-authored-by: Viktor Hofer <[email protected]>
2021-10-05 13:08:11 -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
Ulrich Weigand 3fa8c5cc7a Fix source-build on the s390x platform (#58553)
* Do not disable Mono in source-build if it is the primary runtime

This fixes a build failure when building runtime via the source-build method on s390x:  with source-build, the Mono runtime is currently not supported -- but this doesn't make sense on s390x where Mono is the *primary* (only) supported runtime.
2021-09-03 12:39:06 +02:00
Andy Ayers f97c18b186 Tool to stress tiered compilation (and PGO) (#57839)
Add a test wrapper that executes a test's `Main` method so that more methods are
able to reach Tier1. In particular this is useful in trying to increase test coverage
for dynamic PGO.

Uses various tricks to tolerate tests that are not amenable to being run in this manner:
* failures on the first or second iteration are ignored
* long running tests are run for fewer iterations
* some tests that become flaky after 2 iterations are excluded

Also add support for running tests in this mode to various CI scripts.
2021-08-24 18:59:28 -07:00
Adeel Mujahid 25bb59daa0 Move corehost.proj to corehost directory (#57036)
* Move corehost.proj to corehost directory

* Simplify host version overriding
2021-08-09 09:33:28 +02:00
Viktor Hofer 22cee85aa0 Clean-up pkgproj leftovers in libs and apply fixes (#56899)
* Clean-up pkgproj leftovers in libs and apply fixes

Remove any pkgproj infrastructure that was only used by src/libraries
(which is the majority). Delete the packageindex *YAY*.
Update the documentation that covered the packageindex and the pkgprojs.

Avoid any incremental builds during packaging by removing
libraries-packages.proj and use src.proj for packaging instead. Make use
of the `GeneratePackageOnBuild` property to build package during the
allconfigurations without requiring a different entry target.

Fix the addition of the DocumentationFile during packaging when
`GeneratePackageOnBuid` is used by hooking onto the
`DocumentationProjectOutputGroup` that NuGet uses and replacing the
generated documentation file with the one that comes via the
intellisense package.
Also introduce a property to choose the generated documentation file
over the one from the intellisense package:
<UseIntellisenseDocumentationFile>false</UseIntellisenseDocumentationFile>

Removing a few leftover PackageDescription properties from the projects'
Directory.Build.props file.

Cleaning up properties in Directory.Build.props & Directory.Build.targets
files.

* Actually run packaging during the allconfigurations build

* Update docs

* make runtime specific pkgs non packable

* io.ports native pkg fixes
2021-08-06 12:01:36 +02:00
Ulrich Weigand c2bd3ca1c2 Build support for s390x: installers and packages (#53950)
* Introduce "PrimaryRuntimeFlavor" concept, set to Mono for s390x

* Enable installers, packages, and archives when building the
  PrimaryRuntimeFlavor, even when this is Mono instead of CoreCLR

* Update default subsets in eng/Subsets.props to take
  PrimaryRuntimeFlavor into account

* Skip packaging singlefilehost when not available (due to building
  with the Mono runtime flavor)

* Only build the IL tools packages in coreclr-packages.proj
  when building with the Mono runtime flavor
2021-07-23 21:36:12 -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
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
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
Jo Shields 837605b9b9 Add support for building and using Mac Catalyst offsets (#52777)
* Add support for building Mac Catalyst offsets, and use to create AOT compiler nupkgs
2021-05-18 13:56:40 -04: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
Anton Lapounov 1cc11b1fad Fix building the repo on ARM64 (#51706) 2021-04-22 15:44:19 -07:00
David Wrighton be307a8bf8 Fix crossgen2 build (#51349)
- Include osx arm64 jit in package
  - Also use that jit when appropriate
- build for all rids
- build cross targeting test scenario variant from separate project file to avoid issue with incorrect app host rid
  - Remove app host from cross targeting x64 crossgen used in test scenarios
2021-04-16 13:35:57 -07:00
Andy GockeandAnton Lapounov 4c15f97f5b Enable PGO packaging for Linux & win-x86 (#51047)
Co-authored-by: Anton Lapounov <[email protected]>
2021-04-14 17:52:52 -07:00
Jeremy Koritzinsky 8d6cd81d8e Reorganize CoreCLR native build to reduce CMake reconfigures when the build system is untouched (#49906) 2021-04-05 15:05:34 -07:00
Andy Gocke 74cb83d7f6 Also build bundleproj for PGO (#50434)
I previously disabled publishing all but Microsoft.NETCore.App.sfxproj,
which publishes the dotnet-runtime-internal package. This is almost, but
not quite, the right package. It doesn't contain the host dependencies,
although it does contain the right runtime files. The right package is
Microsoft.NETCore.App.bundleproj, which builds dotnet-runtime. Unfortunately,
I didn't catch this in manual testing because I think copying over the temp
bits reused the host dependencies from the previous install location. I've
wiped this from scratch and it looks fine now. (crossed fingers)
2021-03-31 12:08:18 -07:00
Anton Lapounov c5ec2386c9 Fix CMake detection and DefaultSubsets (#49919) 2021-03-19 19:43:49 -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
Ulrich Weigand 9cdfa3e85c Add clr.iltools subset (#49545)
* Add new subset to build only the IL tools (ilasm/ildasm)
  (enabled by default)

* New -skipiltools argument to src/coreclr/build-runtime.{cmd,sh}
  (skips building the IL tools if present)

* Actually make -skipjit argument work to not build the JIT & VM
2021-03-19 07:53:10 -07:00
Andy Gocke 8170c06395 Stop building extra installer bundles during PGO build (#49779)
* Select only the runtime-internal package and turn off installers

* Remove R2R modifications
2021-03-18 01:55:17 -07:00
Thays GraziaandJan Kotas 234cc7da35 [mono][debugger] Disable by default the generation of mscordbi (#49596)
* Disable by default compilation of mscordbi, it will be generated by default only on CI.
To generate it use /p:MonoMsCorDbi=true
Fixes #49590

* Changing what was suggested by @jkotas and @akoeplinger.
Thanks @directhex for your help.

* Update eng/Subsets.props

Co-authored-by: Jan Kotas <[email protected]>

Co-authored-by: Jan Kotas <[email protected]>
2021-03-16 14:17:59 -03:00
David Wrighton dceccd3a3d Tweak package build for dotnet-pgo so that it builds in our official builds (#48724) 2021-02-24 16:07:47 -08:00
Viktor Hofer 875c0d90e5 Minor msbuild code cleanup in installer partition (#48603)
* Minor code clean-up in installer partition

* Move prepare-artifacts.proj into installer root
2021-02-22 20:38:21 +01:00
David Wrighton a99e6bc3fd Package dotnet-pgo as a dotnet tool (#48542)
- The package is marked as non-shipping as we're not ready to make it part of the official product at this time, but this should make it easier to consume in downstream repos.
2021-02-22 11:30:05 -08: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
Zoltan Varga 382de3d308 Remove the src/mono/netcore directory, move its contents to src/mono. (#47847)
* Remove the src/mono/netcore directory, move its contents to src/mono.

* Fix docs and make targets.

* Remove the netcore dir itself.

* Fix samples.
2021-02-04 18:59:14 -05:00
Sergey Andreenko 2864b3769e Include crossgen2 when crossgening SPC. (#47216) 2021-01-20 15:05:48 -08:00
Jo Shields 1390941e4f Fix missing mono jit nupkg runtime library (#47193)
Resolve race condition w/ empty Microsoft.NETCore.App.Runtime.Mono.linux-x64

With the original Subsets.props, some packaging targets are called in an AOT-only environment, and are simply missing some files (because in AOT-only, the JIT was not built). These half-empty nupkgs are uploaded during AzDO builds, after the "correct" JIT builds, and overwriting them. Make changes here to avoid replacing good packages with bad - simply do not call those targets in this situation.
2021-01-19 20:27:44 -05:00
Jo Shields 1ab58a85f3 Wasm cross compiler (#47011)
Leverage changes brought in for Android AOT, to add Wasm AOT. Also rename some parameters to make it clearer what their purpose is
2021-01-19 15:00:47 -05:00
Jo Shields 48f4f295e9 Initial Android cross-compiler (#43535)
Produce cross compilers for Android targets, from Linux x64 and OSX x64 hosts. This should be reasonably solid groundwork for adding more targets and more hosts for cross-compile scenarios.
2021-01-14 14:49:17 -05:00
Tomáš Rylek 69e114c1ab December infra rollout - remove duplicated 'src' from coreclr subrepo (src/coreclr/src becomes src/coreclr) (#44973)
* Move src/coreclr/src/Directory.Build.targets to src/coreclr
Merge src/coreclr/src/CMakeLists.txt into src/coreclr/CMakeLists.txt

* Mechanical move of src/coreclr/src to src/coreclr

* Scripts adjustments to reflect the changed paths
2020-12-08 03:19:44 +01:00
Viktor Hofer 86f25ee030 Move regenerate-download-table and cleanup (#45724) 2020-12-08 01:06:30 +01:00
Jeremy KoritzinskyandViktor Hofer d2fc747f6d Signing cleanup (#44658)
Co-authored-by: Viktor Hofer <[email protected]>
2020-11-17 12:30:05 -08:00
Jeremy KoritzinskyandViktor Hofer 86d5d16d31 Switch to new Microsoft.DotNet.SharedFramework.Sdk and refactor Host/Installer build subsets (#38457)
* Start creating runtime, apphost, and targeting packs using the new SDK in the NewSFX subset.

* Fix generation of runtime package, runtime symbols package, and host symbols package.

* Correcly include hosting files and DIA in the shared framework archives and packages

* Include PackageOverrides.txt in the ref pack.

* Fix product brand prefix.

* Add the shared host installer.

* Add the hostfxr build and clean up MacOS building.

* Rename host and hostfxr projects to ensure we don't collide with the nuget packaging projects.

* Add bundle installer.

* Update platform manifest entries to include linux/mac file variations from the runtime.

* Update apphost pack to match master.

* Fix typo

* Include manpages and fix linux package properties.

* Fix linux package properties.

* Match short-description from packages in master.

* Update to uploaded package.

* Update metadata and SDK to generate an exact match of the productbuild xml file.

* First draft moving crossgen2 to new SDK.

* Get crossgen2 pack working with updated SDK.

* Build archives from the installer and bundle projects.

* Move the dotnet-runtime-deps installers to use the new SDK.

* Rough attempt to convert the build to use the new sfx sdk.

* Remove now empty subsets.

* Update installer subsets for testing.

* Remove non-existent packaging project from subsets.

* Add missing Windows api shim dll to platform manifest.

* Update sharedfx sdk.

* Add both versions of the long-name dac to the platform manifest.

* Skip builds for non-relevant components on Mono.

* Remove installer tests by default temporarily to validate product build.

* Remove pkgprojs subset from mono installer build since it doesn't build the hosts.

* Skip the apphost pack on mono.

* Update host test infra to use the new sfx projects.

* Delete an out of date test (the alternative case this test exercises is now the only case in this repo)

* Fix packaging tests and remove NETStandard packaging tests since we aren't producing that ref pack any more.

* Fixes for test official build failures. Re-eneable installer tests by default.

* Fix condition for building linux installers.

* Exclude Mono header files from the deps.json. They don't need to be in it.

* Don't include the host files on the sfxproj.

* Add mono-specific files to the platform manifest.

* Remove extra copy step in installer job.

* Include libmonosgen-2.0.a in platform manifest.

* Fix change in linux-x64 test steps.

* Fix display name of linux package steps.

* Build the installers based on the portable build when applicable so they can find their artifacts.

* The installer build no longer consumes Microsoft.NETCore.Platforms and Microsoft.NETCore.Targets, try removing the dependency on the AllConfigurations leg from the installer build.

* Set PackageBrandNameSuffix for runtime-deps packages.

* Updated sharedfx sdk

* Fix debian runtime-deps dependency elements.

* Add new platform manifest entries.

* Add icudt.dat to the platform manifest.

* Invert conditions to correctly skip generating installers on non-applicable platforms.

* Create extra installer subset so we can build just the installers (and avoid double-building nuget packages). Rename the newsfx subset and folder to sfx.

* Fix Crossgen2 package name.

* Clean up some dead MSBuild goo and update the sharedfx package so we can override the crossgen2 package name without breaking the default package id logic.

* Update SharedFX SDK.

* Fix discovery of the built dotnet layout for installer tests. Clean up some MSBuild along this path.

* Update to use the new refactored packages.

* Fix macOS build failures.

* Fix linux installer build.

* Upgrade to newest version of the SDK and centrally manage versions.

* Update SDK to fix build skipping for the shared framework sdk.

* Update SDK with full fix for skipbuild with packaging.

* Another try for fixing the build-skip infra.

* Upgrade SDK.

* Fix package ids for mono packages.

* Fix installer tests after update.

* Add System.Private.Runtime.InteropServices.Javascript.dll to platform manifest

* Fix Crossgen2 package to place all files in the tools folder.

* Update to SDK with validation targets.

* Add new ICU files to manifest.

* Crossgen2 doesn't need to go through framework resolution so we can permit non-file-versioned dlls. (jitinterface.dll is currently unversioned).

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Put the property in a property group.

* Ensure we build corehost before sfx since we no longer directly build the project from the sfx projects.

* Add missing entry for additional ICU data file.

* Remove step downloading all artifacts and remove MSBuild glue to hook up looking up artifacts in the full download.

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Update SDK

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Update SDK to get MSI fix.

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Don't even try building the hosting, crossgen2, or bundle installers when RuntimeFlavor is Mono.

* Remove out of date comment.

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Rename subsets based on PR discussion.

* Update platform manifest and fix path to 3rd party notices for installer.

* Remove test feed.

* Update subset references I missed.

* Fixed the subset arguments in other yaml files.

* Add NuGet metadata to packs.

* Add diagnostics-specific incremental signing in CoreCLR when the files are produced so the installer portion doesn't need to sign them.

* Pass sign type to job.

* Add new WASM files.

* Enable static graph restore for the whole repo

* Fix nits

* Add back the runtime-deps packages. They were lost when we moved away from globs.

* Don't disable NuGet static graph restore.

* Make sure we sign the cross-arch same-os DAC

* Update installers package.

* Update Installers package from arcade

* Update installers package.

Co-authored-by: Viktor Hofer <[email protected]>
2020-11-13 01:50:31 +00:00
Tomáš Rylek e33ba5d5f2 Crossgen2 support for System.Private.CoreLib compilation in CoreCLR build (#44090)
This change moves the logic for crossgenning System.Private.CoreLib to the crossgen-corelib.proj script, no longer calling out to the OS-specific scripts crossgen-corelib.cmd / crossgen-corelib.sh, and adds the support for using Crossgen2 for the System.Private.CoreLib compilation. As of this commit Crossgen2 is not set as the default because the System.Utf8.Experimental libraries tests fail with Crossgen2-compiled CoreLib. I'm working on fixing this as the next step.

Thanks

Tomas
2020-11-12 03:01:15 +01:00
Anirudh Agnihotry b37f10a504 Changing Windows_NT -> Windows for enabling TargetPlatformMoniker feature of the sdk for platform specific tfms. (#43651)
* eng change

* coreclr change

* libraries change

* tests change

* installer & mono change

* py files changed

* .md change

* .yml change

* remove redundant targetos property

* Windows_NT -> windows after ninja change

* fixing runtime build failure
2020-11-02 14:25:58 -08:00
Jeremy Koritzinsky 8c6a049cdb Enable using the Ninja generator instead of Visual Studio on Windows builds. (#41897)
* Move DacTableGen out of the CMake build and into tools-local.

* Attempt: usenmakefiles means ninja.

* Make changes to Windows build to support non-VS generators like ninja.

* Use CMake 3.16 PCHs.

* Remove explicit process count.

* Build and run DacTableGen via the .NET CLI we pull down for the build instead of via CMake.

* Update configurecompiler.cmake to specify language (needed for Ninja).

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Get Ninja build working again.

* Pass configuration to cmake configure step for Ninja build.

* Rename flag

* Fix configure step for cross-arch native build

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Support building via Ninja for coreclr via an MSBuild property

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Implement support for opening the CoreCLR solution in VS via the -vs flag.

* Fix setting generator to Ninja.

* Merge libraries gen-buildsys-win.bat with runtime gen-buildsys.cmd to share windows cmake configure infra.

* Enable building libraries native build with ninja.

* Centralize setting CMAKE_SYSTEM_VERSION for windows builds.

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Update host build to use shared gen-buildsys.cmd

* Fix multi-config generator detection.

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Exit with success when we build successfully.

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Enable and fix up Ninja build for hosts.

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Only link delayimp.lib on Windows

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Remove "overriding /W3 with /W1" warning in Ninja build of hosts by turning on /W3 and disabling any new warnings we hit.

* Reduce command line override warnings by adopting the MSVC_RUNTIME_LIBRARY abstraction feature in CMake 3.14+ (below the minimum requirement on Windows).

* Use the delayed expansion syntax to correctly pass in the config to cmake.

* Move all usages of MSVC runtime library selection to the CMake abstraction to reduce console spew about overridden flags.

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Condition the rest of the compiler options correctly so they don't show up as invalid parameter warnings for assembly builds.

* Correctly build DIALib and DacTableGen as AnyCPU

* Fix WRITE_BARRIER_CHECK define

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Fix passing arch for MSBuild build.

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Configure ASM compiler command line format in configurecompiler.cmake and use CMake's assembly compilation step to build ASM files for ARM/ARM64 instead of manually building them and adding the generated files as additional sources.

* Cleanup after fixing ARM/ARM64 support.

* Rename variable

* Condition PCH's for C++-only as needed to fix using them on non-Windows (where we compile C as C instead of as C++).

* Fix CoreCLR native test build on windows to point to new gen-buildsys location.

* Add missing compilation options in Ninja build that are implicitly defined in the MSBuild build.

* Disable analyzers for DacTableGen. Remove /MAP linker flag (that's for local testing).

* Upgrade to CMake 3.16.4

* Don't warn on unused variables in CMake (these usually vary on platform/config)

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Manually compile ARM and ARM64 asm files when using the VS generator since it doesn't support emitting MARMASM item types in projects (and as a result cannot compile ARM or ARM64 asm without assistance).

* Enable CMake policy in test build to use CMAKE_MSVC_RUNTIME_LIBRARY variable.

* Update initially disabled warnings in host.

* Add -ninja arg to root scripts to enable using Ninja.

* Enable using Ninja in CoreCLR CI.

* Try to fix passing the -ninja arg in yaml.

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Add ninja to the Windows invocation

* Fix 2-phase cross targeting to do one phase at a time and initialize the VC++ environment for the correct build tools each time instead of interleaving them and relying on Visual Studio to handle the differing targets.

* Restore old /Ox optimization setting for Release.

* Fix typos, don't pass exception flags to C files.

* Remove unneeded pragma.

* Fix .pgd file installation.

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Add mention of the `-ninja` flag in the Building CoreCLR documentation.

Signed-off-by: Jeremy Koritzinsky <[email protected]>

* Mention installation locations for Ninja and warn while building if CMake is older than 3.16.0.

* Update docs/workflow/requirements/windows-requirements.md
2020-11-02 07:50:01 -08:00
imhameed 5e6de70217 CoreCLR runtime tests + Mono LLVM AOT on arm64 Linux (#41751)
This change:

- Adds new options to mono.proj:

    - MonoAOTEnableLLVM, which enables (or disables) building a Mono AOT
    cross compiler with LLVM;

    - MonoAOTLLVMDir, which specifies the path to a copy of LLVM suitable for
    building a Mono AOT cross compiler, and is optional; and

    - BuildMonoAOTCrossCompilerOnly, which allows building a Mono AOT
    cross compiler without building an associated full Mono runtime.

- Changes offsets-tool.py's user interface slightly; '--include-prefix' is
renamed to '--prefix' and may be specified multiple times. While this latter
feature isn't necessary to build a Mono cross compiler today, because we don't
use distribution-supplied cross-compilation headers on CI, it does make it
easier to experiment with the offsets tool using arbitrary header layouts.  For
example, Debian's arm64 cross-compilation packages scatter useful header files
across `/usr/lib/gcc-cross/aarch64-linux-gnu` and `/usr/aarch64-linux-gnu`.

- Updates the docker image used for arm64 cross-compilation to a newer revision
that includes libclang (see also
https://github.com/dotnet/dotnet-buildtools-prereqs-docker/pull/375).

- Adds some tests that currently fail to compile with Mono LLVM AOT to
issues.targets.

- Adds a Linux_arm64 LLVM AOT job to CI. Nothing particularly fancy is done to
build the Mono LLVM AOT cross compiler; it is built as a step in the same job
that also sends Linux_arm64 tests to Helix.
2020-10-26 09:38:25 -07:00
Juan HoyosandJan Kotas 0a2a7e9948 Add back nightly build table (#43392)
* Update README table generator.
* Link README to new table location.
* Add 6.0 coreclr runtime links for table generation.
* Add generated table to the dogfooding page.
* Update some stale references to sleet feeds, older versions of the runtime, and deprecated packages.
* Add subset for table generation and reorder table to frontload OS groups.

Co-authored-by: Jan Kotas <[email protected]>
2020-10-15 18:06:40 -07:00
Egor BogatovandAlexander Köplinger d260e95e2a [mono] Include hostpolicy/hostfxr in mono desktop runtime packs (#42729)
Currently mono desktop runtime packs don't include `libhostfxr.*` and `libhostpolicy*` libs needed for corehost in self contained mode.

Co-authored-by: Alexander Köplinger <[email protected]>
2020-10-15 15:51:21 +02:00
David Wrighton 0c36a9a209 Run PAL tests in CI (#42049)
Refactor the PAL test framework to be useable in our CI system, and enable it for testing

The existing PAL tests are problematic in a few ways for our CI.
1. They are large in terms of disk space used per test, this interferes with building them properly, especially as they are part of the product build, and not of the test build
2. While part of the product build, the option to build them was well hidden.
3. The tests are not related to our existing tests, and in particular are not driven from managed xunit wrappers.

The change here has 4 components
1. Reduce the volume of the binaries such that they can be passed from a product build to a test job effectively. This is done by merging all tests which are not strictly dependent on secondary libraries.
  - This was done via a tool which parsed and replaced all of the CMakeFiles.txt 
  - And then manual editing to remove all duplicate global symbols
2. The build flag for building the tests has been exposed as a first class option to build-runtime, as well as through the subset mechanism. As of this change, developers who wish to build the tests should use the clr.paltests subset to build the tests.
3. As the tests do not have normal xunit wrappers, but they *do* have a script which will generate xunit output, they cannot quite be run in the existing helix pathway. Add a separate path for launch the appropriate helix workitem as part of outerloop test runs.
4. A new issue exclusion mechanism has been built. Add exclusions by modifying src/coreclr/src/pal/tests/palsuite/issues.targets
  - There are a number of failures in the current test suite that should probably be investigated, but making meaningful changes to the tests should not be part of this change.
2020-09-16 12:55:59 -07:00
Juan Hoyos 8fc68f626a Enable build + pack of cross-OS diagnostic artifacts on Linux-musl-arm (#42096) 2020-09-11 15:39:58 +00:00
David Wrighton 28e68bd70c Build infra changes to enable building a more universal cross target jit builds (#41126)
This change is part of a larger effort to enable crossgen2 to perform general purpose cross compilation from any architecture to any other architecture. This portion of the change is to begin generating cross targeting jits with a consistent naming scheme with a minimal amount of code change.

The practical output of this change is replacement of the current practice of building protojit/protononjit/etc. with `clrjit_<targetos>_<target_arch>_<host_arch>` binaries.

In addition I've defined a couple of new subsets so that this can be less impactful to the inner dev loop.

clr.alljits, which will build all of the jits.
clr.jit, which will build only non-cross targeting jits.
clr.runtime which has been enhanced to not trigger the alljits build.

Current restrictions of the change:
1. This change does not support 32bit to 64bit compilation. I've built a larger change that includes the necessary work for that, but the changes are more disruptive, and I would prefer to scope this work to make it reviewable.
2. This work builds different compilers for the unix targetting and windows targetting compilers. This is due to the different ABIs that the architectures support. Upon investigation, I've determined that the actual product differences in these cases is small for ARM and ARM64. In the future, once we have testing, I believe it would be reasonable to unify the generated compiler binaries.
3. These changes do not build an armel targeting compiler for all scenarios, but it does build one with the current naming scheme as was done before. Again, like in condition 2, I believe we can make a single arm targetting compiler that will work.
4. These changes include changes to crossgen2 to use the new compiler binaries. However, there is no expanded testing to cover test the newly available cross compilation capabilities. That will appear in follow-on work.
2020-09-09 14:49:42 -07:00
Alexander Köplinger e658ddbc68 Simplify webassembly targets (#41869)
Add a subset for compiling only the wasm runtime: `mono.wasmruntime`
This allows us to rebuild the wasm runtime without building the full libraries subset.

Updated documentation with new guidance.

Updated how we build the dotnet.timezones.blat.
2020-09-05 00:41:32 +02:00
Mike McLaughlin 57678512d2 Sign and add entitlements to createdump and host binaries (#40485)
Sign and add entitlements to createdump and host binaries

Enables createdump on MacOS.

Part of issue #https://github.com/dotnet/runtime/issues/34916.

Don't attempt to sign in a public PR job
2020-08-07 15:21:30 -07:00
Alexander KöplingerandLarry Ewing c5e4fd71a8 WASM: Add pkgproj for the browser debug proxy/host transport package (#40494)
* WASM: Add pkgproj for the browser debug proxy/host transport package

* Update src/mono/wasm/debugger/BrowserDebugProxy/MonoProxy.cs

Co-authored-by: Larry Ewing <[email protected]>

Co-authored-by: Larry Ewing <[email protected]>
2020-08-07 22:52:31 +02:00
Adeel Mujahid 4d41f13e03 Remove netstandard packaging infra (#40239) 2020-08-02 19:45:52 +02:00
Viktor Hofer 809a06f451 Remove depprojs in favor of PackageReferences (#35606)
- Remove depprojs which currently binplace external references into the RefPath folders in favor of PackageReference and PackageDownload items.
- Build all configurations by default when building an individual project (either on the CLI or inside VS) same as with the official SDK. This enables .NETFramework Test Explorer support.
- Centrally define libraries that compose the shared framework instead of in each Directory.Build.props file to be able to build the targeting pack first and consume it in the OOB libraries.
- Use ProjectReferences to reference OOB projects. Compile against the reference assembly but use the implementation assembly app-local during runtime.
- Remove OOBs from the testhost and remove the testhost folder for .NETFramework as it isn't required anymore.
- Only binplace for $(NetCoreAppCurrent) to compose a) the targeting pack, b) the runtime pack, c) the testhost, d) a full closure for the shims.
- Use Targeting Packs for OOB projects (with their implicit assembly references) but still explicitly define granular references for .NETCoreApp configurations (DisableImplicitAssemblyReferences switch). Use the implicit targeting pack references in some Microsoft.Extensions.* cases.
- Remove placeholder configurations as they aren't needed anymore with explicit P2Ps vs Targeting Pack references.
- Remove implicit assembly references (ie for .NETFramework, mscorlib)
- Remove AssemblySearchPath hacks that were introduced with b7c4cb7 as the targeting pack is now used by default.
- Reduce unnecessary .NETFramework configurations that were added to run tests in favor of the already existing ref&src configurations.
- Stop hardcoding the paths for wasm assemblies and use the returned TargetPath of the ProjectReferences.
- Addressed formatting (ItemGroups, References at the bottom of the project file, ordering of references, use LibrariesProjectRoot instead of a relative path, unnecessary AssemblyName and RootNamespace properties which are identical to the project name, ordering of tfms)
- Revert "fix clean (#33758)"
2020-07-23 17:20:26 +02:00