From 3dcf7722bba2b7a56fef5851282eec5017683a77 Mon Sep 17 00:00:00 2001 From: Pascal Hartig Date: Wed, 4 Jul 2018 10:11:42 -0700 Subject: [PATCH] Add support for x86_64 builds (#128) Summary: Add the required compiler flag for Folly when building x86_64. I'll prepare a new release for this shortly. Depends on #126 Closes https://github.com/facebook/Sonar/pull/128 Reviewed By: danielbuechele Differential Revision: D8731955 Pulled By: priteshrnandgaonkar fbshipit-source-id: 9511811b0b51205989a5200ad9d0d8689ca684cb --- android/build.gradle | 2 +- android/third-party/Folly/CMakeLists.txt | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/android/build.gradle b/android/build.gradle index f753b826f..243f7113a 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -211,7 +211,7 @@ android { buildConfigField "boolean", "IS_INTERNAL_BUILD", 'true' ndk { - abiFilters 'x86', 'armeabi-v7a', 'arm64-v8a' + abiFilters 'x86', 'x86_64', 'armeabi-v7a', 'arm64-v8a' } externalNativeBuild { diff --git a/android/third-party/Folly/CMakeLists.txt b/android/third-party/Folly/CMakeLists.txt index d235e864c..351206bdc 100644 --- a/android/third-party/Folly/CMakeLists.txt +++ b/android/third-party/Folly/CMakeLists.txt @@ -47,6 +47,11 @@ add_compile_options( -Wno-return-type -Wno-tautological-constant-compare ) + +if (CMAKE_ANDROID_ARCH_ABI STREQUAL "x86_64") + add_compile_options(-mpclmul) +endif() + file(GLOB SRC_FILES ${FOLLY_DIR}/portability/*.cpp ${FOLLY_DIR}/io/async/ssl/*.cpp ${FOLLY_DIR}/io/async/*.cpp