From 06132637f3056db0b7b2a1d5de5a519ded75d0f4 Mon Sep 17 00:00:00 2001 From: Delyan Angelov Date: Mon, 9 Jun 2025 13:53:46 +0300 Subject: [PATCH] native: leave only the unique paths in g.linker_include_paths, before doing lookups --- vlib/v/gen/native/pe.v | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/vlib/v/gen/native/pe.v b/vlib/v/gen/native/pe.v index 34eadccdf7..631d477279 100644 --- a/vlib/v/gen/native/pe.v +++ b/vlib/v/gen/native/pe.v @@ -622,6 +622,13 @@ fn (mut g Gen) gen_pe_idata() { g.linker_include_paths << '.' + // keep only the unique paths: + mut upaths := map[string]bool{} + for path in g.linker_include_paths { + upaths[path] = true + } + g.linker_include_paths = upaths.keys() + mut dll_files := ['kernel32.dll', 'user32.dll', 'msvcrt.dll'] dll_files << g.linker_libs.map(it + '.dll') mut dlls := dll_files