콘텐츠로 이동

Swift 개발 환경 설정

Swift 컴파일러 기여를 위한 환경 구성과 편집-빌드-테스트-디버그 루프 안내.

요구 사항

  • macOS 또는 Ubuntu Linux, 디스크 150GB+, RAM 8GB+
  • Python 3, Git 2.x

핵심 워크플로우

  1. git cloneutils/update-checkout --clone
  2. utils/build-script -r --debug-swift-frontend로 빌드
  3. Ninja 직접 사용(ninja bin/swift-frontend)으로 증분 빌드
  4. utils/build-script --test 또는 lit.py로 테스트
  5. LLDB로 컴파일러 디버깅

빌드 가속

  • sccache로 빌드 캐싱
  • --bootstrapping=hosttools로 빌드 시간 단축

관련 페이지: overview, compiler-driver, testing-guide