qmake: Don't allow -framework without second argument when merging flags

The linker doesn't support -framworkFoo, so neither should we. The correct
syntax is -framework Foo.

Change-Id: I3f39ffc067871ce058542bf0068274b35f7b51f6
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
Tor Arne Vestbø 2019-07-29 16:00:43 +02:00
parent f4647b40ca
commit 080fbb55b5

View File

@ -498,14 +498,10 @@ UnixMakefileGenerator::findLibraries(bool linkPrl, bool mergeLflags)
// Make sure we keep the dependency order of libraries
lflags[arch].removeAll(opt);
lflags[arch].append(opt);
} else if (target_mode == TARG_MAC_MODE && opt.startsWith("-framework")) {
if (opt.length() > 10) {
opt = opt.mid(10).trimmed();
} else {
} else if (target_mode == TARG_MAC_MODE && opt == "-framework") {
opt = l.at(++lit);
if (opt.startsWith("-Xarch"))
opt = l.at(++lit); // The user has done the right thing and prefixed each part
}
for(int x = 0; x < lflags[arch].size(); ++x) {
if (lflags[arch].at(x) == "-framework" && lflags[arch].at(++x) == opt) {
lflags[arch].remove(x - 1, 2);