summaryrefslogtreecommitdiff
path: root/tools/c-arcmt-test
Commit message (Collapse)AuthorAgeFilesLines
* [CMake] Use PRIVATE in target_link_libraries for executablesShoaib Meenai2017-12-051-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We currently use target_link_libraries without an explicit scope specifier (INTERFACE, PRIVATE or PUBLIC) when linking executables. Dependencies added in this way apply to both the target and its dependencies, i.e. they become part of the executable's link interface and are transitive. Transitive dependencies generally don't make sense for executables, since you wouldn't normally be linking against an executable. This also causes issues for generating install export files when using LLVM_DISTRIBUTION_COMPONENTS. For example, clang has a lot of LLVM library dependencies, which are currently added as interface dependencies. If clang is in the distribution components but the LLVM libraries it depends on aren't (which is a perfectly legitimate use case if the LLVM libraries are being built static and there are therefore no run-time dependencies on them), CMake will complain about the LLVM libraries not being in export set when attempting to generate the install export file for clang. This is reasonable behavior on CMake's part, and the right thing is for LLVM's build system to explicitly use PRIVATE dependencies for executables. Unfortunately, CMake doesn't allow you to mix and match the keyword and non-keyword target_link_libraries signatures for a single target; i.e., if a single call to target_link_libraries for a particular target uses one of the INTERFACE, PRIVATE, or PUBLIC keywords, all other calls must also be updated to use those keywords. This means we must do this change in a single shot. I also fully expect to have missed some instances; I tested by enabling all the projects in the monorepo (except dragonegg), and configuring both with and without shared libraries, on both Darwin and Linux, but I'm planning to rely on the buildbots for other configurations (since it should be pretty easy to fix those). Even after this change, we still have a lot of target_link_libraries calls that don't specify a scope keyword, mostly for shared libraries. I'm thinking about addressing those in a follow-up, but that's a separate change IMO. Differential Revision: https://reviews.llvm.org/D40823 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@319840 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove autoconf supportChris Bieneman2016-01-261-50/+0
| | | | | | | | | | | | | | | | | Summary: This patch is provided in preparation for removing autoconf on 1/26. The proposal to remove autoconf on 1/26 was discussed on the llvm-dev thread here: http://lists.llvm.org/pipermail/llvm-dev/2016-January/093875.html "This is the way [autoconf] ends Not with a bang but a whimper." -T.S. Eliot Reviewers: chandlerc, grosbach, bob.wilson, echristo Subscribers: klimek, cfe-commits Differential Revision: http://reviews.llvm.org/D16472 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@258862 91177308-0d34-0410-b5e6-96231b3b80d8
* Tweak libclang's users, c-arcmt-test, c-index-test and libclangTests to ↵NAKAMURA Takumi2015-07-121-0/+4
| | | | | | satisfy LDFLAGS=-static. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241992 91177308-0d34-0410-b5e6-96231b3b80d8
* Reformat Makefile.NAKAMURA Takumi2015-07-121-1/+6
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@241991 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-251-3/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230454 91177308-0d34-0410-b5e6-96231b3b80d8
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-251-2/+3
| | | | | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. This reapplies r230044 with a fixed configure+make build and updated dependencies and testcase requirements. Over the last iteration this version adds - missing target requirements for testcases that specify an x86 triple, - a missing clangCodeGen.a dependency to libClang.a in the make build. rdar://problem/19104245 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230423 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert "Wrap clang module files in a Mach-O, ELF, or COFF container."Adrian Prantl2015-02-241-3/+4
| | | | | | | This reverts commit r230305. Off to fix another round of missing dependencies on various platforms. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230309 91177308-0d34-0410-b5e6-96231b3b80d8
* Wrap clang module files in a Mach-O, ELF, or COFF container.Adrian Prantl2015-02-241-4/+3
| | | | | | | | | | | | | | This is a necessary prerequisite for debugging with modules. The .pcm files become containers that hold the serialized AST which allows us to store debug information in the module file that can be shared by all object files that were built importing the module. rdar://problem/19104245 This reapplies r230044 with a fixed configure+make build and updated dependencies. Take 3. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@230305 91177308-0d34-0410-b5e6-96231b3b80d8
* Support LLVM_BUILD_STATIC.Rafael Espindola2014-11-051-3/+9
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@221346 91177308-0d34-0410-b5e6-96231b3b80d8
* [autoconf] Add clangToolingCore.a to Makefile(s) for static build w/o ↵NAKAMURA Takumi2014-10-301-0/+1
| | | | | | libclang.dll. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@220904 91177308-0d34-0410-b5e6-96231b3b80d8
* Make clang's rewrite engine a core featureAlp Toker2014-07-161-1/+1
| | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@213171 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix C++ style // comments in a couple of C filesTimur Iskhodzhanov2014-06-061-2/+2
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210325 91177308-0d34-0410-b5e6-96231b3b80d8
* Flush C stdio streams upon process terminationReid Kleckner2014-06-051-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to what can only be described as a CRT bug, stdout and amazingly even stderr are not always flushed upon process termination, especially when the system is under high threading pressure. I have found two repros for this: 1) In lib\Support\Threading.cpp, change sys::Mutex to an std::recursive_mutex and run check-clang. Usually between 30 and 40 tests will fail. 2) Add OutputDebugStrings in code that runs during static initialization and static shutdown. This will sometimes generate similar failures. After a substantial amount of troubleshooting and debugging, I found that I could reproduce this from the command line without running check-clang. Simply make the mutex change described in #1, then manually run the following command many times by running it once, then pressing Up -> Enter very quickly: D:\src\llvm\build\vs2013\Debug\bin\c-index-test.EXE -cursor-at=D:\src\llvm\tools\clang\test\Index\targeted-preamble.h:2:15 D:\src\llvm\tools\clang\test\Index\targeted-cursor.c -include D:\src\llvm\build\vs2013\tools\clang\test\Index\Output\targeted-cursor.c.tmp.h -Xclang -error-on-deserialized-decl=NestedVar1 -Xclang -error-on-deserialized-decl=TopVar | D:\src\llvm\build\vs2013\Debug\bin\FileCheck.EXE D:\src\llvm\tools\clang\test\Index\targeted-cursor.c -check-prefix=PREAMBLE-CURSOR1 Sporadically they will fail, and attaching a debugger to a failed instance indicates that stdin of FileCheck.exe is empty. Note that due to the repro in #2, we can rule out a bug in the STL's mutex implementation, and instead conclude that this is a real flake in the windows test harness. Test Plan: Without patch: Ran check-clang 10 times and saw over 30 Unexpected failures on every run. With patch: Ran check-clang 10 times and saw 0 unexpected failures across all runs. Reviewers: rnk Differential Revision: http://reviews.llvm.org/D4021 Patch by Zachary Turner! git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@210225 91177308-0d34-0410-b5e6-96231b3b80d8
* c-arcmt-test/Makefile: Update USEDLIBS for -static.NAKAMURA Takumi2014-04-271-1/+4
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@207340 91177308-0d34-0410-b5e6-96231b3b80d8
* c-arcmt-test/Makefile: Fixup for LDFLAGS=-static on cygming, corresponding ↵NAKAMURA Takumi2013-12-121-0/+1
| | | | | | to r197116. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@197129 91177308-0d34-0410-b5e6-96231b3b80d8
* [CMake] Update target_link_libraries() and LLVM_LINK_COMPONENTS for each ↵NAKAMURA Takumi2013-12-101-5/+0
| | | | | | CMakeLists.txt. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@196916 91177308-0d34-0410-b5e6-96231b3b80d8
* {c-index-test|c-arcmt-test}/Makefile: Update USEDLIBS along corresponding to ↵NAKAMURA Takumi2013-08-181-1/+1
| | | | | | clangIndex. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@188621 91177308-0d34-0410-b5e6-96231b3b80d8
* [Driver] Refactor clang driver to use LLVM's Option libraryReid Kleckner2013-06-141-1/+1
| | | | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@183989 91177308-0d34-0410-b5e6-96231b3b80d8
* libclang: Update comment about USEDLIBS in c-*-test/Makefile.NAKAMURA Takumi2013-01-221-1/+1
| | | | | | "Note that 'USEDLIBS' must include all of the core clang libraries when -static is given to linker on cygming." git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@173124 91177308-0d34-0410-b5e6-96231b3b80d8
* Add bitreader to LINK_COMPONENTS in users of libclang, c-arcmt-test and ↵NAKAMURA Takumi2013-01-201-1/+1
| | | | | | | | c-index-test. They don't link cygclang.dll, but libclang.a on cygwin. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@172980 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment that clang.dll is unavailable on cygming yet.Ted Kremenek2012-09-011-0/+3
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163055 91177308-0d34-0410-b5e6-96231b3b80d8
* c-arcmt-test/Makefile: Restore some stuff. clang.dll is unavailable on ↵NAKAMURA Takumi2012-09-011-2/+8
| | | | | | cygming yet. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163054 91177308-0d34-0410-b5e6-96231b3b80d8
* Split library clangRewrite into clangRewriteCore and clangRewriteFrontend.Ted Kremenek2012-09-011-5/+2
| | | | | | | This is similar to how we divide up the StaticAnalyzer libraries to separate core functionality to what is clearly associated with Frontend actions. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@163050 91177308-0d34-0410-b5e6-96231b3b80d8
* c-arcmt-test, c-index-test: Appease Cygwin, to link to libclang.a, not ↵NAKAMURA Takumi2012-08-101-1/+6
| | | | | | clang.dll. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161655 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove a goofy CMake hack and use the standard CMake facilities toChandler Carruth2012-06-211-2/+4
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@158888 91177308-0d34-0410-b5e6-96231b3b80d8
* Kill the last vestiges of clangIndexDouglas Gregor2012-04-131-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154675 91177308-0d34-0410-b5e6-96231b3b80d8
* [Cygwin] Work around to flush stdout in a thread, or stdout in threads won't ↵NAKAMURA Takumi2012-04-071-0/+3
| | | | | | be flushed at exit. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@154254 91177308-0d34-0410-b5e6-96231b3b80d8
* Update library dependencies to add clangEdit on c-index-test and c-arcmt-test.NAKAMURA Takumi2012-03-111-1/+1
| | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152539 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new code migrator support for migrating existing Objective-C code to useTed Kremenek2012-03-061-2/+31
| | | | | | | | | | | the new Objective-C NSArray/NSDictionary/NSNumber literal syntax. This introduces a new library, libEdit, which provides a new way to support migration of code that improves on the original ARC migrator. We now believe that most of its functionality can be refactored into the existing libraries, and thus this new library may shortly disappear. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@152141 91177308-0d34-0410-b5e6-96231b3b80d8
* [arcmt] Move the remapping functions to clang-c/Index.h and change 'arcmt_' ↵Argyrios Kyrtzidis2011-07-111-7/+6
| | | | | | prefix to 'clang_'. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134916 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix ARCMT/migrate.m on MSVC. Francois Pichet2011-07-101-0/+5
| | | | | | Solution is to set output stdout to binary mode to prevent newline conversion (\n => \r\n). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134879 91177308-0d34-0410-b5e6-96231b3b80d8
* tools/c-arcmt-test/Makefile: Add clangARCMigrate.a clangRewrite.a to ↵NAKAMURA Takumi2011-07-101-1/+2
| | | | | | | | USEDLIBS to satisfy linking on cygming. FIXME: tools/c-*.exe should be linked to clang.dll on cygming. llvm/Makefile.rules is not aware of bin/clang.dll. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134871 91177308-0d34-0410-b5e6-96231b3b80d8
* c-arcmt-test.c: MSVCRT does not have setenv. Use putenv instead.NAKAMURA Takumi2011-07-101-0/+5
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134859 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix linker problem in buildbot.Argyrios Kyrtzidis2011-07-091-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134849 91177308-0d34-0410-b5e6-96231b3b80d8
* Ugh, fix CMake.Argyrios Kyrtzidis2011-07-091-1/+1
| | | | git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134848 91177308-0d34-0410-b5e6-96231b3b80d8
* [arcmt] Introduce new '-ccc-arcmt-migrate <path>' ARC migration driver option.Argyrios Kyrtzidis2011-07-093-0/+120
This is a new mode of migration, where we avoid modifying the original files but we emit temporary files instead. <path> will be used to keep migration process metadata. Currently the temporary files that are produced are put in the system's temp directory but we can put them in the <path> if is necessary. Also introduce new ARC migration functions in libclang whose only purpose, currently, is to accept <path> and provide pairs of original file/transformed file to map from the originals to the files after transformations are applied. Finally introduce the c-arcmt-test utility that exercises the new libclang functions, update arcmt-test, and add tests for the whole process. rdar://9735086. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@134844 91177308-0d34-0410-b5e6-96231b3b80d8