From f85bcc21ddadd07f38e1db7aa286ff985bd0eb10 Mon Sep 17 00:00:00 2001 From: jasonliu Date: Wed, 14 Oct 2020 15:55:55 +0000 Subject: [AIX] Turn -fdata-sections on by default in Clang Summary: This patch does the following: 1. Make InitTargetOptionsFromCodeGenFlags() accepts Triple as a parameter, because some options' default value is triple dependant. 2. DataSections is turned on by default on AIX for llc. 3. Test cases change accordingly because of the default behaviour change. 4. Clang Driver passes in -fdata-sections by default on AIX. Reviewed By: MaskRay, DiggerLin Differential Revision: https://reviews.llvm.org/D88737 --- llvm/tools/gold/gold-plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'llvm/tools/gold') diff --git a/llvm/tools/gold/gold-plugin.cpp b/llvm/tools/gold/gold-plugin.cpp index 0124e0a..ebd08c4 100644 --- a/llvm/tools/gold/gold-plugin.cpp +++ b/llvm/tools/gold/gold-plugin.cpp @@ -852,7 +852,7 @@ static std::unique_ptr createLTO(IndexWriteCallback OnIndexWrite, ThinBackend Backend; Conf.CPU = options::mcpu; - Conf.Options = codegen::InitTargetOptionsFromCodeGenFlags(); + Conf.Options = codegen::InitTargetOptionsFromCodeGenFlags(Triple()); // Disable the new X86 relax relocations since gold might not support them. // FIXME: Check the gold version or add a new option to enable them. -- cgit v1.1