aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--mesonbuild/backend/vs2010backend.py2
-rw-r--r--mesonbuild/compilers/c.py2
-rw-r--r--test cases/common/185 ndebug if-release enabled/meson.build4
-rw-r--r--test cases/common/186 ndebug if-release disabled/meson.build4
-rw-r--r--test cases/unit/25 ndebug if-release/meson.build4
5 files changed, 2 insertions, 14 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index 3b0dc0e..28e6722 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -731,7 +731,7 @@ class Vs2010Backend(backends.Backend):
# generate_single_compile() and generate_basic_compiler_args()
for l, comp in target.compilers.items():
if l in file_args:
- file_args[l] += compilers.get_base_compile_args(self.environment.coredata.base_options, comp)
+ file_args[l] += compilers.get_base_compile_args(self.get_base_options_for_target(target), comp)
file_args[l] += comp.get_option_compile_args(self.environment.coredata.compiler_options)
# Add compile args added using add_project_arguments()
for l, args in self.build.projects_args.get(target.subproject, {}).items():
diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py
index 2d14116..e0cccc3 100644
--- a/mesonbuild/compilers/c.py
+++ b/mesonbuild/compilers/c.py
@@ -936,7 +936,7 @@ class VisualStudioCCompiler(CCompiler):
self.warn_args = {'1': ['/W2'],
'2': ['/W3'],
'3': ['/W4']}
- self.base_options = ['b_pch'] # FIXME add lto, pgo and the like
+ self.base_options = ['b_pch', 'b_ndebug'] # FIXME add lto, pgo and the like
self.is_64 = is_64
# Override CCompiler.get_always_args
diff --git a/test cases/common/185 ndebug if-release enabled/meson.build b/test cases/common/185 ndebug if-release enabled/meson.build
index ac4f0e7..be26375 100644
--- a/test cases/common/185 ndebug if-release enabled/meson.build
+++ b/test cases/common/185 ndebug if-release enabled/meson.build
@@ -4,8 +4,4 @@ project('ndebug enabled', 'c',
'b_ndebug=if-release',
])
-if meson.get_compiler('c').get_id() == 'msvc'
- error('MESON_SKIP_TEST b_ndebug is not supported on Visual Studio')
-endif
-
test('exe', executable('main', 'main.c'))
diff --git a/test cases/common/186 ndebug if-release disabled/meson.build b/test cases/common/186 ndebug if-release disabled/meson.build
index f2678ed..a9a79ea 100644
--- a/test cases/common/186 ndebug if-release disabled/meson.build
+++ b/test cases/common/186 ndebug if-release disabled/meson.build
@@ -4,8 +4,4 @@ project('ndebug disabled', 'c',
'b_ndebug=if-release',
])
-if meson.get_compiler('c').get_id() == 'msvc'
- error('MESON_SKIP_TEST b_ndebug is not supported on Visual Studio')
-endif
-
test('exe', executable('main', 'main.c'))
diff --git a/test cases/unit/25 ndebug if-release/meson.build b/test cases/unit/25 ndebug if-release/meson.build
index d45bd86..4af2406 100644
--- a/test cases/unit/25 ndebug if-release/meson.build
+++ b/test cases/unit/25 ndebug if-release/meson.build
@@ -1,7 +1,3 @@
project('ndebug enabled', 'c')
-if meson.get_compiler('c').get_id() == 'msvc'
- error('MESON_SKIP_TEST b_ndebug is not supported on Visual Studio')
-endif
-
executable('main', 'main.c')