Skip to content

Fix LTO regressions in nightly toolchain#52

Merged
ascjones merged 6 commits into
masterfrom
aj-xbuild
May 12, 2020
Merged

Fix LTO regressions in nightly toolchain#52
ascjones merged 6 commits into
masterfrom
aj-xbuild

Conversation

@ascjones

@ascjones ascjones commented May 12, 2020

Copy link
Copy Markdown
Collaborator

Fix for use-ink/ink#391.

Recent nightly has broken since rust-lang/rust#71925 (see rust-osdev/cargo-xbuild#69 (comment))

@riusricardo riusricardo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The build command is fixed but generating the metadata is broken.
I get a cc linker error.

flipper/target/release/deps/flipper.flipper.8f0qzq8t-cgu.0.rcgu.o: file not recognized: File format not recognized
          collect2: error: ld returned 1 exit status

EDIT: Same error as in the tests :(

@ascjones

Copy link
Copy Markdown
Collaborator Author

@riusricardo indeed I am working on troubleshooting this as we speak

@ascjones

Copy link
Copy Markdown
Collaborator Author

As a workaround you can comment out lto = true in your contract's Cargo.toml in order to generate the metadata. Remember to enable again when building the contract itself.

I'm working on doing this automatically but in the meantime this should suffice.

@ascjones ascjones changed the title Upgrade xbuild to include LTO fix Fix lto regressions in nightly toolchain May 12, 2020
@ascjones ascjones changed the title Fix lto regressions in nightly toolchain Fix LTO regressions in nightly toolchain May 12, 2020
@ascjones

Copy link
Copy Markdown
Collaborator Author

@riusricardo could you try again now, and see if it works for you?

@riusricardo

Copy link
Copy Markdown

@ascjones everything is working again 🎉

@riusricardo riusricardo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

👍

@ascjones
ascjones merged commit 285a049 into master May 12, 2020
@ascjones
ascjones deleted the aj-xbuild branch May 12, 2020 18:35
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