Skip to content

Commit 3ecdf56

Browse files
committed
Fix dll extraction logic in checkArtifacts
1 parent f2677ce commit 3ecdf56

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

compiler/build.gradle

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -245,10 +245,12 @@ def checkArtifacts = tasks.register("checkArtifacts") {
245245
if (ret.exitValue != 0) {
246246
throw new GradleException("dumpbin exited with " + ret.exitValue)
247247
}
248-
def dlls = os.toString() =~ /Image has the following dependencies:\s+(.*)\s+Summary/
249-
if (dlls[0][2] != "KERNEL32.dll") {
250-
throw new Exception("unexpected dll deps: " + dlls[0][1]);
248+
def dlls = os.toString() =~ /Image has the following dependencies:([\S\s]*)Summary/
249+
def second_dll = dlls[0][1].trim().split("\\s+")[1]
250+
if (second_dll != "KERNEL32.dll") {
251+
throw new Exception("unexpected dll deps: " + dlls[0][2]);
251252
}
253+
252254
os.reset()
253255
ret = exec {
254256
executable 'dumpbin'

0 commit comments

Comments
 (0)