[llvm] [SystemZ][z/OS] Add z/OS archive writing support (PR #200087)
James Henderson via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 25 00:50:12 PDT 2026
================
@@ -35,20 +37,31 @@
# LONG-LIST: very_long_member_name.txt
# LONG-CONTENT: xyz
+## Use LLVM bitcode here so the test remains target-independent. The archive
+## writer only needs a symbolic input in order to emit the archive symbol table.
## A z/OS archive with real symbols should write a readable symbol table.
-# RUN: printf 'define i32 @mytest() {\nentry:\n ret i32 87\n}\n' > %t.dir/mytest.ll
# RUN: llvm-as %t.dir/mytest.ll -o %t.dir/mytest.bc
# RUN: llvm-ar rcD --format=zos %t.sym.a %t.dir/mytest.bc
# RUN: llvm-nm --print-armap %t.sym.a | FileCheck %s --check-prefix=SYMTAB
# SYMTAB: Archive map
# SYMTAB-NEXT: mytest in mytest.bc
+# SYMTAB-NOT: {{^ in mytest.bc$}}
## A z/OS archive with no real symbols should still write the dummy blank symbol.
-# RUN: printf 'source_filename = "blank.ll"\n' > %t.dir/blank.ll
# RUN: llvm-as %t.dir/blank.ll -o %t.dir/blank.bc
# RUN: llvm-ar rcD --format=zos %t.blank-sym.a %t.dir/blank.bc
# RUN: llvm-nm --print-armap %t.blank-sym.a | FileCheck %s --check-prefix=EMPTY-SYMTAB
# EMPTY-SYMTAB: Archive map
# EMPTY-SYMTAB-NEXT: {{^ in blank.bc$}}
+# EMPTY-SYMTAB-NOT: {{^.+ in blank.bc$}}
----------------
jh7370 wrote:
Similar comment to above: just checking "in blank.bc" should probably be enough, without the extra regex bits.
https://github.com/llvm/llvm-project/pull/200087
More information about the llvm-commits
mailing list