scd build
Compiles an SPM project for the specified target platform. Accepts SPM Build Options for controlling the build configuration, compiler flags, and linked libraries. The output is placed in the Product subdirectory of the project by default.
Synopsis
Section titled “Synopsis”scd build [options]Options
Section titled “Options”| Option | Description |
|---|---|
-p, --path | Path to the SPM project. Defaults to current directory |
-c, --configuration | Build configuration: Debug (default) or Release |
--platform | Target platform. See Platforms |
--build-dir | Path to build directory. Defaults to .build |
-o, --output | Path to output directory. Defaults to Product subdirectory |
--os-version | Minimum OS version or Android API level |
--static-swift-stdlib | Link with static Swift standard library |
--debug-info-format | Debug info format: dwarf (default), codeview, or none |
--sdk | Path to target SDK sysroot |
--pkg-config-path | Additional pkg-config search paths |
--verbose | Enable verbose output |
All commands also accept Global Options.
Examples
Section titled “Examples”# Build for macOS (default)scd build
# Build for Android ARM64scd build --platform android-arm64-v8a