[PATCH] D87426: Disallow fbasic-block-sections on non-ELF, non-x86 targets.

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 9 19:38:50 PDT 2020


MaskRay added inline comments.


================
Comment at: clang/lib/Driver/ToolChains/Clang.cpp:4892
+    } else {
+      D.Diag(diag::warn_drv_unsupported_opt_for_target)
+          << A->getAsString(Args) << TripleStr;
----------------
This should be an error


================
Comment at: clang/test/Driver/fbasic-block-sections.c:5
+// RUN: %clang -### -target x86_64-linux-gnu -fbasic-block-sections=labels %s -S 2>&1 | FileCheck -check-prefix=CHECK-OPT-LABELS %s
+// RUN: %clang -### -target arm-unknown-linux -fbasic-block-sections=all %s -S 2>&1 | FileCheck -check-prefix=CHECK-TRIPLE %s
+// RUN: %clang -### -target x86_64-apple-darwin10 -fbasic-block-sections=all %s -S 2>&1 | FileCheck -check-prefix=CHECK-TRIPLE %s
----------------
`%clang -###` -> `not %clang -fsyntax-only`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D87426



More information about the cfe-commits mailing list