diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2020-12-02 16:02:03 -0800 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-01-04 12:20:39 -0800 |
commit | fe973d9fc45581f20fefc41fc0b8eb0066c0129d (patch) | |
tree | cbf7f5bd779ddae1655c9644ef96c4df66e67ee3 /mesonbuild/backend/vs2010backend.py | |
parent | bdca05e2e66abbd872c17b8226641a2b8d018112 (diff) | |
download | meson-fe973d9fc45581f20fefc41fc0b8eb0066c0129d.zip meson-fe973d9fc45581f20fefc41fc0b8eb0066c0129d.tar.gz meson-fe973d9fc45581f20fefc41fc0b8eb0066c0129d.tar.bz2 |
use OptionKey for compiler_options
Diffstat (limited to 'mesonbuild/backend/vs2010backend.py')
-rw-r--r-- | mesonbuild/backend/vs2010backend.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index 59a5ed4..f893e8f 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -879,7 +879,7 @@ class Vs2010Backend(backends.Backend): # Exception handling has to be set in the xml in addition to the "AdditionalOptions" because otherwise # cl will give warning D9025: overriding '/Ehs' with cpp_eh value if 'cpp' in target.compilers: - eh = self.environment.coredata.compiler_options[target.for_machine]['cpp']['eh'] + eh = self.environment.coredata.compiler_options[OptionKey('eh', machine=target.for_machine, lang='cpp')] if eh.value == 'a': ET.SubElement(clconf, 'ExceptionHandling').text = 'Async' elif eh.value == 's': @@ -927,7 +927,7 @@ class Vs2010Backend(backends.Backend): 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[target.for_machine][comp.language]) + self.environment.coredata.compiler_options) # Add compile args added using add_project_arguments() for l, args in self.build.projects_args[target.for_machine].get(target.subproject, {}).items(): @@ -941,10 +941,8 @@ class Vs2010Backend(backends.Backend): # Compile args added from the env or cross file: CFLAGS/CXXFLAGS, etc. We want these # to override all the defaults, but not the per-target compile args. for l in file_args.keys(): - opts = self.environment.coredata.compiler_options[target.for_machine][l] - k = 'args' - if k in opts: - file_args[l] += opts[k].value + opts = self.environment.coredata.compiler_options[OptionKey('args', machine=target.for_machine, lang=l)] + file_args[l] += opts.value for args in file_args.values(): # This is where Visual Studio will insert target_args, target_defines, # etc, which are added later from external deps (see below). |