[build][gradle][4.4] upgrade (HACK inside see comment in body)
Gradle native software plugins adds -I/usr/include that inroduce conflict with our --systemroot flags,
so we had to add following hack over it:
/* HACK over gradle 4.4, it adds /usr/include, that affects our --sysroot flag */
toolChains {
clang(Clang) {
eachPlatform {
cppCompiler.withArguments { args ->
args.remove /usr/include
}
}
}
}
This commit is contained in:
committed by
Vasily Levchenko
parent
3e949b4047
commit
56a214c454
@@ -82,6 +82,16 @@ model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* HACK over gradle 4.4, it adds /usr/include, that affects our --sysroot flag */
|
||||||
|
toolChains {
|
||||||
|
clang(Clang) {
|
||||||
|
eachPlatform {
|
||||||
|
cppCompiler.withArguments { args ->
|
||||||
|
args.remove "/usr/include"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
sourceSets {
|
sourceSets {
|
||||||
|
|||||||
+1
-1
@@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME
|
|||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-4.3.1-all.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-4.4-all.zip
|
||||||
|
|||||||
@@ -39,4 +39,15 @@ model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* HACK over gradle 4.4, it adds /usr/include, that affects our --sysroot flag */
|
||||||
|
toolChains {
|
||||||
|
clang(Clang) {
|
||||||
|
eachPlatform {
|
||||||
|
cppCompiler.withArguments { args ->
|
||||||
|
args.remove "/usr/include"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ model {
|
|||||||
binaries.withType(StaticLibraryBinarySpec) { binary ->
|
binaries.withType(StaticLibraryBinarySpec) { binary ->
|
||||||
if (!project.parent.convention.plugins.platformInfo.isWindows())
|
if (!project.parent.convention.plugins.platformInfo.isWindows())
|
||||||
cppCompiler.args "-fPIC"
|
cppCompiler.args "-fPIC"
|
||||||
cppCompiler.args "--std=c++11", "-g", "-I${llvmDir}/include", "-I${projectDir}/src/main/include"
|
cppCompiler.args "--std=c++11", "-I${llvmDir}/include", "-I${projectDir}/src/main/include"
|
||||||
linker.args "-L${llvmDir}/lib", "-lLLVMCore", "-lLLVMSupport"
|
linker.args "-L${llvmDir}/lib", "-lLLVMCore", "-lLLVMSupport"
|
||||||
}
|
}
|
||||||
binaries.withType(SharedLibraryBinarySpec) { binary ->
|
binaries.withType(SharedLibraryBinarySpec) { binary ->
|
||||||
@@ -33,4 +33,15 @@ model {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* HACK over gradle 4.4, it adds /usr/include, that affects our --sysroot flag */
|
||||||
|
toolChains {
|
||||||
|
clang(Clang) {
|
||||||
|
eachPlatform {
|
||||||
|
cppCompiler.withArguments { args ->
|
||||||
|
args.remove "/usr/include"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user