-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[-Zbuild-std] Only build libtest when libstd is built #7360
[-Zbuild-std] Only build libtest when libstd is built #7360
Conversation
r? @ehuss (rust_highfive has picked a reviewer for you, use r? to override) |
9cdbbc5
to
6b4fd44
Compare
@bors: r+ Seems like a reasonable workaround for now! |
📌 Commit 6b4fd44 has been approved by |
⌛ Testing commit 6b4fd44 with merge a41885e9b40ac3801a48b355a0f95b84c935266a... |
💔 Test failed - checks-azure |
I have never seen that error before, weird! @bors retry |
…lexcrichton [-Zbuild-std] Only build libtest when libstd is built Currently `libtest` is always compiled when a compilation unit uses a test harness. This implicitly adds builds the standard library too because `libtest` depends on it. This breaks the use of custom test frameworks in `no_std` crates as reported in #7216 (comment). This pull request fixes the issue by only building `libtest` if `libstd` is built. This makes sense in my opinion because when the user explicitly specified `-Zbuild-std=core`, they probably don't want to build the full standard library and rather get a compilation error when they accidentally use `libtest`.
☀️ Test successful - checks-azure |
Currently
libtest
is always compiled when a compilation unit uses a test harness. This implicitly adds builds the standard library too becauselibtest
depends on it. This breaks the use of custom test frameworks inno_std
crates as reported in #7216 (comment).This pull request fixes the issue by only building
libtest
iflibstd
is built. This makes sense in my opinion because when the user explicitly specified-Zbuild-std=core
, they probably don't want to build the full standard library and rather get a compilation error when they accidentally uselibtest
.