Skip to content

Commit

Permalink
[ELF] Reorganize "is only supported on" tests and fix some diagnostics
Browse files Browse the repository at this point in the history
  • Loading branch information
MaskRay committed Dec 9, 2020
1 parent 8278922 commit baef18d
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 26 deletions.
4 changes: 2 additions & 2 deletions lld/ELF/Driver.cpp
Expand Up @@ -317,10 +317,10 @@ static void checkOptions() {
error("--fix-cortex-a8 is only supported on ARM targets");

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

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

if (config->pie && config->shared)
error("-shared and -pie may not be used together");
Expand Down
10 changes: 0 additions & 10 deletions lld/test/ELF/aarch64-cortex-a53-843419-cli.s

This file was deleted.

14 changes: 0 additions & 14 deletions lld/test/ELF/ppc64-tocopt-option.s

This file was deleted.

14 changes: 14 additions & 0 deletions lld/test/ELF/target-specific-options.s
@@ -0,0 +1,14 @@
# REQUIRES: x86
# RUN: llvm-mc -filetype=obj -triple=x86_64 %s -o %t

# RUN: not ld.lld %t --fix-cortex-a53-843419 -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR-843419
# ERR-843419: error: --fix-cortex-a53-843419 is only supported on AArch64 targets

# RUN: not ld.lld %t --pcrel-optimize -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR-PCREL
# ERR-PCREL: error: --pcrel-optimize is only supported on PowerPC64 targets

# RUN: not ld.lld %t --toc-optimize -o /dev/null 2>&1 | FileCheck %s --check-prefix=ERR-TOC
# ERR-TOC: error: --toc-optimize is only supported on PowerPC64 targets

.globl _start
_start:

0 comments on commit baef18d

Please sign in to comment.