@@ -212,6 +212,7 @@ opts.Add("extra_suffix", "Custom extra suffix added to the base filename of all
212212opts .Add ("object_prefix" , "Custom prefix added to the base filename of all generated object files" , "" )
213213opts .Add (BoolVariable ("vsproj" , "Generate a Visual Studio solution" , False ))
214214opts .Add ("vsproj_name" , "Name of the Visual Studio solution" , "godot" )
215+ opts .Add ("import_env_vars" , "A comma-separated list of environment variables to copy from the outer environment." , "" )
215216opts .Add (BoolVariable ("disable_3d" , "Disable 3D nodes for a smaller executable" , False ))
216217opts .Add (BoolVariable ("disable_advanced_gui" , "Disable advanced GUI nodes and behaviors" , False ))
217218opts .Add ("build_profile" , "Path to a file containing a feature build profile" , "" )
@@ -270,6 +271,12 @@ opts.Add("LINKFLAGS", "Custom flags for the linker")
270271# in following code (especially platform and custom_modules).
271272opts .Update (env_base )
272273
274+ # Copy custom environment variables if set.
275+ if env_base ["import_env_vars" ]:
276+ for env_var in str (env_base ["import_env_vars" ]).split ("," ):
277+ if env_var in os .environ :
278+ env_base ["ENV" ][env_var ] = os .environ [env_var ]
279+
273280# Platform selection: validate input, and add options.
274281
275282selected_platform = ""
0 commit comments