[llvm-bugs] [Bug 24740] New: [ms] clang-cl produces .obj files that link.exe mis-links in /incremental mode

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Sep 7 10:23:14 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=24740

            Bug ID: 24740
           Summary: [ms] clang-cl produces .obj files that link.exe
                    mis-links in /incremental mode
           Product: clang
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: nicolasweber at gmx.de
                CC: llvm-bugs at lists.llvm.org
    Classification: Unclassified

Here's a self-contained repro:

C:\src\llvm-build>type test.cc
#include <stdio.h>

int main(int argc, char* argv[]) {
#if 1
  int kSize = 0xC000;
#else
  int kSize = 0x1000;
#endif
  fprintf(stderr, "%d\n", kSize);
}

C:\src\llvm-build>bin\clang-cl test.cc  /c

C:\src\llvm-build>link test.obj /verbose:incr /incremental
Microsoft (R) Incremental Linker Version 12.00.31101.0
Copyright (C) Microsoft Corporation.  All rights reserved.


C:\src\llvm-build>test
49152

C:\src\llvm-build>link test.obj /verbose:incr /incremental

C:\src\llvm-build>type test.cc
#include <stdio.h>

int main(int argc, char* argv[]) {
#if 0
  int kSize = 0xC000;
#else
  int kSize = 0x1000;
#endif
  fprintf(stderr, "%d\n", kSize);
}

C:\src\llvm-build>bin\clang-cl test.cc  /c

C:\src\llvm-build>link test.obj /verbose:incr /incremental
Microsoft (R) Incremental Linker Version 12.00.31101.0
Copyright (C) Microsoft Corporation.  All rights reserved.


C:\src\llvm-build>test
49152

C:\src\llvm-build>link test.obj
Microsoft (R) Incremental Linker Version 12.00.31101.0
Copyright (C) Microsoft Corporation.  All rights reserved.


C:\src\llvm-build>test
4096

majnemer discovered that this is due to clang-cl not writing timestamps into
COFF files.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150907/32b8dd79/attachment.html>


More information about the llvm-bugs mailing list