Skip to content

Commit

Permalink
Fix ast patch
Browse files Browse the repository at this point in the history
  • Loading branch information
starseeker committed Jun 27, 2024
1 parent bc9516b commit 264722d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 12 deletions.
11 changes: 3 additions & 8 deletions llvm/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@ if (ENABLE_LLVM)
set(PATCH_CMD "PATCH_COMMAND")
if (TARGET ZLIB_BLD)
set(Z_PREFIX_STR "brl_")
set(Z_BRL_PATCH_CMD "${PATCH_CMD};${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/llvm_z_brl.patch")
set(PATCH_CMD "COMMAND")
set(Z_BRL_PATCH_CMD "COMMAND;${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/llvm_z_brl.patch")
endif (TARGET ZLIB_BLD)
if (MSVC)
set(Z_NO_AST_INTRO_PATCH_CMD "${PATCH_CMD};${PATCH_EXECUTABLE};-E;-p1;${PATCH_OPTIONS};-i;${CMAKE_CURRENT_SOURCE_DIR}/llvm_no_ast_introspection.patch")
set(PATCH_CMD "COMMAND")
endif (MSVC)

if (WIN32)

Expand All @@ -39,8 +34,8 @@ if (ENABLE_LLVM)
URL "${CMAKE_CURRENT_SOURCE_DIR}/llvm-project"
SOURCE_SUBDIR llvm
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
PATCH_COMMAND ${PATCH_EXECUTABLE} -E -p1 ${PATCH_OPTIONS} -i "${CMAKE_CURRENT_SOURCE_DIR}/llvm_no_ast_introspection.patch"
${Z_BRL_PATCH_CMD}
${Z_NO_AST_INTRO_PATCH_CMD}
CMAKE_ARGS
-C ${CMAKE_CURRENT_SOURCE_DIR}/llvm_targets.cmake
${BUILD_TYPE_SPECIFIER}
Expand Down Expand Up @@ -80,8 +75,8 @@ if (ENABLE_LLVM)
URL "${CMAKE_CURRENT_SOURCE_DIR}/llvm-project"
SOURCE_SUBDIR llvm
BUILD_ALWAYS ${EXT_BUILD_ALWAYS} ${LOG_OPTS}
PATCH_COMMAND ${PATCH_EXECUTABLE} -E -p1 ${PATCH_OPTIONS} -i "${CMAKE_CURRENT_SOURCE_DIR}/llvm_no_ast_introspection.patch"
${Z_BRL_PATCH_CMD}
${Z_NO_AST_INTRO_PATCH_CMD}
CMAKE_ARGS
-C ${CMAKE_CURRENT_SOURCE_DIR}/llvm_targets.cmake
-DCMAKE_BUILD_TYPE=Release
Expand Down
9 changes: 5 additions & 4 deletions llvm/llvm_no_ast_introspection.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
diff -Naur llvm-project/clang/lib/Tooling/CMakeLists.txt LLVM_BLD/clang/lib/Tooling/CMakeLists.txt
--- llvm-project/clang/lib/Tooling/CMakeLists.txt 2024-06-26 10:58:56.993040845 -0400
+++ LLVM_BLD/clang/lib/Tooling/CMakeLists.txt 2024-06-26 11:56:09.496630352 -0400
@@ -24,11 +24,12 @@
+++ LLVM_BLD/clang/lib/Tooling/CMakeLists.txt 2024-06-27 18:30:51.174617217 -0400
@@ -24,12 +24,13 @@
string(SUBSTRING ${CMAKE_CURRENT_BINARY_DIR} ${PATH_LIB_END} -1 PATH_TAIL)
string(CONCAT BINARY_INCLUDE_DIR ${PATH_HEAD} "/include/clang/" ${PATH_TAIL})

Expand All @@ -10,12 +9,14 @@ diff -Naur llvm-project/clang/lib/Tooling/CMakeLists.txt LLVM_BLD/clang/lib/Tool
- OR CMAKE_CROSSCOMPILING
- OR GENERATOR_IS_MULTI_CONFIG
- OR NOT LLVM_NATIVE_ARCH IN_LIST LLVM_TARGETS_TO_BUILD
- )
+#if (NOT Python3_EXECUTABLE
+# OR APPLE
+# OR CMAKE_CROSSCOMPILING
+# OR GENERATOR_IS_MULTI_CONFIG
+# OR NOT LLVM_NATIVE_ARCH IN_LIST LLVM_TARGETS_TO_BUILD
+# )
+if (1)
)
configure_file(
EmptyNodeIntrospection.inc.in
${BINARY_INCLUDE_DIR}/NodeIntrospection.inc

0 comments on commit 264722d

Please sign in to comment.