How to judge whether the current computer uses the M1 chip in the terminal?
And then I plan to execute different compilation scripts for different chips
How to judge whether the current computer uses the M1 chip in the terminal?
And then I plan to execute different compilation scripts for different chips
You can get the CPU information in terminal with
sysctl -n machdep.cpu.brand_string
Edit: The output is Apple processor or Apple M1 / Apple M1 Pro on an Apple Silicon machine.