diff --git a/BUCK b/BUCK index 79a9bfc8..efac474f 100644 --- a/BUCK +++ b/BUCK @@ -32,20 +32,6 @@ cxx_library( ], ) -cxx_library( - name = "yogafastmath", - srcs = glob(["yoga/*.cpp"]), - header_namespace = "", - exported_headers = subdir_glob([("", "yoga/*.h")]), - compiler_flags = COMPILER_FLAGS + ["-ffast-math"], - soname = "libyogafastmathcore.$(ext)", - tests = [":YogaTests"], - visibility = ["PUBLIC"], - deps = [ - yoga_dep("lib/fb:ndklog"), - ], -) - cxx_test( name = "YogaTests", srcs = glob(["tests/*.cpp"]), diff --git a/java/BUCK b/java/BUCK index 568c1fc9..45ce1959 100644 --- a/java/BUCK +++ b/java/BUCK @@ -28,29 +28,6 @@ cxx_library( ], ) -cxx_library( - name = "jniFastMath", - srcs = glob(["jni/*.cpp"]), - header_namespace = "", - compiler_flags = [ - "-fno-omit-frame-pointer", - "-fexceptions", - "-fPIC", - "-Wall", - "-Werror", - "-O3", - "-std=c++11", - ], - platforms = ANDROID, - soname = "libyogafastmath.$(ext)", - visibility = ["PUBLIC"], - deps = [ - FBJNI_TARGET, - JNI_TARGET, - yoga_dep(":yogafastmath"), - ], -) - java_library( name = "java", srcs = glob(["com/facebook/yoga/*.java"]), @@ -63,7 +40,6 @@ java_library( visibility = ["PUBLIC"], deps = [ ":jni", - ":jniFastMath", INFER_ANNOTATIONS_TARGET, JSR_305_TARGET, PROGRUARD_ANNOTATIONS_TARGET, diff --git a/java/com/facebook/yoga/YogaConfig.java b/java/com/facebook/yoga/YogaConfig.java index ebb64aaf..12aa0d8e 100644 --- a/java/com/facebook/yoga/YogaConfig.java +++ b/java/com/facebook/yoga/YogaConfig.java @@ -16,11 +16,7 @@ public class YogaConfig { public static int SPACING_TYPE = 1; static { - if (YogaConstants.shouldUseFastMath) { - SoLoader.loadLibrary("yogafastmath"); - } else { SoLoader.loadLibrary("yoga"); - } } long mNativePointer; diff --git a/java/com/facebook/yoga/YogaConstants.java b/java/com/facebook/yoga/YogaConstants.java index f235cfde..4e081ce4 100644 --- a/java/com/facebook/yoga/YogaConstants.java +++ b/java/com/facebook/yoga/YogaConstants.java @@ -18,8 +18,6 @@ public class YogaConstants { */ public static final float UNDEFINED = (float) (10E20); - public static boolean shouldUseFastMath = false; - public static boolean isUndefined(float value) { // Value of a float in the case of it being not defined is 10.1E20. Earlier it used to be NAN, // the benefit of which diff --git a/java/com/facebook/yoga/YogaNode.java b/java/com/facebook/yoga/YogaNode.java index 69bb3348..59a14d24 100644 --- a/java/com/facebook/yoga/YogaNode.java +++ b/java/com/facebook/yoga/YogaNode.java @@ -17,11 +17,7 @@ import javax.annotation.Nullable; public class YogaNode implements Cloneable { static { - if (YogaConstants.shouldUseFastMath) { - SoLoader.loadLibrary("yogafastmath"); - } else { SoLoader.loadLibrary("yoga"); - } } /** diff --git a/yoga_defs.bzl b/yoga_defs.bzl index 0d12f12a..4e1d472d 100644 --- a/yoga_defs.bzl +++ b/yoga_defs.bzl @@ -32,6 +32,7 @@ BASE_COMPILER_FLAGS = [ '-Wall', '-Werror', '-O3', + '-ffast-math', ] LIBRARY_COMPILER_FLAGS = BASE_COMPILER_FLAGS + [ @@ -112,4 +113,3 @@ def prebuilt_jar(*args, **kwargs): def is_apple_platform(): return True -