[ORC][ORC_RT][COFF] Support dynamic VC runtime.
authorsunho <ksunhokim123@gmail.com>
Sat, 10 Sep 2022 06:25:49 +0000 (15:25 +0900)
committersunho <ksunhokim123@gmail.com>
Sat, 10 Sep 2022 06:25:49 +0000 (15:25 +0900)
commit73c4033987c5ca6cf8022f840f3c42e3324da1cb
tree33126e5a812dcefaaef90e6c2cb10bf3388db285
parentbc24e6ab7c5ebb40045d0efe49da94b5ccc30b16
[ORC][ORC_RT][COFF] Support dynamic VC runtime.

Supports dynamic VC runtime. It implements atexits handling which is required to load msvcrt.lib successfully. (the object file containing atexit symbol somehow resolves to static vc runtim symbols) It also default to dynamic vc runtime which tends to be more robust.

Reviewed By: lhames

Differential Revision: https://reviews.llvm.org/D132525
16 files changed:
compiler-rt/lib/orc/CMakeLists.txt
compiler-rt/lib/orc/coff_platform.cpp
compiler-rt/lib/orc/coff_platform.per_jd.cpp [new file with mode: 0644]
compiler-rt/test/orc/TestCases/Windows/x86-64/Inputs/standalone-dylib.c
compiler-rt/test/orc/TestCases/Windows/x86-64/hello-world.c
compiler-rt/test/orc/TestCases/Windows/x86-64/hello-world.cpp
compiler-rt/test/orc/TestCases/Windows/x86-64/priority-static-initializer-three.c
compiler-rt/test/orc/TestCases/Windows/x86-64/priority-static-initializer.c
compiler-rt/test/orc/TestCases/Windows/x86-64/sehframe-handling.cpp
compiler-rt/test/orc/TestCases/Windows/x86-64/static-initializer.cpp
compiler-rt/test/orc/TestCases/Windows/x86-64/trivial-atexit.c [new file with mode: 0644]
compiler-rt/test/orc/TestCases/Windows/x86-64/trivial-jit-dlopen.c
compiler-rt/test/orc/lit.cfg.py
llvm/include/llvm/ExecutionEngine/Orc/COFFPlatform.h
llvm/lib/ExecutionEngine/Orc/COFFPlatform.cpp
llvm/tools/llvm-jitlink/llvm-jitlink.cpp