diff options
author | Alexander Larsson <alexl@redhat.com> | 2016-02-17 09:10:05 +0100 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2016-02-17 10:26:35 +0100 |
commit | c07b1807d19a2356a22daa8ab6b5cff9e3ef1f0e (patch) | |
tree | 8af1705a902db007da55aac223ebe2e33012b6ac /builder/builder-options.c | |
parent | e233705379399776270296b8e350e8b14754d82a (diff) | |
download | xdg-app-c07b1807d19a2356a22daa8ab6b5cff9e3ef1f0e.tar.gz |
builder: Move CFLAGS/CXXFLAGS handling into BuilderOptions
Diffstat (limited to 'builder/builder-options.c')
-rw-r--r-- | builder/builder-options.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/builder/builder-options.c b/builder/builder-options.c index a4a6868..d52109a 100644 --- a/builder/builder-options.c +++ b/builder/builder-options.c @@ -550,6 +550,7 @@ builder_options_get_env (BuilderOptions *self, BuilderContext *context) GList *l; int i; char **envp = NULL; + const char *cflags, *cxxflags; for (l = options; l != NULL; l = l->next) { @@ -577,7 +578,17 @@ builder_options_get_env (BuilderOptions *self, BuilderContext *context) } } - return builder_context_extend_env (context, envp); + envp = builder_context_extend_env (context, envp); + + cflags = builder_options_get_cflags (self, context); + if (cflags) + envp = g_environ_setenv (envp, "CFLAGS", cflags, TRUE); + + cxxflags = builder_options_get_cxxflags (self, context); + if (cxxflags) + envp = g_environ_setenv (envp, "CXXFLAGS", cxxflags, TRUE); + + return envp; } char ** |