diff --git a/tools/link.py b/tools/link.py index 6b79f80313ecf..6c8e64fc3ebe0 100644 --- a/tools/link.py +++ b/tools/link.py @@ -2795,7 +2795,7 @@ def process_libraries(options, flags): continue static_lib = f'lib{lib}.a' - if not settings.RELOCATABLE and not find_library(static_lib, state.lib_dirs): + if not settings.RELOCATABLE and not find_library(static_lib, options.lib_dirs): # Normally we can rely on the native linker to expand `-l` args. # However, emscripten also supports `.so` files that are actually just # regular object file. This means we need to support `.so` files even