@@ -383,8 +383,7 @@ if env["platform"] not in platform_list:
383383
384384# Add platform-specific options.
385385if env ["platform" ] in platform_opts :
386- for opt in platform_opts [env ["platform" ]]:
387- opts .Add (opt )
386+ opts .AddVariables (* platform_opts [env ["platform" ]])
388387
389388# Platform-specific flags.
390389# These can sometimes override default options, so they need to be processed
@@ -440,12 +439,11 @@ for name, path in modules_detected.items():
440439 else :
441440 enabled = False
442441
443- opts .Add (BoolVariable ("module_" + name + " _enabled" , "Enable module '%s'" % ( name ,) , enabled ))
442+ opts .Add (BoolVariable (f "module_{ name } _enabled" , f "Enable module '{ name } '" , enabled ))
444443
445444 # Add module-specific options.
446445 try :
447- for opt in config .get_opts (env ["platform" ]):
448- opts .Add (opt )
446+ opts .AddVariables (* config .get_opts (env ["platform" ]))
449447 except AttributeError :
450448 pass
451449
@@ -580,7 +578,7 @@ env.Append(RCFLAGS=env.get("rcflags", "").split())
580578# Feature build profile
581579env .disabled_classes = []
582580if env ["build_profile" ] != "" :
583- print ('Using feature build profile: "{}"' . format ( env ["build_profile" ]) )
581+ print (f 'Using feature build profile: "{ env ["build_profile" ]} "' )
584582 import json
585583
586584 try :
@@ -592,7 +590,7 @@ if env["build_profile"] != "":
592590 for c in dbo :
593591 env [c ] = dbo [c ]
594592 except json .JSONDecodeError :
595- print_error ('Failed to open feature build profile: "{}"' . format ( env ["build_profile" ]) )
593+ print_error (f 'Failed to open feature build profile: "{ env ["build_profile" ]} "' )
596594 Exit (255 )
597595
598596# 'dev_mode' and 'production' are aliases to set default options if they haven't been
@@ -854,8 +852,6 @@ else: # GCC, Clang
854852
855853 if methods .using_gcc (env ):
856854 common_warnings += ["-Wshadow" , "-Wno-misleading-indentation" ]
857- if cc_version_major == 7 : # Bogus warning fixed in 8+.
858- common_warnings += ["-Wno-strict-overflow" ]
859855 if cc_version_major < 11 :
860856 # Regression in GCC 9/10, spams so much in our variadic templates
861857 # that we need to outright disable it.
@@ -931,7 +927,7 @@ env.module_icons_paths = []
931927env .doc_class_path = platform_doc_class_path
932928
933929for name , path in modules_detected .items ():
934- if not env ["module_" + name + " _enabled" ]:
930+ if not env [f "module_{ name } _enabled" ]:
935931 continue
936932 sys .path .insert (0 , path )
937933 env .current_module = name
@@ -1044,7 +1040,7 @@ if env["compiledb"]:
10441040
10451041if env ["ninja" ]:
10461042 if env .scons_version < (4 , 2 , 0 ):
1047- print_error ("The `ninja=yes` option requires SCons 4.2 or later, but your version is %s." % scons_raw_version )
1043+ print_error (f "The `ninja=yes` option requires SCons 4.2 or later, but your version is { scons_raw_version } ." )
10481044 Exit (255 )
10491045
10501046 SetOption ("experimental" , "ninja" )
0 commit comments