Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix asm compiler detection #3

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Fix asm compiler detection #3

wants to merge 3 commits into from

Conversation

AlexanderLanin
Copy link
Owner

I stumbled upon this due to a new setup.
Turns out CMake requires ASM to be the last parameter so it can try whether the C compiler can compile asm.
See https://gitlab.kitware.com/cmake/cmake/-/merge_requests/1560/diffs

How to reproduce

This might be not 100% accurate, it's from memory:

  1. Install Ubuntu 18.04
  2. sudo apt update
  3. sudo apt upgrade
  4. sudo apt install clang-10
  5. sudo ln -s /usr/local/bin/c++ /usr/bin/clang++-10
  6. sudo ln -s /usr/local/bin/cc /usr/bin/clang-10

And out of desperation:
7. sudo apt install build-essential

Actual behavior

-- The ASM compiler identification is unknown
-- Found assembler: /usr/local/bin/cc
-- The C compiler identification is Clang 10.0.0
-- The CXX compiler identification is Clang 10.0.0
-- Warning: Did not find file Compiler/-ASM
-- Check for working C compiler: /usr/local/bin/cc
-- Check for working C compiler: /usr/local/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/local/bin/c++
-- Check for working CXX compiler: /usr/local/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done

A little later blake3 fails since it doesn't expect to have to ASM compiler.
We could fix blake3 to use C code in case there is no ASM compiler.
But I guess we do want the ASM version since they specifically offer it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant