[PATCH] D63105: Add --print-supported-cpus flag for clang.

Douglas Yung via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jun 14 15:34:01 PDT 2019


dyung added a comment.

Hi Ziang,

Your test fails if the the compiler does not include the x86_64 and ARM backends. For example, the PS4 target compiler only includes the x86_64 backend, so it fails when trying to use ARM like you are attempting to do.

http://lab.llvm.org:8011/builders/llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast/builds/22/steps/test/logs/stdio

  FAIL: Clang :: Driver/print-supported-cpus.c (8911 of 50224)
  ******************** TEST 'Clang :: Driver/print-supported-cpus.c' FAILED ********************
  Script:
  --
  : 'RUN: at line 3';   c:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.obj\bin\clang.exe --target=x86_64-unknown-linux-gnu    --print-supported-cpus 2>&1    | c:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.obj\bin\filecheck.exe C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\Driver\print-supported-cpus.c --check-prefix=CHECK-X86
  : 'RUN: at line 10';   c:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.obj\bin\clang.exe --target=arm-unknown-linux-android    --print-supported-cpus 2>&1    | c:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.obj\bin\filecheck.exe C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\Driver\print-supported-cpus.c --check-prefix=CHECK-ARM
  --
  Exit Code: 1
  
  Command Output (stdout):
  --
  $ ":" "RUN: at line 3"
  $ "c:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.obj\bin\clang.exe" "--target=x86_64-unknown-linux-gnu" "--print-supported-cpus"
  $ "c:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.obj\bin\filecheck.exe" "C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\Driver\print-supported-cpus.c" "--check-prefix=CHECK-X86"
  $ ":" "RUN: at line 10"
  $ "c:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.obj\bin\clang.exe" "--target=arm-unknown-linux-android" "--print-supported-cpus"
  note: command had no output on stdout or stderr
  error: command failed with exit status: 1
  $ "c:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.obj\bin\filecheck.exe" "C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\Driver\print-supported-cpus.c" "--check-prefix=CHECK-ARM"
  # command stderr:
  C:\ps4-buildslave2\llvm-clang-lld-x86_64-scei-ps4-windows10pro-fast\llvm.src\tools\clang\test\Driver\print-supported-cpus.c:14:15: error: CHECK-ARM: expected string not found in input
  
  // CHECK-ARM: cortex-a73
  
                ^
  
  <stdin>:3:1: note: scanning from here
  
  Thread model: posix
  
  ^
  
  <stdin>:5:64: note: possible intended match here
  
  No available targets are compatible with triple "armv4t-unknown-linux-android"
  
                                                                 ^
  
  
  error: command failed with exit status: 1

Can you fix the test so that it does not depend on the backend being present if possible, or find another way to test the feature?


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

https://reviews.llvm.org/D63105





More information about the llvm-commits mailing list