[compiler-rt] [compiler-rt] Improve lit test discovery speed on Darwin (PR #195193)

Mariusz Borsa via llvm-commits llvm-commits at lists.llvm.org
Thu Apr 30 17:07:31 PDT 2026


================
@@ -334,3 +335,22 @@ def build_invocation(compile_flags, with_lto=False):
 
 if config.target_os == "NetBSD":
     config.substitutions.insert(0, ("%run", config.netbsd_noaslr_prefix))
+
+if config.target_os == "Darwin":
----------------
wrotki wrote:

Is lit.cfg.py loaded by multiple processes, with these ASAN variants? If not, i.e. if there' only one process involved, I'd extract code below as a function (can_read_log) decorated with  @functools.cache - which will make it run only once. 

Plus refactoring  config.available_features.add("darwin_log_cmd") line, which is buried deep inside now, like:

if can_read_log():
   config.available_features.add("darwin_log_cmd")

https://github.com/llvm/llvm-project/pull/195193


More information about the llvm-commits mailing list