HomePhabricator

[clang] Disallow fbasic-block-sections on non-ELF, non-x86 targets.

Authored by snehasish on Sep 9 2020, 5:57 PM.

Description

[clang] Disallow fbasic-block-sections on non-ELF, non-x86 targets.

Basic block sections is untested on other platforms and binary formats apart
from x86,elf. This patch emits a warning and drops the flag if the platform
and binary format are not compatible. Add a test to ensure that
specifying an incompatible target in the driver does not enable the
feature.

Differential Revision: https://reviews.llvm.org/D87426

Details