Skip to content
Commit 0b66b341 authored by Qiongsi Wu's avatar Qiongsi Wu
Browse files

[clang][AIX] Fix Overly Strict LTO Option Checking against `data-sections`...

[clang][AIX] Fix Overly Strict LTO Option Checking against `data-sections` when `mxcoff-roptr` is in Effect

The LTO `-mxcoff-roptr` [[ https://github.com/llvm/llvm-project/blob/c6b2d25927817bdeca99653ee3e66720f33ce3ae/clang/lib/Driver/ToolChains/CommonArgs.cpp#L750 | check ]] against data sections is overly strict and it ignores the fact that [[ https://github.com/llvm/llvm-project/blob/c6b2d25927817bdeca99653ee3e66720f33ce3ae/llvm/lib/LTO/LTOCodeGenerator.cpp#L427 | data sections is on by default on AIX ]], causing valid LTO compilation to fail when `-fdata-sections` is not explicitly specified.

This patch revises the check so that an error is reported only if data sections is explicitly turned off for LTO.

Reviewed By: hubert.reinterpretcast

Differential Revision: https://reviews.llvm.org/D152021
parent e7c48ffd
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment