[PATCH] D156468: [lld-macho] Fixed crashes when linking with incompatible-arch archives/

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Aug 3 08:34:17 PDT 2023


MaskRay added inline comments.


================
Comment at: lld/test/MachO/ignore-incompat-arch.s:34
+## Verify that the output doesn't take any symbol from the in-compat archive
+# RUN: cat %t/x86_a.map | FileCheck --check-prefix=SYM-X86 %s
+# RUN: cat %t/x86_b.map | FileCheck --check-prefix=SYM-X86 %s
----------------
Replace `cat` command with `--input-file=%t/x86_a.map`


================
Comment at: lld/test/MachO/ignore-incompat-arch.s:70
+_main:
+  .quad _caller
+  ret
----------------
it'd be slightly better to use a call instead of a data relocation.


================
Comment at: lld/test/MachO/ignore-incompat-arch.s:72
+  ret
+	
----------------
delete blank line


================
Comment at: lld/test/MachO/objc.s:28
+# WARNING: {{.+}}wrong-arch.o has architecture armv7 which is incompatible with target architecture x86_64
+# WARNING-EMPTY:
+
----------------
`-NOT: {{.}}` is slightly better than `-EMPTY:`. The former tests that there is no extra line while `-EMPTY:` may match an empty line.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D156468/new/

https://reviews.llvm.org/D156468



More information about the llvm-commits mailing list