[PATCH] D144353: [lld][RISCV] Avoid error when encountering unrecognised ISA extensions/versions in RISC-V attributes

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 22 16:38:36 PST 2023


MaskRay added a comment.

LG and I support back porting this to the release/16.x branch.

I think the new API needs a unittest under `llvm/unittests/Support/`, which the original patch adding `parseArchString` omitted.



================
Comment at: lld/test/ELF/riscv-attributes.s:18
 # RUN: llvm-mc -filetype=obj -triple=riscv64 unrecognized_ext1.s -o unrecognized_ext1.o
-# RUN: not ld.lld unrecognized_ext1.o -o /dev/null 2>&1 | FileCheck %s --check-prefix=UNRECOGNIZED_EXT1 --implicit-check-not=error:
-# UNRECOGNIZED_EXT1: error: unrecognized_ext1.o:(.riscv.attributes): rv64i2p0_y2p0: invalid standard user-level extension 'y'
+# RUN: ld.lld -e 0 unrecognized_ext1.o -o unrecognized_ext1
+# RUN: llvm-readobj --arch-specific unrecognized_ext1 | FileCheck %s --check-prefix=UNRECOGNIZED_EXT1
----------------
ditto below


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D144353



More information about the llvm-commits mailing list