-
Notifications
You must be signed in to change notification settings - Fork 458
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
builds: Enable lld, optimize linking more, faster cargo-test build #25116
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is going to apply to local developer builds too, no? I don’t think everyone has easy access to lld.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, but on Linux only. I think we should set lld everywhere on Linux actually, and devs who are on Linux should be able to easily install it or override RUSTFLAGS. lld is definitely faster than ld, so I don't see a downside.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm somewhat reticent to set any compile flags that will make it so that
cargo build
doesn't work with a standard Rust installation. Historically the main motivation behind this philosophy has been to encourage external contributions from folks who might not want to customize their toolchains to match Materialize's specifications. That's less of an issue now that we've gone cloud native. But recently @ParkMyCar ran into trouble while trying to get the Fivetran destination deployed because Fivetran's hardware is too old for the target CPU/features we specify in .cargo/config. So I'm increasingly pondering whether we should declare that .cargo/config should be the lowest common denominator, and we'd provide a custom profile likedev-fast
for folks who want to opt into faster compiles at the cost of installing extra tools. But that's not viable until custom profiles learn to support configuring rustflags.Anyway, no qualms with trying this out. We can always find a different course if it proves to be a big problem for external contributors or partners who need to build the repository. Just one ask: can you check with folks in #epd-announce and make sure everyone's up for installing lld? We should also update the developer guide with a note that you need to install lld on Linux (or override rustflags).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The experience with getting the Fivetran Destination built on their hardware definitely surprised me. Also not opposed to adding these for now, but I agree the best approach would be having separate profiles like
dev-fast
andprod-like
, with the default being the lowest common denominator, possibly even no special flags.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I asked in #epd-announce but didn't get much feedback either way: https://materializeinc.slack.com/archives/CUXUBJH7B/p1707756913865829