Commit 5afc337
committed
fix(build): strip explicit asan -l flags from gtest executable link
clang -fsanitize=address on an executable statically embeds the full ASan
runtime via --whole-archive libclang_rt.asan*.a. Adding an explicit
-lclang_rt.asan / -lasan on top creates a second dynamic NEEDED entry,
causing two __asan_init calls and 'incompatible ASan runtimes' at startup.
Shared library builds legitimately need the explicit -l to satisfy -z defs.
Executables do not — clang handles the runtime automatically.1 parent 01e3d25 commit 5afc337
1 file changed
Lines changed: 8 additions & 1 deletion
Lines changed: 8 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
108 | 115 | | |
109 | 116 | | |
110 | 117 | | |
| |||
0 commit comments