HomePhabricator

Fix depfile name construction

Authored by LukeCheeseman on Sep 13 2019, 6:15 AM.

Description

Fix depfile name construction

  • When using -o, the provided filename is using for constructing the depfile name (when -MMD is passed).
  • The logic looks for the rightmost '.' character and replaces what comes after with 'd'.
  • This works incorrectly when the filename has no extension and the directories have '.' in them (e.g. out.dir/test)
  • This replaces the funciton to just llvm::sys::path functionality

Differential Revision: https://reviews.llvm.org/D67542

llvm-svn: 371853

Details

Committed
LukeCheesemanSep 13 2019, 6:15 AM
Differential Revision
D67542: Fix depfile name construction
Parents
rGd48ea5da9416: lld-link: Add a flag /lldignoreenv that makes lld-link ignore env vars.
Branches
Unknown
Tags
Unknown