[PATCH] D88737: [AIX] Turn -fdata-sections on by default in Clang

Jason Liu via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Oct 7 07:08:17 PDT 2020


jasonliu marked an inline comment as done.
jasonliu added inline comments.


================
Comment at: clang/test/Driver/aix-data-sections.c:7
+// RUN:   | FileCheck %s
+// CHECK: "-fdata-sections"
----------------
DiggerLin wrote:
> may be good to check the whether other OS platform behavior be changed or not? 
I think there are existing lit tests checked other platform's behavior.

linux platform behavior is tested in clang/test/Driver/function-sections.c
cloudABI platform behavior is tested in clang/test/Driver/cloudabi.c
msvc behavior is tested in clang/test/Driver/cl-options.c


================
Comment at: lld/Common/TargetOptionsCommandFlags.cpp:17
+llvm::TargetOptions
+lld::initTargetOptionsFromCodeGenFlags(const llvm::Triple &TheTriple) {
+  return llvm::codegen::InitTargetOptionsFromCodeGenFlags(TheTriple);
----------------
MaskRay wrote:
> Currently lld does not need Triple. Consider not changing the signature of `initTargetOptionsFromCodeGenFlags`.
This function acts like a forwarder for llvm::codegen::InitTargetOptionsFromCodeGenFlags.
I think it still makes sense to change the signature in this case to minimize the different variation of the function, as those variations cause confusion to people. 
I will change the name to match the LLVM style.


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

https://reviews.llvm.org/D88737



More information about the cfe-commits mailing list