Skip to content

[Windows] don't use invalid flags on Windows #8915

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
Mar 5, 2025

Conversation

SamGondelman
Copy link
Contributor

@SamGondelman SamGondelman commented Mar 4, 2025

Summary

This is the fourth PR in my attempt to get Windows builds working. Since "-Wno-missing-prototypes", #pragma GCC diagnostic push, etc. aren't valid with non-gcc compilers, let's wrap them so we are only doing them on non-Windows platforms.

Test plan

Since we aren't actually building on Windows yet, this should have no effect on existing platforms, so just confirm that everything builds.

Copy link

pytorch-bot bot commented Mar 4, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/8915

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit 4a69380 with merge base b2bee8c (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Mar 4, 2025
@SS-JIA
Copy link
Contributor

SS-JIA commented Mar 4, 2025

Overall, I think we only need to change the .bzl files to make sure that we aren't using unsupported compile flags for windows. I would try to avoid modifying the .h/.cpp/ files if possible, except to add #ifdef _GNUC_ guards wherever necessary.

@SamGondelman SamGondelman force-pushed the windows-compile-flags branch from c1f9345 to 4a69380 Compare March 4, 2025 21:57
@SamGondelman SamGondelman changed the title [Windows] move warning suppression to .bzl files [Windows] don't use invalid flags on Windows Mar 4, 2025
@SamGondelman
Copy link
Contributor Author

@SS-JIA thank you! I've made those changes and it's much better.

If I grep for compile_flags = I'm noticing now that there are several other places that might need the select for Windows...since we aren't actually building on Windows yet, I'm hesitant to go in and change all of them yet for fear of breaking something. what do you think?

@SamGondelman SamGondelman added the release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc. label Mar 5, 2025
@SS-JIA
Copy link
Contributor

SS-JIA commented Mar 5, 2025

@SamGondelman LGTM! Yes, we can update compile flags incrementally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: build Changes related to build, including dependency upgrades, build flags, optimizations, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants