Once the llvm.org server comes back up, I'll commit the changes that
switch Clang from using .def files for the diagnostics to .td tablegen
files. It compiles, all tests pass, and there aren't any spurious
rebuilds. (Except perhaps for CMake users.)
From now on, make sure you modify the .td files, and not the .def files
that SVN might not delete, or the generated .inc files.
Build system people, can you please validate the changes I've done? It's
a bit confusing, and I'm not sure if I've done it all correctly.
Win32 or other CMake users, please check if what I've done works. I
haven't had the chance to test it yet.
We had a little bit of trouble here, since the original change broke CMake and out-of-source makefile builds, so Sebastian reverted his commit.
Now, I've just committed r67058, which introduces the build-system changes from Sebastian's work with fixes for CMake and out-of-source makefile builds but without actually eliminating the ".def" files. We can use this current state to shake out any remaining build system issues before we make the switch.
The attached patch contains the changes needed to switch from using the existing ".def" files to the ".inc" files now generated by the build system. Apply this, then remove include/clang/Basic/Diagnostic*Kinds.def, and you'll be using the new TableGen-based system.
I don't have access to Visual Studio, but I'd appreciate if someone could do a CMake + Visual Studio build with r67058 (and, optionally, the attached patch) to see if my CMake-fu works.
warnings-switchover.patch (6.57 KB)
I’ve tryed to compile the r67062 with Cmake + VS2008 and get the follow error:
CommandLine.h(836) : error C3861: ‘setValue’: identifier not found
The VS2008 build is broken, but I didn't get to checking in my patch yet.
You can find it here:
Only apply the llvm patch, not the Clang patch. You might get a failed
application in signals.inc, though; I moved a function that was later
I was wondering if it is possible to cut over to the .td files now? I don’t think these Windows build issues are unrelated. It would be great to move away from the .def files as soon as possible. It would be great to sync the .td files one last time with the .def files and be done with them.
Ted Kremenek wrote:
I was wondering if it is possible to cut over to the .td files now? I
don't think these Windows build issues are unrelated. It would be
great to move away from the .def files as soon as possible. It would
be great to sync the .td files one last time with the .def files and
be done with them.
I want to test the Windows build with my patches one more time before
doing that, but I've had two very, very busy days.
Okay. Sounds great.
Incidentally, I just wrote a second TableGen backend to generate the OptionsTable (Warnings.cpp). We should probably discuss the implementation of how warnings are controlled in Warnings.cpp, as it could have an important impact on startup time for Clang.