[gnome-continuous] task-build: allow setting architecture-specific cflags for a module
- From: Vadim Rutkovsky <vrutkovsky src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-continuous] task-build: allow setting architecture-specific cflags for a module
- Date: Mon, 30 Jun 2014 08:49:36 +0000 (UTC)
commit e293d8865e24206719c0fd83592e36ab4bbcd1be
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
In some cases, a module might need specific CFLAGS for an architecture
(an example of this is that iPXE is always 32-bit, so passing
in our generic x86_64 bit cflags breaks it.)
https://bugzilla.gnome.org/show_bug.cgi?id=732359
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 f95f4b3..906fc62 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]) {
@@ -712,8 +712,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]