[PATCH] D137044: [ClangFE] Add support for option -mno-pic-data-is-text-relative

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 7 13:00:32 PST 2022


MaskRay added a comment.

Making `-mpic-data-is-text-relative` unrecognized by non-SystemZ targets LG.



================
Comment at: clang/test/Driver/pic.c:321
+
+// RUN: %clang -c -target s390x-linux-gnu -mno-pic-data-is-text-relative %s \
+// RUN:   -### 2>&1 | FileCheck %s --check-prefix=CHECK-NO-PIC-DATA-TEXT-REL
----------------
Use `--target=` for new tests. `-target ` is legacy.


================
Comment at: llvm/test/CodeGen/SystemZ/pic-data-is-text-rel.ll:1
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc -mtriple=s390x-linux-gnu < %s | FileCheck %s
----------------
You can use a trick like `llvm/Instrumentation/InstrProfiling/comdat.ll` to combine two files into one.


================
Comment at: llvm/test/CodeGen/SystemZ/pic-data-is-text-rel.ll:32
+!2 = !{i32 7, !"PIE Level", i32 2}
+
----------------
delete trailing blank line


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

https://reviews.llvm.org/D137044



More information about the llvm-commits mailing list