summaryrefslogtreecommitdiff
path: root/utils/not
AgeCommit message (Collapse)Author
2017-12-05[CMake] Use PRIVATE in target_link_libraries for executablesShoaib Meenai
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/llvm/trunk@319840 91177308-0d34-0410-b5e6-96231b3b80d8
2017-09-13Convenience/safety fix for llvm::sys::Execute(And|No)WaitAlexander Kornienko
Summary: Change the type of the Redirects parameter of llvm::sys::ExecuteAndWait, ExecuteNoWait and other APIs that wrap them from `const StringRef **` to `ArrayRef<Optional<StringRef>>`, which is safer and simplifies the use of these APIs (no more local StringRef variables just to get a pointer to). Corresponding clang changes will be posted as a separate patch. Reviewers: bkramer Reviewed By: bkramer Subscribers: vsk, llvm-commits Differential Revision: https://reviews.llvm.org/D37563 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@313155 91177308-0d34-0410-b5e6-96231b3b80d8
2016-12-01Remove unused header, NFC.Vedant Kumar
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@288407 91177308-0d34-0410-b5e6-96231b3b80d8
2016-01-26Remove autoconf supportChris Bieneman
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 "I felt a great disturbance in the [build system], as if millions of [makefiles] suddenly cried out in terror and were suddenly silenced. I fear something [amazing] has happened." - Obi Wan Kenobi Reviewers: chandlerc, grosbach, bob.wilson, tstellarAMD, echristo, whitequark Subscribers: chfast, simoncook, emaste, jholewinski, tberghammer, jfb, danalbert, srhines, arsenm, dschuff, jyknight, dsanders, joker.eph, llvm-commits Differential Revision: http://reviews.llvm.org/D16471 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@258861 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-26Add a small "usage:" comment at the top of not.cppSean Silva
Mostly pulled from Rafael's r185678 commit message. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@222855 91177308-0d34-0410-b5e6-96231b3b80d8
2014-11-04Use findProgramByName.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221221 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-23not: Only consider exit code 3 to be a crash with --crashReid Kleckner
This fixes Clang's test/Index/comment-xml-schema.c with Cygwin's xmllint.exe, which uses exit(3) for XML validation failure. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@211550 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-13[Win32] Let utils/not aware of abort(), aka llvm_unreachable(), in msvcrt.NAKAMURA Takumi
It has exit code as 3. abort(), aka unreachable, may be handled as crash. FIXME: Could we move this into Win32/Program.inc? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210895 91177308-0d34-0410-b5e6-96231b3b80d8
2014-06-08[C++11] Use 'nullptr'.Craig Topper
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210442 91177308-0d34-0410-b5e6-96231b3b80d8
2014-02-10[CMake] LLVMSupport should be responsible to provide system_libs.NAKAMURA Takumi
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@201077 91177308-0d34-0410-b5e6-96231b3b80d8
2013-12-20Install three utils, "FileCheck", "count", and "not", for now to appease ↵NAKAMURA Takumi
llvmlab dragonegg builder. Since r197684, "install/bin/llvm-config --obj-root" hasn't shown the build tree. The builder was finding utils in the build tree, from the installed tree. I will revert this after dragonegg builder would be tweaked not to use installed llvm-config. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@197786 91177308-0d34-0410-b5e6-96231b3b80d8
2013-10-07Revert "Revert "Windows: Add support for unicode command lines""David Majnemer
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
2013-10-06Revert "Windows: Add support for unicode command lines"David Majnemer
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
2013-10-06Windows: Add support for unicode command linesDavid Majnemer
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
2013-07-05Add a --crash option to not.Rafael Espindola
Now the two possible uses of not are * not cmd Will return true if cmd doesn't crash and returns false. * not --crash cmd Will return true if cmd crashes. It will be used/tested in a followup commit for the clang crash recovery testing. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@185678 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13Avoid using PathV1.h in Program.h.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183940 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-13Have sys::FindProgramByName return a std::string.Rafael Espindola
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183928 91177308-0d34-0410-b5e6-96231b3b80d8
2013-06-12Remove the program class.Rafael Espindola
It was only used to implement ExecuteAndWait and ExecuteNoWait. Expose just those two functions and make Execute and Wait implementations details. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@183864 91177308-0d34-0410-b5e6-96231b3b80d8
2011-02-20Put targets on folders, if the IDE supports the feature.Oscar Fuentes
Requires CMake 2.8.3 or newer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@126092 91177308-0d34-0410-b5e6-96231b3b80d8
2010-11-29Merge System into Support.Michael J. Spencer
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29Apply a patch from Frits van Bommel to fix the CMake build.Dan Gohman
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117731 91177308-0d34-0410-b5e6-96231b3b80d8
2010-10-29not is testing for a normal exit with a non-zero value. It shouldn'tDan Gohman
return success if the child process is killed with a signal. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@117701 91177308-0d34-0410-b5e6-96231b3b80d8
2009-09-24Add count/not tools as executables.Daniel Dunbar
- Apparently, I'm willing to do incredibly stupid things in the name of portability. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82685 91177308-0d34-0410-b5e6-96231b3b80d8