Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit34ff542

Browse files
committed
MSVC: Build ~35% faster by calling dumpbin just once per directory.
Peifeng QiuDiscussion:https://postgr.es/m/CABmtVJiKXQjast0dQD-8KAtfm8XmyYxo-4Dc7+M+fBr8JRTqkw@mail.gmail.com
1 parent726cc42 commit34ff542

File tree

1 file changed

+6
-21
lines changed

1 file changed

+6
-21
lines changed

‎src/tools/msvc/gendef.pl

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
use strict;
22
use warnings;
33
use 5.8.0;
4-
use File::Spec::Functionsqw(splitpath catpath);
54
use List::Utilqw(max);
65

76
my@def;
@@ -12,17 +11,6 @@
1211
# src/tools/msvc/gendef.pl
1312
#
1413

15-
subdumpsyms
16-
{
17-
my ($objfile,$symfile) =@_;
18-
my ($symvol,$symdirs,$symbase) = splitpath($symfile);
19-
my$tmpfile = catpath($symvol,$symdirs,"symbols.out");
20-
system("dumpbin /symbols /out:$tmpfile$_ >NUL")
21-
&&die"Could not call dumpbin";
22-
rename($tmpfile,$symfile);
23-
return;
24-
}
25-
2614
# Given a symbol file path, loops over its contents
2715
# and returns a list of symbols of interest as a dictionary
2816
# of 'symbolname' -> symtype, where symtype is:
@@ -177,15 +165,12 @@ sub usage
177165

178166
my%def = ();
179167

180-
while (<$ARGV[0]/*.obj>)## no critic (RequireGlobFunction);
181-
{
182-
my$objfile =$_;
183-
my$symfile =$objfile;
184-
$symfile =~s/\.obj$/.sym/i;
185-
dumpsyms($objfile,$symfile);
186-
print".";
187-
extract_syms($symfile, \%def);
188-
}
168+
my$symfile ="$ARGV[0]/all.sym";
169+
my$tmpfile ="$ARGV[0]/tmp.sym";
170+
system("dumpbin /symbols /out:$tmpfile$ARGV[0]/*.obj >NUL")
171+
&&die"Could not call dumpbin";
172+
rename($tmpfile,$symfile);
173+
extract_syms($symfile, \%def);
189174
print"\n";
190175

191176
writedef($deffile,$platform, \%def);

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp