title: Android Studio JNI build Error with cmake
body: <p>I want to build the JNI with android studio so that I can use .so file.
  I used the Cmake for it but when I build the JNI, I got the built error.</p>
  
  <p>My build.gradle</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  android {
      compileSdkVersion 28
      defaultConfig {
          applicationId "com.ss.raynor.nativehttprequest"
          minSdkVersion 18
          targetSdkVersion 28
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
          externalNativeBuild {
              cmake {
                  cppFlags "-std=c++14"
              }
          }
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
          }
      }
      externalNativeBuild {
          cmake {
              path "src/main/cpp/CMakeLists.txt"
          }
      }
  }
  
  dependencies {
      implementation fileTree(dir: 'libs', include: ['*.jar'])
      implementation 'com.android.support:appcompat-v7:28.0.0'
      implementation 'com.android.support.constraint:constraint-layout:1.1.3'
      testImplementation 'junit:junit:4.12'
      androidTestImplementation 'com.android.support.test:runner:1.0.2'
      androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
  }
  </code></pre>
  
  <p>Build command failed.
  Error while executing process </p>
  
  <pre><code>E:\environment\sdk\cmake\3.6.4111459\bin\cmake.exe with arguments {-HE:\Work\NativeHttpRequest\NativeHttpRequest\app\src\main\cpp -BE:\Work\NativeHttpRequest\NativeHttpRequest\app\.externalNativeBuild\cmake\debug\armeabi-v7a -DANDROID_ABI=armeabi-v7a -DANDROID_PLATFORM=android-18 -DCMAKE_LIBRARY_OUTPUT_DIRECTORY=E:\Work\NativeHttpRequest\NativeHttpRequest\app\build\intermediates\cmake\debug\obj\armeabi-v7a -DCMAKE_BUILD_TYPE=Debug -DANDROID_NDK=E:\environment\sdk\ndk-bundle -DCMAKE_CXX_FLAGS=-std=c++14 -DCMAKE_TOOLCHAIN_FILE=E:\environment\sdk\ndk-bundle\build\cmake\android.toolchain.cmake -DCMAKE_MAKE_PROGRAM=E:\environment\sdk\cmake\3.6.4111459\bin\ninja.exe -GAndroid Gradle - Ninja}
  -- Check for working C compiler: E:/environment/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe
  -- Check for working C compiler: E:/environment/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe -- broken
  -- Configuring incomplete, errors occurred!
  See also "E:/Work/NativeHttpRequest/NativeHttpRequest/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeOutput.log".
  See also "E:/Work/NativeHttpRequest/NativeHttpRequest/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeError.log".
  
  CMake Error at E:/environment/sdk/cmake/3.6.4111459/share/cmake-3.6/Modules/CMakeTestCCompiler.cmake:61 (message):
    The C compiler
    "E:/environment/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/bin/clang.exe"
    is not able to compile a simple test program.
  
    It fails with the following output:
  
     Change Dir: E:/Work/NativeHttpRequest/NativeHttpRequest/app/.externalNativeBuild/cmake/debug/armeabi-v7a/CMakeFiles/CMakeTmp
  
  
  
    Run Build Command:"E:\environment\sdk\cmake\3.6.4111459\bin\ninja.exe"
    "cmTC_2ada3"
  
    [1/2] Building C object CMakeFiles/cmTC_2ada3.dir/testCCompiler.c.o
  
  
    FAILED:
    E:\environment\sdk\ndk-bundle\toolchains\llvm\prebuilt\windows-x86_64\bin\clang.exe
    --target=armv7-none-linux-androideabi18
    --gcc-toolchain=E:/environment/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64
    --sysroot=E:/environment/sdk/ndk-bundle/toolchains/llvm/prebuilt/windows-x86_64/sysroot
    -g -DANDROID -fdata-sections -ffunction-sections -funwind-tables
    -fstack-protector-strong -no-canonical-prefixes -fno-addrsig -march=armv7-a
    -mthumb -Wa,--noexecstack -Wformat -Werror=format-security -fPIE -o
    CMakeFiles/cmTC_2ada3.dir/testCCompiler.c.o -c
    E:\Work\NativeHttpRequest\NativeHttpRequest\app\.externalNativeBuild\cmake\debug\armeabi-v7a\CMakeFiles\CMakeTmp\testCCompiler.c
  </code></pre>
  
  <p>clang.exe: error: unknown argument: '-fno-addrsig'</p>
  
  <p>ninja: build stopped: subcommand failed.</p>