summaryrefslogtreecommitdiffstats
path: root/CONTRIBUTION.md
diff options
context:
space:
mode:
authorJay Kwak <82421531+jkwak-work@users.noreply.github.com>2024-08-13 08:09:11 -0700
committerGitHub <noreply@github.com>2024-08-13 08:09:11 -0700
commitbbef25cbc668d42203eee493aa5737490124dfd2 (patch)
treee33536f687436c84fc8625f053b2cdf70351fd62 /CONTRIBUTION.md
parent127f0c5848f405f9d4f4b1f7f27006c26db748ed (diff)
Update build steps for MacOS (#4813)
This commit adds a quick build step for MacOS on CONTRIBUTION.md. It is unclear what are the conditions that slang-llvm needs to be rebuilt locally. An issue is filed for it, #4812
Diffstat (limited to 'CONTRIBUTION.md')
-rw-r--r--CONTRIBUTION.md36
1 files changed, 36 insertions, 0 deletions
diff --git a/CONTRIBUTION.md b/CONTRIBUTION.md
index b043d9607..0b68e0ca0 100644
--- a/CONTRIBUTION.md
+++ b/CONTRIBUTION.md
@@ -105,6 +105,42 @@ Build with a following command:
$ cmake --build --preset release
```
+#### MacOS
+Install XCode from AppStore.
+
+Install CMake and Ninja; we recommend using [homebrew](https://brew.sh/) for installing them.
+```
+brew install ninja
+brew install cmake
+```
+
+Run CMake with a following command to generate Makefile:
+```
+$ cmake --preset default
+```
+
+Build with a following command:
+```
+$ cmake --build --preset release
+```
+
+#### MacOS with slang-llvm local build
+slang-llvm is required to run slang-test properly.
+Depending on your hardware, your slang-llvm may need to be locally rebuilt with the following command.
+```
+external/build-llvm.sh --source-dir=build/slang-llvm_src --install-prefix=build/slang-llvm_install
+```
+
+You need to use the following command to re-generate Makefile,
+```
+$ cmake --preset default --fresh -DSLANG_SLANG_LLVM_FLAVOR=USE_SYSTEM_LLVM -DLLVM_DIR=build/slang-llvm_install/lib/cmake/llvm -DClang_DIR=build/slang-llvm_install/lib/cmake/clang
+```
+
+Build with a following command:
+```
+$ cmake --build --preset release
+```
+
### Making Changes
Make your changes and ensure to follow our [Design Decisions](docs/design/README.md).