您可以在发布配置与构建。
$ 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'通过优化选项 –