<div dir="ltr">Just be aware that those ifdefs were recommitted and reverted several times, so I'm not sure what the state is.</div><br><div class="gmail_quote"><div dir="ltr">On Fri, Sep 28, 2018 at 8:48 AM Alastair Murray via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <p>Hi Kern,</p>
    <p>We also had issues with mixing GCC/Clang builds when testing the
      7.0 release branch.</p>
    <p>My colleague submitted a patch that fixed the issue for us:<br>
      * <a class="m_-7403740192623216969moz-txt-link-freetext" href="https://reviews.llvm.org/D50710" target="_blank">https://reviews.llvm.org/D50710</a><br>
      <br>
      I no longer have a copy of the error we were seeing to see if it
      was the same, but the fix is to llvm::OptionalStorage and your
      error message involves llvm::Optional.  The patch removes a GCC
      specific ifdef, and hopefully fixes the issue that made that
      necessary in the first place, but we never really knew how the GCC
      miscompilation was expressed.</p>
    <p>It would be interesting to know whether this resolves your issue,
      but regardless we should give the patch a prod.<br>
      <br>
      Regards,<br>
      Alastair Murray.<br>
    </p>
    <br>
    <div class="m_-7403740192623216969moz-cite-prefix">On 27/09/18 08:46, Kern Handa via
      llvm-dev wrote:<br>
    </div>
    <blockquote type="cite">
      
      <div dir="ltr">
        <div dir="ltr">
          <div>Hi folks,</div>
          <div><br>
          </div>
          <div>Not sure if this is the right mailing list target, but
            I'm trying out the new LLVM 7.0 packages found at <a href="http://apt.llvm.org" target="_blank">http://apt.llvm.org</a>
            by porting over an existing LLVM 6.0 project of ours to the
            new version. In doing so, I found that the executable always
            segfaulted at the same spot with no explanation:</div>
          <div><br>
          </div>
          <div>0x0000000000fefe33 in
llvm::RegisterTargetMachine<llvm::X86TargetMachine>::Allocator(llvm::Target
            const&, llvm::Triple const&, llvm::StringRef,
            llvm::StringRef, llvm::TargetOptions const&,
            llvm::Optional<llvm::R<br>
            eloc::Model>,
            llvm::Optional<llvm::CodeModel::Model>,
            llvm::CodeGenOpt::Level, bool) ()</div>
          <div><br>
          </div>
          <div>This happens if I build my project and link it against
            LLVM 7.0 with either clang++ 6.1 or clang++ 7.0. This does
            not happen if I build my project with g++ 8. <br>
          </div>
          <div><br>
          </div>
          <div>I have also confirmed that building LLVM 7.0 with clang++
            and then using that private build of the libraries fixes the
            issue.</div>
          <div><br>
          </div>
          <div>To summarize, it seems that there's an ABI
            incompatibility introduced somewhere, which means LLVM 7.0
            compiled with gcc can only be used by other projects also
            built with gcc. Is this something that's being investigated
            and to be resolved as a fix in 7.1? If not, is there any
            official release note that's remarking on this
            incompatibility?</div>
          <div><br>
          </div>
          <div>Thanks,</div>
          <div>Kern<br>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="m_-7403740192623216969mimeAttachmentHeader"></fieldset>
      <br>
      <pre>_______________________________________________
LLVM Developers mailing list
<a class="m_-7403740192623216969moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>
<a class="m_-7403740192623216969moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a>
</pre>
    </blockquote>
    <br>
    <pre class="m_-7403740192623216969moz-signature" cols="72">-- 
Alastair Murray
Principal Software Engineer, Compilers
Codeplay Software Ltd
Level C, Argyle House, 3 Lady Lawson St., Edinburgh, EH3 9DR
Tel: 0131 466 0503
Fax: 0131 557 6600
Website: <a class="m_-7403740192623216969moz-txt-link-freetext" href="http://www.codeplay.com" target="_blank">http://www.codeplay.com</a>
Twitter: <a class="m_-7403740192623216969moz-txt-link-freetext" href="https://twitter.com/codeplaysoft" target="_blank">https://twitter.com/codeplaysoft</a>

This email and any attachments may contain confidential and /or privileged information and
is for use by the addressee only. If you are not the intended recipient, please notify
Codeplay Software Ltd immediately and delete the message from your computer. You may not
copy or forward it, or use or disclose its contents to any other person. Any views or other
information in this message which do not relate to our business are not authorized by
Codeplay software Ltd, nor does this message form part of any contract unless so stated.
As internet communications are capable of data corruption Codeplay Software Ltd does not
accept any responsibility for any changes made to this message after it was sent. Please
note that Codeplay Software Ltd does not accept any liability or responsibility for viruses
and it is your responsibility to scan any attachments.
Company registered in England and Wales, number: 04567874
Registered office: Regent House, 316 Beulah Hill, London, United Kingdom, SE19 3HF</pre>
  </div>

_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>