Skip to content
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

Fix static build and install #6158

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

ramenguy99
Copy link

Main goal of the PR is to simplify building statically when used as a submodule by a downstream project.

Fixes #5832 by adding missing STATIC arguments in cmake.

Improves the state on #5821 by fixing build errors, but does not entirely fix the static build install, just disables the failing part. Completely fixing the problem requires being more careful with what dependencies are PRIVATE and PUBLIC or adding additional explicit targets to install.

Also adds an option to disable LTO, this can be useful to limit the size of static libs (slang.lib is currently ~2GB when using LTO).

@ramenguy99 ramenguy99 requested a review from a team as a code owner January 22, 2025 22:10
@CLAassistant
Copy link

CLAassistant commented Jan 22, 2025

CLA assistant check
All committers have signed the CLA.

Copy link
Collaborator

@csyonghe csyonghe left a comment

Choose a reason for hiding this comment

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

Looks good to me! @expipiplus1 can you take a look as well?

@csyonghe csyonghe added the pr: non-breaking PRs without breaking changes label Jan 22, 2025
@expipiplus1
Copy link
Collaborator

/format

Copy link
Collaborator

@expipiplus1 expipiplus1 left a comment

Choose a reason for hiding this comment

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

Thanks! Could you add the new option to building.md please

@slangbot
Copy link
Contributor

🌈 Formatted, please merge the changes from this PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr: non-breaking PRs without breaking changes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Cannot build windows static library with embedded source
5 participants