Forums - how to optmize for unused function

2 posts / 0 new
Last post
how to optmize for unused function
zhengfang.liu
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
 
  • Up0
  • Down0
mengdiz
Join Date: 6 Dec 21
Posts: 22
Posted: Sun, 2021-12-19 18:11
  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.