Skip to content

Commit 0613263

Browse files
committed
native: leave only the unique paths in g.linker_include_paths, before doing lookups
1 parent 921e001 commit 0613263

File tree

1 file changed

+7
-0
lines changed
  • vlib/v/gen/native

1 file changed

+7
-0
lines changed

vlib/v/gen/native/pe.v

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -622,6 +622,13 @@ fn (mut g Gen) gen_pe_idata() {
622622

623623
g.linker_include_paths << '.'
624624

625+
// keep only the unique paths:
626+
mut upaths := map[string]bool{}
627+
for path in g.linker_include_paths {
628+
upaths[path] = true
629+
}
630+
g.linker_include_paths = upaths.keys()
631+
625632
mut dll_files := ['kernel32.dll', 'user32.dll', 'msvcrt.dll']
626633
dll_files << g.linker_libs.map(it + '.dll')
627634
mut dlls := dll_files

0 commit comments

Comments
 (0)