Skip to content

Commit 122ed79

Browse files
docs: add some notes and warnings about cross-compilation (#985)
See #977. --------- Signed-off-by: Henry Schreiner <[email protected]> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent 54f9a89 commit 122ed79

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

docs/build.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ pipx run build
1616
````{tab} uv
1717
1818
```bash
19-
uvx --from build pyproject-build --installer=uv
19+
uv build
2020
```
2121
2222
````

docs/crosscompile.md

+21-1
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,25 @@
22

33
## macOS
44

5+
Unlike the other platforms, macOS has the ability to target older operating
6+
systems with the `MACOSX_DEPLOYMENT_TARGET` variable. If that is not set, you
7+
will get a wheel optimized for the current operating system. Popular
8+
redistributable builders like cibuildwheel will set this for you.
9+
10+
:::{warning}
11+
12+
While CMake also allows you to specify this a few other ways, scikit-build-core
13+
will not know you've set this and won't get the correct wheel name.
14+
15+
:::
16+
517
### Intel to AppleSilicon
618

719
On macOS, AppleClang has excellent support for making Apple Silicon and
820
Universal2 binaries (both architectures in one binary). Scikit-build-core
921
respects `ARCHFLAGS` if `CMAKE_SYSTEM_PROCESSOR` is not in the cmake args. These
10-
values are set by cibuildwheel when cross-compiling.
22+
values are set by most redistributable builders like cibuildwheel when
23+
cross-compiling.
1124

1225
:::{warning}
1326

@@ -19,6 +32,13 @@ Universal2.
1932

2033
:::
2134

35+
:::{warning}
36+
37+
If you manually set the arch flags in other ways besides `ARCHFLAGS`, or the one
38+
special case above, scikit-build-core will not get the right wheel name.
39+
40+
:::
41+
2242
## Windows
2343

2444
### Intel to ARM

0 commit comments

Comments
 (0)