build: configure 'c' plugin to use clang toolchain from dependencies

This commit is contained in:
Svyatoslav Scherbina
2016-10-19 23:33:21 +03:00
committed by SvyatoslavScherbina
parent a938fcca6c
commit a158d52f8c
+16
View File
@@ -10,4 +10,20 @@ allprojects {
if (path != ":dependencies") {
evaluationDependsOn(":dependencies")
}
afterEvaluate {
if (plugins.hasPlugin('c')) {
model {
toolChains {
clang(Clang) {
path "$llvmDir/bin"
// The system PATH should be appended automatically according to Gradle docs,
// but this doesn't seem to happen
path System.env.PATH.split(File.pathSeparator)
}
}
}
}
}
}