Skip to content

[ESI] Extend instead of override CMAKE_CXX_FLAGS #8551

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

mortbopet
Copy link
Contributor

No description provided.

@mortbopet mortbopet requested a review from teqdruid as a code owner June 10, 2025 13:56
@teqdruid
Copy link
Contributor

teqdruid commented Jun 10, 2025 via email

@teqdruid
Copy link
Contributor

The problem with this approach is that a flag disabling exceptions may be in the flags already. So appending isn't enough.

Which is the situation when the runtime is compiled in a CIRCT context.

@mortbopet
Copy link
Contributor Author

Sure, but that's not a blank check to override all CXX flags. In that case, the ESI runtime should scan the existing flags and remove any flags that it definitely does not want to build with.
An example - in an internal build, it is required that /FS is set on all targets, when using sccache.
This, unfortunately, is impossible when ESI overrides all flags - and we do not want to manually add /FS to the one-to-many targets which the ESI runtime builds (i.e. the runtime itself, perhaps zlib if it's also building that, ...).

@teqdruid
Copy link
Contributor

teqdruid commented Jun 11, 2025 via email

@mortbopet
Copy link
Contributor Author

@teqdruid unfortunately, i am not aware of anything better... added a regex replace for exception-related flags, hopefully that is a sufficient enough catch-all.

Copy link
Contributor

@teqdruid teqdruid left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks

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.

2 participants