-
Notifications
You must be signed in to change notification settings - Fork 12.7k
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
Remove redundant compiler check. Allow CC override #25792
Conversation
Currently, there are two conditional blocks that exist to check for "clang or gcc" On line 866: ``` if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ] then err "either clang or gcc is required" fi ``` and on line 1019: ``` if [ -z "$CC" -a -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ] then err "either clang or gcc is required" fi ``` Given the order of the clauses, this results in the "either clang or gcc is required" error from the earlier block, (even) when CC is set. The expected behaviour is to honour user-flags, in this case CC. Aside from removing all hand-holdy compiler checks in favour of actual compiler *feature* checks, this change removes the redundant former block in favour of the latter block, which appears designed to allow the expected behaviour.
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @pcwalton (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. The way Github handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see CONTRIBUTING.md for more information. |
Currently, there are two conditional blocks that exist to check for "clang or gcc" On line 866: ``` if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ] then err "either clang or gcc is required" fi ``` and on line 1019: ``` if [ -z "$CC" -a -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ] then err "either clang or gcc is required" fi ``` Given the order of the clauses, this results in the "either clang or gcc is required" error from the earlier block, (even) when CC is set. The expected behaviour is to honour user-flags, in this case CC. Aside from removing all hand-holdy compiler checks in favour of actual compiler *feature* checks, this change removes the redundant former block in favour of the latter block, which appears designed to allow the expected behaviour.
Currently, there are two conditional blocks that exist to check for "clang or gcc" On line 866: ``` if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ] then err "either clang or gcc is required" fi ``` and on line 1019: ``` if [ -z "$CC" -a -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ] then err "either clang or gcc is required" fi ``` Given the order of the clauses, this results in the "either clang or gcc is required" error from the earlier block, (even) when CC is set. The expected behaviour is to honour user-flags, in this case CC. Aside from removing all hand-holdy compiler checks in favour of actual compiler *feature* checks, this change removes the redundant former block in favour of the latter block, which appears designed to allow the expected behaviour.
Currently, there are two conditional blocks that exist to check for "clang or gcc" On line 866: ``` if [ -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ] then err "either clang or gcc is required" fi ``` and on line 1019: ``` if [ -z "$CC" -a -z "$CFG_ENABLE_CLANG" -a -z "$CFG_GCC" ] then err "either clang or gcc is required" fi ``` Given the order of the clauses, this results in the "either clang or gcc is required" error from the earlier block, (even) when CC is set. The expected behaviour is to honour user-flags, in this case CC. Aside from removing all hand-holdy compiler checks in favour of actual compiler *feature* checks, this change removes the redundant former block in favour of the latter block, which appears designed to allow the expected behaviour.
Currently, there are two conditional blocks that exist to check for "clang or gcc"
On line 866:
and on line 1019:
Given the order of the clauses, this results in the "either clang or gcc is required" error from the earlier block, (even) when CC is set.
The expected behaviour is to honour user-flags, in this case CC.
Aside from removing all hand-holdy compiler checks in favour of actual compiler feature checks, this change removes the redundant former block in favour of the latter block, which appears designed to allow the expected behaviour.