android_external_mesa3d/meson_to_hermetic/templates/bazel/static_library.txt
C Stout edd4d06624 meson_to_hermetic: fix Fuchsia build
Change-Id: Ia2083cf1b6ecbc596147fe7e0d1f493937d419c5
2024-12-19 11:45:37 -08:00

49 lines
1.2 KiB
Text

{# Copyright © 2024 Google Inc.
SPDX-License-Identifier: MIT
#}
cc_library(
name = "{{ name }}",
srcs = [
{%- for src in srcs %}
"{{ src }}",
{%- endfor %}
],
hdrs = [
{% for hdr in hdrs -%}
"{{ hdr }}",
{%- endfor %}
]
{%- for include_dir in include_directories %}
+ glob(["{{ include_dir }}"])
{%- endfor %}
,
{# Tells Bazel to use -isystem for targets that depend on this one,
which is needed for clients that include package headers with angle brackets.
#}
includes = [
{%- for include_dir in system_include_directories %}
"{{ include_dir }}"
{%- endfor %}
],
copts = [
{%- for copt in copts %}
'{{ copt }}',
{%- endfor %}
],
deps = [
{%- for dep in deps %}
"{{ dep }}",
{%- endfor %}
],
target_compatible_with = [
{%- for target_compat in target_compatible_with %}
"{{ target_compat }}",
{%- endfor %}
],
visibility = [ "//visibility:public" ],
{# Bazel doesn't seem to have a 'whole_static_libs'
option for targets that link against static libs;
workaround is to specify every static lib as alwaysLink
#}
alwayslink = True,
)