summaryrefslogtreecommitdiffstats
path: root/premake5.lua
diff options
context:
space:
mode:
Diffstat (limited to 'premake5.lua')
-rw-r--r--premake5.lua20
1 files changed, 17 insertions, 3 deletions
diff --git a/premake5.lua b/premake5.lua
index a1661e611..8b4348cfa 100644
--- a/premake5.lua
+++ b/premake5.lua
@@ -150,15 +150,23 @@ newoption {
value = "bool",
default = "true",
allowed = { { "true", "True"}, { "false", "False" } }
- }
+ }
- newoption {
+ newoption {
trigger = "enable-experimental-projects",
description = "(Optional) If true include experimental projects in build.",
value = "bool",
default = "false",
allowed = { { "true", "True"}, { "false", "False" } }
- }
+ }
+
+ newoption {
+ trigger = "disable-stdlib-source",
+ description = "(Optional) If true stdlib source will not be included in binary.",
+ value = "bool",
+ default = "false",
+ allowed = { { "true", "True"}, { "false", "False" } }
+ }
buildLocation = _OPTIONS["build-location"]
executeBinary = (_OPTIONS["execute-binary"] == "true")
@@ -171,6 +179,8 @@ newoption {
enableEmbedStdLib = (_OPTIONS["enable-embed-stdlib"] == "true")
enableXlib = (_OPTIONS["enable-xlib"] == "true")
enableExperimental = (_OPTIONS["enable-experimental-projects"] == "true")
+ disableStdlibSource = (_OPTIONS["disable-stdlib-source"] == "true")
+
-- Determine the target info
targetInfo = slangUtil.getTargetInfo()
@@ -1304,6 +1314,10 @@ tool "slangd"
--
defines { "SLANG_DYNAMIC_EXPORT" }
+ if disableStdlibSource then
+ defines { "SLANG_DISABLE_STDLIB_SOURCE" }
+ end
+
if enableEmbedStdLib then
-- We only have this dependency if we are embedding stdlib
dependson { "embed-stdlib-generator" }