mirror of
https://github.com/kunkundi/crossdesk.git
synced 2026-08-02 23:41:52 +08:00
docs: use GCC 10 toolchain for Linux builds
This commit is contained in:
@@ -127,17 +127,21 @@ git submodule update --init --recursive
|
|||||||
# 已安装发行版 PipeWire 0.3 开发包时可跳过此步骤。
|
# 已安装发行版 PipeWire 0.3 开发包时可跳过此步骤。
|
||||||
sudo ./docker/linux-build/install-pipewire-sdk.sh
|
sudo ./docker/linux-build/install-pipewire-sdk.sh
|
||||||
|
|
||||||
xmake f -m release --USE_CUDA=false --cc=gcc-10 --cxx=g++-10 -y
|
xmake f -c -m release --USE_CUDA=false --toolchain=gcc-10 -y
|
||||||
xmake b -vy crossdesk
|
xmake b -vy crossdesk
|
||||||
```
|
```
|
||||||
|
|
||||||
|
这里应使用 `--toolchain=gcc-10`,以确保 CrossDesk 及 xmake 在配置阶段构建的
|
||||||
|
libyuv 等第三方包都使用 GCC 10。只指定 `--cc`/`--cxx` 时,依赖安装可能仍回退到
|
||||||
|
系统默认的 `/bin/cc` 和 `/bin/c++`。`-c` 会清除旧配置,切换编译器时必须保留。
|
||||||
|
|
||||||
amd64 构建结果位于 `build/linux/x86_64/release/crossdesk`,arm64 构建结果位于 `build/linux/arm64/release/crossdesk`。
|
amd64 构建结果位于 `build/linux/x86_64/release/crossdesk`,arm64 构建结果位于 `build/linux/arm64/release/crossdesk`。
|
||||||
|
|
||||||
启用 Wayland 和 DRM 的配置示例:
|
启用 Wayland 和 DRM 的配置示例:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
xmake f -m release --USE_WAYLAND=true --USE_DRM=true --USE_CUDA=false \
|
xmake f -c -m release --USE_WAYLAND=true --USE_DRM=true --USE_CUDA=false \
|
||||||
--cc=gcc-10 --cxx=g++-10 -y
|
--toolchain=gcc-10 -y
|
||||||
xmake b -vy crossdesk
|
xmake b -vy crossdesk
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
+9
-3
@@ -136,17 +136,23 @@ git submodule update --init --recursive
|
|||||||
# PipeWire 0.3 development packages are already installed.
|
# PipeWire 0.3 development packages are already installed.
|
||||||
sudo ./docker/linux-build/install-pipewire-sdk.sh
|
sudo ./docker/linux-build/install-pipewire-sdk.sh
|
||||||
|
|
||||||
xmake f -m release --USE_CUDA=false --cc=gcc-10 --cxx=g++-10 -y
|
xmake f -c -m release --USE_CUDA=false --toolchain=gcc-10 -y
|
||||||
xmake b -vy crossdesk
|
xmake b -vy crossdesk
|
||||||
```
|
```
|
||||||
|
|
||||||
|
Use `--toolchain=gcc-10` so that both CrossDesk and third-party packages such
|
||||||
|
as libyuv, which xmake builds during configuration, use GCC 10. Specifying only
|
||||||
|
`--cc`/`--cxx` may still let dependency builds fall back to the system
|
||||||
|
`/bin/cc` and `/bin/c++`. Keep `-c` when switching compilers to clear the old
|
||||||
|
configuration.
|
||||||
|
|
||||||
The amd64 binary is written to `build/linux/x86_64/release/crossdesk`; the arm64 binary is written to `build/linux/arm64/release/crossdesk`.
|
The amd64 binary is written to `build/linux/x86_64/release/crossdesk`; the arm64 binary is written to `build/linux/arm64/release/crossdesk`.
|
||||||
|
|
||||||
Example configuration with Wayland and DRM capture enabled:
|
Example configuration with Wayland and DRM capture enabled:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
xmake f -m release --USE_WAYLAND=true --USE_DRM=true --USE_CUDA=false \
|
xmake f -c -m release --USE_WAYLAND=true --USE_DRM=true --USE_CUDA=false \
|
||||||
--cc=gcc-10 --cxx=g++-10 -y
|
--toolchain=gcc-10 -y
|
||||||
xmake b -vy crossdesk
|
xmake b -vy crossdesk
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user