diff --git a/gradle/native-build.gradle b/gradle/native-build.gradle index c7d7167..f17eee3 100644 --- a/gradle/native-build.gradle +++ b/gradle/native-build.gradle @@ -374,7 +374,7 @@ ext.nativeBuildLib = { buildDir, projectDir, name, os -> File nativeSourcesDir = file("$projectDir/src/main/native/$os/c/") osSources = [nativeSourcesDir.listFiles().findAll {it.name.endsWith(".c")}].flatten() - def compilerArgs = ["-target", platform, "-Werror", "-c", includeFlags, osIncludeFlags, osSources].flatten() + def compilerArgs = ["-target", platform, "-Werror", "-c", "-fPIC", includeFlags, osIncludeFlags, osSources].flatten() exec { executable compiler