diff --git a/kotlin-native/Interop/Indexer/build.gradle b/kotlin-native/Interop/Indexer/build.gradle index ea7d33b350a..97f0d7f8514 100644 --- a/kotlin-native/Interop/Indexer/build.gradle +++ b/kotlin-native/Interop/Indexer/build.gradle @@ -74,6 +74,12 @@ if (libclangextIsEnabled) { model { + tasks.compileClangstubsSharedLibraryClangstubsC{ + dependsOn ":kotlin-native:dependencies:update" + } + tasks.compileClangstubsSharedLibraryClangstubsCpp { + dependsOn ":kotlin-native:dependencies:update" + } components { clangstubs(NativeLibrarySpec) { sources { @@ -84,6 +90,7 @@ model { binaries.all { cCompiler.args hostPlatform.clang.hostCompilerArgsForJni cCompiler.args.addAll(cflags) + cppCompiler.args.add("-std=c++11") } binaries.withType(SharedLibraryBinarySpec) { diff --git a/kotlin-native/Interop/Indexer/prebuilt/nativeInteropStubs/c/clangstubs.c b/kotlin-native/Interop/Indexer/prebuilt/nativeInteropStubs/c/clangstubs.c index 6930a9792c3..bddeac54ac7 100644 --- a/kotlin-native/Interop/Indexer/prebuilt/nativeInteropStubs/c/clangstubs.c +++ b/kotlin-native/Interop/Indexer/prebuilt/nativeInteropStubs/c/clangstubs.c @@ -3,6 +3,7 @@ #include #include #include +#include // NOTE THIS FILE IS AUTO-GENERATED diff --git a/kotlin-native/Interop/Runtime/build.gradle b/kotlin-native/Interop/Runtime/build.gradle index 5dd410e2db6..b9b3059d86c 100644 --- a/kotlin-native/Interop/Runtime/build.gradle +++ b/kotlin-native/Interop/Runtime/build.gradle @@ -30,6 +30,9 @@ import org.jetbrains.kotlin.konan.target.ClangArgs model { + tasks.compileCallbacksSharedLibraryCallbacksC { + dependsOn ":kotlin-native:dependencies:update" + } components { callbacks(NativeLibrarySpec) { sources.c.source { diff --git a/kotlin-native/build-tools/src/main/groovy/org/jetbrains/kotlin/NativeInteropPlugin.groovy b/kotlin-native/build-tools/src/main/groovy/org/jetbrains/kotlin/NativeInteropPlugin.groovy index e0d638e3d4d..1ef8220f8d0 100644 --- a/kotlin-native/build-tools/src/main/groovy/org/jetbrains/kotlin/NativeInteropPlugin.groovy +++ b/kotlin-native/build-tools/src/main/groovy/org/jetbrains/kotlin/NativeInteropPlugin.groovy @@ -197,6 +197,7 @@ class NamedNativeInteropConfig implements Named { } genTask.configure { + dependsOn ":kotlin-native:dependencies:update" classpath = project.configurations.interopStubGenerator main = "org.jetbrains.kotlin.native.interop.gen.jvm.MainKt" jvmArgs '-ea' diff --git a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/bitcode/CompileToBitcodePlugin.kt b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/bitcode/CompileToBitcodePlugin.kt index 703b342411a..319fd8faf9f 100644 --- a/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/bitcode/CompileToBitcodePlugin.kt +++ b/kotlin-native/build-tools/src/main/kotlin/org/jetbrains/kotlin/bitcode/CompileToBitcodePlugin.kt @@ -65,6 +65,7 @@ open class CompileToBitcodeExtension @Inject constructor(val project: Project) { SanitizerKind.THREAD -> " with TSAN" } description = "Compiles '$name' to bitcode for $targetName$sanitizerDescription" + dependsOn(":kotlin-native:dependencies:update") configurationBlock() } } diff --git a/kotlin-native/build.gradle b/kotlin-native/build.gradle index 2033f77ba4c..0103eddca56 100644 --- a/kotlin-native/build.gradle +++ b/kotlin-native/build.gradle @@ -359,6 +359,7 @@ task shadowJar(type: ShadowJar) { } task distCompiler(type: Copy) { + dependsOn ":kotlin-native:dependencies:update" dependsOn ':kotlin-native:shadowJar' destinationDir distDir diff --git a/kotlin-native/common/build.gradle.kts b/kotlin-native/common/build.gradle.kts index a9bdc671fdb..9914d2ea6ba 100644 --- a/kotlin-native/common/build.gradle.kts +++ b/kotlin-native/common/build.gradle.kts @@ -8,8 +8,12 @@ plugins { } bitcode { - create("hash") - create("files") + create("hash") { + dependsOn(":kotlin-native:dependencies:update") + } + create("files"){ + dependsOn(":kotlin-native:dependencies:update") + } } val hostName: String by project diff --git a/kotlin-native/libclangext/build.gradle b/kotlin-native/libclangext/build.gradle index ba0de5d2277..ec786ff57e2 100644 --- a/kotlin-native/libclangext/build.gradle +++ b/kotlin-native/libclangext/build.gradle @@ -30,6 +30,9 @@ import org.jetbrains.kotlin.PlatformInfo ext.isEnabled = PlatformInfo.isMac() model { + tasks.compileClangextStaticLibraryClangextCpp { + dependsOn ":kotlin-native:dependencies:update" + } components { clangext(NativeLibrarySpec) { sources { diff --git a/kotlin-native/llvmCoverageMappingC/build.gradle b/kotlin-native/llvmCoverageMappingC/build.gradle index b10dc5ae4a1..3a1d665461b 100644 --- a/kotlin-native/llvmCoverageMappingC/build.gradle +++ b/kotlin-native/llvmCoverageMappingC/build.gradle @@ -29,6 +29,9 @@ buildscript { import org.jetbrains.kotlin.konan.target.ClangArgs model { + tasks.compileCoverageMappingStaticLibraryCoverageMappingCpp { + dependsOn ":kotlin-native:dependencies:update" + } components { coverageMapping(NativeLibrarySpec) { sources.cpp.source.srcDirs "src/main/cpp" diff --git a/kotlin-native/llvmDebugInfoC/build.gradle b/kotlin-native/llvmDebugInfoC/build.gradle index b309f8d2a69..bc9e1cf211d 100644 --- a/kotlin-native/llvmDebugInfoC/build.gradle +++ b/kotlin-native/llvmDebugInfoC/build.gradle @@ -29,6 +29,9 @@ buildscript { import org.jetbrains.kotlin.konan.target.ClangArgs model { + tasks.compileDebugInfoStaticLibraryDebugInfoCpp { + dependsOn ":kotlin-native:dependencies:update" + } components { debugInfo(NativeLibrarySpec) { sources.cpp.source.srcDirs "src/main/cpp" diff --git a/kotlin-native/runtime/build.gradle.kts b/kotlin-native/runtime/build.gradle.kts index 2f3f3106ef4..1ee9f42ca74 100644 --- a/kotlin-native/runtime/build.gradle.kts +++ b/kotlin-native/runtime/build.gradle.kts @@ -28,6 +28,7 @@ val targetList: List by project bitcode { create("runtime", file("src/main")) { dependsOn( + ":kotlin-native:dependencies:update", ":kotlin-native:common:${target}Hash", "${target}StdAlloc", "${target}OptAlloc",