Skip to content

Commit a0ebd68

Browse files
Ninja3047ekilmerPeter Goodman
authored
LLVM 16 (#1013)
Co-authored-by: Eric Kilmer <[email protected]> Co-authored-by: Peter Goodman <[email protected]>
1 parent 920354c commit a0ebd68

20 files changed

+3864
-11
lines changed

.github/workflows/vcpkg_ci_amd64.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,10 @@ on:
2727
branches:
2828
- 'master'
2929

30+
concurrency:
31+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
32+
cancel-in-progress: true
33+
3034
jobs:
3135
build:
3236
strategy:
@@ -37,7 +41,7 @@ jobs:
3741
image:
3842
- { name: 'ubuntu', tag: '20.04' }
3943
- { name: 'ubuntu', tag: '22.04' }
40-
llvm: [ 'llvm-15', 'llvm-15[pasta]' ]
44+
llvm: [ 'llvm-15', 'llvm-16[pasta]', 'llvm-16' ]
4145

4246
container:
4347
image: docker.pkg.github.com/lifting-bits/cxx-common/vcpkg-builder-${{ matrix.image.name }}:${{ matrix.image.tag }}
@@ -66,6 +70,7 @@ jobs:
6670
- name: Get commit message
6771
shell: bash
6872
run: |
73+
git config --global --add safe.directory /__w/cxx-common/cxx-common
6974
echo 'COMMIT_MESSAGE<<EOF' >> "$GITHUB_ENV"
7075
if [[ '${{ github.event_name }}' == 'push' ]]; then
7176
echo "$(git log --format=%B -n 1 HEAD)" >> "$GITHUB_ENV"

.github/workflows/vcpkg_ci_mac.yml

Lines changed: 16 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,14 +26,18 @@ on:
2626
branches:
2727
- 'master'
2828

29+
concurrency:
30+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
31+
cancel-in-progress: true
32+
2933
jobs:
3034
build:
3135
strategy:
3236
fail-fast: false
3337
matrix:
3438
os:
35-
- { runner: 'macos-11', xcode: '13.0' }
36-
llvm: [ 'llvm-15', 'llvm-15[pasta]' ]
39+
- { runner: 'macos-12', xcode: '14.2' }
40+
llvm: [ 'llvm-15', 'llvm-16[pasta]', 'llvm-16' ]
3741
target_arch: [ 'x64', 'arm64' ]
3842

3943
runs-on: ${{ matrix.os.runner }}
@@ -106,6 +110,11 @@ jobs:
106110
name: ${{ env.ARTIFACT_NAME }}_logs
107111
path: ${{ github.workspace }}/vcpkg/buildtrees/**/*.log
108112

113+
- name: 'Adhoc codesign'
114+
shell: 'bash'
115+
run: |
116+
find ./${{ env.ARTIFACT_NAME }} \( -path '**/bin/*' -or -path '**/libexec/*' -or -path '**/tools/*' \) -type f -perm +111 -exec codesign --force -s - \{\} \;
117+
109118
- name: 'Export Packages'
110119
if: contains(env.COMMIT_MESSAGE, 'debug artifacts') || github.event.release
111120
shell: 'bash'
@@ -191,7 +200,7 @@ jobs:
191200
- name: 'Remill build'
192201
shell: 'bash'
193202
working-directory: remill
194-
if: matrix.target_arch == 'x64'
203+
if: contains(matrix.llvm, 'llvm-15') && matrix.target_arch == 'x64'
195204
run: |
196205
cmake -G Ninja \
197206
-DCMAKE_VERBOSE_MAKEFILE=ON \
@@ -207,15 +216,15 @@ jobs:
207216
- name: 'Remill test'
208217
shell: 'bash'
209218
working-directory: remill/build
210-
if: matrix.target_arch == 'x64'
219+
if: contains(matrix.llvm, 'llvm-15') && matrix.target_arch == 'x64'
211220
run: |
212221
# Only run test on x64
213222
env CTEST_OUTPUT_ON_FAILURE=1 ctest .
214223
215224
- name: 'Anvill build'
216225
shell: 'bash'
217226
working-directory: anvill
218-
if: matrix.target_arch == 'x64'
227+
if: contains(matrix.llvm, 'llvm-15') && matrix.target_arch == 'x64'
219228
run: |
220229
cmake -G Ninja \
221230
-DCMAKE_VERBOSE_MAKEFILE=ON \
@@ -232,12 +241,12 @@ jobs:
232241
-S . -B build
233242
cmake --build build
234243
cmake --install build
244+
235245
#- name: 'Anvill test'
236246
# shell: 'bash'
237247
# working-directory: anvill/build
238-
# if: matrix.target_arch == 'x64'
248+
# if: contains(matrix.llvm, 'llvm-15') && matrix.target_arch == 'x64'
239249
# run: |
240-
# # Only run test on x64
241250
# ./install/bin/anvill-decompile-json -spec ../bin/Decompile/tests/specs/ret0.json -bc_out ./ret0.bc -ir_out ret0.ir
242251

243252
- name: Cache cleanup and reporting

.github/workflows/vcpkg_ci_windows.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,13 +29,18 @@ on:
2929
branches:
3030
- 'master'
3131

32+
concurrency:
33+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
34+
cancel-in-progress: true
35+
3236
jobs:
3337
build:
3438
strategy:
3539
fail-fast: false
3640
matrix:
3741
llvm: [
38-
'llvm-15'
42+
'llvm-15',
43+
'llvm-16'
3944
]
4045

4146
runs-on: ['self-hosted', 'Windows', 'X64']

.github/workflows/vcpkg_docker_amd64.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
- 'docker/**'
1616
- '.github/workflows/vcpkg_docker_amd64.yml'
1717

18+
concurrency:
19+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
20+
cancel-in-progress: true
1821

1922
jobs:
2023
build:

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Passing `--export-dir <DIR>` to the `./build_dependencies.sh` script, you can in
4949
./build_dependencies.sh --export-dir vcpkg-llvm-15-install llvm-15
5050
```
5151

52-
will build all of the dependencies listed in `dependencies.txt` _and_ LLVM 14 and install into a local directory named `vcpkg-llvm-15-install`.
52+
will build all of the dependencies listed in `dependencies.txt` _and_ LLVM 15 and install into a local directory named `vcpkg-llvm-15-install`.
5353

5454
Furthermore, you are able to install additional dependencies into an existing exported directory created by this script by setting the `--export-dir <path>` to the same path:
5555

@@ -163,4 +163,4 @@ This command will do similar things as the above command, except it will `remove
163163

164164
This repo is under the Apache-2.0 LICENSE, unless where specified. See below.
165165

166-
The LLVM version port directories (ports/llvm-{14,15}) were initially copied from the upstream [vcpkg](https://github.com/microsoft/vcpkg) repo as a starting point. Eventually, we plan to submit the relevant patches for upstream when we have thoroughly tested these changes. More info can be found in the respective `LICENSE` and `NOTICE` files in those directories.
166+
The LLVM version port directories (ports/llvm-{15,16}) were initially copied from the upstream [vcpkg](https://github.com/microsoft/vcpkg) repo as a starting point. Eventually, we plan to submit the relevant patches for upstream when we have thoroughly tested these changes. More info can be found in the respective `LICENSE` and `NOTICE` files in those directories.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
diff --git a/openmp/tools/Modules/CMakeLists.txt b/openmp/tools/Modules/CMakeLists.txt
2+
index 22d818eea72d..75aacc4468d4 100644
3+
--- a/openmp/tools/Modules/CMakeLists.txt
4+
+++ b/openmp/tools/Modules/CMakeLists.txt
5+
@@ -12,4 +12,4 @@
6+
7+
8+
install(FILES "FindOpenMPTarget.cmake"
9+
- DESTINATION "${OPENMP_INSTALL_LIBDIR}/cmake/openmp")
10+
+ DESTINATION "share/openmp")
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
llvm/cmake/modules/FindFFI.cmake | 2 +-
2+
1 file changed, 1 insertion(+), 1 deletion(-)
3+
4+
diff --git a/llvm/cmake/modules/FindFFI.cmake b/llvm/cmake/modules/FindFFI.cmake
5+
index b0d859af8959..a756d0c8fdb0 100644
6+
--- a/llvm/cmake/modules/FindFFI.cmake
7+
+++ b/llvm/cmake/modules/FindFFI.cmake
8+
@@ -34,7 +34,7 @@ else()
9+
endif()
10+
endif()
11+
12+
-find_library(FFI_LIBRARIES ffi PATHS ${FFI_LIBRARY_DIR})
13+
+find_library(FFI_LIBRARIES ffi libffi PATHS ${FFI_LIBRARY_DIR})
14+
15+
if(FFI_LIBRARIES)
16+
include(CMakePushCheckState)
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
bolt/tools/driver/CMakeLists.txt | 7 -------
2+
1 file changed, 7 deletions(-)
3+
4+
diff --git a/bolt/tools/driver/CMakeLists.txt b/bolt/tools/driver/CMakeLists.txt
5+
index e56be15dbcff..85b078e2e761 100644
6+
--- a/bolt/tools/driver/CMakeLists.txt
7+
+++ b/bolt/tools/driver/CMakeLists.txt
8+
@@ -35,13 +35,6 @@ set(BOLT_DEPENDS
9+
)
10+
11+
add_custom_target(bolt DEPENDS ${BOLT_DEPENDS})
12+
-install(PROGRAMS
13+
- ${CMAKE_BINARY_DIR}/bin/llvm-bolt
14+
- ${CMAKE_BINARY_DIR}/bin/perf2bolt
15+
- ${CMAKE_BINARY_DIR}/bin/llvm-boltdiff
16+
- DESTINATION ${CMAKE_INSTALL_BINDIR}
17+
- COMPONENT bolt
18+
- )
19+
add_llvm_install_targets(install-bolt DEPENDS bolt COMPONENT bolt)
20+
set_target_properties(bolt PROPERTIES FOLDER "BOLT")
21+
set_target_properties(install-bolt PROPERTIES FOLDER "BOLT")
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
diff --git a/llvm/cmake/modules/FindZ3.cmake b/llvm/cmake/modules/FindZ3.cmake
2+
index 118b1eac3b32..455bbf28facc 100644
3+
--- a/llvm/cmake/modules/FindZ3.cmake
4+
+++ b/llvm/cmake/modules/FindZ3.cmake
5+
@@ -1,3 +1,22 @@
6+
+# Try first to find Z3 using its upstream cmake files (included in newer version)
7+
+# unless the user has provided a hint that would assume skipping the CONFIG
8+
+# option
9+
+if (NOT DEFINED Z3_ROOT AND NOT LLVM_Z3_INSTALL_DIR)
10+
+ find_package(Z3 QUIET CONFIG)
11+
+endif()
12+
+
13+
+# If we found with CONFIG mode, then set up the compatible variables
14+
+if (Z3_FOUND)
15+
+ set(Z3_VERSION "${Z3_VERSION_STRING}")
16+
+ set(Z3_LIBRARIES z3::libz3)
17+
+ get_property(Z3_INCLUDE_DIR
18+
+ TARGET z3::libz3 PROPERTY
19+
+ INTERFACE_INCLUDE_DIRECTORIES
20+
+ )
21+
+ find_package_handle_standard_args(Z3 CONFIG_MODE)
22+
+
23+
+else()
24+
+
25+
INCLUDE(CheckCXXSourceRuns)
26+
27+
# Function to check Z3's version
28+
@@ -123,3 +142,5 @@ FIND_PACKAGE_HANDLE_STANDARD_ARGS(Z3
29+
VERSION_VAR Z3_VERSION_STRING)
30+
31+
mark_as_advanced(Z3_INCLUDE_DIR Z3_LIBRARIES)
32+
+
33+
+endif()
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
diff --git a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in
2+
index 2d90512bfb06..97aacd6f9c0f 100644
3+
--- a/llvm/cmake/modules/LLVMConfig.cmake.in
4+
+++ b/llvm/cmake/modules/LLVMConfig.cmake.in
5+
@@ -51,16 +51,18 @@ set(LLVM_ENABLE_ASSERTIONS @LLVM_ENABLE_ASSERTIONS@)
6+
7+
set(LLVM_ENABLE_EH @LLVM_ENABLE_EH@)
8+
9+
+include(CMakeFindDependencyMacro)
10+
+
11+
set(LLVM_ENABLE_FFI @LLVM_ENABLE_FFI@)
12+
if(LLVM_ENABLE_FFI)
13+
- find_package(FFI)
14+
+ find_dependency(FFI)
15+
endif()
16+
17+
set(LLVM_ENABLE_RTTI @LLVM_ENABLE_RTTI@)
18+
19+
set(LLVM_ENABLE_TERMINFO @LLVM_ENABLE_TERMINFO@)
20+
if(LLVM_ENABLE_TERMINFO)
21+
- find_package(Terminfo)
22+
+ find_dependency(Terminfo)
23+
endif()
24+
25+
set(LLVM_ENABLE_THREADS @LLVM_ENABLE_THREADS@)
26+
@@ -70,25 +72,28 @@ set(LLVM_ENABLE_UNWIND_TABLES @LLVM_ENABLE_UNWIND_TABLES@)
27+
set(LLVM_ENABLE_ZLIB @LLVM_ENABLE_ZLIB@)
28+
if(LLVM_ENABLE_ZLIB)
29+
set(ZLIB_ROOT @ZLIB_ROOT@)
30+
- find_package(ZLIB)
31+
+ find_dependency(ZLIB)
32+
endif()
33+
34+
set(LLVM_ENABLE_ZSTD @LLVM_ENABLE_ZSTD@)
35+
if(LLVM_ENABLE_ZSTD)
36+
- find_package(zstd)
37+
+ find_dependency(zstd)
38+
endif()
39+
40+
set(LLVM_ENABLE_LIBXML2 @LLVM_ENABLE_LIBXML2@)
41+
if(LLVM_ENABLE_LIBXML2)
42+
- find_package(LibXml2)
43+
+ find_dependency(LibXml2)
44+
endif()
45+
46+
set(LLVM_ENABLE_CURL @LLVM_ENABLE_CURL@)
47+
if(LLVM_ENABLE_CURL)
48+
- find_package(CURL)
49+
+ find_dependency(CURL)
50+
endif()
51+
52+
set(LLVM_WITH_Z3 @LLVM_WITH_Z3@)
53+
+if(LLVM_WITH_Z3)
54+
+ find_dependency(Z3 4.7.1)
55+
+endif()
56+
57+
set(LLVM_ENABLE_DIA_SDK @LLVM_ENABLE_DIA_SDK@)
58+

0 commit comments

Comments
 (0)