Skip to content

Commit 895b5c8

Browse files
committed
[windows] add usr/lib/swift/clang to the toolchain installer
this directory contains clang's resource headers that are needed by the clang embedded inside of the swift compiler, as it assumes its clang resources are in usr/lib/swift/clang, as opposed to standalone clang looking in usr/lib/clang/<clang_version>
1 parent dd33cf3 commit 895b5c8

File tree

3 files changed

+16
-1
lines changed

3 files changed

+16
-1
lines changed

platforms/Windows/bld/bld.wixproj

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
DEVTOOLS_ROOT=$(DEVTOOLS_ROOT);
66
TOOLCHAIN_ROOT=$(TOOLCHAIN_ROOT);
77
TOOLCHAIN_ROOT_USR_LIB_CLANG=$(TOOLCHAIN_ROOT)\usr\lib\clang;
8+
TOOLCHAIN_ROOT_USR_LIB_SWIFT_CLANG=$(TOOLCHAIN_ROOT)\usr\lib\swift\clang;
89
</DefineConstants>
910
</PropertyGroup>
1011

@@ -22,4 +23,15 @@
2223
<SuppressRootDirectory>true</SuppressRootDirectory>
2324
</HarvestDirectory>
2425
</ItemGroup>
26+
27+
<ItemGroup>
28+
<HarvestDirectory Include="$(TOOLCHAIN_ROOT)\usr\lib\swift\clang">
29+
<ComponentGroupName>SwiftClangResources</ComponentGroupName>
30+
<DirectoryRefId>_usr_lib_swift_clang</DirectoryRefId>
31+
<PreprocessorVariable>var.TOOLCHAIN_ROOT_USR_LIB_SWIFT_CLANG</PreprocessorVariable>
32+
<SuppressCom>true</SuppressCom>
33+
<SuppressRegistry>true</SuppressRegistry>
34+
<SuppressRootDirectory>true</SuppressRootDirectory>
35+
</HarvestDirectory>
36+
</ItemGroup>
2537
</Project>

platforms/Windows/bld/bld.wxs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@
506506
<ComponentGroupRef Id="TestingMacros" />
507507

508508
<ComponentGroupRef Id="ClangResources" />
509+
<ComponentGroupRef Id="SwiftClangResources" />
509510

510511
<ComponentGroupRef Id="EnvironmentVariables" />
511512
<ComponentGroupRef Id="VersionedDirectoryCleanup" />

platforms/Windows/shared/shared.wxs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,9 @@
4444
<Directory Id="_usr_include" Name="include" />
4545
<Directory Id="_usr_lib" Name="lib">
4646
<Directory Id="_usr_lib_clang" Name="clang" />
47-
<Directory Id="_usr_lib_swift" Name="swift" />
47+
<Directory Id="_usr_lib_swift" Name="swift">
48+
<Directory Id="_usr_lib_swift_clang" Name="clang" />
49+
</Directory>
4850
</Directory>
4951
<Directory Id="_usr_share" Name="share">
5052
<Directory Id="_usr_share_docc" Name="docc">

0 commit comments

Comments
 (0)