Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Initial Android cross-compiler #43535

Merged
merged 218 commits into from
Jan 14, 2021
Merged
Show file tree
Hide file tree
Changes from 208 commits
Commits
Show all changes
218 commits
Select commit Hold shift + click to select a range
ba14e1d
Start creating runtime, apphost, and targeting packs using the new SD…
jkoritzinsky Jun 24, 2020
6802ad1
Fix generation of runtime package, runtime symbols package, and host …
jkoritzinsky Jun 24, 2020
a36a296
Correcly include hosting files and DIA in the shared framework archiv…
jkoritzinsky Jun 24, 2020
c6f72c7
Include PackageOverrides.txt in the ref pack.
jkoritzinsky Jun 24, 2020
8757c50
Fix product brand prefix.
jkoritzinsky Jun 24, 2020
cbd46d2
Add the shared host installer.
jkoritzinsky Jun 25, 2020
db70570
Add the hostfxr build and clean up MacOS building.
jkoritzinsky Jun 25, 2020
7ad7304
Rename host and hostfxr projects to ensure we don't collide with the …
jkoritzinsky Jun 25, 2020
ece261c
Add bundle installer.
jkoritzinsky Jun 25, 2020
84ab2b0
Merge branch 'master' of https://github.com/dotnet/runtime into adopt…
jkoritzinsky Jun 25, 2020
0b54120
Update platform manifest entries to include linux/mac file variations…
jkoritzinsky Jun 25, 2020
290d0fa
Update apphost pack to match master.
jkoritzinsky Jun 25, 2020
2083c85
Fix typo
jkoritzinsky Jun 25, 2020
49fbab6
Include manpages and fix linux package properties.
jkoritzinsky Jun 25, 2020
0c9b00c
Fix linux package properties.
jkoritzinsky Jun 25, 2020
6dfa868
Match short-description from packages in master.
jkoritzinsky Jun 25, 2020
63cdc70
Update to uploaded package.
jkoritzinsky Jun 25, 2020
5c637d2
Update metadata and SDK to generate an exact match of the productbuil…
jkoritzinsky Jun 26, 2020
c8bd51e
First draft moving crossgen2 to new SDK.
jkoritzinsky Jul 13, 2020
890dc74
Get crossgen2 pack working with updated SDK.
jkoritzinsky Jul 15, 2020
5ef903f
Merge remote-tracking branch 'dotnet/master' into adopt-unified-sharedfx
jkoritzinsky Jul 15, 2020
98bb6c9
Build archives from the installer and bundle projects.
jkoritzinsky Jul 15, 2020
4a0ecf0
Move the dotnet-runtime-deps installers to use the new SDK.
jkoritzinsky Jul 15, 2020
3ac3696
Rough attempt to convert the build to use the new sfx sdk.
jkoritzinsky Jul 15, 2020
361e750
Remove now empty subsets.
jkoritzinsky Jul 16, 2020
13753c6
Update installer subsets for testing.
jkoritzinsky Jul 22, 2020
31fcde4
Remove non-existent packaging project from subsets.
jkoritzinsky Jul 22, 2020
6683b7a
Add missing Windows api shim dll to platform manifest.
jkoritzinsky Jul 22, 2020
7137375
Update sharedfx sdk.
jkoritzinsky Jul 22, 2020
f8d1fbe
Add both versions of the long-name dac to the platform manifest.
jkoritzinsky Jul 23, 2020
388711d
Skip builds for non-relevant components on Mono.
jkoritzinsky Jul 23, 2020
006a761
Remove installer tests by default temporarily to validate product build.
jkoritzinsky Jul 23, 2020
0fdcd70
Remove pkgprojs subset from mono installer build since it doesn't bui…
jkoritzinsky Jul 23, 2020
a118d3d
Skip the apphost pack on mono.
jkoritzinsky Jul 23, 2020
1d84487
Update host test infra to use the new sfx projects.
jkoritzinsky Jul 23, 2020
6752318
Delete an out of date test (the alternative case this test exercises …
jkoritzinsky Jul 23, 2020
ae145b3
Fix packaging tests and remove NETStandard packaging tests since we a…
jkoritzinsky Jul 23, 2020
e2e6624
Fixes for test official build failures. Re-eneable installer tests by…
jkoritzinsky Jul 23, 2020
54496ab
Fix condition for building linux installers.
jkoritzinsky Jul 23, 2020
0ce63ef
Exclude Mono header files from the deps.json. They don't need to be i…
jkoritzinsky Jul 24, 2020
2612fba
Don't include the host files on the sfxproj.
jkoritzinsky Jul 24, 2020
d2adc6c
Add mono-specific files to the platform manifest.
jkoritzinsky Jul 24, 2020
3d994ff
Remove extra copy step in installer job.
jkoritzinsky Jul 24, 2020
06d242b
Include libmonosgen-2.0.a in platform manifest.
jkoritzinsky Jul 24, 2020
90baa80
Fix change in linux-x64 test steps.
jkoritzinsky Jul 24, 2020
f5434af
Fix display name of linux package steps.
jkoritzinsky Jul 24, 2020
7b7526d
Build the installers based on the portable build when applicable so t…
jkoritzinsky Jul 24, 2020
1840af7
The installer build no longer consumes Microsoft.NETCore.Platforms an…
jkoritzinsky Jul 24, 2020
15026fb
Set PackageBrandNameSuffix for runtime-deps packages.
jkoritzinsky Jul 25, 2020
442fed4
Updated sharedfx sdk
jkoritzinsky Jul 27, 2020
a2cdf87
Fix debian runtime-deps dependency elements.
jkoritzinsky Jul 30, 2020
d9838ff
Merge branch 'master' of https://github.com/dotnet/runtime into adopt…
jkoritzinsky Jul 30, 2020
2f6d892
Add new platform manifest entries.
jkoritzinsky Jul 30, 2020
b97b134
Add icudt.dat to the platform manifest.
jkoritzinsky Jul 30, 2020
c9597c4
Invert conditions to correctly skip generating installers on non-appl…
jkoritzinsky Jul 30, 2020
af5bcc8
Merge branch 'adopt-unified-sharedfx-official-build-test' of /mnt/d/s…
jkoritzinsky Jul 30, 2020
f521759
Create extra installer subset so we can build just the installers (an…
jkoritzinsky Jul 31, 2020
4c5828d
Fix Crossgen2 package name.
jkoritzinsky Jul 31, 2020
dd86d7f
Merge branch 'master' into adopt-unified-sharedfx
jkoritzinsky Jul 31, 2020
d26bad7
Clean up some dead MSBuild goo and update the sharedfx package so we …
jkoritzinsky Jul 31, 2020
494d9bd
Update SharedFX SDK.
jkoritzinsky Aug 3, 2020
cf95aa7
Merge branch 'master' into adopt-unified-sharedfx
jkoritzinsky Aug 3, 2020
d23d093
Fix discovery of the built dotnet layout for installer tests. Clean u…
jkoritzinsky Aug 3, 2020
9c54206
Update to use the new refactored packages.
jkoritzinsky Aug 5, 2020
160a2dd
Fix macOS build failures.
jkoritzinsky Aug 5, 2020
1a35bcc
Fix linux installer build.
jkoritzinsky Aug 5, 2020
4479907
Upgrade to newest version of the SDK and centrally manage versions.
jkoritzinsky Aug 5, 2020
a65d4c8
Merge branch 'master' of https://github.com/dotnet/runtime into adopt…
jkoritzinsky Aug 6, 2020
b4804c8
Update SDK to fix build skipping for the shared framework sdk.
jkoritzinsky Aug 6, 2020
d6be480
Update SDK with full fix for skipbuild with packaging.
jkoritzinsky Aug 6, 2020
6f9b6d5
Another try for fixing the build-skip infra.
jkoritzinsky Aug 6, 2020
78849bf
Upgrade SDK.
jkoritzinsky Aug 6, 2020
9b3bb51
Fix package ids for mono packages.
jkoritzinsky Aug 7, 2020
d0f5313
Fix installer tests after update.
jkoritzinsky Aug 7, 2020
8fe251c
Add System.Private.Runtime.InteropServices.Javascript.dll to platform…
jkoritzinsky Aug 10, 2020
29f38aa
Merge branch 'master' of https://github.com/dotnet/runtime into adopt…
jkoritzinsky Aug 20, 2020
1a71e7b
Fix Crossgen2 package to place all files in the tools folder.
jkoritzinsky Aug 20, 2020
33407b5
Update to SDK with validation targets.
jkoritzinsky Aug 22, 2020
a87e9a1
Add new ICU files to manifest.
jkoritzinsky Aug 24, 2020
7fe5c8e
Crossgen2 doesn't need to go through framework resolution so we can p…
jkoritzinsky Aug 24, 2020
a63c911
Put the property in a property group.
jkoritzinsky Aug 24, 2020
14e80f4
Merge branch 'master' of https://github.com/dotnet/runtime into adopt…
jkoritzinsky Aug 26, 2020
160bf5d
Ensure we build corehost before sfx since we no longer directly build…
jkoritzinsky Aug 26, 2020
ac5ce6c
Add missing entry for additional ICU data file.
jkoritzinsky Aug 26, 2020
299745d
Remove step downloading all artifacts and remove MSBuild glue to hook…
jkoritzinsky Aug 26, 2020
642e0f4
Merge branch 'master' into adopt-unified-sharedfx
jkoritzinsky Sep 15, 2020
faf52ec
Update SDK
jkoritzinsky Sep 15, 2020
a589182
Update SDK to get MSI fix.
jkoritzinsky Sep 15, 2020
6ee0569
Merge branch 'master' into adopt-unified-sharedfx
jkoritzinsky Sep 16, 2020
9e4ce3c
Don't even try building the hosting, crossgen2, or bundle installers …
jkoritzinsky Sep 16, 2020
1f34d31
Remove out of date comment.
jkoritzinsky Sep 16, 2020
1bd45aa
Merge branch 'master' of github.com:dotnet/runtime into adopt-unified…
jkoritzinsky Oct 29, 2020
829d01a
Rename subsets based on PR discussion.
jkoritzinsky Oct 29, 2020
a72bc60
Update platform manifest and fix path to 3rd party notices for instal…
jkoritzinsky Oct 29, 2020
55d36ba
Remove test feed.
jkoritzinsky Oct 30, 2020
dbf59d7
Update subset references I missed.
jkoritzinsky Oct 30, 2020
3b60cad
Merge branch 'master' of github.com:dotnet/runtime into adopt-unified…
jkoritzinsky Oct 30, 2020
3027275
Fixed the subset arguments in other yaml files.
jkoritzinsky Oct 30, 2020
220044f
Merge branch 'master' of github.com:dotnet/runtime into adopt-unified…
jkoritzinsky Nov 3, 2020
aafd6b1
Merge branch 'master' of github.com:dotnet/runtime into adopt-unified…
jkoritzinsky Nov 4, 2020
8d95643
Merge remote-tracking branch 'origin/master' into android-cross2
directhex Nov 5, 2020
d52caae
Redesign mono.aotcross building
directhex Nov 6, 2020
940b262
Rejiggle so AOT compiler gets copied to HOST/cross/TARGET dir
directhex Nov 9, 2020
2853b33
Merge remote-tracking branch 'origin/master' into android-cross2
directhex Nov 13, 2020
c2ff411
Merge remote-tracking branch 'origin/master' into android-cross2
directhex Nov 18, 2020
ed414dc
Build a package with the cross compiler inside (hardcoded to android-…
directhex Nov 18, 2020
a7f983d
Parallelize, apparently successfully
directhex Nov 19, 2020
6cdebd8
Pull in changes from the other PR
directhex Nov 19, 2020
9fe7827
Only build cross-compiler packs on Linux FOR NOW, until we have NDK o…
directhex Nov 19, 2020
1fa2274
Fix building locally
directhex Nov 20, 2020
1ff28b1
Fix up subset behaviour
directhex Nov 20, 2020
a666da5
Build cross in pipeline, and enable cross packages on Mac
directhex Nov 20, 2020
2364432
Nope, build cross on osx_x64 job, not android_x64 job
directhex Nov 20, 2020
b30055d
Release not debug?
directhex Nov 20, 2020
a9d8fe8
Fix old-style Android build
directhex Nov 23, 2020
d745965
Workaround for x86 builds
directhex Nov 24, 2020
e06f503
Try something else
directhex Nov 24, 2020
e9bf809
Mumble mumble
directhex Nov 24, 2020
5535a44
Gosh darn it
directhex Nov 24, 2020
c86e5a3
Rename android offset file to help disambiguate
directhex Nov 29, 2020
dd5ae10
Create a new property which can generate offsets only
directhex Nov 29, 2020
1bed2aa
Revert "Nope, build cross on osx_x64 job, not android_x64 job"
directhex Nov 29, 2020
8dbed75
Revert "Nope, build cross on osx_x64 job, not android_x64 job"
directhex Nov 29, 2020
fa40514
Clean up more pipeline errors
directhex Nov 29, 2020
750cffc
Add new yaml branch for generating offset files
directhex Nov 29, 2020
16ae1a3
Merge remote-tracking branch 'origin/master' into android-cross
directhex Nov 29, 2020
27b865f
Fix sysroot setting
directhex Nov 29, 2020
1419d79
Missing escaping
directhex Nov 29, 2020
276e9f7
Why can't PublishPipelineArtifact do wildcards>?!
directhex Nov 29, 2020
342dc03
Fic typos
directhex Nov 29, 2020
4107a1c
See if dependencies work
directhex Nov 30, 2020
04ad8b4
Ensure Mono jobs pass through dependsOn
directhex Nov 30, 2020
5850b22
Try adding AotCross to build. This should fail as we don't consume of…
directhex Nov 30, 2020
e828986
Try downloading offsets
directhex Nov 30, 2020
cfe0277
Don;t hide behind conditional
directhex Nov 30, 2020
a9b74f4
Fix offset aertifact name
directhex Nov 30, 2020
99993bf
Download to correct place
directhex Nov 30, 2020
f5b60a0
Copy offset file where it needs to be
directhex Nov 30, 2020
a7ad243
debug
directhex Dec 1, 2020
fd8cbde
add debug, fix path
directhex Dec 1, 2020
1ea31a8
typo
directhex Dec 1, 2020
e7e0fc7
Fix escaping
directhex Dec 1, 2020
99a3bb3
Fix building cross compilers with no NDK, but an offset file
directhex Dec 1, 2020
2f9a661
Get rid of debug noise
directhex Dec 1, 2020
e0f5ecf
Merge remote-tracking branch 'origin/master' into android-cross
directhex Dec 2, 2020
7e00e41
Fix noise on Windows
directhex Dec 2, 2020
352c0e8
Build cross on correct platforms
directhex Dec 2, 2020
f849ee1
Build all android targets
directhex Dec 2, 2020
10d9b35
Try and work around llvm-config not being found on windows
directhex Dec 2, 2020
b47099c
Revert "Get rid of debug noise"
directhex Dec 2, 2020
a970b07
More debug spew, osx should be working
directhex Dec 2, 2020
957dfd5
tpyo
directhex Dec 2, 2020
7a6a0c2
tweaky
directhex Dec 2, 2020
9a9094a
Get rid of a debug output
directhex Dec 2, 2020
78f5ac4
Merge remote-tracking branch 'origin/master' into android-cross
directhex Dec 4, 2020
27a4243
Shelve fixing Windows and non-x64 hosts for now, get what works fully…
directhex Dec 4, 2020
5ad26c3
Remove debug spew
directhex Dec 4, 2020
447b04c
Make LLVM AOT compatible with new path structure?
directhex Dec 4, 2020
dcf5b7a
Merge branch 'master' into android-cross
akoeplinger Dec 18, 2020
ae2f79c
Merge remote-tracking branch 'upstream/master' into android-cross
akoeplinger Dec 18, 2020
23778a3
Merge remote-tracking branch 'upstream/master' into android-cross
akoeplinger Dec 21, 2020
2e003e1
Merge remote-tracking branch 'upstream/master' into android-cross
akoeplinger Dec 22, 2020
fdf028f
Merge remote-tracking branch 'upstream/master' into android-cross
akoeplinger Dec 22, 2020
da2bf1a
Merge remote-tracking branch 'upstream/master' into android-cross
akoeplinger Dec 23, 2020
6b4ae14
Simplify logic
akoeplinger Dec 23, 2020
79cd407
Fix Android sample app
akoeplinger Dec 23, 2020
25e59bf
Fix including the mono-cross-aot in the live-built runtime pack
akoeplinger Dec 23, 2020
60c7cef
Revert changes to MonoAOTCompiler.props
akoeplinger Dec 23, 2020
9643bac
Revert unnecessary change
akoeplinger Dec 23, 2020
29e8f5e
Simplify and fix .yml
akoeplinger Dec 23, 2020
5eeccfb
Simplify and fix .yml
akoeplinger Dec 23, 2020
569926a
Merge remote-tracking branch 'upstream/master' into android-cross
akoeplinger Dec 25, 2020
e501d3f
If we only build AOT compilers in Release, generate Release offsets
directhex Jan 5, 2021
5c8bd50
Merge remote-tracking branch 'origin/master' into android-cross
directhex Jan 5, 2021
9b24095
Debug?
directhex Jan 5, 2021
cc2e82c
This is a horrible workaround
directhex Jan 5, 2021
3000673
Rename package
directhex Jan 5, 2021
03c41a2
Remove obsolete debug spew
directhex Jan 5, 2021
cb4fa69
New debug spew - this works fine locally, so why broken on azdo?
directhex Jan 5, 2021
081d54e
More debug
directhex Jan 5, 2021
92fe6c8
Stop setting an OS override to Android, it breaks zipping
directhex Jan 5, 2021
0d5d749
Clean up some packaging errors
directhex Jan 7, 2021
cb2dc7d
Merge remote-tracking branch 'origin/master' into android-cross
directhex Jan 7, 2021
c7e96c4
Fix AOT on iOS
directhex Jan 8, 2021
dc1a0ec
Cleanup suggestions from Jeremy
directhex Jan 8, 2021
e157f3f
More cleanup
directhex Jan 8, 2021
cab92f2
Fix for WASM failure
directhex Jan 8, 2021
d5e63cc
Add Mono cross to official build
directhex Jan 11, 2021
53dd723
jobParameters cannot be empty
directhex Jan 11, 2021
e921022
Be more aggressive in making offsets build
directhex Jan 11, 2021
96b4f5f
OK, maybe now?
directhex Jan 11, 2021
21d76c9
Switch monoaotcross.proj back to Traversal, due to NuGet error
directhex Jan 11, 2021
02cb3d0
Better fix from Viktor
directhex Jan 11, 2021
a751b90
Ensure AOT arg is passed to package build
directhex Jan 11, 2021
ae850a0
Did I miss build args?
directhex Jan 11, 2021
8847d5f
fixed?
directhex Jan 12, 2021
59d19ea
Change runtime.yml for new checkout behaviour
directhex Jan 12, 2021
30afc60
Let's not put debug spew into the repo, eh?
directhex Jan 12, 2021
072859e
Maybe specifying nameSuffix will allow global-build-job to disambiguate
directhex Jan 12, 2021
62334e2
Liberal sprinkle of ToLower()
directhex Jan 12, 2021
fbb4c0a
Merge branch 'android-cross' of github.com:directhex/runtime into and…
directhex Jan 12, 2021
9edf683
Missing args
directhex Jan 12, 2021
15cf3c0
Add dependsOn to global-build-job
directhex Jan 12, 2021
22bfc7f
Revert "Add dependsOn to global-build-job"
directhex Jan 12, 2021
0587cba
Use build-job directly, going via global-build-job is too hard
directhex Jan 12, 2021
014feb7
Revert "Use build-job directly, going via global-build-job is too hard"
directhex Jan 13, 2021
e7e52c1
Move artifact download to global-job, because reasons
directhex Jan 13, 2021
d9276e8
Pass through dependsOn in global-build-job
directhex Jan 13, 2021
0e20a79
Merge remote-tracking branch 'origin/master' into android-cross
directhex Jan 13, 2021
97b15bb
Changes from Zoltan
directhex Jan 13, 2021
fa0ca33
Changes from Zoltan
directhex Jan 13, 2021
098090e
changes from santi
directhex Jan 13, 2021
4da4b41
Don't redefine
directhex Jan 13, 2021
b0ce416
Better dependsOn
directhex Jan 13, 2021
e719d36
Typo
directhex Jan 13, 2021
af351ac
More mess
directhex Jan 13, 2021
91d1179
Merge remote-tracking branch 'origin/master' into android-cross
directhex Jan 13, 2021
7b01293
Changes from Viktor
directhex Jan 14, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion eng/Subsets.props
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
<DefaultMonoSubsets Condition="'$(MonoEnableLLVM)' == 'true' and '$(MonoLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(MonoAOTEnableLLVM)' == 'true' and '$(MonoAOTLLVMDir)' == ''">mono.llvm+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(TargetOS)' == 'Browser'">$(DefaultMonoSubsets)mono.wasmruntime+</DefaultMonoSubsets>
<DefaultMonoSubsets Condition="'$(BuildMonoCrossAOT)' == 'true'">$(DefaultMonoSubsets)mono.aotcross+</DefaultMonoSubsets>
<DefaultMonoSubsets>$(DefaultMonoSubsets)mono.runtime+mono.corelib+mono.packages</DefaultMonoSubsets>

<DefaultLibrariesSubsets>libs.native+libs.ref+libs.src+libs.pretest+libs.packages</DefaultLibrariesSubsets>
Expand Down Expand Up @@ -92,6 +93,7 @@
<!-- Mono -->
<SubsetName Include="Mono" Description="The Mono runtime and CoreLib." />
<SubsetName Include="Mono.Runtime" Description="The Mono .NET runtime." />
<SubsetName Include="Mono.AotCross" Description="The cross-compiler runtime for Mono AOT." />
<SubsetName Include="Mono.CoreLib" Description="The managed System.Private.CoreLib library for Mono." />
<SubsetName Include="Mono.Packages" Description="The projects that produce NuGet packages for the Mono runtime." />
<SubsetName Include="Mono.WasmRuntime" Description="The WebAssembly runtime." />
Expand Down Expand Up @@ -201,7 +203,7 @@
</ItemGroup>

<!-- Mono sets -->
<ItemGroup Condition="$(_subset.Contains('+mono.llvm+')) or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'Browser'">
<ItemGroup Condition="$(_subset.Contains('+mono.llvm+')) or $(_subset.Contains('+mono.aotcross+')) or '$(TargetOS)' == 'iOS' or '$(TargetOS)' == 'tvOS' or '$(TargetOS)' == 'Android' or '$(TargetOS)' == 'Browser'">
<ProjectToBuild Include="$(MonoProjectRoot)llvm\llvm-init.proj" Category="mono" />
</ItemGroup>

Expand All @@ -213,6 +215,10 @@
<ProjectToBuild Include="$(MonoProjectRoot)mono.proj" Category="mono" />
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+mono.aotcross+'))">
<ProjectToBuild Include="$(MonoProjectRoot)monoaotcross.proj" Category="mono" />
</ItemGroup>

<ItemGroup Condition="$(_subset.Contains('+mono.corelib+'))">
<ProjectToBuild Include="$(MonoProjectRoot)netcore\System.Private.CoreLib\System.Private.CoreLib.csproj" Category="mono" />
</ItemGroup>
Expand Down Expand Up @@ -282,6 +288,7 @@
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' != 'Mono'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-hostfxr.proj" />
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' != 'Mono'" Include="$(InstallerProjectRoot)pkg\sfx\installers\dotnet-runtime-deps\*.proj" />
<SharedFrameworkProjectToBuild Condition="'$(RuntimeFlavor)' != 'Mono'" Include="$(InstallerProjectRoot)pkg\sfx\bundle\Microsoft.NETCore.App.Bundle.bundleproj" />
<SharedFrameworkProjectToBuild Condition="'$(BuildMonoCrossAOT)' == 'true'" Include="$(InstallerProjectRoot)pkg\sfx\Microsoft.NETCore.App\monocrossaot.sfxproj" />
<ProjectToBuild Include="@(SharedFrameworkProjectToBuild)" Category="packs" />
</ItemGroup>

Expand Down
4 changes: 3 additions & 1 deletion eng/liveBuilds.targets
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
<CoreCLRSharedFrameworkDir>$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'sharedFramework'))</CoreCLRSharedFrameworkDir>
<CoreCLRCrossgen2Dir>$([MSBuild]::NormalizeDirectory('$(CoreCLRArtifactsPath)', 'crossgen2'))</CoreCLRCrossgen2Dir>

<MonoCrossAOTDir>$([MSBuild]::NormalizeDirectory('$(MonoArtifactsPath)', 'cross'))</MonoCrossAOTDir>

<LibrariesPackagesDir>$([MSBuild]::NormalizeDirectory('$(LibrariesArtifactsPath)', 'packages', '$(LibrariesConfiguration)'))</LibrariesPackagesDir>
<LibrariesShippingPackagesDir>$([MSBuild]::NormalizeDirectory('$(LibrariesPackagesDir)', 'Shipping'))</LibrariesShippingPackagesDir>
<LibrariesNonShippingPackagesDir>$([MSBuild]::NormalizeDirectory('$(LibrariesPackagesDir)', 'NonShipping'))</LibrariesNonShippingPackagesDir>
Expand Down Expand Up @@ -105,7 +107,7 @@
</RuntimeFiles>

<MonoCrossFiles Condition="'$(TargetsMobile)' == 'true'"
Include="$(MonoArtifactsPath)\cross\*.*" />
Include="$(MonoArtifactsPath)\cross\**\*.*" />
<MonoIncludeFiles Condition="'$(TargetsMobile)' == 'true'"
Include="$(MonoArtifactsPath)\include\**\*.*" />
</ItemGroup>
Expand Down
14 changes: 13 additions & 1 deletion eng/pipelines/common/global-build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ parameters:
variables: []
targetRid: ''
timeoutInMinutes: ''
dependsOn: ''
pool: ''
platform: ''
condition: true
Expand Down Expand Up @@ -40,8 +41,12 @@ jobs:
workspace:
clean: all

dependsOn: ${{ parameters.dependsOn }}

${{ if eq(parameters.useCheckoutBundle, true) }}:
dependsOn: checkout
dependsOn:
- checkout
- ${{ parameters.dependsOn }}

variables:
- name: _osParameter
Expand Down Expand Up @@ -82,6 +87,13 @@ jobs:
- ${{ if eq(parameters.isOfficialBuild, true) }}:
- template: /eng/pipelines/common/restore-internal-tools.yml

- ${{ if eq(parameters.monoCrossAOTTargetOS, 'Android') }}:
- task: DownloadPipelineArtifact@2
displayName: Download AOT offset files
inputs:
artifact: Mono_Offsets_Android
path: '$(Build.SourcesDirectory)/artifacts/obj/monooffsetfiles'

- ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS', 'Android') }}:
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh ${{ parameters.osGroup }} ${{ parameters.archType }} azDO
displayName: Install Build Dependencies
Expand Down
27 changes: 23 additions & 4 deletions eng/pipelines/mono/templates/build-job.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ parameters:
isOfficialBuild: false
crossBuild: false
crossrootfsDir: ''
dependOnEvaluatePaths: false
dependsOn: ''
monoCrossAOTTargetOS: ''
useCheckoutBundle: false

### Product build
Expand All @@ -28,6 +31,7 @@ jobs:
pool: ${{ parameters.pool }}
runtimeVariant: ${{ parameters.runtimeVariant }}
crossBuild: ${{ parameters.crossBuild }}
monoCrossAOTTargetOS: ${{ parameters.monoCrossAOTTargetOS }}
crossrootfsDir: ${{ parameters.crossroofsDir }}
condition: ${{ parameters.condition }}
useCheckoutBundle: ${{ parameters.useCheckoutBundle }}
Expand All @@ -40,6 +44,7 @@ jobs:
# Note that the containers are defined in platform-matrix.yml
container: ${{ parameters.container }}

dependsOn: ${{ parameters.dependsOn }}
timeoutInMinutes: ${{ parameters.timeoutInMinutes }}

gatherAssetManifests: true
Expand All @@ -52,6 +57,10 @@ jobs:
value: ''
- name: osOverride
value: ''
- name: aotCrossParameter
value: ''
- name: llvmParameter
value: ''
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- name: officialBuildIdArg
value: '/p:officialBuildId=$(Build.BuildNumber)'
Expand Down Expand Up @@ -85,6 +94,9 @@ jobs:
- ${{ if eq(parameters.runtimeVariant, 'llvmaot') }}:
- name: llvmParameter
value: /p:MonoEnableLLVM=true /p:MonoBundleLLVMOptimizer=true $(llvmCxxAbi)
- ${{ if eq(parameters.monoCrossAOTTargetOS, 'Android') }}:
- name: aotCrossParameter
value: /p:BuildMonoCrossAOT=true /p:SkipMonoCrossJitConfigure=true /p:BuildMonoAOTCrossCompilerOnly=true
- ${{ parameters.variables }}

steps:
Expand All @@ -101,6 +113,13 @@ jobs:
- script: $(Build.SourcesDirectory)\eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force
displayName: Install native dependencies

- ${{ if eq(parameters.monoCrossAOTTargetOS, 'Android') }}:
- task: DownloadPipelineArtifact@2
displayName: Download AOT offset files
inputs:
artifact: Mono_Offsets_Android
path: '$(Build.SourcesDirectory)/artifacts/obj/monooffsetfiles'

- ${{ if in(parameters.osGroup, 'OSX', 'iOS','tvOS') }}:
- script: |
du -sh $(Build.SourcesDirectory)/*
Expand All @@ -109,10 +128,10 @@ jobs:

# Build
- ${{ if ne(parameters.osGroup, 'windows') }}:
- script: ./build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(llvmParameter)
- script: ./build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter)
displayName: Build product
- ${{ if eq(parameters.osGroup, 'windows') }}:
- script: build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(llvmParameter)
- script: build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter)
displayName: Build product

- ${{ if in(parameters.osGroup, 'OSX', 'iOS','tvOS') }}:
Expand All @@ -134,10 +153,10 @@ jobs:

# Build packages
- ${{ if ne(parameters.osGroup, 'windows') }}:
- script: ./build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(llvmParameter) -pack $(OutputRidArg)
- script: ./build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) -pack $(OutputRidArg)
displayName: Build nupkg
- ${{ if eq(parameters.osGroup, 'windows') }}:
- script: build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(llvmParameter) -pack $(OutputRidArg)
- script: build$(scriptExt) -subset mono -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) $(aotCrossParameter) $(llvmParameter) -pack $(OutputRidArg)
displayName: Build nupkg

# Publish official build
Expand Down
95 changes: 95 additions & 0 deletions eng/pipelines/mono/templates/generate-offsets.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
parameters:
buildConfig: 'Debug'
osGroup: ''
platform: ''
container: ''
timeoutInMinutes: ''
variables: {}
pool: ''
condition: true
isOfficialBuild: false

### Product build
jobs:
- template: xplat-pipeline-job.yml
parameters:
buildConfig: ${{ parameters.buildConfig }}
osGroup: ${{ parameters.osGroup }}
helixType: 'build/product/'
enableMicrobuild: true
pool: ${{ parameters.pool }}
condition: ${{ parameters.condition }}
dependOnEvaluatePaths: ${{ parameters.dependOnEvaluatePaths }}

${{ if eq(parameters.useCheckoutBundle, true) }}:
dependsOn: checkout

# Compute job name from template parameters
name: ${{ format('mono_{0}_offsets', parameters.osGroup) }}
displayName: ${{ format('Mono {0} AOT offsets', parameters.osGroup) }}

# Run all steps in the container.
# Note that the containers are defined in platform-matrix.yml
container: ${{ parameters.container }}

timeoutInMinutes: ${{ parameters.timeoutInMinutes }}

gatherAssetManifests: true
variables:
- name: osGroup
value: ${{ parameters.osGroup }}
- name: officialBuildIdArg
value: ''
- ${{ if and(eq(variables['System.TeamProject'], 'internal'), ne(variables['Build.Reason'], 'PullRequest')) }}:
- name: officialBuildIdArg
value: '/p:officialBuildId=$(Build.BuildNumber)'
- name: osOverride
value: -os Linux
- name: archType
value: x64
- ${{ parameters.variables }}

steps:

# Install native dependencies
# Linux builds use docker images with dependencies preinstalled,
# and FreeBSD builds use a build agent with dependencies
# preinstalled, so we only need this step for OSX and Windows.
- ${{ if in(parameters.osGroup, 'OSX', 'iOS', 'tvOS') }}:
- script: $(Build.SourcesDirectory)/eng/install-native-dependencies.sh $(osGroup) ${{ parameters.archType }} azDO
displayName: Install native dependencies
- ${{ if eq(parameters.osGroup, 'windows') }}:
# Necessary to install python
- script: $(Build.SourcesDirectory)\eng\common\init-tools-native.cmd -InstallDirectory $(Build.SourcesDirectory)\native-tools -Force
displayName: Install native dependencies

# Build
- ${{ if ne(parameters.osGroup, 'windows') }}:
- script: ./build$(scriptExt) -subset mono.aotcross -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) /p:MonoGenerateOffsetsOnly=true
displayName: Generate AOT offsets
- ${{ if eq(parameters.osGroup, 'windows') }}:
- script: build$(scriptExt) -subset mono.aotcross -c $(buildConfig) -arch $(archType) $(osOverride) -ci $(officialBuildIdArg) /p:MonoGenerateOffsetsOnly=true
displayName: Generate AOT offsets

# Upload offset files
- task: CopyFiles@2
displayName: Collect offset files
inputs:
sourceFolder: '$(Build.SourcesDirectory)/artifacts/obj/mono/'
contents: '**/offsets-*.h'
targetFolder: '$(Build.SourcesDirectory)/artifacts/obj/monooffsetfiles/'

- task: PublishPipelineArtifact@1
displayName: Upload offset files
inputs:
targetPath: '$(Build.SourcesDirectory)/artifacts/obj/monooffsetfiles'
artifactName: 'Mono_Offsets_$(osGroup)'

# Publish Logs
- task: PublishPipelineArtifact@1
displayName: Publish Logs
inputs:
targetPath: $(Build.SourcesDirectory)/artifacts/log
artifactName: 'BuildLogs_Mono_Offsets_$(osGroup)'
continueOnError: true
condition: always()
31 changes: 31 additions & 0 deletions eng/pipelines/runtime-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,37 @@ stages:
extraStepsParameters:
name: MonoRuntimePacks

# Build Mono AOT offset headers once, for consumption elsewhere
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/mono/templates/generate-offsets.yml
buildConfig: release
platforms:
- Android_x64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

maybe add a comment here that this will actually generate offsets for all platforms, not just x64.


#
# Build Mono release Android AOT cross-compiler
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/common/global-build-job.yml
runtimeFlavor: mono
buildConfig: release
platforms:
- OSX_x64
- Linux_x64
jobParameters:
buildArgs: -s mono+libs+host+packs -c $(_BuildConfig)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we really need the libs subset here?

/p:BuildMonoCrossAOT=true /p:SkipMonoCrossJitConfigure=true /p:BuildMonoAOTCrossCompilerOnly=true
nameSuffix: AndroidAOT_Mono
runtimeVariant: crossandroid
dependsOn: mono_android_offsets
monoCrossAOTTargetOS: Android
isOfficialBuild: ${{ variables.isOfficialBuild }}
extraStepsTemplate: /eng/pipelines/common/upload-intermediate-artifacts-step.yml
extraStepsParameters:
name: MonoRuntimePacks
#
# Build Mono LLVM runtime packs
#
Expand Down
44 changes: 44 additions & 0 deletions eng/pipelines/runtime.yml
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,22 @@ jobs:
eq(dependencies.checkout.outputs['SetPathVars_coreclr.containsChange'], true),
eq(variables['isFullMatrix'], true))

