[PS4] Enable relaxed relocations by default

PS4 supports these relocations types; so, we want to enable them by default.

Differential Revision: https://reviews.llvm.org/D79980
This commit is contained in:
Ben Dunbobbin 2020-05-20 11:36:10 +01:00
parent 3198406367
commit 9d23b5025d
2 changed files with 20 additions and 0 deletions

View File

@ -100,6 +100,8 @@ public:
return llvm::DenormalMode::getPreserveSign();
}
bool useRelaxRelocations() const override { return true; }
protected:
Tool *buildAssembler() const override;
Tool *buildLinker() const override;

View File

@ -0,0 +1,18 @@
// REQUIRES: x86-registered-target
// RUN: %clang -### -target x86_64-scei-ps4 %s -o - 2>&1 | \
// RUN: FileCheck %s
// RUN: %clang -### -target x86_64-scei-ps4 -Wa,-mrelax-relocations=yes %s -o - 2>&1 | \
// RUN: FileCheck %s
// RUN: %clang -### -target x86_64-scei-ps4 -Wa,-mrelax-relocations=no %s -o - 2>&1 | \
// RUN: FileCheck -check-prefix=UNSET %s
// RUN: %clang -### -x assembler -target x86_64-scei-ps4 %s -o - 2>&1 | \
// RUN: FileCheck %s
// RUN: %clang -### -x assembler -target x86_64-scei-ps4 -Wa,-mrelax-relocations=yes %s -o - 2>&1 | \
// RUN: FileCheck %s
// RUN: %clang -### -x assembler -target x86_64-scei-ps4 -Wa,-mrelax-relocations=no %s -o - 2>&1 | \
// RUN: FileCheck -check-prefix=UNSET %s
// CHECK: "--mrelax-relocations"
// UNSET-NOT: "--mrelax-relocations"