Skip to content

Commit 931aec1

Browse files
Philip Oakleydscho
Philip Oakley
authored andcommitted
contrib/buildsystems: ignore invalidcontinue.obj
Since 4b623d8 (MSVC: link in invalidcontinue.obj for better POSIX compatibility, 2014-03-29), invalidcontinue.obj is linked in the MSVC build, but it was not parsed correctly by the buildsystem. Ignore it, as it is known to Visual Studio and will be handled elsewhere. Also only substitute filenames ending with .o when generating the source .c filename, otherwise we would start to expect .cbj files to generate .obj files (which are not generated by our build)... In the future there may be source files that produce .obj files so keep the two issues (.obj files with & without source files) separate. Signed-off-by: Philip Oakley <philipoakley@iee.org> Signed-off-by: Duncan Smart <duncan.smart@gmail.com> Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
1 parent 7aba9f8 commit 931aec1

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

contrib/buildsystems/engine.pl

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ sub handleLibLine
282282
# exit(1);
283283
foreach (@objfiles) {
284284
my $sourcefile = $_;
285-
$sourcefile =~ s/\.o/.c/;
285+
$sourcefile =~ s/\.o$/.c/;
286286
push(@sources, $sourcefile);
287287
push(@cflags, @{$compile_options{"${sourcefile}_CFLAGS"}});
288288
push(@defines, @{$compile_options{"${sourcefile}_DEFINES"}});
@@ -326,8 +326,12 @@ sub handleLinkLine
326326
} elsif ($part =~ /\.(a|lib)$/) {
327327
$part =~ s/\.a$/.lib/;
328328
push(@libs, $part);
329-
} elsif ($part =~ /\.(o|obj)$/) {
329+
} elsif ($part eq 'invalidcontinue.obj') {
330+
# ignore - known to MSVC
331+
} elsif ($part =~ /\.o$/) {
330332
push(@objfiles, $part);
333+
} elsif ($part =~ /\.obj$/) {
334+
# do nothing, 'make' should not be producing .obj, only .o files
331335
} else {
332336
die "Unhandled lib option @ line $lineno: $part";
333337
}
@@ -336,7 +340,7 @@ sub handleLinkLine
336340
# exit(1);
337341
foreach (@objfiles) {
338342
my $sourcefile = $_;
339-
$sourcefile =~ s/\.o/.c/;
343+
$sourcefile =~ s/\.o$/.c/;
340344
push(@sources, $sourcefile);
341345
push(@cflags, @{$compile_options{"${sourcefile}_CFLAGS"}});
342346
push(@defines, @{$compile_options{"${sourcefile}_DEFINES"}});

0 commit comments

Comments
 (0)