@@ -808,13 +808,9 @@ def get_option_link_args(self, target: None, subproject: SubProject) -> T.List[s
808808
809809 def get_option_link_args (self , target : T .Optional [BuildTarget ], subproject : T .Optional [SubProject ] = None ) -> T .List [str ]:
810810 subproject = subproject if subproject is not None else target .subproject
811- # need a typeddict for this
812811 key = self .form_compileropt_key ('winlibs' , subproject )
813- if target :
814- value = self .environment .coredata .optstore .get_option_for_target_untyped (target , key )
815- else :
816- value = self .environment .coredata .optstore .get_value_for_untyped (key )
817- return T .cast ('T.List[str]' , value )[:]
812+ value = self .environment .coredata .optstore .get_option_for_maybe_target (target , key , list )
813+ return value .copy ()
818814
819815 def _get_options_impl (self , opts : 'MutableKeyedOptionDictType' , cpp_stds : T .List [str ]) -> 'MutableKeyedOptionDictType' :
820816 opts = super ().get_options ()
@@ -922,10 +918,7 @@ def get_option_std_args(self, target: T.Optional[BuildTarget], subproject: T.Opt
922918 # (i.e., after VS2015U3)
923919 # if one is using anything before that point, one cannot set the standard.
924920 stdkey = self .form_compileropt_key ('std' , subproject )
925- if target is not None :
926- std = self .environment .coredata .optstore .get_option_for_target_untyped (target , stdkey )
927- else :
928- std = self .environment .coredata .optstore .get_value_for_untyped (stdkey )
921+ std = self .environment .coredata .optstore .get_option_for_maybe_target (target , stdkey , str )
929922 if std in {'vc++11' , 'c++11' }:
930923 mlog .warning (self .id , 'does not support C++11;' ,
931924 'attempting best effort; setting the standard to C++14' ,
0 commit comments