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

Use modern stripping option #2173

Merged
merged 1 commit into from
Aug 5, 2024
Merged

Conversation

konstin
Copy link
Member

@konstin konstin commented Aug 4, 2024

Use -C strip=symbols instead of -C link-arg=-s. Still broken due to rust-lang/cargo#14346, but i think it's the right modernization anyway.

Use `-C strip=symbols` instead of `-C link-arg=-s`. Still broken due to rust-lang/cargo#14346, but i think it's the right modernization anyway.
@konstin konstin added the enhancement New feature or request label Aug 4, 2024
@konstin konstin enabled auto-merge August 4, 2024 16:01
Copy link

netlify bot commented Aug 4, 2024

Deploy Preview for maturin-guide ready!

Name Link
🔨 Latest commit 68f297b
🔍 Latest deploy log https://app.netlify.com/sites/maturin-guide/deploys/66afa5c181aaf60009571fcf
😎 Deploy Preview https://deploy-preview-2173--maturin-guide.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@konstin konstin added this pull request to the merge queue Aug 4, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 4, 2024
@konstin konstin added this pull request to the merge queue Aug 4, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Aug 4, 2024
Copy link
Member

@messense messense left a comment

Choose a reason for hiding this comment

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

LGTM, note that this only supports Rust 1.45+ which should be acceptable.

@messense messense merged commit ed8ba1e into main Aug 5, 2024
28 checks passed
@messense messense deleted the konsti/use-more-modern-stripping-option branch August 5, 2024 01:32
@edmorley
Copy link

Still broken due to rust-lang/cargo#14346, but i think it's the right modernization anyway.

Another option which would both work around the cargo regression and perhaps make things more robust long term would be to switch to setting CARGO_PROFILE_RELEASE_STRIP=true instead of passing manual linker args.

I think passing manual linker args is always going to risk conflicts with Cargo implementation details, whereas using the Cargo provided options (via env vars) will mean Maturin benefits from whatever improvements Cargo makes to features over time (for example, perhaps in the future strip=true might also enable other optimisations, that the manual linker options wouldn't) - plus means Maturin works out of the box more like how end users might invoke Cargo outside of Maturin.

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

Successfully merging this pull request may close these issues.

3 participants