Skip to content

Commit bf2255c

Browse files
authored
Custom llvm for lifting bits (#1038)
1 parent eec61cc commit bf2255c

File tree

4 files changed

+50
-17
lines changed

4 files changed

+50
-17
lines changed

.github/workflows/vcpkg_ci_amd64.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ jobs:
4242
- { os: 'ubuntu', name: 'ubuntu-v2', tag: '22.04' }
4343
llvm: [
4444
'llvm-16',
45-
'llvm-17'
45+
'llvm-17',
46+
'llvm-17[liftingbits-llvm]'
4647
]
4748
target_arch: [ 'x64', 'arm64' ]
4849

.github/workflows/vcpkg_ci_mac.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ jobs:
3939
- { runner: 'macos-13', xcode: '15.0' }
4040
llvm: [
4141
'llvm-16',
42-
'llvm-17'
42+
'llvm-17',
43+
'llvm-17[liftingbits-llvm]'
4344
]
4445
target_arch: [ 'x64', 'arm64' ]
4546

ports/llvm-17/portfile.cmake

Lines changed: 32 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,37 @@
11
vcpkg_check_linkage(ONLY_STATIC_LIBRARY)
22

3-
vcpkg_from_github(
4-
OUT_SOURCE_PATH SOURCE_PATH
5-
REPO llvm/llvm-project
6-
REF llvmorg-${VERSION}
7-
SHA512 df68879cb3f23489e19bbec4aac1898d213e837132072f8bbc1a49eb561c8cc7ccdb6ae9202b68b0915c84c8f2b41e536ab690697eb8ab8c9f44d5ae600b575b
8-
HEAD_REF release/17.x
9-
PATCHES
10-
0001-Fix-install-paths.patch
11-
0006-Fix-libffi.patch
12-
0020-fix-FindZ3.cmake.patch
13-
0021-fix-find_dependency.patch
14-
0026-fix-prefix-path-calc.patch
15-
0029-Do-not-attempt-macro-expansion-on-invalid-sourceloc.patch
16-
)
3+
4+
if("liftingbits-llvm" IN_LIST FEATURES)
5+
vcpkg_from_github(
6+
OUT_SOURCE_PATH SOURCE_PATH
7+
REPO trail-of-forks/llvm-project
8+
REF b779442fffcf46f2dfc104217e1413d7d5b538d6
9+
SHA512 700ddc8c4b39b260a2041385128ef2bbe3bf6c0ff45d933d3d50d15f737892e2c7e817a4a11cda606b91364b99b10c884b76e040b321696effac7ce172720552
10+
HEAD_REF main
11+
PATCHES
12+
0001-Fix-install-paths.patch
13+
0006-Fix-libffi.patch
14+
0020-fix-FindZ3.cmake.patch
15+
0021-fix-find_dependency.patch
16+
0026-fix-prefix-path-calc.patch
17+
0029-Do-not-attempt-macro-expansion-on-invalid-sourceloc.patch
18+
)
19+
else()
20+
vcpkg_from_github(
21+
OUT_SOURCE_PATH SOURCE_PATH
22+
REPO llvm/llvm-project
23+
REF llvmorg-${VERSION}
24+
SHA512 df68879cb3f23489e19bbec4aac1898d213e837132072f8bbc1a49eb561c8cc7ccdb6ae9202b68b0915c84c8f2b41e536ab690697eb8ab8c9f44d5ae600b575b
25+
HEAD_REF release/17.x
26+
PATCHES
27+
0001-Fix-install-paths.patch
28+
0006-Fix-libffi.patch
29+
0020-fix-FindZ3.cmake.patch
30+
0021-fix-find_dependency.patch
31+
0026-fix-prefix-path-calc.patch
32+
0029-Do-not-attempt-macro-expansion-on-invalid-sourceloc.patch
33+
)
34+
endif()
1735

1836
string(REPLACE "." ";" VERSION_LIST ${VERSION})
1937
list(GET VERSION_LIST 0 LLVM_VERSION_MAJOR)

ports/llvm-17/vcpkg.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,19 @@
3030
"utils"
3131
],
3232
"features": {
33+
"liftingbits-llvm": {
34+
"description": "Custom llvm source tree that allows for custom calling convention registration. These custom calling conventions allow for specifying binary level compatibility.",
35+
"dependencies": [
36+
{
37+
"name": "llvm-17",
38+
"default-features": false,
39+
"features": [
40+
"libunwind",
41+
"enable-rtti"
42+
]
43+
}
44+
]
45+
},
3346
"bolt": {
3447
"description": "BOLT is a post-link optimizer developed to speed up large applications.",
3548
"dependencies": [
@@ -439,4 +452,4 @@
439452
"description": "Build LLVM utils."
440453
}
441454
}
442-
}
455+
}

0 commit comments

Comments
 (0)