From a158d52f8c3c2da3635422c079064828011fce5a Mon Sep 17 00:00:00 2001 From: Svyatoslav Scherbina Date: Wed, 19 Oct 2016 23:33:21 +0300 Subject: [PATCH] build: configure 'c' plugin to use clang toolchain from dependencies --- build.gradle | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) 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