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

Add a CI check for the prebuild debug-mode libraries. #190

Merged
merged 1 commit into from
Jan 25, 2022

Conversation

sunfishcode
Copy link
Member

The existing CI code checked it for --release builds; this ensures it's
checked for debug builds as well.

This also updates the debug builds where became out of date after
bc8ea07 added comments to the .s files, changing the line numbers in
the .debug_line sections.

@sunfishcode
Copy link
Member Author

The current working directory path of the build is embedded in the debug info and is different between my build and the github build.

The existing CI code checked it for --release builds; this ensures it's
checked for debug builds as well.

This also updates the debug builds which became out of date after
bc8ea07 added comments to the .s files, changing the line numbers in
the .debug_line sections.
@sunfishcode
Copy link
Member Author

It looks like building the libraries in a directory named "/home/runner/work/rustix/rustix" was sufficient to reproduce the same binaries that are produced in github CI here!

Copy link
Contributor

@cgwalters cgwalters left a comment

Choose a reason for hiding this comment

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

I haven't fully followed this but - are these prebuilt libraries only needed for CI? Can we skip publishing them in the crates.io source and skip the tests if they're not present?

Right now our projects vendor sources and I'd like to avoid vendoring .a files.

@sunfishcode
Copy link
Member Author

These are used to avoid requiring downstream users needing to have (cross-) compilers installed.

You can build rustix without using them, by enabling the "cc" feature in cargo, and having the appropriate compilers installed. That will build everything from source.

Rustix also has inline asm that it can use instead. This currently only works on nightly Rust, but it's in the process of being stabilized, so in the future it'll work on stable Rust as well.

@sunfishcode sunfishcode merged commit 54a3f6f into main Jan 25, 2022
@sunfishcode sunfishcode deleted the sunfishcode/check-debug-builds branch January 25, 2022 18:14
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