how to optmize for unused function
Join Date: 16 Dec 21
Posts: 1
Posted: Thu, 2021-12-16 01:34
Dear,
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.
Liu Zhengfang
Hi,
Could you refer to below links?
https://lists.llvm.org/pipermail/llvm-dev/2018-January/120233.html
https://www.incredibuild.com/blog/compiling-with-clang-optimization-flags