# Handy Commands for apple swift repo swift buildcmds

Build
Build with Test : utils/build-script --release-debuginfo --test --skip-early-swift-driver
Build without test: utils/build-script --release-debuginfo --skip-early-swift-driver
Note these builds produce a debug build which can take a lot of space

Setting sccache is skipped because snap is not available in Linux Maybe try later with alternatives like ccache

Incremental Build:  ninja -C ../build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/
To use built swift binary:

export bswift=/mnt/d/SwiftOpen/build/Ninja-RelWithDebInfoAssert/swift-linux-x86_64/bin/swift (Add to .bashrc if you want it permanently)
Invoke this with ${bswift}

But there is a better way via sym links, eh too lazy
Useful Links
+ Compile Instructions : https://github.com/apple/swift/blob/main/docs/HowToGuides/GettingStarted.md#how-to-set-up-an-edit-build-test-debug-loop
Debugging tricks
// 1. Install LLVM debugger similiar to gdb 
// 2. Debug Statements print it to llvm error stream -> 
llvm::errs()<<"Error message";

# Handy Commands for plasma py repo PlsamPy buildcmds

Setup and debug
python3 -m pip install -e .[all] #Install changes-to be done from root dir
pytest # To run all test
pytest -k <Name> #Run a specific test
Contribution tips!
1. Add Changelog entry per PR
2. Make sure a test is return for a feature