Skip to content

Commit

Permalink
Update build steps for MacOS
Browse files Browse the repository at this point in the history
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, shader-slang#4812
  • Loading branch information
jkwak-work committed Aug 9, 2024
1 parent 9b580e5 commit df2d9be
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions CONTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).

Expand Down

0 comments on commit df2d9be

Please sign in to comment.