Skip to content

[CMake Build] Build and link driver dependencies as static libraries #965

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

Merged
merged 1 commit into from
Jan 27, 2022

Conversation

artemcm
Copy link
Contributor

@artemcm artemcm commented Jan 5, 2022

This will allow us to not install shared libraries of TSC, ArgumentParser, etc. into the toolchain when installing the driver.

This would also help avoid having to do things like:
#963
#953

@artemcm artemcm requested a review from compnerd January 5, 2022 22:44
@artemcm artemcm force-pushed the CMakeBuildStaticDeps branch 2 times, most recently from 795f1a6 to 1d38b4f Compare January 6, 2022 17:30
@artemcm artemcm force-pushed the CMakeBuildStaticDeps branch from 1d38b4f to c725ec1 Compare January 19, 2022 22:46
@artemcm
Copy link
Contributor Author

artemcm commented Jan 19, 2022

@swift-ci please test

@artemcm artemcm changed the title [WIP][CMake Build] Build and link driver dependencies as static libraries [CMake Build] Build and link driver dependencies as static libraries Jan 21, 2022
@artemcm artemcm requested review from tomerd, neonichu and edymtt January 21, 2022 21:11
@artemcm artemcm marked this pull request as ready for review January 21, 2022 21:12
@artemcm
Copy link
Contributor Author

artemcm commented Jan 21, 2022

Cross-repo tests in swiftlang/swift#40754 are green, including toolchain builds.
This PR is now ready for review.

@tomerd
Copy link
Contributor

tomerd commented Jan 22, 2022

not a CMake expert, but seems good to me 👍

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.

One thing that this would do is prevent the use of the build-script-helper on windows (static linking is not available on Windows, though that is something that I would like to fix).

This will allow us to not install shared libraries of TSC, ArgumentParser, etc. into the toolchain when installing the driver.
@artemcm artemcm force-pushed the CMakeBuildStaticDeps branch from c725ec1 to 10418ae Compare January 24, 2022 21:07
@artemcm
Copy link
Contributor Author

artemcm commented Jan 24, 2022

@swift-ci please test

@artemcm
Copy link
Contributor Author

artemcm commented Jan 25, 2022

One thing that this would do is prevent the use of the build-script-helper on windows (static linking is not available on Windows, though that is something that I would like to fix).

Is it currently being used to build swift-driver? If it is, should we preserve the ability to follow the old (pre-this-PR) code-path?

@compnerd
Copy link
Member

No, I don't believe that the python script is being used, so it should be okay to merge this and fix that at some later date.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants