[all-commits] [llvm/llvm-project] d3d9dc: [profile] Build with -fms-extensions in MinGW mode

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Aug 23 13:45:08 PDT 2021


  Branch: refs/heads/release/13.x
  Home:   https://github.com/llvm/llvm-project
  Commit: d3d9dc5869333b6ed2dd8a7a6cfaadf40455e44d
      https://github.com/llvm/llvm-project/commit/d3d9dc5869333b6ed2dd8a7a6cfaadf40455e44d
  Author: Martin Storsjö <martin at martin.st>
  Date:   2021-08-23 (Mon, 23 Aug 2021)

  Changed paths:
    M compiler-rt/lib/profile/CMakeLists.txt

  Log Message:
  -----------
  [profile] Build with -fms-extensions in MinGW mode

54902e00d1280785042e2c7ec71b25a949ade92c added a use of
/alternatename via a #pragma comment(linker); in MinGW mode, this
requires building with -fms-extensions. (This flag is added to
SANITIZER_COMMON_CFLAGS in the toplevel CMakeLists.txt.)

This avoids a warning when building in MinGW mode (about an unknown
pragma being ignored), and presumably also makes the code work as
intended.

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

(cherry picked from commit 94c001d6465857459617e9858e5128a784400e54)


  Commit: 4f857ea56b4fb45f7c9c380a0ab18d9e1296e25e
      https://github.com/llvm/llvm-project/commit/4f857ea56b4fb45f7c9c380a0ab18d9e1296e25e
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2021-08-23 (Mon, 23 Aug 2021)

  Changed paths:
    M compiler-rt/lib/profile/InstrProfilingFile.c

  Log Message:
  -----------
  [profile] Add underscore to /alternatename for Win/x86

/alternatename should use the mangled name. On x86 we need an extra
underscore.

Copied from sanitizer_win_defs.h

Fixes https://crbug.com/1233589.

Reviewed By: phosek

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

(cherry picked from commit ef2627e1fa7c5009aae8b0bbfdec7ff4419ee5d3)


  Commit: e8ce80e31d93019aa9a6b952cf2b21fc3232462c
      https://github.com/llvm/llvm-project/commit/e8ce80e31d93019aa9a6b952cf2b21fc3232462c
  Author: Nikita Popov <nikita.ppv at gmail.com>
  Date:   2021-08-23 (Mon, 23 Aug 2021)

  Changed paths:
    M compiler-rt/lib/profile/CMakeLists.txt
    M compiler-rt/lib/profile/InstrProfilingFile.c

  Log Message:
  -----------
  [profile] Don't use pragma comment linker on mingw

At least when compiling with gcc, this is not supported and will
result in errors when linking against the profiler runtime. Only
use the pragma comment linker based code with MSVC, but not with
a mingw toolchain. This also undoes D107620, which shouldn't be
relevant anymore.

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

(cherry picked from commit 4cfb047d6ab3259c20059e8ed4c15ece3d6eb723)


Compare: https://github.com/llvm/llvm-project/compare/cf035cac186b...e8ce80e31d93


More information about the All-commits mailing list