[gnome-continuous/wip/hwtest: 3/11] task-build: allow setting architecture-specific cflags for a module
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous/wip/hwtest: 3/11] task-build: allow setting architecture-specific cflags for a module
- Date: Thu, 5 Jun 2014 14:10:19 +0000 (UTC)
commit 3bc7c621baa7dbc91b96741ef6fb0d06bb03eaf4
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Thu Jun 5 09:36:08 2014 -0400
task-build: allow setting architecture-specific cflags for a module
src/js/tasks/task-build.js | 14 +++++++++++---
1 files changed, 11 insertions(+), 3 deletions(-)
---
diff --git a/src/js/tasks/task-build.js b/src/js/tasks/task-build.js
index 26d77e7..7499b12 100644
--- a/src/js/tasks/task-build.js
+++ b/src/js/tasks/task-build.js
@@ -224,7 +224,7 @@ const TaskBuild = new Lang.Class({
},
_needsRebuild: function(previousMetadata, newMetadata) {
- let buildKeys = ['config-opts', 'src', 'revision', 'setuid'];
+ let buildKeys = ['config-opts', 'src', 'revision', 'setuid', 'cflags'];
for (let i = 0; i < buildKeys.length; i++) {
let k = buildKeys[i];
if (previousMetadata[k] && !newMetadata[k]) {
@@ -713,8 +713,16 @@ const TaskBuild = new Lang.Class({
let envCopy = {};
Lang.copyProperties(BuildUtil.BUILD_ENV, envCopy);
envCopy['PWD'] = chrootSourcedir.get_path();
- envCopy['CFLAGS'] = OPT_COMMON_CFLAGS[architecture];
- envCopy['CXXFLAGS'] = OPT_COMMON_CFLAGS[architecture];
+
+ let cflags = OPT_COMMON_CFLAGS[architecture];
+
+ if (expandedComponent['cflags'] != null &&
+ expandedComponent['cflags'][architecture] != null) {
+ cflags = expandedComponent['cflags'][architecture];
+ }
+
+ envCopy['CFLAGS'] = cflags;
+ envCopy['CXXFLAGS'] = cflags;
let context = new GSystem.SubprocessContext({ argv: childArgs });
context.set_stdout_disposition(GSystem.SubprocessStreamDisposition.PIPE);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]