[PATCH] D31696: Automatically add include-what-you-use for when building in tree

2022-01-31 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment.

We've had reports from users that it's now possible to build IWYU together with 
Clang and LLVM using LLVM_EXTERNAL_PROJECTS, so this can be closed.


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

https://reviews.llvm.org/D31696

___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D31696: Automatically add include-what-you-use for when building in tree

2018-07-19 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment.
Herald added a reviewer: javed.absar.

This can be closed, IWYU no longer officially supports in-tree builds.


https://reviews.llvm.org/D31696



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D31696: Automatically add include-what-you-use for when building in tree

2018-02-17 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment.
Herald added a subscriber: kristof.beyls.

Ping! It would be nice to get some traction on this.


https://reviews.llvm.org/D31696



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D31696: Automatically add include-what-you-use for when building in tree

2017-04-10 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added inline comments.



Comment at: clang/tools/CMakeLists.txt:35
+# if include-what-you-use is cloned for building in-tree, add it here.
+if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include-what-you-use")
+  add_clang_subdirectory(include-what-you-use)

beanz wrote:
> rnk wrote:
> > Maybe we should do `llvm_add_implicit_projects(CLANG)` here instead?
> > 
> > Or do we not want clang/tools to be a project extension point? Would IWYU 
> > build fine if we added it to llvm/projects or llvm/tools? Maybe we should 
> > just recommend that.
> Either `llvm_add_implicit_projects(CLANG)` or 
> `add_llvm_external_project(include-what-you-use include-what-you-use)`.
> 
> The former case would make this a generic extension point, which I think is 
> good, the later would add just this project without needing to wrap it in an 
> `if`.
> 
> I would prefer going the implicit route because I actually have a distaste 
> for having code living in-tree that is specifically for supporting 
> out-of-tree code.
> Would IWYU build fine if we added it to llvm/projects or llvm/tools? Maybe we 
> should just recommend that.

IWYU has all dependencies explicitly listed to support out-of-tree builds too, 
so I think it could be made to work with some include/lib path setup. But it 
would feel weird layering-wise, since it depends so heavily on clang.

As for `llvm_add_implicit_projects` vs `add_llvm_external_project`, I'm 
guessing it doesn't make a difference for IWYU's CMake system? Mild preference 
for `llvm_add_implicit_projects` to keep mention of `include-what-you-use` out 
of Clang until we can form a coherent story about upstreaming.


https://reviews.llvm.org/D31696



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D31696: Automatically add include-what-you-use for when building in tree

2017-04-10 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added inline comments.



Comment at: clang/tools/.gitignore:12
+#==#
+# The include-what-you-use project, for when building in-tree.
+include-what-you-use

rnk wrote:
> LLVM doesn't currently have any .gitignore files for other projects, and they 
> don't show up in `git status`. What's the difference here?
We actually should put this into the clang/.gitignore instead of a separate 
.gitignore in the tools directory. That is how we've done things in LLVM & 
Clang before.



Comment at: clang/tools/CMakeLists.txt:35
+# if include-what-you-use is cloned for building in-tree, add it here.
+if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include-what-you-use")
+  add_clang_subdirectory(include-what-you-use)

rnk wrote:
> Maybe we should do `llvm_add_implicit_projects(CLANG)` here instead?
> 
> Or do we not want clang/tools to be a project extension point? Would IWYU 
> build fine if we added it to llvm/projects or llvm/tools? Maybe we should 
> just recommend that.
Either `llvm_add_implicit_projects(CLANG)` or 
`add_llvm_external_project(include-what-you-use include-what-you-use)`.

The former case would make this a generic extension point, which I think is 
good, the later would add just this project without needing to wrap it in an 
`if`.

I would prefer going the implicit route because I actually have a distaste for 
having code living in-tree that is specifically for supporting out-of-tree code.


https://reviews.llvm.org/D31696



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D31696: Automatically add include-what-you-use for when building in tree

2017-04-06 Thread Reid Kleckner via Phabricator via cfe-commits
rnk added inline comments.



Comment at: clang/tools/.gitignore:12
+#==#
+# The include-what-you-use project, for when building in-tree.
+include-what-you-use

LLVM doesn't currently have any .gitignore files for other projects, and they 
don't show up in `git status`. What's the difference here?



Comment at: clang/tools/CMakeLists.txt:35
+# if include-what-you-use is cloned for building in-tree, add it here.
+if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include-what-you-use")
+  add_clang_subdirectory(include-what-you-use)

