[all-commits] [llvm/llvm-project] cf4477: [lli] Improve support for MinGW by implementing __...

lhames via All-commits all-commits at lists.llvm.org
Tue May 9 22:52:01 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: cf4477dec11bfda048918d2ec49f04e0794c8030
      https://github.com/llvm/llvm-project/commit/cf4477dec11bfda048918d2ec49f04e0794c8030
  Author: Lang Hames <lhames at gmail.com>
  Date:   2023-05-09 (Tue, 09 May 2023)

  Changed paths:
    M llvm/tools/lli/lli.cpp

  Log Message:
  -----------
  [lli] Improve support for MinGW by implementing __main as a no-op.

Without this function lli will error out on MinGW with a missing symbol error
for __main.

Cygwin and MinGW insert calls from the main function to the runtime function
__main. The __main function is responsible for setting up main's environment
(e.g. running static constructors), however this is not needed when running
under lli: the executor process will have run non-JIT ctors, and ORC will take
care of running JIT'd ctors. To avoid a missing symbol error we just implement
__main as a no-op.




More information about the All-commits mailing list