1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

native: fix order and add missing path in find_o_path() (#15622)

This fixes the linker failing when:

- 32 bit libraries exist in "/usr/lib".
- 64 bit libraries are in "/usr/lib64" and not "/usr/lib/x86_64-linux-gnu".
This commit is contained in:
Davide Beatrici
2022-09-01 09:21:35 +02:00
committed by GitHub
parent 95760ae82a
commit 23e8fca4f9

View File

@@ -746,7 +746,7 @@ pub fn (mut g Gen) prepend_vobjpath(paths []string) []string {
}
pub fn (mut g Gen) find_o_path(fname string) string {
opaths := g.prepend_vobjpath(['/usr/lib', '/usr/lib/x86_64-linux-gnu'])
opaths := g.prepend_vobjpath(['/usr/lib/x86_64-linux-gnu', '/usr/lib64', '/usr/lib'])
for opath in opaths {
fpath := os.join_path_single(opath, fname)
if os.is_file(fpath) {