Skip to content

CMake fails at detecting ASM COMPILER with latest ARMClang #3931

@antoine-morvan

Description

@antoine-morvan

Hello,

I was trying to build openblas 0.3.21 using the latest Arm Compiler for Linux 22.1 (former armclang). Its --version ouput changed, and the CMake fails at detecting the ASM compiler properly:

Checking whether the ASM compiler is ARMClang using "--version" did not match "armclang":
Arm C/C++/Fortran Compiler version 22.1 (build number 12) (based on LLVM 13.0.1)

Note: Although the ASM compiler remains unidentified, the C compiler is properly detected:

-- The C compiler identification is Clang 13.0.1
-- The ASM compiler identification is unknown

PS: I dont want to debate on wether ARMClang should be detected as ARMClang or Clang here :)

The CMake command then fails with:

CMake Error: CMAKE_ASM_COMPILER not set, after EnableLanguage
CMake Error at cmake/prebuild.cmake:1325 (try_compile):
  Failed to configure test project build system.
Call Stack (most recent call first):
  cmake/system.cmake:163 (include)
  CMakeLists.txt:93 (include)


-- Configuring incomplete, errors occurred!

Forcing the ASM COMPILER & COMPILER_ID can be used as workaround:

        -DCMAKE_ASM_COMPILER="$CC" \
        -DCMAKE_ASM_COMPILER_ID="Clang" \

Best.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions