diff --git a/build.gradle b/build.gradle index d44a0f53fc1..5dce5d7281f 100644 --- a/build.gradle +++ b/build.gradle @@ -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) + } + } + } + } + } } \ No newline at end of file