diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-10-13 11:28:11 -0400 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2021-10-14 14:17:50 -0400 |
commit | a3f3ddf581b7dd07d8e48ac0ad32d0234ae9dd9e (patch) | |
tree | 986063abbcb06a8fb3295b213b82809a03195dba /mesonbuild/compilers/cuda.py | |
parent | 8a0d12ec295780977d0e2cb7e2f64f1e3a3e0067 (diff) | |
download | meson-a3f3ddf581b7dd07d8e48ac0ad32d0234ae9dd9e.zip meson-a3f3ddf581b7dd07d8e48ac0ad32d0234ae9dd9e.tar.gz meson-a3f3ddf581b7dd07d8e48ac0ad32d0234ae9dd9e.tar.bz2 |
cuda: Override std=none to avoid host_compiler to emit -std argument
Diffstat (limited to 'mesonbuild/compilers/cuda.py')
-rw-r--r-- | mesonbuild/compilers/cuda.py | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/mesonbuild/compilers/cuda.py b/mesonbuild/compilers/cuda.py index 9a3de48..5a7df73 100644 --- a/mesonbuild/compilers/cuda.py +++ b/mesonbuild/compilers/cuda.py @@ -627,12 +627,9 @@ class CudaCompiler(Compiler): # We must strip the -std option from the host compiler option set, as NVCC has # its own -std flag that may not agree with the host compiler's. - overrides = {name: opt.value for name, opt in options.items()} - overrides.pop(OptionKey('std', machine=self.for_machine, - lang=self.host_compiler.language), None) - host_options = self.host_compiler.get_options().copy() - if 'std' in host_options: - del host_options['std'] # type: ignore + host_options = {key: options.get(key, opt) for key, opt in self.host_compiler.get_options().items()} + std_key = OptionKey('std', machine=self.for_machine, lang=self.host_compiler.language) + overrides = {std_key: 'none'} return OptionOverrideProxy(overrides, host_options) def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: |