Skip to content

Commit

Permalink
llvm patch for FindZ3.cmake
Browse files Browse the repository at this point in the history
  • Loading branch information
gartung committed Oct 4, 2024
1 parent 5e94ffe commit 8c287c8
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
--- llvm/cmake/modules/FindZ3.cmake.bak 2024-10-04 10:19:06.702461755 -0500
+++ llvm/cmake/modules/FindZ3.cmake 2024-10-04 10:19:38.949564722 -0500
@@ -19,6 +19,7 @@
file(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/testz3.cpp
"#include <assert.h>
#include <z3.h>
+ #include <cstdio>
int main() {
unsigned int major, minor, build, rev;
Z3_get_version(&major, &minor, &build, &rev);
8 changes: 1 addition & 7 deletions var/spack/repos/builtin/packages/llvm/package.py
Original file line number Diff line number Diff line change
Expand Up @@ -627,13 +627,7 @@ def patch(self):
string=True,
)

@when("@14.0.6:")
def patch(self):
filter_file(
r"int main",
"#include <cstdio>\nint main",
"llvm/cmake/modules/FindZ3.cmake",
)
patch('llvm-cmake-modules-FindZ3.patch', when="@14.0.6"):

compiler_version_regex = (
# Normal clang compiler versions are left as-is
Expand Down

0 comments on commit 8c287c8

Please sign in to comment.