[PATCH] D149444: [ARM] Allow codegen for Armv6m eXecute-Only (XO) sections

Fangrui Song via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jun 12 13:55:02 PDT 2023


MaskRay accepted this revision.
MaskRay added a comment.

> Actual implementation of code-gen for v6m will follow in follow-up patches, which will include an implementation of relocations needed to support this.

Normally we implement the feature in llvm/ first, and the `clang/lib/Driver` change should be the last patch.
Some users just check whether `clang --target=xxx` accepts a given option, not test that the feature actually works (it's sometimes non-trivial to figure out all corners as they are not compiler feature implementers.)



================
Comment at: clang/test/Driver/arm-execute-only.c:1
-// RUN: not %clang -c -target thumbv6m-eabi -mexecute-only %s 2>&1 | \
+// RUN: %clang -c -### --target=thumbv6m-eabi -mexecute-only %s 2>&1 | \
+// RUN:   FileCheck -allow-empty --check-prefix CHECK-EXECUTE-ONLY %s
----------------
If you don't check -cc1 options with FileCheck, you can also replace `-###` with `-fdriver-only -Werror` and drop two `-NOT:` patterns below. You can play with some examples to see its effect:)

If the `clang -c -fdriver-only -Werror` command gives no output, you can use `... 2>&1 | count 0`


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D149444



More information about the cfe-commits mailing list