summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cfi-verify/CMakeLists.txt
Commit message (Collapse)AuthorAgeFilesLines
* Make llvm-cfi-verify CMakeLists.txt formatting more consistent with the rest ↵Nico Weber2018-05-091-1/+2
| | | | | | of LLVM. llvm-svn: 331835
* [CMake] Use PRIVATE in target_link_libraries for executablesShoaib Meenai2017-12-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 llvm-svn: 319840
* [cfi-verify] Add blacklist parsing for result filtering.Mitch Phillips2017-11-031-1/+1
| | | | | | | | | | | | | | | | | | | | | Adds blacklist parsing behaviour for filtering results into four categories: - Expected Protected: Things that are not in the blacklist and are protected. - Unexpected Protected: Things that are in the blacklist and are protected. - Expected Unprotected: Things that are in the blacklist and are unprotected. - Unexpected Unprotected: Things that are not in the blacklist and are unprotected. now can optionally be invoked with a second command line argument, which specifies the blacklist file that the binary was built with. Current statistics for chromium: Reviewers: vlad.tsyrklevich Subscribers: mgorny, llvm-commits, pcc, kcc Differential Revision: https://reviews.llvm.org/D39525 llvm-svn: 317364
* Parse DWARF information to reduce false positives.Mitch Phillips2017-10-311-0/+1
| | | | | | | | | | | | | | Summary: Help differentiate code and data by parsing DWARF information. This will reduce false positive rates where data is placed in executable sections and is mistakenly parsed as code, resulting in an inflation in the number of indirect CF instructions (and hence an inflation of the number of unprotected). Also prints the DWARF line data around the region of each indirect CF instruction. Reviewers: pcc Subscribers: probinson, llvm-commits, vlad.tsyrklevich, mgorny, aprantl, kcc Differential Revision: https://reviews.llvm.org/D38654 llvm-svn: 317050
* Fix LLVM_LINK_LLVM_DYLIB=On build of llvm-cfi-verifySam Clegg2017-10-241-1/+1
| | | | | | | | Subscribers: mgorny, aheejin Differential Revision: https://reviews.llvm.org/D39250 llvm-svn: 316493
* Graph builder implementation.Mitch Phillips2017-10-231-3/+2
| | | | | | | | | | | | | | | | | | Implement a localised graph builder for indirect control flow instructions. Main interface is through GraphBuilder::buildFlowGraph, which will build a flow graph around an indirect CF instruction. Various modifications to FileVerifier are also made to const-expose some members needed for machine code analysis done by the graph builder. Reviewers: vlad.tsyrklevich Reviewed By: vlad.tsyrklevich Subscribers: llvm-commits, kcc, pcc Differential Revision: https://reviews.llvm.org/D38427 llvm-svn: 316372
* Accidently merged an incomplete upstream patch in ↵Mitch Phillips2017-10-231-2/+3
| | | | | | 10e6ee563a6b5ca498f27972ca6dbe6c308f1ac2 - reverting the changes. llvm-svn: 316359
* Patch inMitch Phillips2017-10-231-3/+2
| | | | llvm-svn: 316358
* Reland 'Classify llvm-cfi-verify.'Vlad Tsyrklevich2017-10-111-1/+3
| | | | | | | | | | | | | | Summary: Move llvm-cfi-verify into a class in preparation for CFI analysis to come. Reviewers: vlad.tsyrklevich Reviewed By: vlad.tsyrklevich Subscribers: mgorny, llvm-commits, pcc, kcc Differential Revision: https://reviews.llvm.org/D38379 llvm-svn: 315504
* Revert "Classify llvm-cfi-verify."Vlad Tsyrklevich2017-10-101-1/+0
| | | | | | | | This reverts commit r315363. It has a simple build failure, but more importantly I want to confirm that unit tests run in check-all to make sure that they don't silently break in the future. llvm-svn: 315370
* Classify llvm-cfi-verify.Vlad Tsyrklevich2017-10-101-0/+1
| | | | | | | | | | | | | | Summary: Move llvm-cfi-verify into a class in preparation for CFI analysis to come. Reviewers: vlad.tsyrklevich Reviewed By: vlad.tsyrklevich Subscribers: mgorny, llvm-commits, pcc, kcc Differential Revision: https://reviews.llvm.org/D38379 llvm-svn: 315363
* [WebAssembly] Add support for local symbol bindingsSam Clegg2017-09-201-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D38096 llvm-svn: 313817
* Introduce the llvm-cfi-verify tool (resubmission of D37937).Vlad Tsyrklevich2017-09-201-0/+15
| | | | | | | | | | | | | | | | Summary: Resubmission of D37937. Fixed i386 target building (conversion from std::size_t& to uint64_t& failed). Fixed documentation warning failure about docs/CFIVerify.rst not being in the tree. Reviewers: vlad.tsyrklevich Reviewed By: vlad.tsyrklevich Patch by Mitch Phillips Subscribers: sbc100, mgorny, pcc, llvm-commits, kcc Differential Revision: https://reviews.llvm.org/D38089 llvm-svn: 313809
* Revert "Introduce the llvm-cfi-verify tool (resubmission of D37937)."Vlad Tsyrklevich2017-09-201-14/+0
| | | | | | This reverts commit r313798, it's causing buildbot failures. llvm-svn: 313804
* Introduce the llvm-cfi-verify tool (resubmission of D37937).Vlad Tsyrklevich2017-09-201-0/+14
| | | | | | | | | | | | | | | | Summary: Resubmission of D37937. Fixed i386 target building (conversion from std::size_t& to uint64_t& failed). Fixed documentation warning failure about docs/CFIVerify.rst not being in the tree. Reviewers: vlad.tsyrklevich Reviewed By: vlad.tsyrklevich Patch by Mitch Phillips Subscribers: mgorny, pcc, llvm-commits, kcc Differential Revision: https://reviews.llvm.org/D38089 llvm-svn: 313798
* Revert "Introduce the llvm-cfi-verify tool."Vlad Tsyrklevich2017-09-191-14/+0
| | | | | | | This reverts commit r313688, it caused build failures for llvm-i686-linux-RA llvm-svn: 313689
* Introduce the llvm-cfi-verify tool.Vlad Tsyrklevich2017-09-191-0/+14
Summary: Introduces the llvm-cfi-verify tool to llvm. Includes the design document (docs/CFIVerify.rst). Current implementation of the tool is simply a disassembler that identifies and prints the indirect control flow instructions. Reviewers: vlad.tsyrklevich Reviewed By: vlad.tsyrklevich Patch by Mitch Phillips Subscribers: llvm-commits, kcc, pcc, mgorny Differential Revision: https://reviews.llvm.org/D37937 llvm-svn: 313688
OpenPOWER on IntegriCloud