We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 60ba7fa commit 5b52c47Copy full SHA for 5b52c47
python/aie_lit_utils/lit_config_helpers.py
@@ -218,6 +218,14 @@ def detect_xrt(
218
config.found = True
219
config.flags = f"-I{xrt_include_dir} -L{xrt_lib_dir} -luuid -lxrt_coreutil"
220
config.substitutions["%xrt_flags"] = config.flags
221
+ # Add XRT library directory to LD_LIBRARY_PATH for runtime linking,
222
+ # preserving any existing entries from the parent environment.
223
+ existing_ld_library_path = os.environ.get("LD_LIBRARY_PATH")
224
+ if existing_ld_library_path:
225
+ new_ld_library_path = existing_ld_library_path + os.pathsep + xrt_lib_dir
226
+ else:
227
+ new_ld_library_path = xrt_lib_dir
228
+ config.environment["LD_LIBRARY_PATH"] = new_ld_library_path
229
230
# Detect NPU hardware
231
try:
0 commit comments