Skip to content
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: Support -Werror with argument #1823

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 11 additions & 3 deletions src/compiler/nvcc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ impl CCompilerImpl for Nvcc {

counted_array!(pub static ARGS: [ArgInfo<gcc::ArgData>; _] = [
//todo: refactor show_includes into dependency_args

take_arg!("--Werror", OsString, CanBeSeparated('='), PreprocessorArgument),
take_arg!("--archive-options options", OsString, CanBeSeparated('='), PassThrough),
take_arg!("--compiler-bindir", OsString, CanBeSeparated('='), PassThrough),
take_arg!("--compiler-options", OsString, CanBeSeparated('='), PreprocessorArgument),
Expand All @@ -203,6 +203,7 @@ counted_array!(pub static ARGS: [ArgInfo<gcc::ArgData>; _] = [
take_arg!("--system-include", PathBuf, CanBeSeparated('='), PreprocessorArgumentPath),
take_arg!("--threads", OsString, CanBeSeparated('='), Unhashed),

take_arg!("-Werror", OsString, CanBeSeparated('='), PreprocessorArgument),
take_arg!("-Xarchive", OsString, CanBeSeparated('='), PassThrough),
take_arg!("-Xcompiler", OsString, CanBeSeparated('='), PreprocessorArgument),
take_arg!("-Xlinker", OsString, CanBeSeparated('='), PassThrough),
Expand Down Expand Up @@ -408,7 +409,10 @@ mod test {
"foo.o",
"--include-path",
"include-file",
"-isystem=/system/include/file"
"-isystem=/system/include/file",
"-Werror",
"cross-execution-space-call",
"-Werror=all-warnings"
);
assert_eq!(Some("foo.cpp"), a.input.to_str());
assert_eq!(Language::Cxx, a.language);
Expand All @@ -428,7 +432,11 @@ mod test {
"--include-path",
"include-file",
"-isystem",
"/system/include/file"
"/system/include/file",
"-Werror",
"cross-execution-space-call",
"-Werror",
"all-warnings"
],
a.preprocessor_args
);
Expand Down
Loading