build: fix compilation on Linux when using libclang
This commit is contained in:
committed by
SvyatoslavScherbina
parent
53b347b75a
commit
9052e08e59
@@ -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
|
||||
|
||||
|
||||
Vendored
+1
-1
@@ -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,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
|
||||
Reference in New Issue
Block a user