Use to_list() on Bazel depsets for iteration.

Starting with Bazel 0.27.0 --incompatible_depset_is_not_iterable became the
default.

Fixes #27

PiperOrigin-RevId: 254703981
Change-Id: I727e4b1c6a907c8794a00f61646c13ad8d4437b7
This commit is contained in:
Christian Blichmann 2019-06-24 00:45:36 -07:00 committed by Copybara-Service
parent 6ca744b959
commit 4bcea59309

View File

@ -73,23 +73,23 @@ def sapi_interface_impl(ctx):
# Append system headers as dependencies
input_files += cc_ctx.headers.to_list()
append_all(extra_flags, "-D", cc_ctx.defines)
append_all(extra_flags, "-isystem", cc_ctx.system_includes)
append_all(extra_flags, "-iquote", cc_ctx.quote_includes)
append_all(extra_flags, "-isystem", cc_ctx.system_includes.to_list())
append_all(extra_flags, "-iquote", cc_ctx.quote_includes.to_list())
for h in cc_ctx.headers:
# Collect all headers as dependency in case libclang needs them.
if h.extension == "h" and "/PROTECTED/" not in h.path:
input_files.append(h)
if ctx.attr.input_files:
for h in cc_ctx.headers.to_list():
# Collect all headers as dependency in case libclang needs them.
if h.extension == "h" and "/PROTECTED/" not in h.path:
input_files.append(h)
for target in ctx.attr.input_files:
if target.files:
for f in target.files:
for f in target.files.to_list():
input_files_paths.append(f.path)
input_files.append(f)
# Try to find files automatically.
else:
for h in cc_ctx.headers:
for h in cc_ctx.headers.to_list():
# Collect all headers as dependency in case clang needs them.
if h.extension == "h" and "/PROTECTED/" not in h.path:
input_files.append(h)