diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2022-06-02 15:00:01 -0700 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2022-06-08 23:19:09 +0300 |
commit | d0a0e04c987ea92473073f9c3017fe648fc59f04 (patch) | |
tree | 66d8f500346d245e8270f3ea1ae8974dc21dbfcb /mesonbuild/build.py | |
parent | 3efb51a958d81e40fb3e29481fc4c1887daefb7f (diff) | |
download | meson-d0a0e04c987ea92473073f9c3017fe648fc59f04.zip meson-d0a0e04c987ea92473073f9c3017fe648fc59f04.tar.gz meson-d0a0e04c987ea92473073f9c3017fe648fc59f04.tar.bz2 |
build: Store depends in GeneratedList instead of Generator
Since they are actually dependencies out the output not the Generator
itself.
This fixes dependency issues in the ninja backend, allowing Meson to
rebuild more accurately. It also does sometimes in the vs backend, but
there are problems in the vs backend I'm not sure how to solve. The
vsbackend is, itself, so fragile looking I don't want to get too
involved with it.
Diffstat (limited to 'mesonbuild/build.py')
-rw-r--r-- | mesonbuild/build.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/build.py b/mesonbuild/build.py index b2f8f37..7b8966b 100644 --- a/mesonbuild/build.py +++ b/mesonbuild/build.py @@ -1720,7 +1720,7 @@ class Generator(HoldableObject): output.depends.add(e.target) if isinstance(e, (CustomTarget, CustomTargetIndex, GeneratedList)): - self.depends.append(e) # BUG: this should go in the GeneratedList object, not this object. + output.depends.add(e) fs = [File.from_built_file(state.subdir, f) for f in e.get_outputs()] elif isinstance(e, str): fs = [File.from_source_file(state.environment.source_dir, state.subdir, e)] @@ -1748,7 +1748,7 @@ class GeneratedList(HoldableObject): def __post_init__(self) -> None: self.name = self.generator.exe - self.depends: T.Set['CustomTarget'] = set() # Things this target depends on (because e.g. a custom target was used as input) + self.depends: T.Set[GeneratedTypes] = set() self.infilelist: T.List['File'] = [] self.outfilelist: T.List[str] = [] self.outmap: T.Dict[File, T.List[str]] = {} |