Skip to content

Commit

Permalink
WiX: require DocC for packaging the Windows toolchain
Browse files Browse the repository at this point in the history
In order to save time, converting DocC to CMake shaves ~8% of the
overall Windows toolchain build time. At this point, it makes sense to
make this is a required component as it can be built with CMake.
  • Loading branch information
compnerd committed Feb 8, 2024
1 parent 3170bd4 commit c3bc90c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
4 changes: 0 additions & 4 deletions platforms/Windows/cli/cli.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,13 @@
DEVTOOLS_ROOT=$(DEVTOOLS_ROOT);
TOOLCHAIN_ROOT=$(TOOLCHAIN_ROOT);
SWIFT_DOCC_BUILD=$(SWIFT_DOCC_BUILD);
INCLUDE_SWIFT_DOCC=$(INCLUDE_SWIFT_DOCC);
SWIFT_FORMAT_BUILD=$(SWIFT_FORMAT_BUILD);
SWIFT_DOCC_RENDER_ARTIFACT_ROOT_DIST=$(SWIFT_DOCC_RENDER_ARTIFACT_ROOT)\dist;
</DefineConstants>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="WixToolset.Heat" Version="4.0.1" />
</ItemGroup>

<ItemGroup Condition="'$(INCLUDE_SWIFT_DOCC)' == 'true'">
<HarvestDirectory Include="$(SWIFT_DOCC_RENDER_ARTIFACT_ROOT)\dist">
<ComponentGroupName>DocCRender</ComponentGroupName>
<DirectoryRefId>_usr_share_docc_render</DirectoryRefId>
Expand Down
12 changes: 4 additions & 8 deletions platforms/Windows/cli/cli.wxs
Original file line number Diff line number Diff line change
Expand Up @@ -232,11 +232,9 @@
</ComponentGroup>

<ComponentGroup Id="DocC" Directory="_usr_bin">
<?if $(INCLUDE_SWIFT_DOCC) == true ?>
<Component>
<File Source="$(SWIFT_DOCC_BUILD)\docc.exe" />
</Component>
<?endif?>
<Component>
<File Source="$(TOOLCHAIN_ROOT)\usr\bin\docc.exe" />
</Component>
</ComponentGroup>

<ComponentGroup Id="swift_format" Directory="_usr_bin">
Expand All @@ -261,9 +259,7 @@
<ComponentGroupRef Id="package_manager" />

<ComponentGroupRef Id="DocC" />
<?if $(INCLUDE_SWIFT_DOCC) == true ?>
<ComponentGroupRef Id="DocCRender" />
<?endif?>
<ComponentGroupRef Id="DocCRender" />

<ComponentGroupRef Id="swift_format" />

Expand Down

0 comments on commit c3bc90c

Please sign in to comment.