Fix version script generation when cross-compiling from Windows to QNX
Recent versions of Qt have apparently added sufficient numbers of headers that the command lines used to spawn a custom header- parsing tool, started overflowing Windows' maximum command-line length. This change restructures the mechanism to use a GCC-style command- line arguments file rather than passing filenames all directly in the argv[] vector. Although QNX is the usual ELF target whose cross-build is supported on Windows, the mechanics introduced in this patch happen to affect all other ELF Unix systems' builds too. Change-Id: I5a7383cf9f2ebf9dffde8dbfdcdeca888265e085 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
This commit is contained in:
parent
a206583da1
commit
6f1b78c980
@ -33,8 +33,21 @@
|
||||
#############################################################################
|
||||
|
||||
use strict;
|
||||
my $syntax = "findclasslist.pl [private header list]\n" .
|
||||
my $syntax = "findclasslist.pl <file (containing private header list)>\n" .
|
||||
"Replaces \@CLASSLIST\@ with the classes found in the header files\n";
|
||||
|
||||
die("Expected exactly one argument") if (@ARGV != 1);
|
||||
|
||||
my @headers = ();
|
||||
|
||||
# Expand contents of the command-line arguments file
|
||||
open ARGFILE, "<$ARGV[0]" or die("Could not open arguments file $ARGV[0]: $!");
|
||||
while (my $line = <ARGFILE>) {
|
||||
chomp($line);
|
||||
push @headers, $line;
|
||||
}
|
||||
close ARGFILE;
|
||||
|
||||
$\ = $/;
|
||||
while (<STDIN>) {
|
||||
chomp;
|
||||
@ -44,7 +57,7 @@ while (<STDIN>) {
|
||||
}
|
||||
|
||||
# Replace @CLASSLIST@ with the class list
|
||||
for my $header (@ARGV) {
|
||||
for my $header (@headers) {
|
||||
open HDR, "<$header" or die("Could not open header $header: $!");
|
||||
my $comment = " /* $header */";
|
||||
while (my $line = <HDR>) {
|
||||
|
@ -215,11 +215,12 @@ android: CONFIG += qt_android_deps no_linker_version_script
|
||||
}
|
||||
|
||||
# Add a post-processing step to replace the @CLASSLIST@
|
||||
verscriptprocess.commands = perl $${PWD}/data/unix/findclasslist.pl < $^ > $@
|
||||
verscriptprocess.commands = perl $${PWD}/data/unix/findclasslist.pl < $${verscript}.in $${verscript}.in.args > $@
|
||||
verscriptprocess.target = $$verscript
|
||||
verscriptprocess.depends = $${verscript}.in
|
||||
for(header, SYNCQT.PRIVATE_HEADER_FILES): \
|
||||
verscriptprocess.depends += $${_PRO_FILE_PWD_}/$$header
|
||||
write_file($${verscript}.in.args, verscriptprocess.depends)|error("Aborting.")
|
||||
verscriptprocess.depends += $${verscript}.in $${verscript}.in.args
|
||||
QMAKE_EXTRA_TARGETS += verscriptprocess
|
||||
PRE_TARGETDEPS += $$verscript
|
||||
verscript = $${verscript}.in
|
||||
|
Loading…
Reference in New Issue
Block a user