Commit Graph

39 Commits

Author SHA1 Message Date
Alp Toker 0621cb2e7d Make clang's rewrite engine a core feature
The rewrite facility's footprint is small so it's not worth going to these
lengths to support disabling at configure time, particularly since key compiler
features now depend on it.

Meanwhile the Objective-C rewriters have been moved under the
ENABLE_CLANG_ARCMT umbrella for now as they're comparatively heavy and still
potentially worth excluding from lightweight builds.

Tests are now passing with any combination of feature flags. The flags
historically haven't been tested by LLVM's build servers so caveat emptor.

llvm-svn: 213171
2014-07-16 16:48:33 +00:00
NAKAMURA Takumi 6dd203288d {c-index-test|c-arcmt-test}/Makefile: Update USEDLIBS along corresponding to clangIndex.
llvm-svn: 188621
2013-08-18 03:48:57 +00:00
NAKAMURA Takumi b538ac6830 c-index-test/Makefile: Use -isystem instead of -I on $(LIBXML2_INC) with -Wdocumentation.
-Wdocumentation won't seek -isystem. LIBXML2's headers in a certain distro might be incompatible to -Wdocumentation.

FIXME: Could autoconf detect clang or availability of -isystem?
llvm-svn: 185927
2013-07-09 11:14:24 +00:00
Reid Kleckner 898229ab4b [Driver] Refactor clang driver to use LLVM's Option library
The big changes are:
- Deleting Driver/(Arg|Opt)*
- Rewriting includes to llvm/Option/ and re-sorting
- 'using namespace llvm::opt' in clang::driver
- Fixing the autoconf build by adding option everywhere

As discussed in the review, this change includes using directives in
header files.  I'll make follow up changes to remove those in favor of
name specifiers.

Reviewers: espindola

Differential Revision: http://llvm-reviews.chandlerc.com/D975

llvm-svn: 183989
2013-06-14 17:17:23 +00:00
NAKAMURA Takumi 873a63ce19 libclang: Update comment about USEDLIBS in c-*-test/Makefile.
"Note that 'USEDLIBS' must include all of the core clang libraries when -static is given to linker on cygming."

llvm-svn: 173124
2013-01-22 04:11:33 +00:00
NAKAMURA Takumi a589b96041 Add bitreader to LINK_COMPONENTS in users of libclang, c-arcmt-test and c-index-test.
They don't link cygclang.dll, but libclang.a on cygwin.

llvm-svn: 172980
2013-01-20 14:53:49 +00:00
NAKAMURA Takumi f827eb629d c-index-test/Makefile: Add clangFormat to USEDLIBS for libclang-unavailable hosts.
llvm-svn: 170693
2012-12-20 13:30:10 +00:00
NAKAMURA Takumi 393bf4c3c8 c-index-test/Makefile: Reformat.
llvm-svn: 170692
2012-12-20 13:30:05 +00:00
Argyrios Kyrtzidis 58a1d90d6a [c-index-test] Do install c-index-test because it's not just for tests,
it's also setup as 'INTERNAL_TOOL'.

llvm-svn: 167432
2012-11-06 02:12:21 +00:00
NAKAMURA Takumi 5c10810754 c-arcmt-test, c-index-test: Appease Cygwin, to link to libclang.a, not clang.dll.
llvm-svn: 161655
2012-08-10 06:10:58 +00:00
Dmitri Gribenko 815f72bac7 c-index-test Makefile: fix build on Linux. Reviewed by Eric Christopher.
llvm-svn: 161439
2012-08-07 18:36:33 +00:00
Dmitri Gribenko 740c0fbe0e libclang API for comment-to-xml conversion.
The implementation also includes a Relax NG schema and tests for the schema
itself.  The schema is used in c-index-test to verify that XML documents we
produce are valid.  In order to do the validation, we add an optional libxml2
dependency for c-index-test.

Credits for CMake part go to Doug Gregor.  Credits for Autoconf part go to Eric
Christopher.  Thanks!

