how to optmize for unused function
Posted: Thu, 2021-12-16 01:34
we use the verison of 4.0 clang &llvm which is provided by Qualcomm,
but i found it not optimized the unused funtion.
I have try many methon, but it still can not work.
such as :
-Xlinker -dead_strip, it report error message
clang-4.0: warning: argument unused during compilation: '-Xliner' [-Wunused-command-line-argument]
clang-4.0: warning: argument unused during compilation: '-dead_strip' [-Wunused-command-line-argument]
I use -flto, as below
/tools/linux/llvm/bin/clang -flto optimized.bc
Fatal: cannot read file crt1.o
so how can i optimize for unused fucntion?
thank you very much.