modules/rust: Also include generated sources for tests

When we create a test from a non-executable, we weren't copying the
generated sources, just the static ones.
pull/11066/head
Dylan Baker 2 years ago committed by Eli Schwartz
parent e45367169f
commit 8526b8c1a9
  1. 7
      mesonbuild/modules/rust.py

@ -1,4 +1,4 @@
# Copyright © 2020 Intel Corporation
# Copyright © 2020-2022 Intel Corporation
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@ -147,9 +147,12 @@ class RustModule(ExtensionModule):
new_target_kwargs['install'] = False
new_target_kwargs['dependencies'] = new_target_kwargs.get('dependencies', []) + kwargs['dependencies']
sources = T.cast('T.List[SourceOutputs]', base_target.sources.copy())
sources.extend(base_target.generated)
new_target = Executable(
name, base_target.subdir, state.subproject, base_target.for_machine,
base_target.sources, base_target.structured_sources,
sources, base_target.structured_sources,
base_target.objects, base_target.environment, base_target.compilers,
new_target_kwargs
)

Loading…
Cancel
Save