llvm-svn: 161431
2012-08-07 17:54:38 +00:00
David Blaikie 5ba8be0e9a Include clang-check as part of the clang installation.
This also tidies up a couple of other tools we were (partially) installing:
* c-index-test was being installed but shouldn't be (it's just a clang-dev tool)
* diagtool was being installed in cmake but not make (& shouldn't be installed in either)

Review by Manuel Klimek, Doug Gregor, and Chandler Carruth.

llvm-svn: 161073
2012-07-31 20:29:59 +00:00
NAKAMURA Takumi 98346f92f2 c-index-test/Makefile: Tweak USEDLIBS for cygwin. cygclang.dll is not linked to c-index-test yet.
llvm-svn: 159499
2012-07-01 00:40:17 +00:00
Chandler Carruth 39a3e7544a Fix a big layering violation introduced by r158771.
That commit added a new library just to hold the RawCommentList. I've
started a discussion on the commit thread about whether that is really
meritted -- it certainly doesn't seem necessary at this stage.

However, the immediate problem is that the AST library has a hard
dependency on the Comment library, but the dependencies were set up
completely backward. In addition to the layering violation, this had an
unfortunate effect if scattering the Comments library dependency
throughout the build system, but inconsistently so -- several parts of
the CMake dependencies were missing and only showed up due to transitive
deps or the fact that the target wasn't being built by tho bots.

It turns out that the Comments library can't (currently) be a well
formed layer *below* the AST library either, as it has an API that
accepts an ASTContext. That parameter is currently unused, so maybe that
was a mistake?

Anyways, it really seems like this is logically part of the AST --
that's the whole point of the ASTContext providing access to it as far
as I can tell -- so I've merged it into the AST library to solve the
immediate layering violation problems and remove some of the churn from
our library dependencies.

llvm-svn: 158807
2012-06-20 09:53:52 +00:00
Dmitri Gribenko aab8383a2b Structured comment parsing, first step.
* Retain comments in the AST
* Serialize/deserialize comments
* Find comments attached to a certain Decl
* Expose raw comment text and SourceRange via libclang

llvm-svn: 158771
2012-06-20 00:34:58 +00:00
Douglas Gregor 1840cc2cc6 Kill the last vestiges of clangIndex
llvm-svn: 154675
2012-04-13 17:26:32 +00:00
NAKAMURA Takumi 354589a663 Update library dependencies to add clangEdit on c-index-test and c-arcmt-test.
To link with -static -lclang, linker tries to seek not libclang.so, clang.dll nor libclang.dll.a, but libclang.a. USEDLIBS should have correct dependencies for -static.
(In contrast, USEDLIBS=libclang.so might be enough w/o -static)

FYI, cygwin build (in buildbot) is using -static, due to avoiding weirdness of extremely slower startup lag of clang.exe.

llvm-svn: 152539
2012-03-11 08:04:40 +00:00
Bob Wilson bd0fbe86c5 Install c-index-test and clang-c/Index.h as internal files. rdar://10217046
Specify that these files should be installed to the optional internal
install location as specified by configure's --with-internal-prefix.
If that option is not used, they'll be installed to the default prefix
as before.

llvm-svn: 145235
2011-11-28 08:03:54 +00:00
Ted Kremenek 7f01c7b5f1 Install c-index-test as part of install-clang-c Makefile rule.
llvm-svn: 140681
2011-09-28 04:39:41 +00:00
Argyrios Kyrtzidis dd76300464 Fix linker problem in buildbot.
llvm-svn: 134849
2011-07-09 22:35:06 +00:00
Chandler Carruth 5dea0dc575 Remove ARCMigrate from more builds that it isn't needed in now that the
layering problem has been addressed.

llvm-svn: 133217
2011-06-16 23:53:28 +00:00
John McCall 32e02a431b c-index-test also depends on ARCMigrate, oh boy
llvm-svn: 133147
2011-06-16 05:29:03 +00:00
NAKAMURA Takumi 8fbf64f420 [PR9321] "make install" does not need install c-index-test. It is used for testing.
llvm-svn: 126634
2011-02-28 05:21:34 +00:00
Peter Collingbourne 8f5cf74c77 Re-instate r125819 and r125820 with no functionality change
llvm-svn: 126060
2011-02-19 23:03:58 +00:00
Rafael Espindola a6d2bff0c5 Revert 125820 and 125819 to fix PR9266.
llvm-svn: 126050
2011-02-19 21:39:31 +00:00
Peter Collingbourne 14a552b2d7 Move CompilerInstance::LLVMContext and LLVMContext ownership to CodeGenAction
This removes the final dependency edge from any lib outside of CodeGen
to core.  As a result we can, and do, trim the dependency on core
from libclang, PrintFunctionNames, the unit tests and c-index-test.
While at it, review and trim other unneeded dependencies.

llvm-svn: 125820
2011-02-18 02:25:12 +00:00
John McCall 8b0666cf79 Another step in the process of making the parser depend on Sema:
- move DeclSpec &c into the Sema library
  - move ParseAST into the Parse library
Reflect this change in a thousand different includes.
Reflect this change in the link orders.

llvm-svn: 111667
2010-08-20 18:27:03 +00:00
Sebastian Redl 135bcc791b Reintroduce the serialization library, with fixed dependencies.
llvm-svn: 111279
2010-08-17 20:43:28 +00:00
Daniel Dunbar d04e1a7ef1 Makefiles: Remove unnecessary early include of Makefile.config.
llvm-svn: 105640
2010-06-08 20:57:22 +00:00
Daniel Dunbar ee6b692551 Makefiles: Set Clang CPP compiler flags in a single location, instead of scattered throughout the project Makefiles.
llvm-svn: 105638
2010-06-08 20:44:43 +00:00
Daniel Dunbar e6c1daa8fd Makefile: Switch Clang Makefiles to always include the top-level Clang Makefile.
- This eliminates most dependencies on how Clang is installed relative to LLVM.

llvm-svn: 105637
2010-06-08 20:34:18 +00:00
Daniel Dunbar d5a2a073a0 Rename 'CIndex' to 'libclang', since it has basically become our stable public
(C) API, and will likely grow further in this direction in the future.

llvm-svn: 102779
2010-04-30 21:51:10 +00:00
Daniel Dunbar 9f84c7b600 Move include installation steps to better location, inside each include dir instead of at the top-level.
Also, don't set NO_INSTALL=1 for c-index-test.

llvm-svn: 102724
2010-04-30 17:59:38 +00:00
Chris Lattner 0bcc858a2b -fno-rtti is now the default.
llvm-svn: 94379
2010-01-24 20:43:31 +00:00
Daniel Dunbar 845a87bd04 Normalize CIndex/c-index-test/index-test link lines in the hopes it will fix
*something*.
 - We really need to fix how LLVM's build systems manage
   linking. Pretty-please-someone-else-do-this? :)

llvm-svn: 90350
2009-12-02 21:47:55 +00:00
Daniel Dunbar e7fe5b2613 Fix relative ordering of Analyis library.
llvm-svn: 90312
2009-12-02 08:44:24 +00:00
Daniel Dunbar 764c082027 Add ASTUnit::LoadFromCompilerInvocation, which does what it says.
Also, add an -ast-from-source option to index-test which allows index-test to
run on source files directly.

llvm-svn: 90223
2009-12-01 09:51:01 +00:00
Steve Naroff a1c728438c Lot's of little changes to get the C-based indexing API going...
Work in progress.

llvm-svn: 80367
2009-08-28 15:28:48 +00:00