-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not apply patches if repo is a not a git repo. #539
Conversation
Co-authored-by: Wenju He <wenju.he@intel.com>
Co-authored-by: Wenju He <wenju.he@intel.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@haonanya I tested the patch and at first glance it looked like working just fine. But when further replaying with it thru a new PR aiming for LLVM 14.x it occured that it still fails such as:
Although after cleaning-up the build directory and re-executing it would succeed such as:
Further investigating showed that it had changed my branch I was working on under the
Explaining the following messages at the second pass:
|
Hi, @th0ma7, opencl-clang is always creating ocl-open-140 branch based on release/14.x branch when build opencl-clang, if you changes source of that branch and the changes are related to patches/clang dir, it's possible that git apply would fail. If you have ocl-open-140 branch already, git apply will not perform and just switch to ocl-open-140 branch when build opencl-clang. |
Well that is where the build issue is as the assumption is wrong. Make is being called from an upper level from within a totally unrelated git repository where ocl assumes wrongly that it can change branch. My use case could be seen as ocl being a nested git within the spksrc repository. Further, to build ocl I'm directly downloading the source tar ball of the ocl-140 branch, rather than git cloning. Therefore the ocl source has no git artifact at all just like any other source package I'm building. Thus when the build process is being called it should have a way to detect this and skip the patching process. Spksrc (git) -> work directory (git ignored) -> ocl (plain source tree) Thus when the build is being called from make at spkrc level, the branch switching made at ocl cmake level is affecting the wrong repository and is unnecessary. |
@th0ma7 , I see, I will take a look. |
) follow up #539. Also add an option to control patch apply which is default on. Pass -DAPPLY_PATCHES=OFF will skip patch apply process.
…it repo. (#541) [Backport] Do not apply patches if repo is a not a git repo. #539 [Backport] Do not apply patches if sub non-git repo is located in a git repo. #545 Also add an option to control patch apply which is default on. Pass -DAPPLY_PATCHES=OFF will skip patch apply process. Update LLVM_BASE_REVISION.
…it repo. (#542) [Backport] Do not apply patches if repo is a not a git repo. #539 [Backport] Do not apply patches if sub non-git repo is located in a git repo. #545 Also add an option to control patch apply which is default on. Pass -DAPPLY_PATCHES=OFF will skip patch apply process. Update LLVM_BASE_REVISION.
…it repo. (#543) [Backport] Do not apply patches if repo is a not a git repo. #539 [Backport] Do not apply patches if sub non-git repo is located in a git repo. #545 Also add an option to control patch apply which is default on. Pass -DAPPLY_PATCHES=OFF will skip patch apply process. Update LLVM_BASE_REVISION.
No description provided.