[PATCH] D76461: [llvm-ar] Use target triple to deduce archive kind for bitcode inputs

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 20 10:50:19 PDT 2020


MaskRay added inline comments.


================
Comment at: llvm/test/tools/llvm-ar/lto-kind-from-triple.test:1
+Ensure that we generate a GNU style archive if the first input is a bitcode
+file with a GNU target triple (absence of __.SYMDEF in the archive).
----------------
Newly added tests (e.g. symtab.test) start to use `## ` for comments and `# ` for RUN/CHECK lines even if llvm-ar does not read anything from the text file.


================
Comment at: llvm/test/tools/llvm-ar/lto-kind-from-triple.test:2
+Ensure that we generate a GNU style archive if the first input is a bitcode
+file with a GNU target triple (absence of __.SYMDEF in the archive).
+
----------------
Darwin archive format is the only different platform now. We can special case it and treat everything else GNU.


================
Comment at: llvm/test/tools/llvm-ar/lto-kind-from-triple.test:4
+
+RUN: echo -e "target triple = \"x86_64-unknown-linux-gnu\" \n define void @_Z3foov() { ret void }" > %t.gnu.ll
+RUN: llvm-as -o %t.o %t.gnu.ll
----------------
Use `echo -e '...'` to avoid quoting `"`


================
Comment at: llvm/test/tools/llvm-ar/lto-kind-from-triple.test:21
+
+Ensure that we generate a BSD style archive if the first input is a bitcode
+file with a BSD target triple (presence of __.SYMDEF in the archive).
----------------
Can be deleted because 4.4BSD archive format is out of fashion nowadays.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76461





More information about the llvm-commits mailing list