aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/cuda.py
diff options
context:
space:
mode:
authorOlexa Bilaniuk <obilaniu@gmail.com>2021-02-21 07:04:55 -0500
committerJussi Pakkanen <jpakkane@gmail.com>2021-02-22 23:56:55 +0200
commit4c1a0c400f4a57bb51d663fcc3aa90014dd47df3 (patch)
treeb06c0ad6fae0275961eacf13204d141184d2ca8a /mesonbuild/compilers/cuda.py
parent2fabd4c7dc22373e99fc63823d80083ad30704b8 (diff)
downloadmeson-4c1a0c400f4a57bb51d663fcc3aa90014dd47df3.zip
meson-4c1a0c400f4a57bb51d663fcc3aa90014dd47df3.tar.gz
meson-4c1a0c400f4a57bb51d663fcc3aa90014dd47df3.tar.bz2
[CUDA] Bugfix: Forward sanitizer_*_args() methods to host compiler.
Enables -Db_sanitize=undefined and company. Also serves as a testcase for NVCC comma-shielding: Because the test- case declares `b_sanitize=address,undefined`, the host GCC compiler needs `-fsanitize=address,undefined`, but this stands a danger of being split by NVCC when wrapped with `-Xcompiler=args,args`. Special, already-existing comma-shielding codepaths activate to prevent this splitting. Closes #8394.
Diffstat (limited to 'mesonbuild/compilers/cuda.py')
-rw-r--r--mesonbuild/compilers/cuda.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/mesonbuild/compilers/cuda.py b/mesonbuild/compilers/cuda.py
index 4efe0c6..bbe6e95 100644
--- a/mesonbuild/compilers/cuda.py
+++ b/mesonbuild/compilers/cuda.py
@@ -625,6 +625,12 @@ class CudaCompiler(Compiler):
# return self._to_host_flags(self.host_compiler.get_optimization_args(optimization_level))
return cuda_optimization_args[optimization_level]
+ def sanitizer_compile_args(self, value: str) -> T.List[str]:
+ return self._to_host_flags(self.host_compiler.sanitizer_compile_args(value))
+
+ def sanitizer_link_args(self, value: str) -> T.List[str]:
+ return self._to_host_flags(self.host_compiler.sanitizer_link_args(value))
+
def get_debug_args(self, is_debug: bool) -> T.List[str]:
return cuda_debug_args[is_debug]