<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 4, 2016 at 10:15 AM, Carsten Mattner <span dir="ltr"><<a href="mailto:carstenmattner@gmail.com" target="_blank">carstenmattner@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Tue, Oct 4, 2016 at 2:22 AM, Xinliang David Li <<a href="mailto:xinliangli@gmail.com">xinliangli@gmail.com</a>> wrote:<br>
> For clang build, cmake flags:<br>
><br>
>  -DCMAKE_EXE_LINKER_FLAGS=-<wbr>fuse-ld=gold \<br>
>  -DCMAKE_MODULE_LINKER_FLAGS=-<wbr>fuse-ld=gold \<br>
>  -DCMAKE_SHARED_LINKER_FLAGS=-<wbr>fuse-ld=gold \<br>
<br>
</span>Thanks, this didn't break the cmake run.<br>
<br>
I've been successfully using LDFLAGS, CXXFLAGS, CPPFLAGS, CFLAGS.<br>
It works, but now I wonder if it's safer to pass those via a -DCMAKE_CXXFLAGS.<br>
Any idea? If so, what are the LLVM CMake variables to set ldflags,<br>
cxxflags, cppflags, cflags?<br></blockquote><div><br></div><div>I think the above cmake variables from David essentially set ldflags for various types of links, which is where you need -fuse-ld, so no need to pass them to c*flags.</div><div><br></div><div>Hopefully your ThinLTO build will work now. Let me know if you still run into issues!</div><div><br></div><div>Teresa</div></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><span style="font-family:Times;font-size:medium"><table cellspacing="0" cellpadding="0"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Teresa Johnson |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tejohnson@google.com" target="_blank">tejohnson@google.com</a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"> 408-460-2413</td></tr></tbody></table></span></div>
</div></div>