[sanitizer] Refine CMake rules for generating exported symbols and lint checking