Skip to content

Commit 00afc11

Browse files
author
Killian Perlin
committed
Fix native image build
Fixed the lookup code: because of the unconditional break, if multiple files where in the same directory, all but the first one would be falsely flagged as not found. Also added "liblktlang.h/.so" to the dependencies.
1 parent ea6f4d5 commit 00afc11

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

lkql_jit/standalone/make_native.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,6 @@ def look_for_files_in_env(files: list[str], env_var_name: str) -> dict[str, str]
6464
for file in files:
6565
if Path(directory, file).is_file():
6666
res[file] = directory
67-
break
6867
one_not_found = False
6968
for file, directory in res.items():
7069
if directory is None:
@@ -84,11 +83,11 @@ def look_for_files_in_env(files: list[str], env_var_name: str) -> dict[str, str]
8483
# On Linux, we need to provide the compiler additional arguments for
8584
# it to find headers and shared objects.
8685
headers_paths = look_for_files_in_env(
87-
["libadalang.h", "liblkqllang.h"],
86+
["libadalang.h", "liblkqllang.h", "liblktlang.h"],
8887
"C_INCLUDE_PATH",
8988
)
9089
libs_paths = look_for_files_in_env(
91-
["libadalang.so", "liblkqllang.so", "libz.so"],
90+
["libadalang.so", "liblkqllang.so", "liblktlang.so", "libz.so"],
9291
"LIBRARY_PATH",
9392
)
9493
if headers_paths is None or libs_paths is None:

0 commit comments

Comments
 (0)