[K/N] Support compiler compilation in MSVC environment

The right way is to add something like KonanTarget.MSVC_X64, but doing
so requires changes throughout whole compiler. It would be especially
painful in HostManager, where we would need to deprecate
KonanTarget.MINGW_X64 as host. Instead we "hack" ClangArgs to compile
for x86_64-pc-windows-msvc instead of x86_64-pc-windows-gnu in JNI case.

CI may contain custom MSVC and Windows Kit installation path, so we
should support it. Things might break when machine has several MSVC
installed (at custom and default path), but it sounds more like
incorrect environment setup problem than ours.
This commit is contained in:
Sergey Bogolepov
2021-07-23 12:46:49 +07:00
committed by Space
parent a78fcd6b64
commit 66ddd15798
6 changed files with 165 additions and 25 deletions
@@ -38,7 +38,7 @@ val llvmDir = project.findProperty("llvmDir")
val libclang =
if (HostManager.hostIsMingw) {
"bin/libclang.dll"
"lib/libclang.lib"
} else {
"lib/${System.mapLibraryName("clang")}"
}