Skip to content

Commit c4e1d88

Browse files
Fix clang-cl compilation, better compilation instructions (#1232)
1 parent 1e15a3c commit c4e1d88

File tree

2 files changed

+16
-3
lines changed

2 files changed

+16
-3
lines changed

CMakeLists.txt

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@ target_sources(Luau.LanguageServer.Test PRIVATE
135135
# TODO: Set Luau.Analysis at O2 to speed up debugging
136136
if (MSVC)
137137
list(APPEND LUAU_LSP_OPTIONS /W3 /D_CRT_SECURE_NO_WARNINGS)
138-
list(APPEND LUAU_LSP_OPTIONS /MP) # Distribute compilation across multiple cores
138+
if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang")
139+
list(APPEND LUTE_OPTIONS "/EHsc") # The CMake clang-cl target doesn't enable exceptions by default
140+
else()
141+
list(APPEND LUAU_LSP_OPTIONS /MP) # Distribute compilation across multiple cores; doesn't work with clang-cl
142+
endif()
139143
else ()
140144
list(APPEND LUAU_LSP_OPTIONS -Wall)
141145
endif ()

README.md

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ An implementation of a language server for the [Luau](https://github.com/Roblox/
66

77
Install the extension from the VSCode Marketplace or OpenVSX Registry:
88

9-
- VSCode Marketplace: https://marketplace.visualstudio.com/items?itemName=JohnnyMorganz.luau-lsp
10-
- OpenVSX Registry: https://open-vsx.org/extension/JohnnyMorganz/luau-lsp
9+
- VSCode Marketplace: <https://marketplace.visualstudio.com/items?itemName=JohnnyMorganz.luau-lsp>
10+
- OpenVSX Registry: <https://open-vsx.org/extension/JohnnyMorganz/luau-lsp>
1111

1212
Alternatively, check out [Getting Started for Language Server Clients](https://github.com/JohnnyMorganz/luau-lsp/blob/main/editors/README.md)
1313
to setup your own client for a different editor.
@@ -124,7 +124,16 @@ Crash Reporting is only available for Windows and macOS, and is not active for S
124124

125125
## Build From Source
126126

127+
Submodules are required to build the project. You should use `--recurse-submodules` when you initally clone the project; e.g.
128+
129+
```sh
130+
git clone https://github.com/JohnnyMorganz/luau-lsp.git --recurse-submodules
131+
```
132+
133+
To compile the project, execute the following commands in the project root directory.
134+
127135
```sh
136+
git submodule update --init --recursive
128137
mkdir build && cd build
129138
cmake .. -DCMAKE_BUILD_TYPE=Release
130139
cmake --build . --target Luau.LanguageServer.CLI --config Release

0 commit comments

Comments
 (0)