Skip to content

Commit

Permalink
cuda: respect host compiler -Werror
Browse files Browse the repository at this point in the history
* Currently, running Meson with `--werror` only adds a select few -Werror
  options that trigger only for device, not host code. In general, users expect
  `--werror` to also error out on warnings in host code with nvcc.
  • Loading branch information
SoapGentoo committed Mar 6, 2024
1 parent 5e0a307 commit b4643a1
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion mesonbuild/compilers/cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -708,7 +708,9 @@ def get_debug_args(self, is_debug: bool) -> T.List[str]:
return cuda_debug_args[is_debug]

def get_werror_args(self) -> T.List[str]:
return ['-Werror=cross-execution-space-call,deprecated-declarations,reorder']
return [
"-Werror=cross-execution-space-call,deprecated-declarations,reorder"
] + ["-Xcompiler=" + x for x in self.host_compiler.get_werror_args()]

def get_warn_args(self, level: str) -> T.List[str]:
return self.warn_args[level]
Expand Down

0 comments on commit b4643a1

Please sign in to comment.