如何使用雨燕的软件包管理器`迅速build`命令
问题描述:
我想汇编写在新雨燕软件包管理器格式转换成高度优化的二进制代码,我迅速的代码来构建斯威夫特包的优化版本。这可能是目前使用swiftc -O somefile.swift
但由于迅速的软件包将使用swift build
命令建成,我无法通过-O
选择,因为它不接受它。那么是否有一种方法可以在编译过程中指定优化代码? swift build --configuration release
:如何使用雨燕的软件包管理器`迅速build`命令
答
您可以在发布配置与构建。
$ swift build --help
OVERVIEW: Build sources into binary products
USAGE: swift build [mode] [options]
MODES:
-c, --configuration <value> Build with configuration (debug|release) [default: debug]
--clean [<mode>] Delete artifacts (build|dist) [default: build]
OPTIONS:
-C, --chdir <path> Change working directory before any other operation
--build-path <path> Specify build/cache directory [default: ./.build]
--color <mode> Specify color mode (auto|always|never) [default: auto]
-v, --verbose Increase verbosity of informational output
-Xcc <flag> Pass flag through to all C compiler invocations
-Xlinker <flag> Pass flag through to all linker invocations
-Xswiftc <flag> Pass flag through to all Swift compiler invocations
NOTE: Use `swift package` to perform other functions on packages
其中列出了此选项:
您还可以通过看到该工具的使用。
见包管理器reference以获取更多信息。
感谢您的信息。之所以能够通过运行以下命令'迅速构建-Xswiftc -O'通过优化选项 –