Skip to content

Commit

Permalink
Enable core module embedding by default in CMake. (#5644)
Browse files Browse the repository at this point in the history
It seems that release workflows were unexpectedly broken when STDLIB
was renamed to CORE_MODULE.
Changed the option default because I think it just makes more sense.
Removed explicit calls to enable it. Fixed docs.
  • Loading branch information
kanashimia authored Nov 22, 2024
1 parent d7c735f commit 8e28e51
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release-linux-glibc-2-17.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
cd /home/app
git config --global --add safe.directory /home/app
cmake --preset default --fresh -DSLANG_SLANG_LLVM_FLAVOR=DISABLE -DSLANG_EMBED_STDLIB=1
cmake --preset default --fresh -DSLANG_SLANG_LLVM_FLAVOR=DISABLE
cmake --build --preset releaseWithDebugInfo
cpack --preset releaseWithDebugInfo -G ZIP
cpack --preset releaseWithDebugInfo -G TGZ
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,6 @@ jobs:
cmake --preset default --fresh \
-DSLANG_GENERATORS_PATH=build-platform-generators/bin \
-DSLANG_ENABLE_EXAMPLES=OFF \
-DSLANG_EMBED_STDLIB=ON \
"-DSLANG_SLANG_LLVM_FLAVOR=$(
[[ "${{matrix.build-slang-llvm}}" = "true" ]] && echo "USE_SYSTEM_LLVM" || echo "DISABLE")"
Expand Down
1 change: 1 addition & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ option(
option(
SLANG_EMBED_CORE_MODULE
"Build slang with an embedded version of the core module"
ON
)

option(SLANG_ENABLE_FULL_IR_VALIDATION "Enable full IR validation (SLOW!)")
Expand Down
1 change: 0 additions & 1 deletion CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
"binaryDir": "${sourceDir}/build.em",
"cacheVariables": {
"SLANG_SLANG_LLVM_FLAVOR": "DISABLE",
"SLANG_EMBED_CORE_MODULE": "ON",
"CMAKE_C_FLAGS_INIT": "-fwasm-exceptions -Os",
"CMAKE_CXX_FLAGS_INIT": "-fwasm-exceptions -Os",
"CMAKE_EXE_LINKER_FLAGS": "-sASSERTIONS -sALLOW_MEMORY_GROWTH -fwasm-exceptions --export=__cpp_exception"
Expand Down
2 changes: 1 addition & 1 deletion docs/building.md
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ See the [documentation on testing](../tools/slang-test/README.md) for more infor
| Option | Default | Description |
|-----------------------------------|----------------------------|----------------------------------------------------------------------------------------------|
| `SLANG_VERSION` | Latest `v*` tag | The project version, detected using git if available |
| `SLANG_EMBED_CORE_MODULE` | `FALSE` | Build slang with an embedded version of the core module |
| `SLANG_EMBED_CORE_MODULE` | `TRUE` | Build slang with an embedded version of the core module |
| `SLANG_EMBED_CORE_MODULE_SOURCE` | `TRUE` | Embed the core module source in the binary |
| `SLANG_ENABLE_ASAN` | `FALSE` | Enable ASAN (address sanitizer) |
| `SLANG_ENABLE_FULL_IR_VALIDATION` | `FALSE` | Enable full IR validation (SLOW!) |
Expand Down

0 comments on commit 8e28e51

Please sign in to comment.