Home | History | Annotate | Download | only in sigchainlib
      1 //
      2 // Copyright (C) 2014 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 
     17 cc_library {
     18     name: "libsigchain",
     19     cpp_std: "gnu++17",
     20 
     21     host_supported: true,
     22     defaults: ["art_defaults"],
     23     target: {
     24         linux: {
     25             shared: {
     26                 srcs: ["sigchain_dummy.cc"],
     27             },
     28             static: {
     29                 srcs: ["sigchain.cc"],
     30             },
     31         },
     32 
     33         darwin: {
     34             srcs: ["sigchain_dummy.cc"],
     35         },
     36 
     37         android: {
     38             shared_libs: ["liblog"],
     39         },
     40     },
     41     // Sigchainlib is whole-statically linked into binaries. For Android.mk-based binaries,
     42     // this will drag ASAN symbols into the binary, even for modules using LOCAL_SANITIZE := never.
     43     // So disable sanitization for now. b/38456126
     44     sanitize: {
     45         never: true,
     46     },
     47 }
     48 
     49 // Create a dummy version of libsigchain which expose the necessary symbols
     50 // but throws when called. This can be used to get static binaries which don't
     51 // need the real functionality of the sig chain but need to please the linker.
     52 cc_library_static {
     53     name: "libsigchain_dummy",
     54     host_supported: true,
     55     defaults: ["art_defaults"],
     56     srcs: ["sigchain_dummy.cc"],
     57     target: {
     58         android: {
     59             shared_libs: ["liblog"],
     60         },
     61     },
     62 }
     63 
     64 art_cc_test {
     65     name: "art_sigchain_tests",
     66     defaults: [
     67         "art_gtest_defaults",
     68     ],
     69     srcs: ["sigchain_test.cc"],
     70     whole_static_libs: ["libsigchain"],
     71 }
     72