diff --git a/FAQ.md b/FAQ.md index 8aaa89e32a9..fbca80c77a7 100644 --- a/FAQ.md +++ b/FAQ.md @@ -19,3 +19,9 @@ It will produce platform-specific shared object (.so on Linux, .dylib on macOS a C language header, allowing to use all public APIs available in your Kotlin/Native program from C code. See `samples/python_extension` as an example of using such shared object to provide a bridge between Python and Kotlin/Native. + +Q: How do I run Kotlin/Native behind corporate proxy? + +A: As Kotlin/Native need to download platform specific toolchain, you need to specify +`-Dhttp.proxyHost=xxx -Dhttp.proxyPort=xxx` as compiler's or `gradlew` arguments, +or set it via `JAVA_OPTS` environment variable. diff --git a/cmd/run_konan b/cmd/run_konan index e2965caf26c..509b72b90ee 100755 --- a/cmd/run_konan +++ b/cmd/run_konan @@ -68,7 +68,8 @@ java_opts=(-ea \ -Xmx3G \ "-Djava.library.path=${NATIVE_LIB}" \ "-Dkonan.home=${KONAN_HOME}" \ - -Dfile.encoding=UTF-8) + -Dfile.encoding=UTF-8 \ + ${JAVA_OPTS}) # Unset some environment variables which are set by XCode and may potentially affect the tool executed. for VAR in `cat "${KONAN_HOME}/tools/env_blacklist"`; do diff --git a/cmd/run_konan.bat b/cmd/run_konan.bat index 68304b2444e..c69a5f94bd9 100644 --- a/cmd/run_konan.bat +++ b/cmd/run_konan.bat @@ -72,7 +72,8 @@ set JAVA_OPTS=-ea ^ -Xmx3G ^ "-Djava.library.path=%NATIVE_LIB%" ^ "-Dkonan.home=%_KONAN_HOME%" ^ - -Dfile.encoding=UTF-8 + -Dfile.encoding=UTF-8 ^ + %JAVA_OPTS% set LIBCLANG_DISABLE_CRASH_RECOVERY=1