[all-commits] [llvm/llvm-project] 359476: [ELF] Define NOMINMAX to fix zlib.h caused build f...

Yaxun (Sam) Liu via All-commits all-commits at lists.llvm.org
Thu Nov 2 06:00:07 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3594769f202ee47c18718215a6f210ad757c9822
      https://github.com/llvm/llvm-project/commit/3594769f202ee47c18718215a6f210ad757c9822
  Author: Yaxun (Sam) Liu <yaxun.liu at amd.com>
  Date:   2023-11-02 (Thu, 02 Nov 2023)

  Changed paths:
    M lld/ELF/OutputSections.cpp

  Log Message:
  -----------
  [ELF] Define NOMINMAX to fix zlib.h caused build failure on Windows (#70368)

On Windows when zlib is enabled, zlib header introduced some Windows
headers which defines max as a macro. Since OutputSections.cpp uses
std::max with template argument, this causes compilation error.

Define macro NOMINMAX to avoid this.




More information about the All-commits mailing list