It seems if link executable through cargo,
if -Z sanitize=address
is speicified,
it static links librustc-nightly_rt.asan.a
bundled with Rust installation.
It causes problems because my executable links to some shared library,
which links to sanitizer runtime shared library.
When running the executable, asan errors:
==115180==Your application is linked against incompatible ASan runtimes.
Is there a way to shared link to libasan.so.4 in gcc installation?
And do not link to librustc-nightly_rt.asan.a
?