From 399ea1092ecaecade9e991c963a2942906f5b3aa Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Tue, 20 Dec 2022 17:47:06 +0100 Subject: [PATCH] Remove kotlinc K/N scripts because they clash with real (K/JVM) kotlinc These scripts were deprecated in 1.5.0. --- kotlin-native/cmd/kotlinc | 20 ------------------- kotlin-native/cmd/kotlinc.bat | 17 ---------------- .../jetbrains/kotlin/cli/utilities/main.kt | 18 ----------------- 3 files changed, 55 deletions(-) delete mode 100755 kotlin-native/cmd/kotlinc delete mode 100644 kotlin-native/cmd/kotlinc.bat diff --git a/kotlin-native/cmd/kotlinc b/kotlin-native/cmd/kotlinc deleted file mode 100755 index a4eb6adc490..00000000000 --- a/kotlin-native/cmd/kotlinc +++ /dev/null @@ -1,20 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2010-2017 JetBrains s.r.o. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -DIR="${BASH_SOURCE[0]%/*}" -: ${DIR:="."} - -"${DIR}"/run_konan kotlinc "$@" diff --git a/kotlin-native/cmd/kotlinc.bat b/kotlin-native/cmd/kotlinc.bat deleted file mode 100644 index e5dc75a4676..00000000000 --- a/kotlin-native/cmd/kotlinc.bat +++ /dev/null @@ -1,17 +0,0 @@ -@echo off - -rem Copyright 2010-2017 JetBrains s.r.o. -rem -rem Licensed under the Apache License, Version 2.0 (the "License"); -rem you may not use this file except in compliance with the License. -rem You may obtain a copy of the License at -rem -rem http://www.apache.org/licenses/LICENSE-2.0 -rem -rem Unless required by applicable law or agreed to in writing, software -rem distributed under the License is distributed on an "AS IS" BASIS, -rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -rem See the License for the specific language governing permissions and -rem limitations under the License. - -call %~dps0run_konan.bat kotlinc %* diff --git a/kotlin-native/utilities/cli-runner/src/main/kotlin/org/jetbrains/kotlin/cli/utilities/main.kt b/kotlin-native/utilities/cli-runner/src/main/kotlin/org/jetbrains/kotlin/cli/utilities/main.kt index 004ba54685e..a26cb31a242 100644 --- a/kotlin-native/utilities/cli-runner/src/main/kotlin/org/jetbrains/kotlin/cli/utilities/main.kt +++ b/kotlin-native/utilities/cli-runner/src/main/kotlin/org/jetbrains/kotlin/cli/utilities/main.kt @@ -17,25 +17,7 @@ private fun mainImpl(args: Array, runFromDaemon: Boolean, konancMain: (A when (utilityName) { "konanc" -> konancMain(utilityArgs) - "kotlinc" -> { - println(""" - NOTE: you are running "kotlinc" CLI tool from Kotlin/Native distribution, - it runs Kotlin/Native compiler that produces native binaries from Kotlin code. - If your intention was to compile Kotlin code to JVM bytecode instead, then you - need to use "kotlinc" from the main Kotlin distribution (e.g. it can be - downloaded as kotlin-compiler-X.Y.ZZ.zip archive from - https://github.com/JetBrains/kotlin/releases/latest, or installed using various - package managers). - WARNING: if your intention was to run Kotlin/Native compiler, then please use - "kotlinc-native" CLI tool instead of "kotlinc". "kotlinc" tool will be removed - from Kotlin/Native distribution, so it will stop clashing with "kotlinc" from - the main Kotlin distribution. - - """.trimIndent()) - - konancMain(utilityArgs) - } "cinterop" -> { val konancArgs = invokeInterop("native", utilityArgs, runFromDaemon) konancArgs?.let { konancMain(it) }