swift build --configuration release
을 사용하여 릴리즈 구성으로 빌드 할 수 있습니다. 이 옵션을 나열
$ 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을 참조하십시오.
정보 주셔서 감사합니다. 다음 명령을 실행하여 최적화 옵션을 전달할 수 있었습니까? 'swift build -Xswiftc -O' –