-
Notifications
You must be signed in to change notification settings - Fork 43
[Packaging] Add No-asserts toolchain to setup #425
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
@@ -103,6 +130,10 @@ | |||
<Property Id="TOOLCHAINSVERSIONED"> | |||
<RegistrySearch Root="HKCU" Key="SOFTWARE\!(loc.ManufacturerName)\Installer\$(ProductVersion)\!(bind.Property.UpgradeCode)" Name="ToolchainsVersioned" Type="directory" /> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should name this to include the variant.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that would break the upgrade scenario.
@@ -86,6 +108,11 @@ | |||
<RegistryValue Root="HKCU" Key="SOFTWARE\!(loc.ManufacturerName)\Installer\$(ProductVersion)\!(bind.Property.UpgradeCode)" Name="ToolchainsVersioned" Value="[ToolchainsVersioned]" /> | |||
<util:RemoveFolderEx Property="TOOLCHAINSVERSIONED" Condition="TOOLCHAINSVERSIONED" /> | |||
</Component> | |||
|
|||
<Component Id="VersionedDirectoryCleanupToolchains_noasserts"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can this not be merged into the singular VersionedDirectoryCleanupToolchains
? We should be cleaning up %ROOT%\Toolchains
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no. they are two different directories: <INSTALLROOT>\Toolchains\0.0.0+Asserts
and <INSTALLROOT>\Toolchains\0.0.0+NoAsserts
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding was that it was meant to clean up any orphaned directories in <INSTALLROOT>\Toolchains
. Is that not the case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are two folders. Toolchain, and ToolchainVersioned:
<DirectoryRef Id="INSTALLROOT">
<Directory Id="Toolchains" Name="Toolchains">
<Directory Id="ToolchainsVersioned" Name="$(ProductVersion)+Asserts">
So for every top level folder we create we need to remember to remove it. so this is why we have similar entries for VersionedDirectoryCleanupRedistVersion
, VersionedDirectoryCleanupRuntimes
and VersionedDirectoryCleanupRedistVersion
</Directory> | ||
</Directory> | ||
</DirectoryRef> | ||
</Fragment> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure I understand why the _noasserts
suffix is needed at all. The layout is going to be identical, its just that the content source is different. The only piece that changes is the ToolchainsVersioned directory, which can include the suffix. If we do this, we can actually share the definition across the variants no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
they are diffrent layouts. they are rooted at diffrent directores. one at 0.0.0+Asserts
and one at 0.0.0+NoAsserts
. a directory entry in an msi is just a name and parent. since the parents are diffrent, we need a new entry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see; lets make that a prefix I think.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why? all the other names it is a suffix. e.g. dbg.noasserts
. why would component names and folder names be different?
…ad of INCLUDE_NOASSERTS as a flag
<PropertyGroup> | ||
<DefineConstants> | ||
$(DefineConstants); | ||
_USR_LIB_CLANG_NOASSERTS=$(ImageRoot)\Toolchains\$(ProductVersion)+Asserts\usr\lib\clang; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make the variant a prefix instead of a suffix?
</Directory> | ||
</Directory> | ||
</DirectoryRef> | ||
</Fragment> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see; lets make that a prefix I think.
@@ -86,6 +108,11 @@ | |||
<RegistryValue Root="HKCU" Key="SOFTWARE\!(loc.ManufacturerName)\Installer\$(ProductVersion)\!(bind.Property.UpgradeCode)" Name="ToolchainsVersioned" Value="[ToolchainsVersioned]" /> | |||
<util:RemoveFolderEx Property="TOOLCHAINSVERSIONED" Condition="TOOLCHAINSVERSIONED" /> | |||
</Component> | |||
|
|||
<Component Id="VersionedDirectoryCleanupToolchains_noasserts"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My understanding was that it was meant to clean up any orphaned directories in <INSTALLROOT>\Toolchains
. Is that not the case?
This is a follow up to swiftlang/swift#81644 which adds build support for no-asserts toolchain variant along with the default asserts variant.
Note to reviewers: Reviewing this change one commit at a time should give you a better experience than looking at all changes at once.
Changes:
bld.msi
,ide.msi
,cli.msi
anddbg.msi
into two separate msi's each. the current authoring with no changes (Same upgrade codes, and component names) goes to a<product>.asserts.msi
and<product>.asserts.cab
, and a new msi is created using the same authoring but new upgrade codes to<product>.noasserts.msi
and<product>.noasserts.cab
bld.msi
,ide.msi
,cli.msi
anddbg.msi
moves from<product>.wxs
to<product>.wxi
and is shared between the two msi variants.asserts/<product>.asserts.wxs
vsnoasserts/<product>.noasserts.wxs
ToolchainsVersioned
defined inshared.wxs
Still Open