@@ -191,7 +191,6 @@ def generate(self, capture: bool = False, vslite_ctx: T.Optional[dict] = None) -
191
191
def check_unused_options (self , coredata : 'coredata.CoreData' , cmd_line_options : T .Any , all_subprojects : T .Any ) -> None :
192
192
pending = coredata .optstore .pending_project_options
193
193
errlist : T .List [str ] = []
194
- permitted_unknowns = ['b_vscrt' , 'b_lto' , 'b_lundef' , 'b_ndebug' ]
195
194
permitlist : T .List [str ] = []
196
195
for opt in pending :
197
196
# Due to backwards compatibility setting build options in non-cross
@@ -204,8 +203,10 @@ def check_unused_options(self, coredata: 'coredata.CoreData', cmd_line_options:
204
203
if opt .subproject and opt .subproject not in all_subprojects :
205
204
continue
206
205
if coredata .optstore .is_compiler_option (opt ):
206
+ permitlist .append (opt .name )
207
207
continue
208
- if opt .name in permitted_unknowns :
208
+ # Ditto for base options.
209
+ if coredata .optstore .is_base_option (opt ):
209
210
permitlist .append (opt .name )
210
211
continue
211
212
keystr = str (opt )
@@ -222,7 +223,7 @@ def check_unused_options(self, coredata: 'coredata.CoreData', cmd_line_options:
222
223
# support it, this option gets silently swallowed.
223
224
# So at least print a message about it.
224
225
optstr = ',' .join (permitlist )
225
- mlog .warning (f'Some command line options went unused : { optstr } ' , fatal = False )
226
+ mlog .warning (f'The following command line option(s) were not used : { optstr } ' , fatal = False )
226
227
227
228
coredata .optstore .clear_pending ()
228
229
0 commit comments