[all-commits] [llvm/llvm-project] 9189a2: [ORC_RT][COFF] Initial platform support for COFF/x...

Sunho Kim via All-commits all-commits at lists.llvm.org
Fri Aug 12 21:49:01 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9189a26664b97fdf22c6f7f57194134f707338bc
      https://github.com/llvm/llvm-project/commit/9189a26664b97fdf22c6f7f57194134f707338bc
  Author: Sunho Kim <ksunhokim123 at gmail.com>
  Date:   2022-08-13 (Sat, 13 Aug 2022)

  Changed paths:
    M compiler-rt/cmake/Modules/AllSupportedArchDefs.cmake
    M compiler-rt/lib/orc/CMakeLists.txt
    A compiler-rt/lib/orc/coff_platform.cpp
    A compiler-rt/lib/orc/coff_platform.h
    M compiler-rt/lib/orc/common.h
    M compiler-rt/lib/orc/compiler.h
    M compiler-rt/lib/orc/error.h
    A compiler-rt/test/orc/TestCases/Windows/lit.local.cfg.py
    A compiler-rt/test/orc/TestCases/Windows/x86-64/Inputs/standalone-dylib.c
    A compiler-rt/test/orc/TestCases/Windows/x86-64/hello-world.c
    A compiler-rt/test/orc/TestCases/Windows/x86-64/hello-world.cpp
    A compiler-rt/test/orc/TestCases/Windows/x86-64/lit.local.cfg.py
    A compiler-rt/test/orc/TestCases/Windows/x86-64/priority-static-initializer-three.c
    A compiler-rt/test/orc/TestCases/Windows/x86-64/priority-static-initializer.c
    A compiler-rt/test/orc/TestCases/Windows/x86-64/sehframe-handling.cpp
    A compiler-rt/test/orc/TestCases/Windows/x86-64/static-initializer.S
    A compiler-rt/test/orc/TestCases/Windows/x86-64/static-initializer.cpp
    A compiler-rt/test/orc/TestCases/Windows/x86-64/trivial-jit-dlopen.c
    M compiler-rt/test/orc/lit.cfg.py
    A llvm/include/llvm/ExecutionEngine/Orc/COFFPlatform.h
    M llvm/lib/ExecutionEngine/Orc/CMakeLists.txt
    A llvm/lib/ExecutionEngine/Orc/COFFPlatform.cpp
    M llvm/lib/ExecutionEngine/Orc/ObjectFileInterface.cpp
    M llvm/tools/llvm-jitlink/llvm-jitlink.cpp
    M llvm/tools/llvm-jitlink/llvm-jitlink.h

  Log Message:
  -----------
  [ORC_RT][COFF] Initial platform support for COFF/x86_64.

Initial platform support for COFF/x86_64.

Completed features:
* Statically linked orc runtime.
* Full linking/initialization of static/dynamic vc runtimes and microsoft stl libraries.
* SEH exception handling.
* Full static initializers support
* dlfns
* JIT side symbol lookup/dispatch

Things to note:
* It uses vc runtime libraries found in vc toolchain installations.
* Bootstrapping state is separated because when statically linking orc runtime it needs microsoft stl functions to initialize the orc runtime, but static initializers need to be ran in order to fully initialize stl libraries.
* Process symbols can't be used blidnly on msvc platform; otherwise duplicate definition error gets generated. If process symbols are used, it's destined to get out-of-reach error at some point.
* Atexit currently not handled -- will be handled in the follow-up patches.

Reviewed By: lhames

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




More information about the All-commits mailing list