Skip to content

Commit 6aa6d8b

Browse files
committed
Document environment variables that can be used to modify swift-syntax’s build or test execution
rdar://112473317 Fixes #1922
1 parent 500c09b commit 6aa6d8b

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Environment variables
2+
3+
The following environment variables can be used to control some behavior in swift-syntax.
4+
5+
## Build time
6+
7+
- `SWIFT_BUILD_SCRIPT_ENVIRONMENT`: Enable assertions in release builds and remove the dependency of swift-syntax on os_log.
8+
- `SWIFTCI_USE_LOCAL_DEPS`: Assume that all of SourceKit-LSP’s dependencies are checked out next to it and use those instead of cloning the repositories. Primarily intended for CI environments that check out related branches.
9+
- `SWIFTPARSER_ENABLE_ALTERNATE_TOKEN_INTROSPECTION`: Mutate the input of `assertParse` test cases. See [CONTRIBUTING](../CONTRIBUTING.md) for more information.
10+
- `SWIFTSYNTAX_BUILD_DYNAMIC_LIBRARIES`: Build all libraries as *dynamic* instead of *automatic*. This allows us to build swift-syntax as dynamic libraries, which in turn allows us to build SourceKit-LSP using SwiftPM on Windows. Linking swift-syntax statically into sourcekit-lsp exceeds the maximum number of exported symbols on Windows.
11+
- `SWIFTSYNTAX_ENABLE_RAWSYNTAX_VALIDATION`: Check that the layout of the syntax tree is correct when creating or modifying nodes. See [CONTRIBUTING](../CONTRIBUTING.md) for more information.
12+
13+
## Testing
14+
15+
- `SKIP_LONG_TESTS`: Skip tests that typically take more than 1s to execute.

0 commit comments

Comments
 (0)