Skip to content

Commit 75a9e04

Browse files
authored
Test and officially support LLVM 12 only (#548)
* Test and officially support LLVM 12 only * Remove tools that are already included in Docker image
1 parent f5c630a commit 75a9e04

File tree

4 files changed

+25
-50
lines changed

4 files changed

+25
-50
lines changed

.github/workflows/ci.yml

+12-22
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,12 @@ jobs:
2525
- { name: 'ubuntu', tag: '18.04' }
2626
- { name: 'ubuntu', tag: '20.04' }
2727
llvm: [
28-
'9',
29-
'10',
30-
'11',
3128
'12'
3229
]
3330

3431
runs-on: ubuntu-20.04
3532
container:
36-
image: docker.pkg.github.com/lifting-bits/cxx-common/vcpkg-builder-${{ matrix.image.name }}:${{ matrix.image.tag }}
33+
image: ghcr.io/lifting-bits/cxx-common/vcpkg-builder-${{ matrix.image.name }}:${{ matrix.image.tag }}
3734
credentials:
3835
username: ${{ github.actor }}
3936
password: ${{ secrets.GITHUB_TOKEN }}
@@ -42,12 +39,6 @@ jobs:
4239
- uses: actions/checkout@v2
4340
with:
4441
fetch-depth: 0
45-
- name: Install utility tools
46-
shell: bash
47-
run: |
48-
# TODO some of these should probably live in the Docker build image
49-
apt-get update
50-
apt-get install -y pixz xz-utils make rpm
5142

5243
- name: Build with build script
5344
shell: bash
@@ -98,10 +89,9 @@ jobs:
9889
fail-fast: false
9990
matrix:
10091
os: [
101-
'macos-10.15'
92+
'macos-11'
10293
]
10394
llvm: [
104-
'11',
10595
'12'
10696
]
10797

@@ -188,8 +178,8 @@ jobs:
188178
zip -r9 remill_ubuntu-20.04_packages.zip \
189179
ubuntu-20.04*
190180
191-
zip -r9 remill_macos-10.15_packages.zip \
192-
macos-10.15*
181+
zip -r9 remill_macos-11_packages.zip \
182+
macos-11*
193183
194184
- name: Upload the Ubuntu 18.04 packages
195185
uses: actions/upload-release-asset@v1
@@ -215,32 +205,32 @@ jobs:
215205
asset_name: remill_ubuntu-20.04_packages.zip
216206
asset_content_type: application/gzip
217207

218-
- name: Upload the macOS 10.15 packages
208+
- name: Upload the macOS 11 packages
219209
uses: actions/upload-release-asset@v1
220210

221211
env:
222212
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
223213

224214
with:
225215
upload_url: ${{ steps.create_release.outputs.upload_url }}
226-
asset_path: remill_macos-10.15_packages.zip
227-
asset_name: remill_macos-10.15_packages.zip
216+
asset_path: remill_macos-11_packages.zip
217+
asset_name: remill_macos-11_packages.zip
228218
asset_content_type: application/gzip
229219

230220

231221
Docker_Linux:
232222
runs-on: ubuntu-latest
233223
strategy:
234224
matrix:
235-
llvm: ["11"]
225+
llvm: ["12"]
236226
ubuntu: ["18.04"]
237227
steps:
238228
- uses: actions/checkout@v2
239229
- name: Build LLVM ${{ matrix.llvm }} on ${{ matrix.ubuntu }}
240230
run: |
241-
docker build . -t docker.pkg.github.com/lifting-bits/remill/remill-llvm${{ matrix.llvm }}-ubuntu${{ matrix.ubuntu }}-amd64:latest -f Dockerfile --build-arg UBUNTU_VERSION=${{ matrix.ubuntu }} --build-arg ARCH=amd64 --build-arg LLVM_VERSION=${{ matrix.llvm }}
231+
docker build . -t ghcr.io/lifting-bits/remill/remill-llvm${{ matrix.llvm }}-ubuntu${{ matrix.ubuntu }}-amd64:latest -f Dockerfile --build-arg UBUNTU_VERSION=${{ matrix.ubuntu }} --build-arg ARCH=amd64 --build-arg LLVM_VERSION=${{ matrix.llvm }}
242232
- name: Test Docker image
243233
run: |
244-
docker run --rm docker.pkg.github.com/lifting-bits/remill/remill-llvm${{ matrix.llvm }}-ubuntu${{ matrix.ubuntu }}-amd64:latest --arch amd64 --ir_out /dev/stdout --bytes c704ba01000000
245-
docker run --rm docker.pkg.github.com/lifting-bits/remill/remill-llvm${{ matrix.llvm }}-ubuntu${{ matrix.ubuntu }}-amd64:latest --arch aarch64 --ir_out /dev/stdout --address 0x400544 --bytes FD7BBFA90000009000601891FD030091B7FFFF97E0031F2AFD7BC1A8C0035FD6
246-
docker run --rm docker.pkg.github.com/lifting-bits/remill/remill-llvm${{ matrix.llvm }}-ubuntu${{ matrix.ubuntu }}-amd64:latest --arch aarch32 -ir_out /dev/stderr --bytes 0cd04de208008de504108de500208de508309de504009de500109de5903122e0c20fa0e110109fe5001091e5002081e5040081e50cd08de21eff2fe14000000000000000
234+
docker run --rm ghcr.io/lifting-bits/remill/remill-llvm${{ matrix.llvm }}-ubuntu${{ matrix.ubuntu }}-amd64:latest --arch amd64 --ir_out /dev/stdout --bytes c704ba01000000
235+
docker run --rm ghcr.io/lifting-bits/remill/remill-llvm${{ matrix.llvm }}-ubuntu${{ matrix.ubuntu }}-amd64:latest --arch aarch64 --ir_out /dev/stdout --address 0x400544 --bytes FD7BBFA90000009000601891FD030091B7FFFF97E0031F2AFD7BC1A8C0035FD6
236+
docker run --rm ghcr.io/lifting-bits/remill/remill-llvm${{ matrix.llvm }}-ubuntu${{ matrix.ubuntu }}-amd64:latest --arch aarch32 -ir_out /dev/stderr --bytes 0cd04de208008de504108de500208de508309de504009de500109de5903122e0c20fa0e110109fe5001091e5002081e5040081e50cd08de21eff2fe14000000000000000

Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# Choose your LLVM version
2-
ARG LLVM_VERSION=11
2+
ARG LLVM_VERSION=12
33
ARG ARCH=amd64
44
ARG UBUNTU_VERSION=18.04
55
ARG DISTRO_BASE=ubuntu${UBUNTU_VERSION}

README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ Most of Remill's dependencies can be provided by the [cxx-common](https://github
4040
| [Google Flags](https://github.com/google/glog) | Latest |
4141
| [Google Log](https://github.com/google/glog) | Latest |
4242
| [Google Test](https://github.com/google/googletest) | Latest |
43-
| [LLVM](http://llvm.org/) | 3.5+ |
44-
| [Clang](http://clang.llvm.org/) | 3.5+ |
43+
| [LLVM](http://llvm.org/) | 12 |
44+
| [Clang](http://clang.llvm.org/) | 12 |
4545
| [Intel XED](https://software.intel.com/en-us/articles/xed-x86-encoder-decoder-software-library) | Latest |
4646
| [Python](https://www.python.org/) | 2.7 |
4747
| Unzip | Latest |
@@ -55,7 +55,7 @@ Remill now comes with a Dockerfile for easier testing. This Dockerfile reference
5555

5656
The Dockerfile allows for quick builds of multiple supported LLVM, architecture, and Linux configurations.
5757

58-
Quickstart (builds Remill against LLVM 11 on Ubuntu 18.04 for AMD64):
58+
Quickstart (builds Remill against LLVM 12 on Ubuntu 18.04 for AMD64):
5959

6060
Clone Remill:
6161
```shell
@@ -71,7 +71,7 @@ docker build . -t remill \
7171
-f Dockerfile \
7272
--build-arg UBUNTU_VERSION=18.04 \
7373
--build-arg ARCH=amd64 \
74-
--build-arg LLVM_VERSION=11
74+
--build-arg LLVM_VERSION=12
7575
```
7676

7777
Ensure remill works:

scripts/build.sh

+8-23
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ DOWNLOAD_DIR="$( cd "$( dirname "${SRC_DIR}" )" && pwd )/lifting-bits-downloads"
2323
CURR_DIR=$( pwd )
2424
BUILD_DIR="${CURR_DIR}/remill-build"
2525
INSTALL_DIR=/usr/local
26-
LLVM_VERSION=llvm-11
26+
LLVM_VERSION=llvm-12
2727
OS_VERSION=
2828
ARCH_VERSION=
2929
BUILD_FLAGS=
30-
CXX_COMMON_VERSION="v0.1.4"
30+
CXX_COMMON_VERSION="v0.1.5"
3131

3232
# There are pre-build versions of various libraries for specific
3333
# Ubuntu releases.
@@ -172,16 +172,13 @@ function DownloadLibraries
172172

173173
#BUILD_FLAGS="${BUILD_FLAGS} -DCMAKE_OSX_SYSROOT=${sdk_root}"
174174
# Min version supported
175-
OS_VERSION="macos-10.15"
175+
OS_VERSION="macos-11"
176176
# Hard-coded to match pre-built binaries in CI
177-
XCODE_VERSION="12.4"
178-
if [[ "$(sw_vers -productVersion)" == "10.15"* ]]; then
179-
echo "Found MacOS Catalina"
180-
OS_VERSION="macos-10.15"
181-
elif [[ "$(sw_vers -productVersion)" == "11."* ]]; then
177+
XCODE_VERSION="13.0"
178+
if [[ "$(sw_vers -productVersion)" == "11."* ]]; then
182179
echo "Found MacOS Big Sur"
183180
# Uses 10.15 binaries
184-
OS_VERSION="macos-10.15"
181+
OS_VERSION="macos-11"
185182
else
186183
echo "WARNING: ****Likely unsupported MacOS Version****"
187184
echo "WARNING: ****Using ${OS_VERSION}****"
@@ -289,25 +286,13 @@ function Package
289286
function GetLLVMVersion
290287
{
291288
case ${1} in
292-
9)
293-
LLVM_VERSION=llvm-9
294-
return 0
295-
;;
296-
10)
297-
LLVM_VERSION=llvm-10
298-
return 0
299-
;;
300-
11)
301-
LLVM_VERSION=llvm-11
302-
return 0
303-
;;
304289
12)
305290
LLVM_VERSION=llvm-12
306291
return 0
307292
;;
308293
*)
309294
# unknown option
310-
echo "[x] Unknown LLVM version ${1}. You may be able to manually build it with cxx-common."
295+
echo "[x] Unknown or unsupported LLVM version ${1}. You may be able to manually build it with cxx-common."
311296
return 1
312297
;;
313298
esac
@@ -320,7 +305,7 @@ function Help
320305
echo ""
321306
echo "Options:"
322307
echo " --prefix Change the default (${INSTALL_DIR}) installation prefix."
323-
echo " --llvm-version Change the default (9) LLVM version."
308+
echo " --llvm-version Change the default (12) LLVM version."
324309
echo " --build-dir Change the default (${BUILD_DIR}) build directory."
325310
echo " --debug Build with Debug symbols."
326311
echo " --extra-cmake-args Extra CMake arguments to build with."

0 commit comments

Comments
 (0)