1""" 2Copyright (C) 2021 The Android Open Source Project 3 4Licensed under the Apache License, Version 2.0 (the "License"); 5you may not use this file except in compliance with the License. 6You may obtain a copy of the License at 7 8 http://www.apache.org/licenses/LICENSE-2.0 9 10Unless required by applicable law or agreed to in writing, software 11distributed under the License is distributed on an "AS IS" BASIS, 12WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13See the License for the specific language governing permissions and 14limitations under the License. 15""" 16 17def prebuilt_library_static( 18 name, 19 static_library, 20 alwayslink = None, 21 export_includes = [], 22 export_system_includes = [], 23 **kwargs): 24 "Bazel macro to correspond with the *_prebuilt_library_static Soong module types" 25 26 # TODO: Handle includes similarly to cc_library_static 27 # e.g. includes = ["clang-r416183b/prebuilt_include/llvm/lib/Fuzzer"], 28 native.cc_import( 29 name = name, 30 static_library = static_library, 31 alwayslink = alwayslink, 32 **kwargs 33 ) 34 35 native.cc_import( 36 name = name + "_alwayslink", 37 static_library = static_library, 38 alwayslink = True, 39 **kwargs 40 ) 41