[flang-commits] [flang] [flang] Fix flang tests on MacOS (PR #70811)

Leandro Lupori via flang-commits flang-commits at lists.llvm.org
Mon Nov 6 14:01:22 PST 2023


================
@@ -7,7 +7,8 @@
 ! As `flang` does not implement `-fc1as` (i.e. a driver for the integrated
 ! assembler), we need to use `-fno-integrated-as` here.
 
-! UNSUPPORTED: system-windows
+! This test fails on MacOS with the error "can't specifiy -Q with -arch arm64"
+! UNSUPPORTED: system-windows, system-darwin
----------------
luporl wrote:

```
/Users/leandro.lupori/git/flang-luporl/buildr/bin/flang-new -v -c -fno-integrated-as -save-temps=cwd -o out.o /Users/leandro.lupori/git/flang-luporl/llvm-project/flang/test/Driver/save-mlir-temps.f90
flang-new version 18.0.0 (git at github.com:luporl/llvm-project.git fb787a1a1347a62babaec4f949d50daf749ad78a)
Target: arm64-apple-darwin23.0.0
Thread model: posix
InstalledDir: /Users/leandro.lupori/git/flang-luporl/buildr/bin
 "/Users/leandro.lupori/git/flang-luporl/buildr/bin/flang-new" -fc1 -triple arm64-apple-macosx14.0.0 -E -fcolor-diagnostics -mrelocation-model pic -pic-level 2 -target-cpu apple-m1 -target-feature +v8.5a -target-feature +aes -target-feature +crc -target-feature +dotprod -target-feature +fp-armv8 -target-feature +fp16fml -target-feature +lse -target-feature +ras -target-feature +rcpc -target-feature +rdm -target-feature +sha2 -target-feature +sha3 -target-feature +neon -target-feature +zcm -target-feature +zcz -target-feature +fullfp16 -o save-mlir-temps.i -save-temps=cwd -x f95-cpp-input /Users/leandro.lupori/git/flang-luporl/llvm-project/flang/test/Driver/save-mlir-temps.f90
 "/Users/leandro.lupori/git/flang-luporl/buildr/bin/flang-new" -fc1 -triple arm64-apple-macosx14.0.0 -emit-llvm-bc -fcolor-diagnostics -mrelocation-model pic -pic-level 2 -target-cpu apple-m1 -target-feature +v8.5a -target-feature +aes -target-feature +crc -target-feature +dotprod -target-feature +fp-armv8 -target-feature +fp16fml -target-feature +lse -target-feature +ras -target-feature +rcpc -target-feature +rdm -target-feature +sha2 -target-feature +sha3 -target-feature +neon -target-feature +zcm -target-feature +zcz -target-feature +fullfp16 -o save-mlir-temps.bc -save-temps=cwd -x f95 save-mlir-temps.i
 "/Users/leandro.lupori/git/flang-luporl/buildr/bin/flang-new" -fc1 -triple arm64-apple-macosx14.0.0 -S -fcolor-diagnostics -mrelocation-model pic -pic-level 2 -target-cpu apple-m1 -target-feature +v8.5a -target-feature +aes -target-feature +crc -target-feature +dotprod -target-feature +fp-armv8 -target-feature +fp16fml -target-feature +lse -target-feature +ras -target-feature +rcpc -target-feature +rdm -target-feature +sha2 -target-feature +sha3 -target-feature +neon -target-feature +zcm -target-feature +zcz -target-feature +fullfp16 -o save-mlir-temps.s -save-temps=cwd -x ir save-mlir-temps.bc
 "/usr/bin/as" -Q -arch arm64 -o out.o save-mlir-temps.s
/Library/Developer/CommandLineTools/usr/bin/as: can't specifiy -Q with -arch arm64
flang-new: error: assembler command failed with exit code 1 (use -v to see invocation)
```

`as`'s man page says `-Q` is deprecated:
```
       -Q     Use the GNU based system assembler. Note that Apple's built-in system assemblers are deprecated; programs that rely
              on these asssemblers should move to the clang(1) integrated assembler instead, using the -q flag.
```

I guess there is just no "GNU based system assembler" for `arm64`.

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


More information about the flang-commits mailing list