summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Add clang source minimizer that reduces source to directivesAlex Lorenz2019-06-031-0/+1
| | | | | | | | | | | | | | | | | | | | | that might affect the dependency list for a compilation This commit introduces a dependency directives source minimizer to clang that minimizes header and source files to the minimum necessary preprocessor directives for evaluating includes. It reduces the source down to #define, #include, The source minimizer works by lexing the input with a custom fast lexer that recognizes the preprocessor directives it cares about, and emitting those directives in the minimized source. It ignores source code, comments, and normalizes whitespace. It gives up and fails if seems any directives that it doesn't recognize as valid (e.g. #define 0). In addition to the source minimizer this patch adds a -print-dependency-directives-minimized-source CC1 option that allows you to invoke the minimizer from clang directly. Differential Revision: https://reviews.llvm.org/D55463 llvm-svn: 362459
* PTH-- Remove feature entirely-Erich Keane2018-12-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When debugging a boost build with a modified version of Clang, I discovered that the PTH implementation stores TokenKind in 8 bits. However, we currently have 368 TokenKinds. The result is that the value gets truncated and the wrong token gets picked up when including PTH files. It seems that this will go wrong every time someone uses a token that uses the 9th bit. Upon asking on IRC, it was brought up that this was a highly experimental features that was considered a failure. I discovered via googling that BoostBuild (mostly Boost.Math) is the only user of this feature, using the CC1 flag directly. I believe that this can be transferred over to normal PCH with minimal effort: https://github.com/boostorg/build/issues/367 Based on advice on IRC and research showing that this is a nearly completely unused feature, this patch removes it entirely. Note: I considered leaving the build-flags in place and making them emit an error/warning, however since I've basically identified and warned the only user, it seemed better to just remove them. Differential Revision: https://reviews.llvm.org/D54547 Change-Id: If32744275ef1f585357bd6c1c813d96973c4d8d9 llvm-svn: 348266
* [CMake] Use LINK_LIBS instead of target_link_libraries().NAKAMURA Takumi2014-02-261-2/+1
| | | | llvm-svn: 202238
* [CMake] Get rid of explicit dependencies to include/clang/*.inc and ↵NAKAMURA Takumi2014-02-211-6/+0
| | | | | | | | | | | | | | | | | | | introduce CLANG_TABLEGEN_TARGETS. This does; - clang_tablegen() adds each tblgen'd target to global property CLANG_TABLEGEN_TARGETS as list. - List of targets is added to LLVM_COMMON_DEPENDS. - all clang libraries and targets depend on generated headers. You might wonder this would be regression, but in fact, this is little loss. - Almost all of clang libraries depend on tblgen'd files and clang-tblgen. - clang-tblgen may cause short stall-out but doesn't cause unconditional rebuild. - Each library's dependencies to tblgen'd files might vary along headers' structure. It made hard to track and update *really optimal* dependencies. Each dependency to intrinsics_gen and ClangSACheckers is left as DEPENDS. llvm-svn: 201842
* clang/Lex: [CMake] Update CMakefiles since r169229.NAKAMURA Takumi2012-12-041-0/+1
| | | | llvm-svn: 169233
* clang/lib: [CMake] Update tblgen'd dependencies.NAKAMURA Takumi2012-07-271-0/+1
| | | | llvm-svn: 160851
* clang/lib: [CMake] Reformat, alphabetize lists.NAKAMURA Takumi2012-07-271-1/+1
| | | | llvm-svn: 160850
* Remove a goofy CMake hack and use the standard CMake facilities toChandler Carruth2012-06-211-3/+8
| | | | | | | | | express library-level dependencies within Clang. This is no more verbose really, and plays nicer with the rest of the CMake facilities. It should also have no change in functionality. llvm-svn: 158888
* Update the CMake build for r146959's new files.Chandler Carruth2011-12-201-0/+1
| | | | llvm-svn: 146967
* Introduce basic support for parsing module map files.Douglas Gregor2011-11-111-0/+1
| | | | | | | | | | | | | | Module map files provide a way to map between headers and modules, so that we can layer a module system on top of existing headers without changing those headers at all. This commit introduces the module map file parser and the module map that it generates, and wires up the module map file parser so that we'll automatically find module map files as part of header search. Note that we don't yet use the information stored in the module map. llvm-svn: 144402
* Add CMake dependencies so that LLVM_USED_LIBS order doesn't matter.Jeffrey Yasskin2011-02-111-0/+2
| | | | | | | I also sorted the tools/driver dependencies since their order no longer matters. llvm-svn: 125417
* CMake: LLVM_NO_RTTI must be obsolete now!NAKAMURA Takumi2011-02-101-2/+0
| | | | llvm-svn: 125275
* Add a __has_attribute macro that works much like __has_feature and ↵Anders Carlsson2010-10-201-1/+1
| | | | | | __has_builtin. llvm-svn: 116906
* Revert "CMake: Update to use standard CMake dependency tracking facilities ↵Michael J. Spencer2010-09-131-7/+3
| | | | | | | | | | | | | instead" This reverts commit r113631 Conflicts: CMakeLists.txt lib/CodeGen/CMakeLists.txt llvm-svn: 113817
* CMake: Update to use standard CMake dependency tracking facilities insteadMichael J. Spencer2010-09-101-3/+7
| | | | | | of whatever we were using before... llvm-svn: 113631
* Clean up some of the CMake dependenciesDouglas Gregor2010-09-081-0/+2
| | | | llvm-svn: 113416
* Introduce the notion of a "preprocessing record", which keeps track ofDouglas Gregor2010-03-181-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | the macro definitions and macro instantiations that are found during preprocessing. Preprocessing records are *not* generated by default; rather, we provide a PPCallbacks subclass that hooks into the existing callback mechanism to record this activity. The only client of preprocessing records is CIndex, which keeps track of macro definitions and instantations so that they can be exposed via cursors. At present, only token annotation uses these facilities, and only for macro instantiations; both will change in the near future. However, with this change, token annotation properly annotates macro instantiations that do not produce any tokens and instantiations of macros that are later undef'd, improving our consistency. Preprocessing directives that are not macro definitions are still handled by clang_annotateTokens() via re-lexing, so that we don't have to track every preprocessing directive in the preprocessing record. Performance impact of preprocessing records is still TBD, although it is limited to CIndex and therefore out of the path of the main compiler. llvm-svn: 98836
* Lexically order files in CMakeLists.txt files.Ted Kremenek2009-07-151-2/+2
| | | | llvm-svn: 75832
* Build system changes to use TableGen to generate the variousDouglas Gregor2009-03-161-0/+2
| | | | | | | | | | | | | | | | | | diagnostics. This builds on the patch that Sebastian committed and then revert. Major differences are: - We don't remove or use the current ".def" files. Instead, for now, we just make sure that we're building the ".inc" files. - Fixed CMake makefiles to run TableGen and build the ".inc" files when needed. Tested with both the Xcode and Makefile generators provided by CMake, so it should be solid. - Fixed normal makefiles to handle out-of-source builds that involve the ".inc" files. I'll send a separate patch to the list with Sebastian's changes that eliminate the use of the .def files. llvm-svn: 67058
* Fix cmake builds.Mike Stump2009-02-131-0/+1
| | | | llvm-svn: 64455
* CMake: Added some source files.Oscar Fuentes2008-11-191-0/+2
| | | | | | Patch contributed by Jay Foad! llvm-svn: 59656
* CMake: Builds and installs clang binary and libs (no docs yet). ItOscar Fuentes2008-10-261-0/+21
must be under the `tools' subdirectory of the LLVM *source* tree. llvm-svn: 58180
OpenPOWER on IntegriCloud