[flang-commits] [clang] [flang] [llvm] Re-land: "[AArch64] Add ability to list extensions enabled for a target" (#95805) (PR #96795)

Lucas Duarte Prates via flang-commits flang-commits at lists.llvm.org
Thu Jun 27 01:55:39 PDT 2024


================
@@ -21,7 +21,7 @@
 
 // RUN: %clang --target=aarch64 -march=armv8a+fp16fml -### -c %s 2>&1 | FileCheck -check-prefix=GENERICV8A-FP16FML %s
----------------
pratlucas wrote:

The check for target validity doesn't run when using `-###` in the command line. E.g.:
```
$ ../build/bin/clang -target foo -c test.c -###
clang version 19.0.0git
Target: foo
Thread model: posix
InstalledDir: /Users/lucpra01/Workspace/opensource/build/bin
Build config: +tsan
 (in-process)
 "/Users/lucpra01/Workspace/opensource/build/bin/clang-19" "-cc1" "-triple" "foo" "-emit-obj" "-disable-free" "-clear-ast-before-backend" "-disable-llvm-verifier" "-discard-value-names" "-main-file-name" "test.c" "-mrelocation-model" "static" "-mframe-pointer=all" "-fmath-errno" "-ffp-contract=on" "-fno-rounding-math" "-mconstructor-aliases" "-debugger-tuning=gdb" "-fdebug-compilation-dir=/Users/lucpra01/Workspace/opensource/test" "-target-linker-version" "1053.12" "-fcoverage-compilation-dir=/Users/lucpra01/Workspace/opensource/test" "-resource-dir" "/Users/lucpra01/Workspace/opensource/build/lib/clang/19" "-ferror-limit" "19" "-fgnuc-version=4.2.1" "-fskip-odr-check-in-gmf" "-fcolor-diagnostics" "-faddrsig" "-o" "test.o" "-x" "c" "test.c"
$ echo $?
0
```

As adding the `// REQUIRES:` directive would reduced our current test coverage, I chose to add an `%if aarch64-registered-target` condition only to the relevant `// RUN:` lines instead.

https://github.com/llvm/llvm-project/pull/96795


More information about the flang-commits mailing list