[PATCH] D79980: [PS4] Enable relaxed relocations by default

Phabricator via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 21 15:13:40 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG9d23b5025d5f: [PS4] Enable relaxed relocations by default (authored by Ben Dunbobbin <Ben_Dunbobbin at sn.scee.net>).
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Changed prior to commit:
  https://reviews.llvm.org/D79980?vs=264142&id=265625#toc

Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79980

Files:
  clang/lib/Driver/ToolChains/PS4CPU.h
  clang/test/Driver/ps4-relax-relocations.c


Index: clang/test/Driver/ps4-relax-relocations.c
===================================================================
--- /dev/null
+++ clang/test/Driver/ps4-relax-relocations.c
@@ -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"
Index: clang/lib/Driver/ToolChains/PS4CPU.h
===================================================================
--- clang/lib/Driver/ToolChains/PS4CPU.h
+++ clang/lib/Driver/ToolChains/PS4CPU.h
@@ -100,6 +100,8 @@
     return llvm::DenormalMode::getPreserveSign();
   }
 
+  bool useRelaxRelocations() const override { return true; }
+
 protected:
   Tool *buildAssembler() const override;
   Tool *buildLinker() const override;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D79980.265625.patch
Type: text/x-patch
Size: 1460 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200521/6404e23b/attachment.bin>


More information about the cfe-commits mailing list