Maybe we should do `llvm_add_implicit_projects(CLANG)` here instead?

Or do we not want clang/tools to be a project extension point? Would IWYU build 
fine if we added it to llvm/projects or llvm/tools? Maybe we should just 
recommend that.


https://reviews.llvm.org/D31696



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D31696: Automatically add include-what-you-use for when building in tree

2017-04-06 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment.

> BTW, kimgr@, is there any particular reason you haven't tried to upstream the 
> tool?
>  Maybe even as not a standalone tool but as a set of checks in clang-tidy.

Lack of time, mostly. IWYU was written before there was libtooling, and follows 
Google style, so we've felt it would be an odd bird in clang-tools-extra, for 
example.


https://reviews.llvm.org/D31696



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D31696: Automatically add include-what-you-use for when building in tree

2017-04-06 Thread Zachary Turner via Phabricator via cfe-commits
zturner added reviewers: beanz, rnk, chandlerc.
zturner added a comment.

Not really sure who to add as a reviewer here, so + a few random people.

BTW, kimgr@, is there any particular reason you haven't tried to upstream the 
tool?  Maybe even as not a standalone tool but as a set of checks in 
`clang-tidy`.


https://reviews.llvm.org/D31696



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D31696: Automatically add include-what-you-use for when building in tree

2017-04-05 Thread Kim Gräsman via Phabricator via cfe-commits
kimgr added a comment.

As an include-what-you-use maintainer, I would very much welcome this. I've 
been too shy to suggest it myself ;-).


https://reviews.llvm.org/D31696



___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits


[PATCH] D31696: Automatically add include-what-you-use for when building in tree

2017-04-04 Thread Zachary Turner via Phabricator via cfe-commits
zturner created this revision.
Herald added subscribers: mgorny, rengolin, aemerson.

It's a little bit annoying to have to manually edit files and then deal with 
git thinking that you've got untracked files, and thusly deleting them when you 
run `git clean -fd`.  Although this is not an officially sanctioned LLVM tool, 
there seems to be little harm in having this logic here and it makes life 
easier for anyone who wants to use this.


https://reviews.llvm.org/D31696

Files:
  clang/tools/.gitignore
  clang/tools/CMakeLists.txt


Index: clang/tools/CMakeLists.txt
===
--- clang/tools/CMakeLists.txt
+++ clang/tools/CMakeLists.txt
@@ -30,3 +30,8 @@
 
 # libclang may require clang-tidy in clang-tools-extra.
 add_clang_subdirectory(libclang)
+
+# if include-what-you-use is cloned for building in-tree, add it here.
+if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include-what-you-use")
+  add_clang_subdirectory(include-what-you-use)
+endif()
Index: clang/tools/.gitignore
===
--- /dev/null
+++ clang/tools/.gitignore
@@ -0,0 +1,13 @@
+#==#
+# This file specifies intentionally untracked files that git should ignore.
+# See: http://www.kernel.org/pub/software/scm/git/docs/gitignore.html
+#
+# This file is intentionally different from the output of `git svn 
show-ignore`,
+# as most of those are useless.
+#==#
+
+#==#
+# File extensions to be ignored anywhere in the tree.
+#==#
+# The include-what-you-use project, for when building in-tree.
+include-what-you-use


Index: clang/tools/CMakeLists.txt
===
--- clang/tools/CMakeLists.txt
+++ clang/tools/CMakeLists.txt
@@ -30,3 +30,8 @@
 
 # libclang may require clang-tidy in clang-tools-extra.
 add_clang_subdirectory(libclang)
+
+# if include-what-you-use is cloned for building in-tree, add it here.
+if (EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/include-what-you-use")
+  add_clang_subdirectory(include-what-you-use)
+endif()
Index: clang/tools/.gitignore
===
--- /dev/null
+++ clang/tools/.gitignore
@@ -0,0 +1,13 @@
+#==#
+# This file specifies intentionally untracked files that git should ignore.
+# See: http://www.kernel.org/pub/software/scm/git/docs/gitignore.html
+#
+# This file is intentionally different from the output of `git svn show-ignore`,
+# as most of those are useless.
+#==#
+
+#==#
+# File extensions to be ignored anywhere in the tree.
+#==#
+# The include-what-you-use project, for when building in-tree.
+include-what-you-use
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits