build: fix compilation on Linux when using libclang

This commit is contained in:
Svyatoslav Scherbina
2017-02-17 17:26:23 +07:00
committed by SvyatoslavScherbina
parent 53b347b75a
commit 9052e08e59
3 changed files with 10 additions and 1 deletions
@@ -203,6 +203,14 @@ class NamedNativeInteropConfig implements Named {
environment['PATH'] = project.files(project.clangPath).asPath +
File.pathSeparator + environment['PATH']
if (project.isLinux()) {
// StubGenerator passes the arguments to libclang which works not exactly the same way
// as the clang binary and (in particular) uses different default header search path.
// See e.g. http://lists.llvm.org/pipermail/cfe-dev/2013-November/033680.html
// Workaround the problem:
compilerOpts += ["-isystem", "${project.llvmDir}/lib/clang/${project.llvmVersion}/include"]
}
compilerOpts += project.hostClangArgs
linkerOpts += project.hostClangArgs
+1 -1
View File
@@ -75,7 +75,7 @@ task libffi(type: TgzNativeDep) {
}
task llvm(type: TgzNativeDep) {
baseName = "clang+llvm-3.8.0-$host"
baseName = "clang+llvm-$llvmVersion-$host"
}
if (isLinux()) {
+1
View File
@@ -1,3 +1,4 @@
kotlin_version=1.1-M03
llvmVersion = 3.8.0
#kotlinCompilerModule=org.jetbrains.kotlin:kotlin-compiler:1.1-SNAPSHOT
kotlinCompilerModule=org.jetbrains.kotlin:kotlin-compiler:1.1-20170217.175209-427