[llvm-dev] Miscompilation while switching from clang-4 to clang-5

Alex Denisov via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 1 00:06:15 PDT 2018


Hi Tim,

The verbose mode is a good idea, thank you.

I've gathered all compilation commands with -v flag for clang-4 and clang-5 and they are identical (excerpt of compiler version).
I will try to find what has changed in clang/llvm between the versions.

If there are any other hints: send them my way :)

> On 31. May 2018, at 09:54, Tim Northover <t.p.northover at gmail.com> wrote:
> 
> On 31 May 2018 at 08:41, Alex Denisov via llvm-dev
> <llvm-dev at lists.llvm.org> wrote:
>> I understand the linking problem. What I do not understand is how to debug the difference between two versions of compilers.
>> This what I do (briefly):
>> 
>> clang++-4 foobar.cpp -lLLVM -l/opt/llvm-3.9/lib
>> 
>> clang++-5 foobar.cpp -lLLVM -l/opt/llvm-3.9/lib
> 
> If you add -v then Clang will output each individual command it runs
> to do that compilation (I'd expect 2: one compile step and one link
> step).
> 
> As Tom & Michael said, the link step is most likely to be wrong. You
> could test that by mixing and matching the invocations (using the .o
> file produced by one version of Clang in the other link command for
> example). In the end though, I suspect you'll find it's linking
> against a different set of libraries now.
> 
> Cheers.
> 
> Tim.

--
AlexDenisov
Software Engineer, https://lowlevelbits.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: Message signed with OpenPGP
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180601/b5aabc4b/attachment.sig>


More information about the llvm-dev mailing list