summaryrefslogtreecommitdiff
path: root/cmake/modules/TableGen.cmake
Commit message (Collapse)AuthorAge
* Revert "Revert "Windows: Add support for unicode command lines""David Majnemer2013-10-07
| | | | | | | | This reverts commit r192070 which reverted r192069, I forgot to regenerate the configure scripts. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192079 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Windows: Add support for unicode command lines"David Majnemer2013-10-06
| | | | | | | | This is causing MinGW bots to fail. This reverts commit r192069. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192070 91177308-0d34-0410-b5e6-96231b3b80d8
* Windows: Add support for unicode command linesDavid Majnemer2013-10-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The MSVCRT deliberately sends main() code-page specific characters. This isn't too useful to LLVM as we end up converting the arguments to UTF-16 and subsequently attempt to use the result as, for example, a file name. Instead, we need to have the ability to access the Unicode command line and transform it to UTF-8. This has the distinct advantage over using the MSVC-specific wmain() function as our entry point because: - It doesn't work on cygwin. - It only work on MinGW with caveats and only then on certain versions. - We get to keep our entry point as main(). :) N.B. This patch includes fixes to other parts of lib/Support/Windows s.t. we would be able to take advantage of getting the Unicode paths. E.G. clang spawning clang -cc1 would want to give it Unicode arguments. Reviewers: aaron.ballman, Bigcheese, rnk, ruiu Reviewed By: rnk CC: llvm-commits, ygao Differential Revision: http://llvm-reviews.chandlerc.com/D1834 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@192069 91177308-0d34-0410-b5e6-96231b3b80d8
* cmake: Install llvm-tblgen againHans Wennborg2013-09-10
| | | | | | | | | | | It was removed in r189130, but it turns out this makes life hard for folks packaging LLVM and Clang and building the latter based on the LLVM package. Note that this only adds back the LLVM tblgen, and it's obviously not included when LLVM_INSTALL_TOOLCHAIN_ONLY is set. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@190419 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake Xcode builds: symlink tblgen targets out to bin/.Douglas Gregor2013-08-26
| | | | | | | | | | | | | Xcode always puts executable targets in the directory bin/<Config>. When building separate LLVM and Clang projects for Xcode, this prevents the CMake-configured project for Clang from finding llvm-tblgen. Add a symlink so that tblgen executables are always available in bin/ (regardless of the configuration LLVM is built with). git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189220 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: don't install tablegenHans Wennborg2013-08-23
| | | | | | | | Since it's an llvm-internal tool, we shouldn't install it. (This depends on Clang r189127 and lld r189128.) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@189130 91177308-0d34-0410-b5e6-96231b3b80d8
* Pass -G argument to cmake with the same generator's name as used for theSimon Atanasyan2013-08-01
| | | | | | | | initial cmake invocation. Patch reviewed by Reid Kleckner. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187591 91177308-0d34-0410-b5e6-96231b3b80d8
* TableGen.cmake: Fix to work without LLVM_COMMON_DEPENDS.NAKAMURA Takumi2012-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@158650 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Add the folder "Tablegenning" on llvm-tblgen targets.NAKAMURA Takumi2012-01-30
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@149219 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a typo noticed by Peter Collingbourne. No one depends on thisChandler Carruth2011-11-02
| | | | | | | working today, but it shouldn't corrupt state for some poor soul to debug later. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143545 91177308-0d34-0410-b5e6-96231b3b80d8
* The TableGen parts of the CMake build are seriously broken. This fixesChandler Carruth2011-11-02
| | | | | | | | | | | | | | one aspect of them by having them use the (annoying, if not broken) proper library dependency model for adding the LLVMTableGen library as a dependency. This could manifest as a link order issue in the presence of separate LLVM / Clang source builds with CMake and a linker that really cares about such things. Also, add the Support dependency to llvm-tblgen itself so that it doesn't rely on TableGen's transitive Support dependency. A parallel change for clang-tblgen will be forthcoming. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143531 91177308-0d34-0410-b5e6-96231b3b80d8
* Build system infrastructure for multiple tblgens.Peter Collingbourne2011-10-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@141266 91177308-0d34-0410-b5e6-96231b3b80d8
* Clean up a pile of hacks in our CMake build relating to TableGen.Chandler Carruth2011-07-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first problem to fix is to stop creating synthetic *Table_gen targets next to all of the LLVM libraries. These had no real effect as CMake specifies that add_custom_command(OUTPUT ...) directives (what the 'tablegen(...)' stuff expands to) are implicitly added as dependencies to all the rules in that CMakeLists.txt. These synthetic rules started to cause problems as we started more and more heavily using tablegen files from *subdirectories* of the one where they were generated. Within those directories, the set of tablegen outputs was still available and so these synthetic rules added them as dependencies of those subdirectories. However, they were no longer properly associated with the custom command to generate them. Most of the time this "just worked" because something would get to the parent directory first, and run tablegen there. Once run, the files existed and the build proceeded happily. However, as more and more subdirectories have started using this, the probability of this failing to happen has increased. Recently with the MC refactorings, it became quite common for me when touching a large enough number of targets. To add insult to injury, several of the backends *tried* to fix this by adding explicit dependencies back to the parent directory's tablegen rules, but those dependencies didn't work as expected -- they weren't forming a linear chain, they were adding another thread in the race. This patch removes these synthetic rules completely, and adds a much simpler function to declare explicitly that a collection of tablegen'ed files are referenced by other libraries. From that, we can add explicit dependencies from the smaller libraries (such as every architectures Desc library) on this and correctly form a linear sequence. All of the backends are updated to use it, sometimes replacing the existing attempt at adding a dependency, sometimes adding a previously missing dependency edge. Please let me know if this causes any problems, but it fixes a rather persistent and problematic source of build flakiness on our end. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136023 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: generalize the system that creates custom targets forOscar Fuentes2011-07-25
| | | | | | tablegenning to all libraries and executables. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135908 91177308-0d34-0410-b5e6-96231b3b80d8
* Add the tablegenned files to the `clean' target.Oscar Fuentes2011-02-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124854 91177308-0d34-0410-b5e6-96231b3b80d8
* Changes for building Clang and others using LLVM as an externalOscar Fuentes2011-02-03
| | | | | | | | | | | | | library. Installs tblgen (required by Clang). Translates handling of user settings and platform-dependant options to its own file, where it can included by another project. Installs the .cmake files required by projects like Clang. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@124816 91177308-0d34-0410-b5e6-96231b3b80d8
* TableGen.cmake: sometimes the .td file is not in the current directoryOscar Fuentes2011-01-03
| | | | | | | | | | | (clang/include/clang/Basic/StmtNodes.td, for instance, is tablegenned from clang/include/clang/AST/CMakeLists.txt) so it is not contained on the list of all .td files on the current source directory which is used as the DEPENDS of the custom command. We must add the .td file to the DEPENDS list of the custom command. Otherwise some .inc files are not regenerated when the corresponding .td file changes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122768 91177308-0d34-0410-b5e6-96231b3b80d8
* Avoid stalled file dependency when tablegenning.Oscar Fuentes2010-10-22
| | | | | | Patch by Frits van Bommel! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117113 91177308-0d34-0410-b5e6-96231b3b80d8
* Teach CMake to only touch tablegen-generated files if anythingOscar Fuentes2010-10-22
| | | | | | | | actually changed. Patch by Frits van Bommel! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117102 91177308-0d34-0410-b5e6-96231b3b80d8
* Allow absolute paths in LLVM_TARGET_DEFINITIONS for CMake's TableGen ruleDouglas Gregor2010-06-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@106219 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Don't use copy_if_different for TableGen output, because it does not ↵Douglas Gregor2009-08-22
| | | | | | work with IDE targets git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79732 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: tablegen: Add .td files under the inlude/llvm directoryOscar Fuentes2009-07-13
| | | | | | | hierarchy to the list of dependencies. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@75510 91177308-0d34-0410-b5e6-96231b3b80d8
* Add missing dependencies to the CMake build system.Douglas Gregor2009-06-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@74161 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Fixed parallel build problem related to native tblgen whenOscar Fuentes2009-06-11
| | | | | | | cross-compiling. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@73180 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Make sure to build TableGen'd files in the binary directoryDouglas Gregor2009-03-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@67052 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Do not rebuild the world when tblgen changes but the .inc filesOscar Fuentes2008-11-21
| | | | | | | it produces are not affected by the change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59763 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Use LLVM_MAIN_SRC_DIR instead of CMAKE_SOURCE_DIR, forOscar Fuentes2008-11-14
| | | | | | | | | consistency. Patch by Kevin Andre! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59326 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Fixed dependencies of .cpp source files on .td and tablegennedOscar Fuentes2008-11-14
| | | | | | | files. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@59325 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Support for cross-compiling. For now, requires a previouslyOscar Fuentes2008-11-09
| | | | | | | | | | | | | | built native tblgen which is passed to cmake in the variable LLVM_TABLEGEN. See http://www.cmake.org/Wiki/CmakeMingw for a quick example on how to cross-compile with CMake. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58939 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Removed some cruft.Oscar Fuentes2008-10-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@58358 91177308-0d34-0410-b5e6-96231b3b80d8
* CMake: Builds all targets.Oscar Fuentes2008-09-26
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@56641 91177308-0d34-0410-b5e6-96231b3b80d8