24 Commits

Author SHA1 Message Date
Eric Kilmer 7f3eb7bb90 Update to latest commit of cmake-git-version-tracking
https://github.com/andrew-hardin/cmake-git-version-tracking

commit 0ef58f1ef2ee02371d3e5be43e6cc6bf4004d8a5 Mar 7, 2022
2022-04-26 09:30:54 -04:00
Eric Kilmer b8621d9a0a Fix errors with protobuf on newer CMake (#756) 2021-08-06 18:07:05 -04:00
Eric Kilmer 6e9e9f1bcb Move cxx-common to lifting-bits. Remove old cxx-common workflow (#752) 2021-05-26 13:54:51 -04:00
Eric Kilmer 36f2660c8f vcpkg: Support Windows and arm64 (#726)
* Fixes and updates for McSema to build on Windows

* Enable C CXX ASM languages from beginning

Workaround for issue after finding Clang using Clang's own CMake
find-scripts

* Support aarch64 and Windows release triplets

* Conditional link to remill_settings for new vcpkg build
2021-02-02 15:49:39 -05:00
Eric Kilmer 24db01c1ba Support vcpkg build system (#717)
First step towards transitioning away from cxx-common's `pkgman.py` dependency management system towards compatibility with and use of vcpkg (https://github.com/microsoft/vcpkg) to manage dependencies.

This commit attempts to support both the new and old build systems until we can phase out the old completely.

Please see the updated remill, anvill, and trailofbits/cxx-common repositories to learn how to fetch the required dependencies.
2020-12-10 19:51:04 -05:00
Peter Goodman b0f7790f43 Sparc support (#709)
* Adds sparc support; formats files

* Update the readme and walkthrough

* Minor tweaks to readme/walkthrough

* Update ci.yml
2020-11-05 12:59:20 -05:00
Peter Goodman 31f267bd5f Cmake refactor (#693)
* Update to latest remill APIs and way of using CMake.

* Minor fixes

* Bug fixes for AArch64

* Tweaks

* Adds some nifty functionality useful for debugging some aarch64 bugs

* Fixes a subtle bug

* Bug fixes

* Make the test suite use explicit args

* Bug fix in xrefs

* Disable tests for now
2020-09-22 23:22:56 -04:00
Artem Dinaburg 8a041d23d0 Append project name to the check_git target to fix compound builds (#688) 2020-08-12 14:58:26 -04:00
Artem Dinaburg f5aa430e3a Detailed Version Information (#684)
Emit version information with git commit hash, commit date, message, and author.
2020-08-11 02:03:37 -04:00
Artem Dinaburg f8ade494ac Find Z3 better (#658)
* Find Z3 better
2020-05-24 00:14:56 -04:00
Eric Kilmer effd27daa9 Small final docker image (#655)
* Small final Docker image
* Ubuntu 20.04 support
* LLVM10 Fixes
2020-05-21 02:04:38 -04:00
Aiethel 4b74181717 cmake: Set c++ standard to c++17. (#632) 2020-03-17 15:44:44 -04:00
Alessandro Gario 52a213dbf2 CMake: Fix ccache detection (#612)
* CMake: Fix ccache detection

* Update .remill_commit_id
2019-12-02 11:48:31 -05:00
Alessandro Gario b133125634 CMake: Add ccache support (#604) 2019-11-18 11:38:52 -05:00
Peter Goodman 376479256d Enable builds with GCC (#527)
* Enable builds with GCC

* Update travis.sh
2019-03-13 09:49:27 -04:00
Peter Goodman c2fe44bbe2 Update according to remill. 2018-09-07 16:26:57 -04:00
Alessandro Gario 4143a74905 WIP: Add Windows support (#385)
* CMake: Small refactor, style changes

* CMake: Fix the install target for Windows

* Windows: Add build instructions

* CMake: Add support for find_package(remill)

* CMake: Fail when the Python package can't be installed

* CMake: Fix the 'install' target on Linux

* CMake: Copy the Updated settings.cmake from Remill

* Travis: Update the build script

* Update the remill commit id

* CMake: Only use C++14 when compiling on Windows

* CMake: Fix the Python package installer

* Update the Windows documentation

* Update .remill_commit_id

Update to track the tip of master

* Change default install location to /usr/local

* Indentation fixes

* Fix CMake error introduced in d2582c7

This regression has been in the branch for a while, and it is caused
by the ABI library in mcsema/OS/Linux. The commit that introduced the
problem enabled an 'add_subdirectory' directive that was initially
commented out.

The problem with CMake was primarly due to the 'project(name BC)'
statement, trying to enable back the BC language (which was removed
due to broken Visual Studio support).

I've kept the add_subdirectory enabled, but only when building on
linux. CMake works fine now, but compilation fails due to missing
include headers referenced by ABI_libc.h (like ultrasound.h, which
appears to come from the kernel headers).

=======

alessandro@tob-ubuntu1804-remill:~/Projects/remill/tools/mcsema$ git bisect run /tmp/bisect.sh
running /tmp/bisect.sh
CMake has failed to configure the project!
Bisecting: 5 revisions left to test after this (roughly 3 steps)
[67164c725e] Update README.md
running /tmp/bisect.sh
CMake has successfully configured the project!
Bisecting: 2 revisions left to test after this (roughly 2 steps)
[d2582c7abd] Build Tests in Travis (#406)
running /tmp/bisect.sh
CMake has failed to configure the project!
Bisecting: 0 revisions left to test after this (roughly 1 step)
[a708bafc42] InlineAsm function type mismatch (#409)
running /tmp/bisect.sh
CMake has successfully configured the project!
d2582c7abd is the first bad commit
commit d2582c7abd
Author: artemdinaburg <artem@dinaburg.org>
Date:   Tue May 22 21:13:43 2018 -0400
    Build Tests in Travis (#406)

    Always generate integration tests and then run the generated integration tests travis. We get around a lack of IDA by providing pre-built CFGs for examples.

    Closes #407
:100644 100644 4154fe1e11 8fbfcee113 M  CMakeLists.txt
:040000 040000 4bb5e0a484 491dba1a1d M  mcsema
:040000 040000 28398aa746 2461062d36 M  scripts
:040000 040000 97f8342b53 c1487df961 M  tests
bisect run success

* Fix for building 32-bit abi libraries

* Minor cmake tweaks

* Install 32-bit libraries on Travis-CI for Linux

* Fix installation of 32-bit libs to work around travis bug

* Handle C++ bitcode files

* Bump remill commit id

* Support bc file generation on ubuntu 14.04

* Bump the Remill commit ID.
2018-08-29 14:42:54 -04:00
Alessandro Gario 92ed567fda CMake refactor. Warning: this commit is broken. 2017-04-18 23:53:23 +02:00
Peter Goodman c6595839b3 Minor fixes 2017-04-18 17:37:50 -04:00
Peter Goodman 93b4aa56b4 WIP. Modified license to apache 2.0 to follow remill, also most code is new anyway. 2017-04-15 16:27:35 -04:00
artemdinaburg ec7868e1a4 Fix win32 build (#210)
* Initial attempt at better windows bootstrap

* Lower build requirements to Win7 and VS2013

* Fix Win32 Build

* LLVM for windows may not come with llvm-link.exe. Use the one we build from soruce.
* Enable parallel building on Windows
* Handle Windows' double == long double weirdness
* Fixes for std=g++11 breaking clang-cl
2017-03-23 10:55:18 -04:00
artemdinaburg fdb55f7e85 Embed git branch information in mcsema-lift (#208)
* Embed git branch information in mcsema-lift

* CMake modules to get git branch information
* Configuration file to embed it in --version output

* Addressing PR comments

* No need for .. in include path
2017-03-23 10:33:34 -04:00
artemdinaburg 2bd0259485 Externally specify semantics definitions (#205)
Main updates:

* Externally specify semantics definitions (see Arch/X86/Semantics/Bitcode/)
* Add the CMake glue to automatically build them into one giant bitcode library
* Create helper functions and macros (e.g. EXTERNAL_SEMANTICS) to specify that a semantic is externally defined
* Use FXAM as an example instruction where we do external semantics
* Add gzip to the integration tests because it hits the new FXAM code

Incidental fixes:

Add SUB64mi32 and SBB64mi32 to the translation map
Remove dependency on MCSEMA_DIR and use CMAKE_SOURCE_DIR
2017-03-21 12:24:09 -04:00
Peter Goodman bcda6a120a Llvm38 (#112)
* - Upgrade to official llvm 3.8
- remove boost
- unify all cmake files into a single cmake file
- use official protobuf
- start factoring out x86-specific stuff to eventually make an arm port easier
- simplify the CLI; now use mcsema-lift, with -arch, -os, -cfg, -entrypoint, and -o. No more having to specify the target triple.
- moves source code slightly closer to our style guide

Note:
- lifted bitcode is not quite right in some cases, so this isn't a stable branch!
- TODO: re-add test cases to discover source of stability problems.

* Some minor fixes, one to make sure xmm regs in the state struct are properly aligned

* Added missing std defs for option parsing. This makes /bin/ls work properly :-)

* Remove old cmake files

* Minor changes to get_cfg.py and raiseX86.cpp in relation to those changes. Those changes don't fix anything, the purpose was to make symbol names for things match between python and cpp. E.g. get_cfg would name things like dta_0xf00, sub_0xf00, ext_... And it seems that it was dta_ instead of data_ for a reallly flaky and dumb reason but oh well. I also fixed a subtle bug related to saving and restoring of callee saved registers on elf 64. I have not made related changes to elf 32 or pe 32/64, though those may be necessary.

* Minor fix

* Adding mcsema-disass, which is a nice wrapper around get_cfg.py.

* Working on readme and cleaning out (currently) unused stuff from the repo

* Renaming mc-sema dir to mcsema

* new travis file

* Updates to bootstrap and build process

* Minor bootstrap fixes

* Well, don't have windows working yet but this is kind of progress I think

* Travis should work now

* Updating protobuf-cmake files so we can generate a VS2015 solution

* Removing and adding some choco packages from README

* Bootstrap now builds protobuf and generates protobuf files
LLVM should now be built on Windows

* Adding Win32 specific compiler options

* Renamed ConstantInt to CreateConstantInt to satisfy MSVC

* Build Release LLVM to not have linking conflicts of MD vs MDd

* Added some missing instructions

* Adding changes to generate runtimes

* Windows bootstrap works.
2017-02-23 13:23:31 -05:00