I made a simple edit to TGlexer.h, which is part of TableGen. Then, in Visual Studio, I asked it to build Tablegen. I got the following output:
1>------ Build started: Project: LLVMTableGen, Configuration: Release x64 ------
1>LLVMTableGen.vcxproj -> D:\LLVM\Build\Release\lib\LLVMTableGen.lib
========== Build: 1 succeeded, 0 failed, 3 up-to-date, 0 skipped ==========
Makes sense to me. But why doesn't it continue on and relink llvm-tblgen.exe? I spent about half an hour searching the interwebs, but all I could find was complaints about building too much, not too little.
I don't work on Windows, so have next to no idea - but when you say
you "aske it to build TableGen" what do you mean, specifically?
Perhaps you asked it to build the TableGen library - so that's what it
did? Can you instead ask it to build llvm-tblgen?
I think David is on the right track. From your build output, it looks like it was asked to build only the LLVMTableGen project, which corresponds to the library. If you just ask Visual Studio to build the solution (F7, or Build menu → Build Solution) rather than an individual project. It looks like Cmake put all the right project dependency information into the solution, so it should just work.
For LLVM, however, I usually use ninja to build outside Visual Studio. It does a better job building things in parallel and keeping all the cores working. I find the Visual Studio solution for LLVM is still very useful for all of its editing, browsing, and debugging features.
Yes, that must be what I need to do. I asked it to build Library -> LLVMTableGen. There must be another . . . Aha! I have to build Tablegenning. That builds the source files, executable, and all the target files.
Interesting, indeed. Thanks!
I know nothing about Ninja, but I put it on my "must read" list. It's a mighty long list.