diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2018-08-18 15:24:31 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2018-08-18 19:08:44 +0300 |
commit | ffde7d0e8b491b8b24d6be2f0af447687d63d4f8 (patch) | |
tree | d0e3c9ea4b2d4504dcfd476542a05daca9907c4c | |
parent | 2d98f5b0277211ed30401803aceaa03e1c03c620 (diff) | |
download | meson-buildtypeseparation.tar.gz |
Call it b_vscrt instead for clarity.buildtypeseparation
-rw-r--r-- | docs/markdown/Builtin-options.md | 2 | ||||
-rw-r--r-- | docs/markdown/snippets/buildtype_toggles.md | 2 | ||||
-rw-r--r-- | mesonbuild/backend/vs2010backend.py | 10 | ||||
-rw-r--r-- | mesonbuild/compilers/c.py | 2 | ||||
-rw-r--r-- | mesonbuild/compilers/compilers.py | 8 | ||||
-rw-r--r-- | mesonbuild/compilers/cpp.py | 2 |
6 files changed, 13 insertions, 13 deletions
diff --git a/docs/markdown/Builtin-options.md b/docs/markdown/Builtin-options.md index a92dc1685..05578c70b 100644 --- a/docs/markdown/Builtin-options.md +++ b/docs/markdown/Builtin-options.md @@ -74,7 +74,7 @@ platforms or with all compilers: | b_bitcode | false | true, false | Embed Apple bitcode, see below | | b_colorout | always | auto, always, never | Use colored output | | b_coverage | false | true, false | Enable coverage tracking | -| b_crtlib | from_buildtype| none, md, mdd, mt, mtd, from_buildtype | VS runtime library to use (since 0.48.0) | +| b_vscrt | from_buildtype| none, md, mdd, mt, mtd, from_buildtype | VS runtime library to use (since 0.48.0) | | b_lundef | true | true, false | Don't allow undefined symbols when linking | | b_lto | false | true, false | Use link time optimization | | b_ndebug | false | true, false, if-release | Disable asserts | diff --git a/docs/markdown/snippets/buildtype_toggles.md b/docs/markdown/snippets/buildtype_toggles.md index 123f09de6..e6ae53d22 100644 --- a/docs/markdown/snippets/buildtype_toggles.md +++ b/docs/markdown/snippets/buildtype_toggles.md @@ -18,4 +18,4 @@ meson configure -Doptimization=g Similarly we have added a toggle option to select the version of Visual Studio C runtime to use. By default it uses the debug runtime DLL debug builds and release DLL for release builds but this can be -manually changed with the new build type option. +manually changed with the new base option `b_vscrt`. diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index 63105e631..4c799d03e 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -685,7 +685,7 @@ class Vs2010Backend(backends.Backend): compiler = self._get_cl_compiler(target) buildtype_args = compiler.get_buildtype_args(self.buildtype) buildtype_link_args = compiler.get_buildtype_linker_args(self.buildtype) - crtlib_type = self.environment.coredata.base_options['b_crtlib'] + vscrt_type = self.environment.coredata.base_options['b_vscrt'] project_name = target.name target_name = target.name root = ET.Element('Project', {'DefaultTargets': "Build", @@ -739,21 +739,21 @@ class Vs2010Backend(backends.Backend): if '/INCREMENTAL:NO' in buildtype_link_args: ET.SubElement(type_config, 'LinkIncremental').text = 'false' # CRT type; debug or release - if crtlib_type.value == 'from_buildtype': + if vscrt_type.value == 'from_buildtype': if self.buildtype == 'debug' or self.buildtype == 'debugoptimized': ET.SubElement(type_config, 'UseDebugLibraries').text = 'true' ET.SubElement(type_config, 'RuntimeLibrary').text = 'MultiThreadedDebugDLL' else: ET.SubElement(type_config, 'UseDebugLibraries').text = 'false' ET.SubElement(type_config, 'RuntimeLibrary').text = 'MultiThreaded' - elif crtlib_type.value == 'mdd': + elif vscrt_type.value == 'mdd': ET.SubElement(type_config, 'UseDebugLibraries').text = 'true' ET.SubElement(type_config, 'RuntimeLibrary').text = 'MultiThreadedDebugDLL' - elif crtlib_type.value == 'mt': + elif vscrt_type.value == 'mt': # FIXME, wrong ET.SubElement(type_config, 'UseDebugLibraries').text = 'false' ET.SubElement(type_config, 'RuntimeLibrary').text = 'MultiThreaded' - elif crtlib_type.value == 'mtd': + elif vscrt_type.value == 'mtd': # FIXME, wrong ET.SubElement(type_config, 'UseDebugLibraries').text = 'true' ET.SubElement(type_config, 'RuntimeLibrary').text = 'MultiThreadedDebug' diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index 81586bc5d..c7092b8c5 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -1211,7 +1211,7 @@ class VisualStudioCCompiler(CCompiler): self.warn_args = {'1': ['/W2'], '2': ['/W3'], '3': ['/W4']} - self.base_options = ['b_pch', 'b_ndebug', 'b_crtlib'] # FIXME add lto, pgo and the like + self.base_options = ['b_pch', 'b_ndebug', 'b_vscrt'] # FIXME add lto, pgo and the like self.is_64 = is_64 # Override CCompiler.get_always_args diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index 6da5acb68..b8ae399ae 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -301,9 +301,9 @@ base_options = {'b_pch': coredata.UserBooleanOption('b_pch', 'Use precompiled he 'b_bitcode': coredata.UserBooleanOption('b_bitcode', 'Generate and embed bitcode (only macOS and iOS)', False), - 'b_crtlib': coredata.UserComboOption('b_crtlib', 'C run-time library to use.', - ['none', 'md', 'mdd', 'mt', 'mtd', 'from_buildtype'], - 'from_buildtype'), + 'b_vscrt': coredata.UserComboOption('b_vscrt', 'VS run-time library type to use.', + ['none', 'md', 'mdd', 'mt', 'mtd', 'from_buildtype'], + 'from_buildtype'), } gnulike_instruction_set_args = {'mmx': ['-mmmx'], @@ -412,7 +412,7 @@ def get_base_compile_args(options, compiler): if option_enabled(compiler.base_options, options, 'b_bitcode'): args.append('-fembed-bitcode') try: - crt_val = options['b_crtlib'].value + crt_val = options['b_vscrt'].value buildtype = options['buildtype'].value try: args += compiler.get_crt_compile_args(crt_val, buildtype) diff --git a/mesonbuild/compilers/cpp.py b/mesonbuild/compilers/cpp.py index 7a5a7a58e..6483e54e4 100644 --- a/mesonbuild/compilers/cpp.py +++ b/mesonbuild/compilers/cpp.py @@ -242,7 +242,7 @@ class VisualStudioCPPCompiler(VisualStudioCCompiler, CPPCompiler): def __init__(self, exelist, version, is_cross, exe_wrap, is_64): CPPCompiler.__init__(self, exelist, version, is_cross, exe_wrap) VisualStudioCCompiler.__init__(self, exelist, version, is_cross, exe_wrap, is_64) - self.base_options = ['b_pch', 'b_crtlib'] # FIXME add lto, pgo and the like + self.base_options = ['b_pch', 'b_vscrt'] # FIXME add lto, pgo and the like def get_options(self): opts = CPPCompiler.get_options(self) |