@@ -1749,6 +1749,9 @@ builder_module_build_helper (BuilderModule *self,
17491749 g_autofree char * n_jobs = NULL ;
17501750 const char * make_cmd = NULL ;
17511751 const char * test_arg = NULL ;
1752+ const char * cflags = NULL ;
1753+ const char * cxxflags = NULL ;
1754+ const char * ldflags = NULL ;
17521755
17531756 gboolean autotools = FALSE, cmake = FALSE, cmake_ninja = FALSE, meson = FALSE, simple = FALSE, qmake = FALSE;
17541757 g_autoptr (GFile ) configure_file = NULL ;
@@ -1794,6 +1797,9 @@ builder_module_build_helper (BuilderModule *self,
17941797 return FALSE;
17951798
17961799 env = builder_options_get_env (self -> build_options , context );
1800+ cflags = g_environ_getenv (env , "CFLAGS" );
1801+ cxxflags = g_environ_getenv (env , "CXXFLAGS" );
1802+ ldflags = g_environ_getenv (env , "LDFLAGS" );
17971803 config_opts = builder_options_get_config_opts (self -> build_options , context , self -> config_opts );
17981804 secret_opts = builder_options_get_secret_opts (self -> build_options , context , self -> secret_opts );
17991805 secret_env = builder_options_get_secret_env (self -> build_options , context , self -> secret_env );
@@ -2029,6 +2035,12 @@ builder_module_build_helper (BuilderModule *self,
20292035 else if (qmake )
20302036 {
20312037 g_ptr_array_add (configure_args_arr , g_strdup_printf ("PREFIX='%s'" , prefix ));
2038+ if (cflags )
2039+ g_ptr_array_add (configure_args_arr , g_strdup_printf ("QMAKE_CFLAGS+=%s" , cflags ));
2040+ if (cxxflags )
2041+ g_ptr_array_add (configure_args_arr , g_strdup_printf ("QMAKE_CXXFLAGS+=%s" , cxxflags ));
2042+ if (ldflags )
2043+ g_ptr_array_add (configure_args_arr , g_strdup_printf ("QMAKE_LFLAGS+=%s" , ldflags ));
20322044 /* TODO: What parameter for qmake? */
20332045 }
20342046 else if (meson )
0 commit comments