-
Notifications
You must be signed in to change notification settings - Fork 715
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
Build speedup: Don't build "test" static library in build.rs unless we're going to build/run tests #1705
Comments
OTOH, we are also trying to remove dev-dependencies from the ring crate so that people can do |
Maybe you can use This solution isn't perfect since user could still use |
For what we're doing right now, we actually wouldn't need the ring-c-test crate to be a dev-dependency of the ring crate; as long as they use the same build.rs they will compile |
...and, since there would be no dependency relationship between the two crates, they should build perfectly in parallel. |
PR #1710 creates a workspace. Presumably |
Right now we build two static libraries in build.rs: one that ring actually needs, and one that only ring's tests need. And that second static library is really just for "crypto/constant_time_test.c" and probably soon "crypto/compiler_test.c" (to be adapted from BoringSSL's "compiler_test.cc").
Ideally we'd only build these source files and run the archiver to create the library when we're actually building tests. For most users of ring, they will not be building ring's tests, so they should be able to skip building that library completely.
In rust-lang/cargo#1581 (comment), @dcsommer had a very good hack for creating what is effectively a "test build script" that achieves this effect, which I am quoting here for archival purposes:
To use that idea:
The text was updated successfully, but these errors were encountered: