Skip to content

Commit 2566533

Browse files
Merge pull request #375 from swiftlang/revert-371-your-allocator
Revert "WiX: simplify mimalloc packaging, require mimalloc"
2 parents ebb922f + 421a6b9 commit 2566533

File tree

2 files changed

+19
-13
lines changed

2 files changed

+19
-13
lines changed

platforms/Windows/bld/bld.wixproj

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

platforms/Windows/bld/bld.wxs

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -483,23 +483,28 @@
483483
</ComponentGroup>
484484

485485
<ComponentGroup Id="mimalloc" Directory="_usr_bin">
486-
<Component>
487-
<File Source="$(TOOLCHAIN_ROOT)\usr\bin\mimalloc.dll" />
488-
</Component>
489-
<Component>
486+
<?if $(ENABLE_MIMALLOC) == true ?>
490487
<?if $(ProductArchitecture) = "amd64" ?>
491-
<File Source="$(TOOLCHAIN_ROOT)\usr\bin\mimalloc-redirect.dll" />
488+
<Component>
489+
<File Source="$(TOOLCHAIN_ROOT)\usr\bin\mimalloc-redirect.dll" />
490+
</Component>
491+
<?if $(WORKAROUND_MIMALLOC_ISSUE_997) ?>
492+
<Component>
493+
<File Source="$(TOOLCHAIN_ROOT)\usr\bin\mimalloc-redirect-arm64.dll" />
494+
</Component>
495+
<?endif?>
492496
<?elseif $(ProductArchitecture) = "arm64" ?>
493-
<File Source="$(TOOLCHAIN_ROOT)\usr\bin\mimalloc-redirect-arm64.dll" />
494-
<?endif?>
495-
</Component>
496-
<?if $(WORKAROUND_MIMALLOC_ISSUE_997) ?>
497-
<Component>
498-
<?if $(ProductArchitecture) = "amd64" ?>
497+
<Component>
499498
<File Source="$(TOOLCHAIN_ROOT)\usr\bin\mimalloc-redirect-arm64.dll" />
500-
<?elseif $(ProductArchitecture) = "arm64" ?>
501-
<File Source="$(TOOLCHAIN_ROOT)\usr\bin\mimalloc-redirect.dll" />
499+
</Component>
500+
<?if $(WORKAROUND_MIMALLOC_ISSUE_997) ?>
501+
<Component>
502+
<File Source="$(TOOLCHAIN_ROOT)\usr\bin\mimalloc-redirect.dll" />
503+
</Component>
502504
<?endif?>
505+
<?endif?>
506+
<Component>
507+
<File Source="$(TOOLCHAIN_ROOT)\usr\bin\mimalloc.dll" />
503508
</Component>
504509
<?endif?>
505510
</ComponentGroup>

0 commit comments

Comments
 (0)