You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -34,157 +34,82 @@ Remill's Linux version can also be built via Docker for quicker testing.
34
34
35
35
## Dependencies
36
36
37
-
Most of Remill's dependencies can be provided by the [cxx-common](https://github.com/lifting-bits/cxx-common) repository. Trail of Bits hosts downloadable, pre-built versions of cxx-common, which makes it substantially easier to get up and running with Remill. Nonetheless, the following table represents most of Remill's dependencies.
We will build the project using the superbuild in `dependencies/`. For more details on the dependency management system, see [Remill Dependency Management](docs/DEPENDENCIES.md).
56
55
57
-
Remill now comes with a Dockerfile for easier testing. This Dockerfile references the [cxx-common](https://github.com/lifting-bits/cxx-common) container to have all pre-requisite libraries available.
56
+
### Clone the repository
58
57
59
-
The Dockerfile allows for quick builds of multiple supported LLVM, and Ubuntu configurations.
60
-
61
-
> [!IMPORTANT]
62
-
> Not all LLVM and Ubuntu configurations are supported---Please refer to the CI results to get an idea about configurations that are tested and supported. The Docker image should build on both x86_64 and ARM64, but we only test x86_64 in CI. ARM64 _should build_, but if it doesn't, please open an issue.
63
-
64
-
Quickstart (builds Remill against LLVM 17 on Ubuntu 22.04).
Next, we build Remill. This script will create another directory, `remill-build`,
129
-
in the current working directory. All remaining dependencies needed
130
-
by Remill will be built in the `remill-build` directory.
75
+
### Windows (requires clang or clang-cl)
131
76
132
-
```shell
133
-
./remill/scripts/build.sh
134
-
```
77
+
**Note**: This requires running from a Visual Studio developer prompt.
135
78
136
-
Next, we can install Remill. Remill itself is a library, and so there is no real way
137
-
to try it. However, you can head on over to the [McSema](https://github.com/lifting-bits/mcsema) repository, which uses Remill for lifting instructions.
Sometimes, you want to build everything from source, including the [cxx-common](https://github.com/lifting-bits/cxx-common) libraries remill depends on. To build against a custom cxx-common location, you can use the following `cmake` invocation:
155
-
156
-
```sh
157
-
mkdir build
158
-
cd build
159
-
cmake \
160
-
-DCMAKE_INSTALL_PREFIX="<path where remill will install>" \
161
-
-DCMAKE_TOOLCHAIN_FILE="<path to cxx-common directory>/vcpkg/scripts/buildsystems/vcpkg.cmake" \
This error happens because the SPARC32 runtime semantics (the bitcode library which lives in `<install directory>/share/remill/<version>/semantics/sparc32.bc`) are built as 32-bit code, but 32-bit development libraries are not installed by default.
187
-
188
-
A similar situation occurs when building remill on arm64 Linux. In that case, you want to follow a similar workflow, except the architecture used in `dpkg` and `apt-get` commands would be `armhf` instead of `i386`.
189
-
190
-
Another alternative is to disable SPARC32 runtime semantics. To do that, use the `-DREMILL_BUILD_SPARC32_RUNTIME=False` option when invoking `cmake`.
Remill uses a CMake superbuild pattern for dependency management instead of traditional package managers like vcpkg or Conan. The superbuild system is located in the `dependencies/` directory.
6
+
7
+
## Why Superbuild?
8
+
9
+
The superbuild approach was chosen for several key reasons:
10
+
11
+
1.**Simplicity**: Automating dependency compilation is easier for users
12
+
2.**Reproducibility**: Pinned dependency versions ensure consistent builds across all environments
13
+
3.**Cross-Platform Consistency**: Same build process works on Linux, macOS, and Windows
14
+
15
+
## How It Works
16
+
17
+
The superbuild uses CMake's `ExternalProject` module to:
18
+
19
+
1. Download dependencies from source
20
+
2. Build them in the correct order (respecting inter-dependencies)
21
+
3. Install everything to a common prefix: `dependencies/install/` as proper CMake packages
22
+
4. The main project then uses this prefix via `CMAKE_PREFIX_PATH`
23
+
24
+
## Configuration Options
25
+
26
+
### Using External LLVM
27
+
28
+
The superbuild can use an externally-provided LLVM instead of building its own:
0 commit comments