From 70866092d265b912673934e7057e74a2c42bb2ae Mon Sep 17 00:00:00 2001 From: Vasily Levchenko Date: Fri, 22 Dec 2017 13:42:59 +0300 Subject: [PATCH] [build][gradle][4.4] missed hack over gradle bug of forcebly injection of '/usr/include' in clang toolchain for c compiler --- Interop/Indexer/build.gradle | 3 +++ Interop/Runtime/build.gradle | 10 ++++++++++ 2 files changed, 13 insertions(+) diff --git a/Interop/Indexer/build.gradle b/Interop/Indexer/build.gradle index 7d74180b85a..f5e59f843a3 100644 --- a/Interop/Indexer/build.gradle +++ b/Interop/Indexer/build.gradle @@ -89,6 +89,9 @@ model { cppCompiler.withArguments { args -> args.remove "/usr/include" } + cCompiler.withArguments { args -> + args.remove "/usr/include" + } } } } diff --git a/Interop/Runtime/build.gradle b/Interop/Runtime/build.gradle index 358c47cabc5..09fe90e3327 100644 --- a/Interop/Runtime/build.gradle +++ b/Interop/Runtime/build.gradle @@ -41,6 +41,16 @@ model { } } + /* HACK over gradle 4.4, it adds /usr/include, that affects our --sysroot flag */ + toolChains { + clang(Clang) { + eachPlatform { + cCompiler.withArguments { args -> + args.remove "/usr/include" + } + } + } + } } dependencies {