1{# Copyright © 2024 Google Inc. 2 SPDX-License-Identifier: MIT 3#} 4cc_library( 5 name = "{{ name }}", 6 srcs = [ 7 {%- for src in srcs %} 8 "{{ src }}", 9 {%- endfor %} 10 ], 11 hdrs = [ 12 {% for hdr in hdrs -%} 13 "{{ hdr }}", 14 {%- endfor %} 15 ] 16 {%- for include_dir in include_directories %} 17 + glob(["{{ include_dir }}"]) 18 {%- endfor %} 19 , 20 {# Tells Bazel to use -isystem for targets that depend on this one, 21 which is needed for clients that include package headers with angle brackets. 22 #} 23 includes = [ 24 {%- for include_dir in system_include_directories %} 25 "{{ include_dir }}" 26 {%- endfor %} 27 ], 28 copts = [ 29 {%- for copt in copts %} 30 '{{ copt }}', 31 {%- endfor %} 32 ], 33 deps = [ 34 {%- for dep in deps %} 35 "{{ dep }}", 36 {%- endfor %} 37 ], 38 target_compatible_with = [ 39 {%- for target_compat in target_compatible_with %} 40 "{{ target_compat }}", 41 {%- endfor %} 42 ], 43 visibility = [ "//visibility:public" ], 44 {# Bazel doesn't seem to have a 'whole_static_libs' 45 option for targets that link against static libs; 46 workaround is to specify every static lib as alwaysLink 47 #} 48 alwayslink = True, 49) 50