Skip to content
  • Brad King's avatar
    Ninja: Avoid empty phony edges for target ordering · 625b8f90
    Brad King authored
    Since commit v3.9.0-rc1~230^2~2 (ninja: break unnecessary target
    dependencies, 2017-04-17) we unconditionally generate a phony edge for
    target ordering.  It is needed in case a later target depends on it.
    However, if the phony edge has no inputs then `ninja -d explain` prints:
    
        ninja explain: output ... of phony edge with no inputs doesn't exist
    
    Furthermore the phony edge's output is considered dirty and can cause
    dependents to be incorrectly considered dirty.  Avoid this by always
    generating at least one input to the target ordering phony edges.
    If we have no real dependencies just use a path that always exists.
    
    Fixes: #17942
    625b8f90