From 51cccd968b5ba98da4d971d9c69b59ec85cfa513 Mon Sep 17 00:00:00 2001 From: Christian Ullrich Date: Tue, 26 Apr 2016 14:52:53 +0200 Subject: [PATCH 2/2] Support parallel build with MSBuild. gendef.pl now puts the temporary output file into the target directory instead of the source tree root, to avoid collisions. --- src/tools/msvc/gendef.pl | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/tools/msvc/gendef.pl b/src/tools/msvc/gendef.pl index 8ccaab3..4bd05fa 100644 --- a/src/tools/msvc/gendef.pl +++ b/src/tools/msvc/gendef.pl @@ -4,6 +4,7 @@ use warnings; use strict; use 5.8.0; use List::Util qw(max); +use File::Spec::Functions qw(splitpath catpath); # # Script that generates a .DEF file for all objects in a directory @@ -14,9 +15,11 @@ use List::Util qw(max); sub dumpsyms { my ($objfile, $symfile) = @_; - system("dumpbin /symbols /out:symbols.out $_ >NUL") + my ($symvol, $symdirs, $symbase) = splitpath($symfile); + my $tmpfile = catpath($symvol, $symdirs, "symbols.out"); + system("dumpbin /symbols /out:$tmpfile $_ >NUL") && die "Could not call dumpbin"; - rename("symbols.out", $symfile); + rename($tmpfile, $symfile); } # Given a symbol file path, loops over its contents -- 2.8.1.windows.1