# Build Mono AOT offset headers once, for consumption elsewhere
# Only when mono changed
#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/mono/templates/generate-offsets.yml
buildConfig: release
platforms:
- Android_x64
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same comment here

jobParameters:
condition: >-
or(
eq(dependencies.checkout.outputs['SetPathVars_mono.containsChange'], true),
eq(dependencies.checkout.outputs['SetPathVars_installer.containsChange'], true),
eq(variables['isFullMatrix'], true))

# Build the whole product using Mono runtime
# Only when libraries, mono or installer are changed
#
Expand Down Expand Up @@ -459,6 +475,34 @@ jobs:
eq(dependencies.checkout.outputs['SetPathVars_mono.containsChange'], true),
eq(variables['isFullMatrix'], true))

#
# Build Mono release Android AOT cross-compiler
# Only when mono changed
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Only when mono changed
# Only when mono or installer changed

#
- template: /eng/pipelines/common/platform-matrix.yml
parameters:
jobTemplate: /eng/pipelines/mono/templates/build-job.yml
runtimeFlavor: mono
buildConfig: release
platforms:
- OSX_x64
- Linux_x64
# - Linux_arm64
# - Linux_musl_arm64
# - windows_x64
# - windows_x86
# - windows_arm
# - windows_arm64
jobParameters:
runtimeVariant: crossandroid
dependsOn: mono_android_offsets
monoCrossAOTTargetOS: Android
condition: >-
or(
eq(dependencies.checkout.outputs['SetPathVars_mono.containsChange'], true),
eq(dependencies.checkout.outputs['SetPathVars_installer.containsChange'], true),
eq(variables['isFullMatrix'], true))

#
# Build Mono release
# Only when libraries or mono changed
Expand Down
4 changes: 2 additions & 2 deletions eng/testing/tests.mobile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -102,14 +102,14 @@
</ItemGroup>

<MonoAOTCompiler Condition="'$(RunAOTCompilation)' == 'true'"
CompilerBinaryPath="$(MicrosoftNetCoreAppRuntimePackNativeDir)cross\mono-aot-cross"
CompilerBinaryPath="$(MicrosoftNetCoreAppRuntimePackNativeDir)cross\$(PackageRID)\mono-aot-cross"
Mode="Full"
OutputType="AsmOnly"
Assemblies="@(AotInputAssemblies)"
AotModulesTablePath="$(BundleDir)\modules.m"
AotModulesTableLanguage="ObjC"
UseLLVM="$(MonoEnableLLVM)"
LLVMPath="$(MicrosoftNetCoreAppRuntimePackNativeDir)cross">
LLVMPath="$(MicrosoftNetCoreAppRuntimePackNativeDir)cross\$(PackageRID)">
<Output TaskParameter="CompiledAssemblies" ItemName="BundleAssemblies" />
</MonoAOTCompiler>

Expand Down
Loading