because not all compiler support the weak attribute, and many features are either always used or guarded by config. Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>