native: leave only the unique paths in g.linker_include_paths, before doing lookups

This commit is contained in:
Delyan Angelov 2025-06-09 13:53:46 +03:00
parent 921e00112a
commit 06132637f3
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -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