Skip to content

Commit a9f328d

Browse files
authored
[NativeAOT-LLVM] Reduce host package sizes #3166 from SingleAccretion/Package-Size
2 parents 8395429 + 26e4ff0 commit a9f328d

File tree

2 files changed

+27
-35
lines changed

2 files changed

+27
-35
lines changed

eng/pipelines/runtimelab.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ extends:
119119
buildConfig: release
120120
platforms:
121121
- linux_x64
122-
- osx_x64
122+
# - osx_x64 https://github.com/dotnet/runtimelab/issues/3168
123123
- windows_x64
124124
- browser_wasm_win
125125
- wasi_wasm_win

src/installer/pkg/projects/Microsoft.DotNet.ILCompiler.LLVM/Microsoft.DotNet.ILCompiler.LLVM.pkgproj

Lines changed: 26 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -2,56 +2,48 @@
22

33
<PropertyGroup>
44
<GeneratePackage>true</GeneratePackage>
5-
<IncludeSymbolsInPackage>true</IncludeSymbolsInPackage>
65
<PackageDescription>Provides a native AOT compiler and runtime for .NET</PackageDescription>
7-
</PropertyGroup>
86

9-
<PropertyGroup>
10-
<!-- For now, send symbols package into a dummy directory to avoid conflicts with dotnet/runtime and
11-
to avoid issues with objwriter not having the rigth ELF version resource -->
12-
<SymbolPackageOutputPath>$([MSBuild]::NormalizeDirectory('$(ArtifactsPackagesDir)', 'Ignored'))</SymbolPackageOutputPath>
7+
<BuildingIlcHostPackage Condition="'$(TargetsWasm)' != 'true'">true</BuildingIlcHostPackage>
138
</PropertyGroup>
149

1510
<Target Name="GetIlcCompilerFiles"
1611
DependsOnTargets="ResolveLibrariesFromLocalBuild"
1712
BeforeTargets="GetPackageFiles">
1813

19-
<ItemGroup Condition="'$(PackageTargetRuntime)' != ''">
20-
<File Include="@(LibrariesRuntimeFiles)">
21-
<TargetPath>framework/%(LibrariesRuntimeFiles.NativeSubDirectory)</TargetPath>
22-
</File>
23-
<File Include="$(CoreCLRILCompilerDir)*">
24-
<TargetPath>tools</TargetPath>
25-
</File>
26-
<File Include="$(CoreCLRAotSdkDir)*">
27-
<TargetPath>sdk</TargetPath>
28-
</File>
14+
<ItemGroup Condition="'$(PackageTargetRuntime)' == ''">
15+
<File Include="$(CoreCLRBuildIntegrationDir)*" TargetPath="build" />
16+
<File Include="$(CoreCLRILCompilerDir)netstandard\*" TargetPath="tools/netstandard" />
17+
18+
<!-- TODO-LLVM-Upstream: https://github.com/dotnet/runtimelab/issues/2576 -->
19+
<File Include="$(ArtifactsBinDir)Microsoft.Interop.SourceGeneration\$(Configuration)\netstandard2.0\*" TargetPath="analyzers/dotnet/cs" />
20+
<File Include="$(ArtifactsBinDir)JSImportGenerator\$(Configuration)\netstandard2.0\*" TargetPath="analyzers/dotnet/cs" />
21+
</ItemGroup>
22+
23+
<ItemGroup Condition="'$(PackageTargetRuntime)' != '' and '$(BuildingIlcHostPackage)' == 'true'">
24+
<File Include="$(CoreCLRILCompilerDir)*" TargetPath="tools" />
25+
</ItemGroup>
26+
27+
<ItemGroup Condition="'$(PackageTargetRuntime)' != '' and '$(BuildingIlcHostPackage)' != 'true'">
28+
<File Include="@(LibrariesRuntimeFiles)" TargetPath="framework/%(LibrariesRuntimeFiles.NativeSubDirectory)" />
29+
<File Include="$(CoreCLRAotSdkDir)*" TargetPath="sdk" />
30+
<File Include="$(MibcOptimizationDataDir)/$(TargetOS)/$(TargetArchitecture)/**/*.mibc" TargetPath="mibc" />
31+
2932
<DotnetJsCoreCLRAotSdkExtension Include="ts;js;map;json" />
3033
<File Include="$(CoreCLRAotSdkDir)dotnetjs/*.%(DotnetJsCoreCLRAotSdkExtension.Identity)" TargetPath="sdk/dotnetjs" />
3134
<File Include="$(CoreCLRAotSdkDir)dotnetjs/src/*.%(DotnetJsCoreCLRAotSdkExtension.Identity)" TargetPath="sdk/dotnetjs/src" />
3235
<File Include="$(CoreCLRAotSdkDir)dotnetjs/src/es6/*.%(DotnetJsCoreCLRAotSdkExtension.Identity)" TargetPath="sdk/dotnetjs/src/es6" />
33-
<File Include="$(MibcOptimizationDataDir)/$(TargetOS)/$(TargetArchitecture)/**/*.mibc">
34-
<TargetPath>mibc</TargetPath>
35-
</File>
3636
</ItemGroup>
3737

38+
<!-- exclude native symbols from ilc package (they are included in symbols package) -->
3839
<ItemGroup>
39-
<File Include="$(CoreCLRBuildIntegrationDir)*">
40-
<TargetPath>build</TargetPath>
41-
</File>
42-
<File Include="$(CoreCLRILCompilerDir)netstandard\*">
43-
<TargetPath>tools/netstandard</TargetPath>
44-
</File>
45-
</ItemGroup>
40+
<!-- on windows, remove the pdbs only from tools directory (both managed and native) -->
41+
<LibPackageExcludes Include="tools\%2A%2A\%2A.pdb"/>
4642

47-
<!-- TODO-LLVM-Upstream: https://github.com/dotnet/runtimelab/issues/2576 -->
48-
<ItemGroup Condition="'$(PackageTargetRuntime)' == ''">
49-
<File Include="$(ArtifactsBinDir)Microsoft.Interop.SourceGeneration\$(Configuration)\netstandard2.0\*">
50-
<TargetPath>analyzers/dotnet/cs</TargetPath>
51-
</File>
52-
<File Include="$(ArtifactsBinDir)JSImportGenerator\$(Configuration)\netstandard2.0\*">
53-
<TargetPath>analyzers/dotnet/cs</TargetPath>
54-
</File>
43+
<LibPackageExcludes Include="%2A%2A\%2A.dbg"/>
44+
<LibPackageExcludes Include="%2A%2A\%2A.debug"/>
45+
<LibPackageExcludes Include="%2A%2A\%2A.dSYM"/>
46+
<LibPackageExcludes Include="%2A%2A\%2A.dwarf"/>
5547
</ItemGroup>
5648
</Target>
5749

0 commit comments

Comments
 (0)