From 2127c8b8bc4427f352e1d30747c0f6aec06bdd5c Mon Sep 17 00:00:00 2001 From: "jose.pereda" Date: Tue, 2 Apr 2024 11:16:44 +0200 Subject: [PATCH] add compile option for Android --- gradle/native-build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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