-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[lld-macho] Fix category merging sed issue - Try nr.2 #112981
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
Conversation
@llvm/pr-subscribers-lld-macho @llvm/pr-subscribers-lld Author: None (alx32) ChangesWe replace sed with awk as I couldn't find a syntax that works consistently on Linux/Mac for sed. Full diff: https://github.com/llvm/llvm-project/pull/112981.diff 1 Files Affected:
diff --git a/lld/test/MachO/objc-category-merging-minimal.s b/lld/test/MachO/objc-category-merging-minimal.s
index 437294791bf33b..88c175333f2629 100644
--- a/lld/test/MachO/objc-category-merging-minimal.s
+++ b/lld/test/MachO/objc-category-merging-minimal.s
@@ -30,7 +30,7 @@
############ Test merging skipped due to invalid category name ############
# Modify __OBJC_$_CATEGORY_MyBaseClass_$_Category01's name to point to L_OBJC_IMAGE_INFO+3
-# RUN: sed -E '/^__OBJC_\$_CATEGORY_MyBaseClass_\$_Category01:/ { n; s/^[ \t]*\.quad[ \t]+l_OBJC_CLASS_NAME_$/\t.quad\tL_OBJC_IMAGE_INFO+3/}' merge_cat_minimal.s > merge_cat_minimal_bad_name.s
+# RUN: awk '/^__OBJC_\$_CATEGORY_MyBaseClass_\$_Category01:/ { print; getline; sub(/^[ \t]*\.quad[ \t]+l_OBJC_CLASS_NAME_$/, "\t.quad\tL_OBJC_IMAGE_INFO+3"); print; next } { print }' merge_cat_minimal.s > merge_cat_minimal_bad_name.s
# Assemble the modified source
# RUN: llvm-mc -filetype=obj -triple=arm64-apple-macos -o merge_cat_minimal_bad_name.o merge_cat_minimal_bad_name.s
|
For Example:
https://stackoverflow.com/questions/52374114/using-sed-s-act |
I'm not sure if this will fix the issue, though :( |
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.
Accepting to unblock, but if we can get sed
to work I'd prefer that because I think it's simpler.
Tried these, but still no go:
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/123/builds/7804 Here is the relevant piece of the build log for the reference
|
|
Is there a way to exclude those specific Windows bots ? I remember the Windows PR build bot succeeded for this. |
Could you share a link to a failing bot ? |
… on Windows With llvm#112981, the test uses awk, which gnuwin32 doesn't seem to have.
https://ci.chromium.org/ui/p/chromium/builders/try/win_upload_clang/5846/overview is the failing bot #113209 to disable the test on Windows. The problem is that LLVM sorta supports building with gnuwin32 tools, although people have moved in the direction of git for windows tools over time. gnuwin32 is very old, but we have sent out patches before to disable tests on Windows due to lack of gnuwin32 support. I will try to upgrade our bots not use gnuwin32, but I'd like to keep things green for now if that's ok |
Thanks for the fix! |
We replace sed with awk as I couldn't find a syntax that works consistently on Linux/Mac for sed.
Repro'ed original issue on Mac and confirmed working now on Mac/Linux.