aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMitch Curtis <mitch.curtis@qt.io>2020-07-21 10:50:51 +0200
committerMitch Curtis <mitch.curtis@qt.io>2020-07-23 07:57:27 +0000
commit1d2e98101d835bf699984a9770eeb055efcad2c3 (patch)
tree031bac17bd868cceb4e156790baeb2001ce0b37e
parent072837660d43b0f83fa9ae405a4c36c0f3aa4519 (diff)
Fix CONFIG variable being read incorrectly in setup-qt.js
QT_CONFIG was read in the line before CONFIG, and the regex matched it: QT_CONFIG += private_tests shared shared [...] CONFIG += shared shared debug sanitize_address sanitizer This would lead to address sanitizer being ignored and requiring workarounds. Use a stricter regex that doesn't allow arbitrary characters before the key. The regex can be tested manually here: https://regex101.com/r/aYSWwG/2 Change-Id: I8b6a509d0fdd9500c527497fa3545646f24c42d1 Fixes: QBS-1387 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de> Reviewed-by: Ivan Komissarov <ABBAPOH@gmail.com>
-rw-r--r--share/qbs/module-providers/Qt/setup-qt.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/share/qbs/module-providers/Qt/setup-qt.js b/share/qbs/module-providers/Qt/setup-qt.js
index f4ec55328..c7b722563 100644
--- a/share/qbs/module-providers/Qt/setup-qt.js
+++ b/share/qbs/module-providers/Qt/setup-qt.js
@@ -107,7 +107,7 @@ function readFileContent(filePath) {
// TODO: Don't do the split every time...
function configVariable(configContent, key) {
var configContentLines = configContent.split('\n');
- var regexp = new RegExp("\\s*" + key + "\\s*\\+{0,1}=(.*)");
+ var regexp = new RegExp("^\\s*" + key + "\\s*\\+{0,1}=(.*)");
for (var i = 0; i < configContentLines.length; ++i) {
var line = configContentLines[i];
var match = regexp.exec(line);