[PATCH] D101335: [ASan][Darwin] Fix `TestCases/Darwin/init_for_dlopen.cpp` when running in a standalone build.

Emily Shi via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 27 10:46:35 PDT 2021


aralisza added a comment.

a couple nits, but otherwise lgtm. deferring to Julian for review of functionality



================
Comment at: compiler-rt/test/asan/lit.cfg.py:57
+def find_clang_compiler_rt_libdir(config):
+  import subprocess
+  clang_cmd = [
----------------
how come this import is inside the function?


================
Comment at: compiler-rt/test/asan/lit.cfg.py:70
+  except subprocess.CalledProcessError as e:
+    msg = 'Failed to run {}\nrc:{}\nstdout:{}\nstderr:{}\n'.format(
+        clang_cmd,
----------------
Is this python >= 3.6? What do you think about using f strings?


================
Comment at: compiler-rt/test/asan/lit.cfg.py:87
+    # Standalone build of compiler-rt.
+    lit_config.warning('Path reported by clang ({}) != configured path ({})'.format(
+      path, config_crt_libdir_real))
----------------
super nit picky, but what do you think about formatting this warning so it's easier to compare the two paths? something like

```
f"Path reported by clang != configured path\n\tclang path:\t{path}\n\tconfigured path:\t{config_crt_libdir_real}"
```


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D101335/new/

https://reviews.llvm.org/D101335



More information about the llvm-commits mailing list