Skip to content

Commit baef18d

Browse files
committed
[ELF] Reorganize "is only supported on" tests and fix some diagnostics
1 parent 8278922 commit baef18d

File tree

4 files changed

+16
-26
lines changed

4 files changed

+16
-26
lines changed

lld/ELF/Driver.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -317,10 +317,10 @@ static void checkOptions() {
317317
error("--fix-cortex-a8 is only supported on ARM targets");
318318

319319
if (config->tocOptimize && config->emachine != EM_PPC64)
320-
error("--toc-optimize is only supported on the PowerPC64 target");
320+
error("--toc-optimize is only supported on PowerPC64 targets");
321321

322322
if (config->pcRelOptimize && config->emachine != EM_PPC64)
323-
error("--pcrel--optimize is only supported on the PowerPC64 target");
323+
error("--pcrel-optimize is only supported on PowerPC64 targets");
324324

325325
if (config->pie && config->shared)
326326
error("-shared and -pie may not be used together");

lld/test/ELF/aarch64-cortex-a53-843419-cli.s

Lines changed: 0 additions & 10 deletions
This file was deleted.

lld/test/ELF/ppc64-tocopt-option.s

Lines changed: 0 additions & 14 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# REQUIRES: x86
2+
# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t
3+
4+
# RUN: not ld.lld %t --fix-cortex-a53-843419 -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR-843419
5+
# ERR-843419: error: --fix-cortex-a53-843419 is only supported on AArch64 targets
6+
7+
# RUN: not ld.lld %t --pcrel-optimize -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR-PCREL
8+
# ERR-PCREL: error: --pcrel-optimize is only supported on PowerPC64 targets
9+
10+
# RUN: not ld.lld %t --toc-optimize -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR-TOC
11+
# ERR-TOC: error: --toc-optimize is only supported on PowerPC64 targets
12+
13+
.globl _start
14+
_start:

0 commit comments

Comments
 (0)