aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/backend/backends.py
diff options
context:
space:
mode:
authorAleksey Gurtovoy <agurtovoy@acm.org>2019-09-06 12:31:26 -0500
committerDylan Baker <dylan@pnwbakers.com>2019-09-24 14:22:20 -0700
commit6ac5db50c901f172176b297d087e6123df497062 (patch)
treec57cab2ef12633b760ab0189539a932e3b465817 /mesonbuild/backend/backends.py
parent1670fca36fcb1a4fe4780e96731e954515501a35 (diff)
downloadmeson-6ac5db50c901f172176b297d087e6123df497062.zip
meson-6ac5db50c901f172176b297d087e6123df497062.tar.gz
meson-6ac5db50c901f172176b297d087e6123df497062.tar.bz2
CUDA support on Windows
Diffstat (limited to 'mesonbuild/backend/backends.py')
-rw-r--r--mesonbuild/backend/backends.py26
1 files changed, 2 insertions, 24 deletions
diff --git a/mesonbuild/backend/backends.py b/mesonbuild/backend/backends.py
index 773c75e..30de716 100644
--- a/mesonbuild/backend/backends.py
+++ b/mesonbuild/backend/backends.py
@@ -20,7 +20,7 @@ from .. import mesonlib
from .. import mlog
import json
import subprocess
-from ..mesonlib import MachineChoice, MesonException, OrderedSet
+from ..mesonlib import MachineChoice, MesonException, OrderedSet, OptionOverrideProxy
from ..mesonlib import classify_unity_sources
from ..mesonlib import File
from ..compilers import CompilerArgs, VisualStudioLikeCompiler
@@ -105,28 +105,6 @@ class TestSerialisation:
self.protocol = protocol
self.priority = priority
-class OptionProxy:
- def __init__(self, value):
- self.value = value
-
-class OptionOverrideProxy:
- '''Mimic an option list but transparently override
- selected option values.'''
- def __init__(self, overrides, *options):
- self.overrides = overrides
- self.options = options
-
- def __getitem__(self, option_name):
- for opts in self.options:
- if option_name in opts:
- return self._get_override(option_name, opts[option_name])
- raise KeyError('Option not found', option_name)
-
- def _get_override(self, option_name, base_opt):
- if option_name in self.overrides:
- return OptionProxy(base_opt.validate_value(self.overrides[option_name]))
- return base_opt
-
def get_backend_from_name(backend, build):
if backend == 'ninja':
from . import ninjabackend
@@ -650,7 +628,7 @@ class Backend:
elif isinstance(dep, dependencies.ExternalLibrary):
commands += dep.get_link_args('vala')
else:
- commands += dep.get_compile_args()
+ commands += compiler.get_dependency_compile_args(dep)
# Qt needs -fPIC for executables
# XXX: We should move to -fPIC for all executables
if isinstance(target, build.Executable):