Brad King
5f882f6ce5
macOS: Offer control over host architecture on Apple Silicon hosts
...
Since commit b6c60f14b6 (macOS: Default to arm64 architecture on Apple
Silicon hosts, 2020-09-28, v3.19.0-rc1~63^2) we use `sysctl` to detect
that we are running on Apple Silicon in a way that pierces Rosetta.
This always sets `CMAKE_HOST_SYSTEM_PROCESSOR` to be `arm64` on such
hosts. However, macOS offers strong support for running processes under
an emulated `x86_64` architecture.
Teach CMake to select either `arm64` or `x86_64` as the host
architecture on Apple Silicon based on the architecture of its own
process. When CMake is built as a universal binary, macOS will select
whichever slice (architecture) is appropriate under the user's shell,
and `CMAKE_HOST_SYSTEM_PROCESSOR` will match.
Also offer a `CMAKE_APPLE_SILICON_PROCESSOR` variable and environment
variable to provide users with explicit control over the host
architecture selection regardless of CMake's own architecture.
Finally, if `CMAKE_OSX_ARCHITECTURES` is not set, pass explicit flags to
the toolchain to use selected host architecture instead of letting the
toolchain pick.
Fixes : #21554
2020-12-10 12:08:13 -05:00
..
2020-12-10 06:57:04 -05:00
2020-11-12 11:26:19 -05:00
2020-10-08 11:59:05 -04:00
2020-09-30 08:05:50 -04:00
2020-12-08 10:18:28 -05:00
2020-11-30 12:37:14 -05:00
2020-12-10 12:08:13 -05:00
2020-08-04 16:19:10 +02:00
2020-07-06 10:23:20 -04:00
2020-09-23 12:52:25 +02:00
2020-09-23 12:52:25 +02:00
2020-09-23 12:52:25 +02:00
2020-09-23 12:52:25 +02:00
2020-07-28 10:35:51 -04:00
2020-10-26 10:57:55 -04:00
2020-10-26 10:57:55 -04:00
2020-10-26 10:57:55 -04:00
2020-10-28 15:06:02 -04:00
2020-10-26 10:57:55 -04:00
2020-10-26 10:57:55 -04:00
2020-10-28 15:06:02 -04:00
2020-10-26 10:57:55 -04:00
2020-10-26 10:57:55 -04:00
2020-10-26 10:57:55 -04:00
2020-07-06 10:23:20 -04:00
2020-07-14 15:22:54 -04:00
2020-10-24 22:58:42 +11:00
2020-10-26 10:57:55 -04:00
2020-10-26 10:57:55 -04:00
2020-10-28 15:06:02 -04:00
2020-10-26 10:57:55 -04:00
2020-10-26 10:57:55 -04:00
2020-10-28 15:06:02 -04:00
2020-11-25 11:06:15 -05:00
2020-10-26 10:57:55 -04:00
2020-10-26 10:57:55 -04:00
2020-07-20 15:47:18 -04:00
2020-07-30 13:46:18 -04:00
2020-12-01 12:20:47 -05:00
2020-12-07 10:46:27 -05:00
2020-09-24 15:19:54 -04:00
2020-09-24 15:19:54 -04:00
2020-12-01 12:20:47 -05:00
2020-08-18 13:33:06 -04:00
2020-07-23 14:52:48 -04:00
2020-11-13 09:41:25 -05:00
2020-08-06 11:00:12 -04:00
2020-10-04 09:09:21 +03:00
2020-12-03 14:37:21 -05:00
2020-11-22 11:30:01 +02:00
2020-11-13 09:41:25 -05:00
2020-07-23 14:52:48 -04:00
2020-08-28 11:21:31 -04:00
2020-07-23 14:52:48 -04:00
2020-11-13 09:41:25 -05:00
2020-11-13 09:41:25 -05:00
2020-07-23 14:52:48 -04:00
2020-07-23 14:52:48 -04:00
2020-12-10 12:08:13 -05:00
2020-09-25 12:23:02 -04:00
2020-12-01 12:20:47 -05:00
2020-09-25 13:11:14 -04:00
2020-08-08 15:22:12 +02:00
2020-08-28 11:21:31 -04:00
2020-08-28 11:21:31 -04:00
2020-08-28 11:21:31 -04:00
2020-09-10 16:15:55 -04:00
2020-09-29 12:35:49 -04:00
2020-09-29 12:35:49 -04:00
2020-10-24 22:58:42 +11:00
2020-07-22 12:44:47 -04:00
2020-07-14 02:23:56 +02:00
2020-07-22 12:44:47 -04:00
2020-07-22 12:44:47 -04:00
2020-08-28 11:21:31 -04:00
2020-07-22 12:44:47 -04:00
2020-07-22 12:44:47 -04:00
2020-11-03 20:11:38 +11:00
2020-11-13 09:45:32 -05:00
2020-07-06 10:23:20 -04:00
2020-07-06 10:23:20 -04:00
2020-11-05 10:04:44 -05:00
2020-07-06 10:23:20 -04:00
2020-11-17 21:06:30 +01:00
2020-09-07 14:27:01 +02:00
2020-08-18 09:16:18 -04:00
2020-09-18 13:46:45 -04:00
2020-10-03 18:46:08 +10:00
2020-07-02 00:36:14 +05:30
2020-09-14 21:40:33 +02:00
2020-10-30 09:42:43 -04:00
2020-07-02 00:37:34 +05:30
2020-11-02 09:39:36 -05:00
2020-11-02 09:39:36 -05:00
2020-07-29 08:05:47 -04:00
2020-09-16 13:48:04 -04:00
2020-07-06 10:23:20 -04:00
2020-07-02 00:38:40 +05:30
2020-07-06 10:23:20 -04:00
2020-07-02 00:43:40 +05:30
2020-09-21 10:55:56 -04:00
2020-07-06 10:23:20 -04:00
2020-11-20 09:31:54 -05:00
2020-12-01 15:31:47 -05:00
2020-07-06 10:23:20 -04:00
2020-07-07 09:22:28 -04:00
2020-07-06 10:23:20 -04:00
2020-07-07 09:22:28 -04:00
2020-07-08 16:17:40 -04:00
2020-10-07 10:12:49 -04:00
2020-07-02 00:40:09 +05:30
2020-09-14 21:40:33 +02:00
2020-07-06 10:23:20 -04:00
2020-07-02 00:40:36 +05:30
2020-09-16 21:41:45 +02:00
2020-07-06 10:23:20 -04:00
2020-07-01 10:55:32 -04:00
2020-09-18 08:41:08 -04:00
2020-08-20 07:55:23 -04:00
2020-07-06 10:23:20 -04:00
2020-07-06 10:23:20 -04:00
2020-07-06 10:23:20 -04:00
2020-08-10 11:25:10 -04:00
2020-07-09 06:17:44 -04:00
2020-08-13 17:59:13 +02:00
2020-11-25 16:36:12 +01:00
2020-07-06 10:23:20 -04:00
2020-08-07 09:41:38 -04:00
2020-08-06 12:35:56 -04:00
2020-09-25 15:56:05 +02:00
2020-07-02 00:44:08 +05:30
2020-11-05 07:59:45 -05:00
2020-09-22 08:49:22 -04:00
2020-10-12 15:45:55 +02:00
2020-10-12 15:45:55 +02:00
2020-10-12 15:45:55 +02:00
2020-11-09 11:44:13 -05:00
2020-11-09 11:44:13 -05:00
2020-08-07 09:41:38 -04:00
2020-08-10 11:25:10 -04:00
2020-11-11 08:30:42 -05:00
2020-07-06 10:23:20 -04:00
2020-10-02 16:17:36 +02:00
2020-08-07 09:41:38 -04:00
2020-08-10 11:25:10 -04:00
2020-09-18 23:24:56 +03:00
2020-06-29 11:55:22 -04:00
2020-07-06 10:23:20 -04:00
2020-10-07 10:11:18 -04:00
2020-07-22 12:44:47 -04:00
2020-08-17 14:54:22 -04:00
2020-07-27 10:43:55 -04:00
2020-07-06 10:23:20 -04:00
2020-07-06 10:23:20 -04:00
2020-07-22 12:44:47 -04:00
2020-10-08 11:10:41 -04:00
2020-07-28 23:49:20 +02:00
2020-08-03 12:10:58 -04:00
2020-07-09 06:29:40 -04:00
2020-09-30 19:19:14 +02:00
2020-07-06 10:23:20 -04:00