Skip to content

Conversation

charles-zablit
Copy link
Contributor

@charles-zablit charles-zablit commented Jul 31, 2025

This patch adds a parameter to pick which SDK version to build in build-windows-toolchain.bat.

We are deploying a bot to build and test Swift features of lldb on Windows. The total run time is currently 2h15. Removing the experimentalSDK build would bring that run time to 1h50, which is a 20% speedup.

@charles-zablit charles-zablit requested a review from compnerd as a code owner July 31, 2025 13:46
@charles-zablit charles-zablit self-assigned this Jul 31, 2025
@charles-zablit charles-zablit added Windows Platform: Windows lldb labels Jul 31, 2025
@charles-zablit
Copy link
Contributor Author

@swift-ci please test

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also consider disabling the static libraries for Linux if we are doing this - they are building static and dynamic libraries AFAIK.

utils/build.ps1 Outdated
If set, skips building the msi's and installer
If set, skips building the msi's and installer.
.PARAMETER SkipExperimentalSDK
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think that this should be another parameter. Perhaps we can handle this uniformly with -SDK; this does however make testing harder.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thinking a bit about this - it would actually be helpful to have this functionality more generically: we should be able to disable the non-experimental SDK bits more than the experimental SDK bits. The experimental SDK is what will become the default. That would also help with testing; perhaps we can have something clever as the specifier in the -WindowsSDKs and -AndroidSDKs to control which SDK and architectures we support. I would be open to renaming the options btw, they currently control the architectures in the SDK, not the SDKs. If we can simplify the logic for the handling, perhaps something like:

-AndroidSDKs experimental -AndroidSDKArchitectures aarch64 -WindowsSDKs default,experimental -WindowsSDKArchitectures arm64,x64

-BinaryCache %BuildRoot% ^
-ImageRoot %BuildRoot% ^
%SkipPackagingArg% ^
%SkipExperimentalSDKArg% ^
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, we cannot skip these in this test. This is used for the PR testing and we want to maintain that these are tested - they build differently and are very easy to regress because they are building static libraries.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to clarify: we would only deactivate this when running the lldb specific bots. The current Swift PR bots would still run those tests. Nothing would change for the current bots, it would only affect the new bots.

@compnerd
Copy link
Member

compnerd commented Aug 1, 2025

BTW, this is an older idea: #81790 was an initial attempt to do part of what this wants. I think I can possibly put up a partial PoC that you can help drive and use for the purposes of tweaking the LLDB tests.

@compnerd
Copy link
Member

compnerd commented Aug 1, 2025

#83496 is something that I am playing around with - I think that is a better approach than this. It allows us to disable the default SDK and only build the experimental SDK instead! It will need a little bit more work before it can be merged, but it should be a good starting point.

@charles-zablit charles-zablit force-pushed the charles-zablit/windows/add-optional-skip-experimental-sdk branch from 27fdeb7 to b402160 Compare September 1, 2025 14:44
@charles-zablit charles-zablit changed the title [windows] add a parameter to skip building experimental SDKs in build.ps1 [windows] add a parameter to pick which Windows SDK version to build Sep 1, 2025
@charles-zablit
Copy link
Contributor Author

Since #83496 was merged, this PR now only adds a parameter to skip the experimental SDKs in CI. Thanks @compnerd !

Copy link
Member

@compnerd compnerd left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this going to be temporary? I would prefer that we track an issue to remove this. I am waiting on swiftlang/swift-installer-scripts#456 to get merged so I can remove the legacy SDK build.

Personally, I don't think that this is worth adding - this is going to be going away pretty soon.

@charles-zablit
Copy link
Contributor Author

Is this going to be temporary? I would prefer that we track an issue to remove this. I am waiting on swiftlang/swift-installer-scripts#456 to get merged so I can remove the legacy SDK build.

Personally, I don't think that this is worth adding - this is going to be going away pretty soon.

Thanks! I didn't know about swiftlang/swift-installer-scripts#456. I will close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lldb Windows Platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants