[all-commits] [llvm/llvm-project] 7ac3fc: Allow /STACK in #pragma comment(linker, ...)

Alex Reinking via All-commits all-commits at lists.llvm.org
Wed May 5 16:01:15 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7ac3fcc526ceb36da9ed41f27f686709a5554af8
      https://github.com/llvm/llvm-project/commit/7ac3fcc526ceb36da9ed41f27f686709a5554af8
  Author: Alex Reinking <alex_reinking at berkeley.edu>
  Date:   2021-05-05 (Wed, 05 May 2021)

  Changed paths:
    M lld/COFF/Driver.cpp
    A lld/test/COFF/stack-drectve.s

  Log Message:
  -----------
  Allow /STACK in #pragma comment(linker, ...)

The Halide project uses `#pragma comment(linker, "/STACK:...")` to set
the stack size high enough for our embedded compiler to run in end-user
programs on Windows.

Unfortunately, lld-link.exe breaks on this when embedded in a COFF
object, despite supporting the flag on the command line. MSVC's link.exe
supports this fine. This patch extends support for this to lld-link.exe
for better compatibility with MSVC projects.

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




More information about the All-commits mailing list