From ed9239c1ff5c269553bdf2c5c11f322b86774018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aleksey=20Kliger=20=28=CE=BBgeek=29?= Date: Fri, 9 Sep 2022 16:27:05 -0400 Subject: [PATCH] [wasm-mt] Create a Microsoft.NET.Runtime.Emscripten.Cache Spin out the emscripten system libraries cache into a separate nupkg. - Split up the Emscripten SDK by moving the system libraries cache into a separate nupkg. - make a new Emscripten Cache SDK that includes just the cache directory - the Cache SDK overrides the WasmCachePath (if it's not set by the user) to point into the Cache SDK we leave the mt multithreaded libraries in the cache. (But we remove the ww WebWorker (non-pthread) Emscripten API libraries) Addresses dotnet/runtime#75263 --- eng/emsdk.proj | 56 ++++++++++++------- ...osoft.NET.Runtime.Emscripten.Cache.pkgproj | 21 +++++++ ...crosoft.NET.Runtime.Emscripten.Cache.props | 11 ++++ .../WorkloadManifest.json.in | 11 ++++ .../WorkloadManifest.targets | 2 + eng/sdk_files/Emscripten.Cache.props | 7 +++ eng/sdk_files/Emscripten.Cache.targets | 7 +++ 7 files changed, 94 insertions(+), 21 deletions(-) create mode 100644 eng/nuget/Microsoft.NET.Runtime.Emscripten.Cache/Microsoft.NET.Runtime.Emscripten.Cache.pkgproj create mode 100644 eng/nuget/Microsoft.NET.Runtime.Emscripten.Cache/Microsoft.NET.Runtime.Emscripten.Cache.props create mode 100644 eng/sdk_files/Emscripten.Cache.props create mode 100644 eng/sdk_files/Emscripten.Cache.targets diff --git a/eng/emsdk.proj b/eng/emsdk.proj index 36795ee078..e2490b7fcb 100644 --- a/eng/emsdk.proj +++ b/eng/emsdk.proj @@ -124,29 +124,42 @@ + + $(ArtifactsObjDir)\.cache-sdk\ + + + + + + + + + - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + @@ -165,6 +178,7 @@ + diff --git a/eng/nuget/Microsoft.NET.Runtime.Emscripten.Cache/Microsoft.NET.Runtime.Emscripten.Cache.pkgproj b/eng/nuget/Microsoft.NET.Runtime.Emscripten.Cache/Microsoft.NET.Runtime.Emscripten.Cache.pkgproj new file mode 100644 index 0000000000..fd3f9d3953 --- /dev/null +++ b/eng/nuget/Microsoft.NET.Runtime.Emscripten.Cache/Microsoft.NET.Runtime.Emscripten.Cache.pkgproj @@ -0,0 +1,21 @@ + + + + + + + + + + Microsoft.NET.Runtime.Emscripten.$(EmscriptenVersion).Cache.$(PackageRID) + + + + + Contains Emscripten SDK system libraries cache for $(PackageRID). + Contains Emscripten SDK system libraries cache for $(PackageRID). + + + + + diff --git a/eng/nuget/Microsoft.NET.Runtime.Emscripten.Cache/Microsoft.NET.Runtime.Emscripten.Cache.props b/eng/nuget/Microsoft.NET.Runtime.Emscripten.Cache/Microsoft.NET.Runtime.Emscripten.Cache.props new file mode 100644 index 0000000000..eee485708d --- /dev/null +++ b/eng/nuget/Microsoft.NET.Runtime.Emscripten.Cache/Microsoft.NET.Runtime.Emscripten.Cache.props @@ -0,0 +1,11 @@ + + + $(ArtifactsObjDir).cache-sdk\ + + + + + + + + diff --git a/eng/nuget/Microsoft.NET.Workload.Emscripten.net7.Manifest/WorkloadManifest.json.in b/eng/nuget/Microsoft.NET.Workload.Emscripten.net7.Manifest/WorkloadManifest.json.in index a3ba7c4d2c..d19720689d 100644 --- a/eng/nuget/Microsoft.NET.Workload.Emscripten.net7.Manifest/WorkloadManifest.json.in +++ b/eng/nuget/Microsoft.NET.Workload.Emscripten.net7.Manifest/WorkloadManifest.json.in @@ -7,6 +7,7 @@ "packs": [ "Microsoft.NET.Runtime.Emscripten.Node.net7", "Microsoft.NET.Runtime.Emscripten.Python.net7", + "Microsoft.NET.Runtime.Emscripten.Cache.net7", "Microsoft.NET.Runtime.Emscripten.Sdk.net7" ], "platforms": [ "win-x64", "linux-x64", "osx-x64", "osx-arm64" ] @@ -32,6 +33,16 @@ "osx-arm64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Python.osx-x64" } }, + "Microsoft.NET.Runtime.Emscripten.Cache.net7" : { + "kind": "Sdk", + "version": "${PackageVersion}", + "alias-to": { + "win-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Cache.win-x64", + "linux-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Cache.linux-x64", + "osx-x64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Cache.osx-x64", + "osx-arm64": "Microsoft.NET.Runtime.Emscripten.${EmscriptenVersion}.Cache.osx-x64" + } + }, "Microsoft.NET.Runtime.Emscripten.Sdk.net7" : { "kind": "Sdk", "version": "${PackageVersion}", diff --git a/eng/nuget/Microsoft.NET.Workload.Emscripten.net7.Manifest/WorkloadManifest.targets b/eng/nuget/Microsoft.NET.Workload.Emscripten.net7.Manifest/WorkloadManifest.targets index 8d5acd6b8b..3a2dbbd523 100644 --- a/eng/nuget/Microsoft.NET.Workload.Emscripten.net7.Manifest/WorkloadManifest.targets +++ b/eng/nuget/Microsoft.NET.Workload.Emscripten.net7.Manifest/WorkloadManifest.targets @@ -22,5 +22,7 @@ + + diff --git a/eng/sdk_files/Emscripten.Cache.props b/eng/sdk_files/Emscripten.Cache.props new file mode 100644 index 0000000000..f993940ac6 --- /dev/null +++ b/eng/sdk_files/Emscripten.Cache.props @@ -0,0 +1,7 @@ + + + $(MSBuildThisFileDirectory)..\tools\ + $([MSBuild]::NormalizeDirectory('$(EmscriptenCacheSdkToolsPath)', 'emscripten', 'cache')) + + + diff --git a/eng/sdk_files/Emscripten.Cache.targets b/eng/sdk_files/Emscripten.Cache.targets new file mode 100644 index 0000000000..071a641e66 --- /dev/null +++ b/eng/sdk_files/Emscripten.Cache.targets @@ -0,0 +1,7 @@ + + + + $(EmscriptenCacheSdkCacheDir) + + +