[wasm32] linux & mingw support

This commit is contained in:
Vasily Levchenko
2017-11-26 17:22:54 +03:00
parent 93a3444a70
commit 4baeb5cb45
3 changed files with 18 additions and 2 deletions
@@ -211,8 +211,10 @@ internal open class WasmPlatform(distribution: Distribution)
override fun linkCommand(objectFiles: List<ObjectFile>, executable: ExecutableFile, optimize: Boolean, debug: Boolean, dynamic: Boolean): List<String> {
//No link stage for WASM yet, just give '.wasm' as output.
return mutableListOf("/bin/cp", objectFiles.single(), executable)
// No link stage for WASM yet, just give '.wasm' as output.
return mutableListOf(
*(if (TargetManager.host == KonanTarget.MINGW) arrayOf("${System.getenv("SystemRoot")}/System32/cmd.exe", "/c", "copy") else arrayOf("/bin/cp")),
objectFiles.single(), executable)
}
}
+12
View File
@@ -278,6 +278,18 @@ dependencies.osx-wasm32 = \
target-sysroot-2-wasm \
target-toolchain-2-osx-wasm
targetToolchain.linux-wasm32 = target-toolchain-1-linux-wasm
dependencies.linux-wasm32 = \
clang-llvm-5.0.0-linux-x86-64 \
target-sysroot-2-wasm \
target-toolchain-1-linux-wasm
targetToolchain.mingw-wasm32 = target-toolchain-1-mingw-wasm
dependencies.mingw-wasm32 = \
msys2-mingw-w64-x86_64-gcc-7.2.0-clang-llvm-5.0.0-windows-x86-64 \
target-sysroot-2-wasm \
target-toolchain-1-mingw-wasm
quadruple.wasm32 = wasm32
llvmLtoFlags.wasm32 =
targetSysRoot.wasm32 = target-sysroot-2-wasm
@@ -176,9 +176,11 @@ class TargetManager(val userRequest: String? = null) {
KonanTarget.LINUX_MIPSEL32.enabled = true
KonanTarget.ANDROID_ARM32.enabled = true
KonanTarget.ANDROID_ARM64.enabled = true
KonanTarget.WASM32.enabled = true
}
KonanTarget.MINGW -> {
KonanTarget.MINGW.enabled = true
KonanTarget.WASM32.enabled = true
}
KonanTarget.MACBOOK -> {
KonanTarget.MACBOOK.enabled = true