Skip to content

Commit 3e3f827

Browse files
committed
Reword push_cc_arg() doc comments.
* Clarify that the flag is added after other arguments (although obvious from the function name), * Push extraneous info to the second paragraph to display nicer in IDE completions, * Reword the bits about nvcc and the `-Xcompiler` flag.
1 parent 0d9a0f8 commit 3e3f827

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/lib.rs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3277,11 +3277,12 @@ impl Tool {
32773277
self.removed_args.push(flag);
32783278
}
32793279

3280-
/// Add a flag, and optionally prepend the NVCC wrapper flag "-Xcompiler".
3280+
/// Push a flag to the end of the compiler's arguments list.
32813281
///
3282-
/// Currently this is only used for compiling CUDA sources, since NVCC only
3283-
/// accepts a limited set of GNU-like flags, and the rest must be prefixed
3284-
/// with a "-Xcompiler" flag to get passed to the underlying C++ compiler.
3282+
/// Currently `-Xcompiler` is inserted before the passed flag when compiling
3283+
/// CUDA sources since NVCC only accepts a limited set of GNU-like flags,
3284+
/// while the rest must be prefixed with the `-Xcompiler` flag to get passed
3285+
/// to the underlying C++ compiler.
32853286
fn push_cc_arg(&mut self, flag: OsString) {
32863287
if self.cuda {
32873288
self.args.push("-Xcompiler".into());

0 commit comments

Comments
 (0)