Skip to content

Detect release builds by comparing CMAKE_BUILD_TYPE to Debug, not Release #12045

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 3 commits into from
Jun 28, 2025

Conversation

swolchok
Copy link
Contributor

MinSizeRel and RelWithDebInfo are also release builds.

swolchok added 3 commits June 26, 2025 13:00
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
Copy link

pytorch-bot bot commented Jun 27, 2025

🔗 Helpful Links

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

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

❗ 1 Active SEVs

There are 1 currently active SEVs. If your PR is affected, please view them below:

✅ No Failures

As of commit bf512fe with merge base 8bc99d3 (image):
💚 Looks good so far! There are no failures yet. 💚

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

@swolchok
Copy link
Contributor Author

noting CI is green before starting stack land

Base automatically changed from gh/swolchok/478/head to main June 28, 2025 00:01
@swolchok swolchok requested a review from manuelcandales as a code owner June 28, 2025 00:01
@swolchok swolchok merged commit 3e19e67 into main Jun 28, 2025
101 checks passed
@swolchok swolchok deleted the gh/swolchok/482/head branch June 28, 2025 00:02
swolchok added a commit that referenced this pull request Jun 28, 2025
By accidentally fixing the code in test/build_size_test.sh to correctly detect release builds (EQUAL is for numbers; you need STREQUAL for strings), #12045 broke that script on Mac because `--gc-sections` is not a valid linker flag there. This PR creates a general utility function for stripping dead code in linker flags and uses it everywhere we currently set `--gc-sections`.


ghstack-source-id: 58a2fd2
ghstack-comment-id: 3014707984
Pull-Request-resolved: #12089
mergennachin pushed a commit that referenced this pull request Jun 28, 2025
By accidentally fixing the code in test/build_size_test.sh to correctly
detect release builds (EQUAL is for numbers; you need STREQUAL for
strings), #12045 broke that script on Mac because `--gc-sections` is not
a valid linker flag there. This PR creates a general utility function
for stripping dead code in linker flags and uses it everywhere we
currently set `--gc-sections`.
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants