Skip to content

Commit

Permalink
Update bindgen.bzl to use toolchain system include directories as well (
Browse files Browse the repository at this point in the history
#2727)

This is needed when using toolchains that use custom include
directories.
  • Loading branch information
hlopko authored Jul 8, 2024
1 parent a5fd695 commit 116f6db
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion bindgen/private/bindgen.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ def _rust_bindgen_impl(ctx):
feature_configuration = feature_configuration,
include_directories = cc_lib[CcInfo].compilation_context.includes,
quote_include_directories = cc_lib[CcInfo].compilation_context.quote_includes,
system_include_directories = cc_lib[CcInfo].compilation_context.system_includes,
system_include_directories = depset(
transitive = [cc_lib[CcInfo].compilation_context.system_includes],
direct = cc_toolchain.built_in_include_directories,
),
user_compile_flags = ctx.attr.clang_flags,
)
compile_flags = cc_common.get_memory_inefficient_command_line(
Expand Down

0 comments on commit 116f6db

Please sign in to comment.