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: avoid adding -Wpedantic to compile lines #12912

Merged
merged 1 commit into from
Feb 29, 2024
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
8 changes: 7 additions & 1 deletion mesonbuild/compilers/cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,13 @@ def __init__(self, ccache: T.List[str], exelist: T.List[str], version: str, for_
self.exe_wrapper = exe_wrapper
self.host_compiler = host_compiler
self.base_options = host_compiler.base_options
self.warn_args = {level: self._to_host_flags(flags) for level, flags in host_compiler.warn_args.items()}
# -Wpedantic generates useless churn due to nvcc's dual compilation model producing
# a temporary host C++ file that includes gcc-style line directives:
# https://stackoverflow.com/a/31001220
self.warn_args = {
level: self._to_host_flags(list(f for f in flags if f != '-Wpedantic'))
for level, flags in host_compiler.warn_args.items()
}

@classmethod
def _shield_nvcc_list_arg(cls, arg: str, listmode: bool = True) -> str:
Expand Down
Loading