summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKanashimia <chad@redpilled.dev>2024-11-23 00:48:36 +0200
committerGitHub <noreply@github.com>2024-11-22 14:48:36 -0800
commit8e28e51f826931857828dc43d138c5169fcc40e4 (patch)
tree88e9c03890baba6e3e577f30f9aa4cabcc2fcaf2
parentd7c735fadfd497942dc0ce6f0819019568b6e563 (diff)
Enable core module embedding by default in CMake. (#5644)
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.
-rw-r--r--.github/workflows/release-linux-glibc-2-17.yml2
-rw-r--r--.github/workflows/release.yml1
-rw-r--r--CMakeLists.txt1
-rw-r--r--CMakePresets.json1
-rw-r--r--docs/building.md2
5 files changed, 3 insertions, 4 deletions
diff --git a/.github/workflows/release-linux-glibc-2-17.yml b/.github/workflows/release-linux-glibc-2-17.yml
index 8d72d1dd2..6b11f1d9f 100644
--- a/.github/workflows/release-linux-glibc-2-17.yml
+++ b/.github/workflows/release-linux-glibc-2-17.yml
@@ -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
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
index 8339bfc79..8bc5c497d 100644
--- a/.github/workflows/release.yml
+++ b/.github/workflows/release.yml
@@ -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")"
diff --git a/CMakeLists.txt b/CMakeLists.txt
index ede2cb417..dc281211e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -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!)")
diff --git a/CMakePresets.json b/CMakePresets.json
index 34a1c15df..b09d1fff1 100644
--- a/CMakePresets.json
+++ b/CMakePresets.json
@@ -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"
diff --git a/docs/building.md b/docs/building.md
index d74a65ac8..0f76bb780 100644
--- a/docs/building.md
+++ b/docs/building.md
@@ -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!) |