<div dir="ltr">To correct a typo: I am using both clang 6.0.0, and a local build of clang 10.0.0, and each result in the same error.<br><br>Best, <br>Shishir Jessu</div><img src="https://my-email-signature.link/signature.gif?u=452460&e=92535037&v=d73d0b674834dae5034b25971c343764da04d72ec5179aea266d7b6b437c04c7" style="width:2px;max-height:0;overflow:hidden"><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, Apr 8, 2020 at 12:22 PM Shishir V Jessu <<a href="mailto:shishir.jessu@utexas.edu">shishir.jessu@utexas.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi, <br><br>I have tried to build <a href="https://github.com/libjpeg-turbo/libjpeg-turbo" target="_blank">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>
</blockquote></div>