diff options
Diffstat (limited to 'builder/xdg-app-builder-main.c')
-rw-r--r-- | builder/xdg-app-builder-main.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/builder/xdg-app-builder-main.c b/builder/xdg-app-builder-main.c index b2fa2f5..2107347 100644 --- a/builder/xdg-app-builder-main.c +++ b/builder/xdg-app-builder-main.c @@ -44,6 +44,7 @@ static gboolean opt_ccache; static gboolean opt_require_changes; static gboolean opt_keep_build_dirs; static gboolean opt_force_clean; +static char *opt_arch; static char *opt_repo; static char *opt_subject; static char *opt_body; @@ -53,6 +54,7 @@ static char **opt_key_ids; static GOptionEntry entries[] = { { "verbose", 'v', 0, G_OPTION_ARG_NONE, &opt_verbose, "Print debug information during command processing", NULL }, { "version", 0, 0, G_OPTION_ARG_NONE, &opt_version, "Print version information and exit", NULL }, + { "arch", 0, 0, G_OPTION_ARG_STRING, &opt_arch, "Architecture to build for (must be host compatible)", "ARCH" }, { "run", 0, 0, G_OPTION_ARG_NONE, &opt_run, "Run a command in the build directory", NULL }, { "ccache", 0, 0, G_OPTION_ARG_NONE, &opt_ccache, "Use ccache", NULL }, { "disable-cache", 0, 0, G_OPTION_ARG_NONE, &opt_disable_cache, "Disable cache", NULL }, @@ -230,6 +232,9 @@ main (int argc, builder_context_set_keep_build_dirs (build_context, opt_keep_build_dirs); + if (opt_arch) + builder_context_set_arch (build_context, opt_arch); + if (opt_ccache && !builder_context_enable_ccache (build_context, &error)) { |