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

Set lto = "thin" for metadata build to fix linkme on macOS #1200

Merged
merged 3 commits into from
Jul 24, 2023

Conversation

ascjones
Copy link
Collaborator

@ascjones ascjones commented Jul 6, 2023

use-ink/ink#1827 uses linkme to collect events from external crates. However there is a known issue on macOS which can cause some events from external crates not to be added to the ink_metadata::EVENTS distributed slice.

This PR attempts to fix this by setting lto = "thin" for the release target when building the metadata.

Notes:

  • any user supplied value of lto in profile.release will override this default value
  • I have made the fields and types of Profile public so that these can be set upon construction of the Profile
  • I have made the fields of Profile all optional, so that if not set then the default cargo profile settings will be used, see https://doc.rust-lang.org/cargo/reference/profiles.html#default-profiles

@ascjones ascjones mentioned this pull request Jul 6, 2023
@ascjones ascjones merged commit 96092f5 into master Jul 24, 2023
10 checks passed
@ascjones ascjones deleted the aj/events2-linking branch July 24, 2023 14:25
This was referenced Jul 26, 2023
@smiasojed smiasojed mentioned this pull request Mar 4, 2024
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