<div dir="ltr">Hi, <br><br>I have tried to build <a href="https://github.com/libjpeg-turbo/libjpeg-turbo">libjpeg-turbo</a> with LTO in LLVM, using both clangbut get many errors in lld that look like the following: <br><br>ld: error: undefined symbol: jpeg_std_error<br>>>> referenced by jcstest.c:76<br>>>>               lto.tmp:(main)<br><br>ld: error: undefined symbol: jpeg_CreateCompress<br>>>> referenced by jcstest.c:86<br>>>>               lto.tmp:(main)<br><br>ld: error: undefined symbol: jpeg_set_defaults<br>>>> referenced by jcstest.c:88<br>>>>               lto.tmp:(main)<br><br>ld: error: undefined symbol: jpeg_default_colorspace<br>>>> referenced by jcstest.c:90<br>>>>               lto.tmp:(main)<br>>>> referenced by jcstest.c:114<br>>>>               lto.tmp:(main)<br><br>This only occurs when compiling with the -flto flag. Has anyone been able to build libjpeg-turbo with LTO? Are there any modifications I need to make to the makefile or other configuration in order to do so? Thanks for your help!<br><br>Best, <br>Shishir Jessu</div><img src="https://my-email-signature.link/signature.gif?u=452460&e=92534764&v=8445508cbc53dc6cc94ecf72e775c02e49a5f9b08529a1748c0264845b087ae7" style="width:2px;max-height:0;overflow:hidden">