[PATCH] D79400: [CMAKE] Fix build failure when source directory is read only

Pushpinder Singh via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Jun 30 01:02:42 PDT 2020


pdhaliwal added a comment.

In D79400#2121685 <https://reviews.llvm.org/D79400#2121685>, @vsapsai wrote:

> Seems like this change causes `ninja clean` to fail with the error
>
> > ninja: error: remove(include/llvm/Support): Directory not empty
>
> Full repro steps are
>
>   <cmake configuration>
>   ninja install
>   ninja clean
>
>
> Simpler steps are
>
>   <cmake configuration>
>   ninja include/llvm/Support/all
>   ninja clean
>


Thanks @vsapsai for reporting this.

I found that when `${fake_version_inc}` is not defined, cmake is still considering its value even if it is empty. I think this is the reason why clean fails. When I remove `${fake_version_inc}` from `add_custom_command`, clean starts working without any issues. I have submitted the patch for fix here -> https://reviews.llvm.org/D82847. Please let me know if it fixes your issue.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D79400/new/

https://reviews.llvm.org/D79400





More information about the cfe-commits mailing list