1// 2// Copyright (C) 2016 The Android Open Source Project 3// 4// Licensed under the Apache License, Version 2.0 (the "License"); 5// you may not use this file except in compliance with the License. 6// You may obtain a copy of the License at 7// 8// http://www.apache.org/licenses/LICENSE-2.0 9// 10// Unless required by applicable law or agreed to in writing, software 11// distributed under the License is distributed on an "AS IS" BASIS, 12// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13// See the License for the specific language governing permissions and 14// limitations under the License. 15// 16 17cc_defaults { 18 name: "conscrypt_global", 19 20 cflags: [ 21 "-Wall", 22 "-Wextra", 23 "-Werror", 24 "-Wunused", 25 ], 26 27 srcs: [ 28 "common/src/jni/main/cpp/CompatibilityCloseMonitor.cpp", 29 "common/src/jni/main/cpp/JniConstants.cpp", 30 "common/src/jni/main/cpp/NativeCrypto.cpp", 31 "common/src/jni/main/cpp/jni_load.cpp", 32 ], 33 34 local_include_dirs: [ 35 "common/src/jni/main/include", 36 ], 37 38 compile_multilib: "both", 39 stl: "c++_static", 40} 41 42cc_defaults { 43 name: "conscrypt_unbundled", 44 45 local_include_dirs: [ 46 "common/src/jni/unbundled/include", 47 ], 48 49 host_ldlibs: ["-ldl"], 50 51 shared_libs: [ 52 "liblog", 53 ], 54 55 static_libs: [ 56 "libssl", 57 "libcrypto", 58 ], 59 60 sdk_version: "9", 61} 62 63cc_library { 64 name: "libconscrypt_jni", 65 defaults: ["conscrypt_global", "conscrypt_unbundled"], 66} 67 68cc_library_host_shared { 69 name: "libconscrypt_openjdk_jni", 70 defaults: ["conscrypt_global"], 71 72 cflags: [ 73 "-DCONSCRYPT_OPENJDK", 74 ], 75 76 local_include_dirs: [ 77 "common/src/jni/unbundled/include", 78 ], 79 80 host_ldlibs: ["-lpthread"], 81 82 static_libs: [ 83 "libssl", 84 "libcrypto", 85 ], 86 87 // TODO: b/26097626. ASAN breaks use of this library in JVM. 88 // Re-enable sanitization when the issue with making clients of this library 89 // preload ASAN runtime is resolved. Without that, clients are getting runtime 90 // errors due to unresolved ASAN symbols, such as 91 // __asan_option_detect_stack_use_after_return. 92 sanitize: { 93 never: true, 94 }, 95 96 stl: "libc++_static", 97} 98