-
Notifications
You must be signed in to change notification settings - Fork 540
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
nvcc: Handle compiler detection when gcc isn't on the path #1747
nvcc: Handle compiler detection when gcc isn't on the path #1747
Conversation
you have a bunch of failure in the CI :) |
To properly handle compiler detction sccache invokes the compiler with -E. To generate the preprocessed output `nvcc` invokes the host comiler, which either requires gcc to be on the path or `-ccbin` argument to be provided. This PR allows `sccache` to be used with `nvcc` when `gcc` isn't on the path but the host compiler to be used is included via `-ccbin`. This was found when building small build images which only had a compiler with a name like `gcc-aarch64`.
5e52d1a
to
b19fc29
Compare
3d3afdd
to
5ef97cc
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1747 +/- ##
==========================================
+ Coverage 29.22% 29.38% +0.16%
==========================================
Files 49 49
Lines 17488 17593 +105
Branches 8457 8500 +43
==========================================
+ Hits 5110 5169 +59
Misses 7252 7252
- Partials 5126 5172 +46
☔ View full report in Codecov by Sentry. |
I think I fixed all the issues and learned some more rust along the way :) |
} | ||
use self::ArgData::PassThrough as Detect_PassThrough; | ||
|
||
counted_array!(static ARGS: [ArgInfo<ArgData>; _] = [ |
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.
could you please document this a bit? :)
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.
Do you mean like move the documentation from 1101 up to here?
Or explain what this code is doing :)
Le ven. 28 avr. 2023, 17:10, Robert Maynard ***@***.***> a
écrit :
… ***@***.**** commented on this pull request.
------------------------------
In src/compiler/compiler.rs
<#1747 (comment)>:
> cc.map(|c| (c, None))
}
}
+ArgData! {
+ PassThrough(OsString),
+}
+use self::ArgData::PassThrough as Detect_PassThrough;
+
+counted_array!(static ARGS: [ArgInfo<ArgData>; _] = [
Do you mean like move the documentation from 1101 up to here?
—
Reply to this email directly, view it on GitHub
<#1747 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAFTBDXD4QJZZGXO2HQSUSLXDPMVTANCNFSM6AAAAAAXLDUTIY>
.
You are receiving this because you commented.Message ID:
***@***.***>
|
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.
Updated comments on what/why of the code changes
I have updated the general code blocks with explanations on what we are doing, and why. |
please run rustfmt :) |
To properly handle compiler detction sccache invokes the compiler with -E. To generate the preprocessed output
nvcc
invokes the host comiler, which either requires gcc to be on the path or-ccbin
argument to be provided.This PR allows
sccache
to be used withnvcc
whengcc
isn't on the path but the host compiler to be used is included via-ccbin
.This was found when building small build images which only had a compiler with a name like
gcc-aarch64
.