diff options
| author | Dylan Baker <dylan@pnwbakers.com> | 2019-08-21 13:12:30 -0700 |
|---|---|---|
| committer | Dylan Baker <dylan@pnwbakers.com> | 2019-10-07 12:08:20 -0700 |
| commit | 0c22798b1ad4678abb205280060175678a790c4a (patch) | |
| tree | e58a51d87bffe1ecd6437f85adc0adefbed469d6 /mesonbuild/compilers/swift.py | |
| parent | ff4a17dbef08a1d8afd075f57dbab0f5c76951ab (diff) | |
| download | meson-0c22798b1ad4678abb205280060175678a790c4a.tar.gz | |
compilers: replace CompilerType with MachineInfo
Now that the linkers are split out of the compilers this enum is
only used to know what platform we're compiling for. Which is
what the MachineInfo class is for
Diffstat (limited to 'mesonbuild/compilers/swift.py')
| -rw-r--r-- | mesonbuild/compilers/swift.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/mesonbuild/compilers/swift.py b/mesonbuild/compilers/swift.py index e42905635..c5d388559 100644 --- a/mesonbuild/compilers/swift.py +++ b/mesonbuild/compilers/swift.py @@ -13,11 +13,15 @@ # limitations under the License. import subprocess, os.path +import typing from ..mesonlib import EnvironmentException, MachineChoice from .compilers import Compiler, swift_buildtype_args, clike_debug_args +if typing.TYPE_CHECKING: + from ..envconfig import MachineInfo + swift_optimization_args = {'0': [], 'g': [], '1': ['-O'], @@ -30,9 +34,10 @@ class SwiftCompiler(Compiler): LINKER_PREFIX = ['-Xlinker'] - def __init__(self, exelist, version, for_machine: MachineChoice, is_cross, **kwargs): + def __init__(self, exelist, version, for_machine: MachineChoice, + is_cross, info: 'MachineInfo', **kwargs): self.language = 'swift' - super().__init__(exelist, version, for_machine, **kwargs) + super().__init__(exelist, version, for_machine, info, **kwargs) self.version = version self.id = 'llvm' self.is_cross = is_cross |
