-
Notifications
You must be signed in to change notification settings - Fork 564
Improve interop user experience and docs #342
Conversation
@@ -162,6 +166,12 @@ private fun processLib(konanHome: String, | |||
val platform = KotlinPlatform.values().single { it.name.equals(platformName, ignoreCase = true) } | |||
|
|||
val defFile = args["-def"]?.single()?.let { File(it) } | |||
|
|||
if (defFile == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Предлагаешь убрать возможность интеропиться без def-файла?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А он всё равно ниже !! так что NPE падает. Запусти interop без аргументов.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
./dist/bin/interop -pkg:qqq -h:math.h
работает без .def файла.
Просто нужно аккуратнее об этом сказать пользователю
Было бы здорово уметь передавать компилятору опции линкера из def-файла. |
В смысле компилятору линкера? А зачем? |
6cb09e5
to
d430a03
Compare
INTEROP.md
Outdated
## Creating bindings for a new library ## | ||
|
||
To create bindings for a new library, start by creating `.def` file. | ||
Structurally it's simple property file, looking like this: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a
-copt:<c compiler flags> specifies flags passed to clang | ||
-lopt:<linker flags> specifies flags passed to linker | ||
-verbose increases verbosity | ||
-shims adds generation of shims tracing native library calls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
про -pkg:, -h: не хотим рассказать?
Так это для Kotlin JVM. |
Наверное будет понятнее, если ты это при случае сделаешь (я не уверен, что хорошо понимаю суть твоего предложения). |
No description provided.