mirror of
https://github.com/mesonbuild/meson.git
synced 2026-06-30 19:57:45 +00:00
backend: Finish typing the rest of the vs backends
This commit is contained in:
committed by
Paolo Bonzini
parent
4a077324c7
commit
261c25d446
@@ -11,7 +11,9 @@ from .vs2010backend import Vs2010Backend
|
||||
from ..mesonlib import MesonException
|
||||
|
||||
if T.TYPE_CHECKING:
|
||||
from ..arglist import CompilerArgs
|
||||
from ..build import Build
|
||||
from ..compilers.compilers import Language
|
||||
|
||||
|
||||
class Vs2017Backend(Vs2010Backend):
|
||||
@@ -45,11 +47,11 @@ class Vs2017Backend(Vs2010Backend):
|
||||
if sdk_version:
|
||||
self.windows_target_platform_version = sdk_version.rstrip('\\')
|
||||
|
||||
def generate_debug_information(self, link):
|
||||
def generate_debug_information(self, link: ET.Element) -> None:
|
||||
# valid values for vs2017 is 'false', 'true', 'DebugFastLink', 'DebugFull'
|
||||
ET.SubElement(link, 'GenerateDebugInformation').text = 'DebugFull'
|
||||
|
||||
def generate_lang_standard_info(self, file_args, clconf):
|
||||
def generate_lang_standard_info(self, file_args: T.Dict[Language, CompilerArgs], clconf: ET.Element) -> None:
|
||||
if 'cpp' in file_args:
|
||||
optargs = [x for x in file_args['cpp'] if x.startswith('/std:c++')]
|
||||
if optargs:
|
||||
|
||||
@@ -10,7 +10,9 @@ import xml.etree.ElementTree as ET
|
||||
from .vs2010backend import Vs2010Backend
|
||||
|
||||
if T.TYPE_CHECKING:
|
||||
from ..arglist import CompilerArgs
|
||||
from ..build import Build
|
||||
from ..compilers.compilers import Language
|
||||
|
||||
|
||||
class Vs2019Backend(Vs2010Backend):
|
||||
@@ -40,11 +42,11 @@ class Vs2019Backend(Vs2010Backend):
|
||||
if sdk_version:
|
||||
self.windows_target_platform_version = sdk_version.rstrip('\\')
|
||||
|
||||
def generate_debug_information(self, link):
|
||||
def generate_debug_information(self, link: ET.Element) -> None:
|
||||
# valid values for vs2019 is 'false', 'true', 'DebugFastLink', 'DebugFull'
|
||||
ET.SubElement(link, 'GenerateDebugInformation').text = 'DebugFull'
|
||||
|
||||
def generate_lang_standard_info(self, file_args, clconf):
|
||||
def generate_lang_standard_info(self, file_args: T.Dict[Language, CompilerArgs], clconf: ET.Element) -> None:
|
||||
if 'cpp' in file_args:
|
||||
optargs = [x for x in file_args['cpp'] if x.startswith('/std:c++')]
|
||||
if optargs:
|
||||
|
||||
@@ -10,7 +10,9 @@ import xml.etree.ElementTree as ET
|
||||
from .vs2010backend import Vs2010Backend
|
||||
|
||||
if T.TYPE_CHECKING:
|
||||
from ..arglist import CompilerArgs
|
||||
from ..build import Build
|
||||
from ..compilers.compilers import Language
|
||||
|
||||
|
||||
class Vs2022Backend(Vs2010Backend):
|
||||
@@ -40,11 +42,11 @@ class Vs2022Backend(Vs2010Backend):
|
||||
if sdk_version:
|
||||
self.windows_target_platform_version = sdk_version.rstrip('\\')
|
||||
|
||||
def generate_debug_information(self, link):
|
||||
def generate_debug_information(self, link: ET.Element) -> None:
|
||||
# valid values for vs2022 is 'false', 'true', 'DebugFastLink', 'DebugFull'
|
||||
ET.SubElement(link, 'GenerateDebugInformation').text = 'DebugFull'
|
||||
|
||||
def generate_lang_standard_info(self, file_args, clconf):
|
||||
def generate_lang_standard_info(self, file_args: T.Dict[Language, CompilerArgs], clconf: ET.Element) -> None:
|
||||
if 'cpp' in file_args:
|
||||
optargs = [x for x in file_args['cpp'] if x.startswith('/std:c++')]
|
||||
if optargs:
|
||||
|
||||
@@ -10,7 +10,9 @@ import xml.etree.ElementTree as ET
|
||||
from .vs2010backend import Vs2010Backend
|
||||
|
||||
if T.TYPE_CHECKING:
|
||||
from ..arglist import CompilerArgs
|
||||
from ..build import Build
|
||||
from ..compilers.compilers import Language
|
||||
|
||||
|
||||
class Vs2026Backend(Vs2010Backend):
|
||||
@@ -40,11 +42,11 @@ class Vs2026Backend(Vs2010Backend):
|
||||
if sdk_version:
|
||||
self.windows_target_platform_version = sdk_version.rstrip('\\')
|
||||
|
||||
def generate_debug_information(self, link):
|
||||
def generate_debug_information(self, link: ET.Element) -> None:
|
||||
# valid values for vs2026 is 'false', 'true', 'DebugFastLink', 'DebugFull'
|
||||
ET.SubElement(link, 'GenerateDebugInformation').text = 'DebugFull'
|
||||
|
||||
def generate_lang_standard_info(self, file_args, clconf):
|
||||
def generate_lang_standard_info(self, file_args: T.Dict[Language, CompilerArgs], clconf: ET.Element) -> None:
|
||||
if 'cpp' in file_args:
|
||||
optargs = [x for x in file_args['cpp'] if x.startswith('/std:c++')]
|
||||
if optargs:
|
||||
|
||||
@@ -34,6 +34,14 @@ modules = [
|
||||
'mesonbuild/backend/backends.py',
|
||||
'mesonbuild/backend/ninjabackend.py',
|
||||
'mesonbuild/backend/nonebackend.py',
|
||||
'mesonbuild/backend/vs2010backend.py',
|
||||
'mesonbuild/backend/vs2012backend.py',
|
||||
'mesonbuild/backend/vs2013backend.py',
|
||||
'mesonbuild/backend/vs2015backend.py',
|
||||
'mesonbuild/backend/vs2017backend.py',
|
||||
'mesonbuild/backend/vs2019backend.py',
|
||||
'mesonbuild/backend/vs2022backend.py',
|
||||
'mesonbuild/backend/vs2026backend.py',
|
||||
'mesonbuild/cmdline.py',
|
||||
'mesonbuild/coredata.py',
|
||||
'mesonbuild/depfile.py',
|
||||
|
||||
Reference in New Issue
Block a user