File tree Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Expand file tree Collapse file tree 2 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -124,20 +124,17 @@ if(NOT USE_PREBUILT_LLVM)
124124
125125 set (SPIRV_BASE_REVISION llvm_release_110)
126126 set (TARGET_BRANCH "ocl-open-110" )
127-
128- apply_patches(${LLVM_SOURCE_DIR}
129- ${CMAKE_CURRENT_SOURCE_DIR} /patches/llvm
127+ get_filename_component (LLVM_MONOREPO_DIR ${LLVM_SOURCE_DIR} DIRECTORY )
128+ set (LLVM_PATCHES_DIRS ${CMAKE_CURRENT_SOURCE_DIR} /patches/llvm
129+ ${CMAKE_CURRENT_SOURCE_DIR} /patches/clang)
130+ apply_patches(${LLVM_MONOREPO_DIR}
131+ "${LLVM_PATCHES_DIRS} "
130132 ${LLVM_BASE_REVISION}
131133 ${TARGET_BRANCH}
132134 ret)
133135 if (${ret} )
134136 add_definitions (-DAPPLIED_LLVM_PATCHES)
135137 endif ()
136- apply_patches(${CLANG_SOURCE_DIR}
137- ${CMAKE_CURRENT_SOURCE_DIR} /patches/clang
138- ${CLANG_BASE_REVISION}
139- ${TARGET_BRANCH}
140- ret)
141138 apply_patches(${SPIRV_SOURCE_DIR}
142139 ${CMAKE_CURRENT_SOURCE_DIR} /patches/spirv
143140 ${SPIRV_BASE_REVISION}
Original file line number Diff line number Diff line change @@ -44,8 +44,12 @@ endmacro(use_eh)
4444# Then all patches from the `patches_dir` are committed to the `target_branch`.
4545# Does nothing if the `target_branch` is already checked out in the `repo_dir`.
4646#
47- function (apply_patches repo_dir patches_dir base_revision target_branch ret)
48- file (GLOB patches ${patches_dir} /*.patch)
47+ function (apply_patches repo_dir patches_dirs base_revision target_branch ret)
48+ set (patches "" )
49+ foreach (patches_dir ${patches_dirs} )
50+ file (GLOB patches_in_dir ${patches_dir} /*.patch)
51+ list (APPEND patches ${patches_in_dir} )
52+ endforeach ()
4953 if (NOT patches)
5054 message (STATUS "No patches in ${patches_dir} " )
5155 return ()
You can’t perform that action at this time.
0 commit comments