DynamoRIO / DynamoRIO/dynamorio
CMake hangs on M1 waiting for "as -Wl,--help"
- Dominant language
- C
- Stars
- 3.2k
- Forks
- 629
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 30
Description
Running CMake to configure DR on my M1 now hangs:
```
$ rm -rf *; cmake -GNinja -DDEBUG=ON ../src
-- The C compiler identification is AppleClang 14.0.0.14000029
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- The CXX compiler identification is AppleClang 14.0.0.14000029
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Building for AArch64
-- Version number: 10.0.19622
-- Performing Test proc_found_sve
-- Performing Test proc_found_sve - Failed
-- WARNING: Compiler or processor do not support SVE. Skipping tests
-- The ASM compiler identification is AppleClang
-- Found assembler: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/as
```
It looks like it's hanging running a command to figure out flags the
assembler supports:
```
33973 s011 S 0:00.00 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/as -Wl,--help
33974 s011 S 0:00.01 /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x assembler - -Wl,--help -o a.out -integrated-as -c
```
Indeed, that hang:
```
$ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/as -Wl,--help
clang: warning: -Wl,--help: 'linker' input unused [-Wunused-command-line-argument]
```
I don't know what changed to cause this: a new xcode toolchain maybe?
Contributor guide
Research direction
The report names no source file or test. Start by reproducing the M1 CMake/Ninja configuration with DEBUG enabled and inspect the AppleClang assembler invocation using `as -Wl,--help`; done means configuration completes without hanging and assembler feature detection still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- c, cmake, macos
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100