[all-commits] [llvm/llvm-project] 19e863: [LLD] [COFF] Fix parsing version numbers with lead...

Martin Storsjö via All-commits all-commits at lists.llvm.org
Mon Oct 5 13:09:02 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 19e86336efa75456469a2a3491fc58e65af6bd0a
      https://github.com/llvm/llvm-project/commit/19e86336efa75456469a2a3491fc58e65af6bd0a
  Author: Martin Storsjö <martin at martin.st>
  Date:   2020-10-05 (Mon, 05 Oct 2020)

  Changed paths:
    M lld/COFF/DriverUtils.cpp
    M lld/test/COFF/subsystem.test
    M lld/test/COFF/version.test

  Log Message:
  -----------
  [LLD] [COFF] Fix parsing version numbers with leading zeros

Parse the components as decimal, instead of decuding the base from
the string. This avoids ambiguity if the second number contains leading
zeros, which previously were parsed as indicating an octal number.

MS link.exe doesn't support hexadecimal numbers in the version numbers,
neither in /version nor in /subsystem.

Differential Revision: https://reviews.llvm.org/D88801


  Commit: 45c4c54003641f2bb225eaf305c07906451d6096
      https://github.com/llvm/llvm-project/commit/45c4c54003641f2bb225eaf305c07906451d6096
  Author: Martin Storsjö <martin at martin.st>
  Date:   2020-10-05 (Mon, 05 Oct 2020)

  Changed paths:
    M lld/COFF/Config.h
    M lld/COFF/Driver.cpp
    M lld/COFF/Driver.h
    M lld/COFF/DriverUtils.cpp
    M lld/COFF/Options.td
    M lld/COFF/Writer.cpp
    M lld/test/COFF/subsystem.test

  Log Message:
  -----------
  [LLD] [COFF] Add a private option for setting the os version separately from subsystem version

The MinGW driver has separate options for OS and subsystem version.
Having this available in lld-link allows the MinGW driver to both match
GNU ld better and simplifies the code for merging two (potentially
mismatching) arguments into one.

Differential Revision: https://reviews.llvm.org/D88802


  Commit: bc8f3b424c7785754c1de8a2f5a1e2c16a997143
      https://github.com/llvm/llvm-project/commit/bc8f3b424c7785754c1de8a2f5a1e2c16a997143
  Author: Martin Storsjö <martin at martin.st>
  Date:   2020-10-05 (Mon, 05 Oct 2020)

  Changed paths:
    M lld/COFF/Config.h
    M lld/MinGW/Driver.cpp
    M lld/test/MinGW/driver.test

  Log Message:
  -----------
  [LLD] [MinGW] Simplify handling of os/subsystem version

As they can be set independently after D88802, we can get rid of a bit
of extra code - simplifying the logic here before adding more
complication to it later.

Differential Revision: https://reviews.llvm.org/D88803


  Commit: 61e2f9fa2e514c053c571228639ccdb5d21fadd4
      https://github.com/llvm/llvm-project/commit/61e2f9fa2e514c053c571228639ccdb5d21fadd4
  Author: Martin Storsjö <martin at martin.st>
  Date:   2020-10-05 (Mon, 05 Oct 2020)

  Changed paths:
    M lld/MinGW/Driver.cpp
    M lld/test/MinGW/driver.test

  Log Message:
  -----------
  [LLD] [MinGW] Support setting the subsystem version via the subsystem argument

If a version is specified both with --{major,minor}-subsystem-version and
with --subsystem <name>:<version>, the one specified last (that actually
sets a version) takes precedance in GNU ld; thus doing the same here.

Differential Revision: https://reviews.llvm.org/D88804


Compare: https://github.com/llvm/llvm-project/compare/a2cc8833683d...61e2f9fa2e51


More information about the All-commits mailing list