Skip to content

Commit

Permalink
modules/rust: set bindgen include_dirs for both build and source dir
Browse files Browse the repository at this point in the history
Which we pretty obviously need if any of our headers are generated
  • Loading branch information
dcbaker authored and nirbheek committed Mar 23, 2022
1 parent 9c82617 commit 6b26d79
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mesonbuild/modules/unstable_rust.py
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,8 @@ def bindgen(self, state: 'ModuleState', args: T.List, kwargs: 'FuncBindgen') ->
inc_strs: T.List[str] = []
for i in kwargs['include_directories']:
# bindgen always uses clang, so it's safe to hardcode -I here
inc_strs.extend([f'-I{x}' for x in i.to_string_list(state.environment.get_source_dir())])
inc_strs.extend([f'-I{x}' for x in i.to_string_list(
state.environment.get_source_dir(), state.environment.get_build_dir())])

if self._bindgen_bin is None:
self._bindgen_bin = state.find_program('bindgen')
Expand Down

0 comments on commit 6b26d79

Please sign in to comment.