Deprecate kotlinc K/N scripts because they clash with real kotlinc
Also make them print the message clarifying that it's Kotlin/Native, not Kotlin/JVM. #KT-43874 Fixed.
This commit is contained in:
committed by
Nikolay Krasko
parent
411506127c
commit
ee9c2f0e33
@@ -17,4 +17,4 @@
|
|||||||
DIR="${BASH_SOURCE[0]%/*}"
|
DIR="${BASH_SOURCE[0]%/*}"
|
||||||
: ${DIR:="."}
|
: ${DIR:="."}
|
||||||
|
|
||||||
"${DIR}"/run_konan konanc "$@"
|
"${DIR}"/run_konan kotlinc "$@"
|
||||||
|
|||||||
@@ -14,4 +14,4 @@ rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|||||||
rem See the License for the specific language governing permissions and
|
rem See the License for the specific language governing permissions and
|
||||||
rem limitations under the License.
|
rem limitations under the License.
|
||||||
|
|
||||||
call %~dps0run_konan.bat konanc %*
|
call %~dps0run_konan.bat kotlinc %*
|
||||||
|
|||||||
+19
@@ -15,6 +15,25 @@ private fun mainImpl(args: Array<String>, konancMain: (Array<String>) -> Unit) {
|
|||||||
when (utilityName) {
|
when (utilityName) {
|
||||||
"konanc" ->
|
"konanc" ->
|
||||||
konancMain(utilityArgs)
|
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" -> {
|
"cinterop" -> {
|
||||||
val konancArgs = invokeInterop("native", utilityArgs)
|
val konancArgs = invokeInterop("native", utilityArgs)
|
||||||
konancArgs?.let { konancMain(it) }
|
konancArgs?.let { konancMain(it) }
|
||||||
|
|||||||
Reference in New Issue
Block a user