summaryrefslogtreecommitdiffstats
path: root/source/slang-stdlib
diff options
context:
space:
mode:
Diffstat (limited to 'source/slang-stdlib')
-rw-r--r--source/slang-stdlib/CMakeLists.txt90
-rw-r--r--source/slang-stdlib/slang-embedded-core-module-source.cpp (renamed from source/slang-stdlib/slang-embedded-stdlib-source.cpp)10
-rw-r--r--source/slang-stdlib/slang-embedded-core-module.cpp (renamed from source/slang-stdlib/slang-embedded-stdlib.cpp)4
3 files changed, 52 insertions, 52 deletions
diff --git a/source/slang-stdlib/CMakeLists.txt b/source/slang-stdlib/CMakeLists.txt
index e7fed354a..fd9394e4a 100644
--- a/source/slang-stdlib/CMakeLists.txt
+++ b/source/slang-stdlib/CMakeLists.txt
@@ -1,7 +1,7 @@
#
-# In this file, for stdlib source embed and stdlib embed itself, we define two
+# In this file, for core module source embed and core module embed itself, we define two
# targets, one which includes the embed and one which does not, these are
-# linked in as needed to libslang and libslang-without-embedded-stdlib (for
+# linked in as needed to libslang and libslang-without-embedded-core-module (for
# slang-bootstrap)
#
# If MSVC supported weak linking we could just have a single library for each
@@ -9,23 +9,23 @@
#
#
-# Generate an embeddable stdlib
+# Generate an embeddable core module
#
-set(stdlib_generated_header_dir ${CMAKE_CURRENT_BINARY_DIR})
-set(stdlib_generated_header
- ${stdlib_generated_header_dir}/slang-stdlib-generated.h
+set(core_module_generated_header_dir ${CMAKE_CURRENT_BINARY_DIR})
+set(core_module_generated_header
+ ${core_module_generated_header_dir}/slang-core-module-generated.h
)
add_custom_command(
- OUTPUT ${stdlib_generated_header}
+ OUTPUT ${core_module_generated_header}
COMMAND
slang-bootstrap -archive-type riff-lz4 -save-core-module-bin-source
- ${stdlib_generated_header}
+ ${core_module_generated_header}
DEPENDS slang-bootstrap
VERBATIM
)
-set(stdlib_common_args
+set(core_module_common_args
.
OBJECT
EXCLUDE_FROM_ALL
@@ -34,20 +34,20 @@ set(stdlib_common_args
FOLDER generated
LINK_WITH_PRIVATE core
USE_EXTRA_WARNINGS
- EXPLICIT_SOURCE ./slang-embedded-stdlib.cpp
+ EXPLICIT_SOURCE ./slang-embedded-core-module.cpp
)
slang_add_target(
- ${stdlib_common_args}
- TARGET_NAME slang-embedded-stdlib
- EXPLICIT_SOURCE ${stdlib_generated_header}
- EXTRA_COMPILE_DEFINITIONS_PRIVATE SLANG_EMBED_STDLIB
- INCLUDE_DIRECTORIES_PRIVATE ${stdlib_generated_header_dir}
+ ${core_module_common_args}
+ TARGET_NAME slang-embedded-core-module
+ EXPLICIT_SOURCE ${core_module_generated_header}
+ EXTRA_COMPILE_DEFINITIONS_PRIVATE SLANG_EMBED_CORE_MODULE
+ INCLUDE_DIRECTORIES_PRIVATE ${core_module_generated_header_dir}
)
slang_add_target(
- ${stdlib_common_args}
- TARGET_NAME slang-no-embedded-stdlib
+ ${core_module_common_args}
+ TARGET_NAME slang-no-embedded-core-module
)
#
@@ -55,46 +55,46 @@ slang_add_target(
#
# List of *.meta.slang headers
-set(stdlib_meta_source_dir "${slang_SOURCE_DIR}/source/slang")
-glob_append(stdlib_meta_source "${stdlib_meta_source_dir}/*.meta.slang")
+set(core_module_meta_source_dir "${slang_SOURCE_DIR}/source/slang")
+glob_append(core_module_meta_source "${core_module_meta_source_dir}/*.meta.slang")
-set(stdlib_meta_output_dir "${CMAKE_CURRENT_BINARY_DIR}/stdlib-meta")
+set(core_module_meta_output_dir "${CMAKE_CURRENT_BINARY_DIR}/core-module-meta")
# Generate the output file list
-set(stdlib_meta_generated_headers)
-foreach(meta_source ${stdlib_meta_source})
+set(core_module_meta_generated_headers)
+foreach(meta_source ${core_module_meta_source})
file(
RELATIVE_PATH
meta_source_relative
- "${stdlib_meta_source_dir}"
+ "${core_module_meta_source_dir}"
${meta_source}
)
list(
APPEND
- stdlib_meta_generated_headers
- "${stdlib_meta_output_dir}/${meta_source_relative}.h"
+ core_module_meta_generated_headers
+ "${core_module_meta_output_dir}/${meta_source_relative}.h"
)
endforeach()
add_custom_command(
- OUTPUT ${stdlib_meta_generated_headers}
- COMMAND ${CMAKE_COMMAND} -E make_directory ${stdlib_meta_output_dir}
+ OUTPUT ${core_module_meta_generated_headers}
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${core_module_meta_output_dir}
COMMAND
- slang-generate ${stdlib_meta_source} --target-directory
- ${stdlib_meta_output_dir}
- DEPENDS ${stdlib_meta_source} slang-generate
- WORKING_DIRECTORY "${stdlib_meta_source_dir}"
+ slang-generate ${core_module_meta_source} --target-directory
+ ${core_module_meta_output_dir}
+ DEPENDS ${core_module_meta_source} slang-generate
+ WORKING_DIRECTORY "${core_module_meta_source_dir}"
VERBATIM
)
-add_custom_target(generate-stdlib-headers DEPENDS ${stdlib_meta_generated_headers})
-set_target_properties(generate-stdlib-headers PROPERTIES FOLDER generated)
+add_custom_target(generate-core-module-headers DEPENDS ${core_module_meta_generated_headers})
+set_target_properties(generate-core-module-headers PROPERTIES FOLDER generated)
#
-# Generate embedded stdlib source
+# Generate embedded core module source
#
-set(stdlib_source_common_args
+set(core_module_source_common_args
.
OBJECT
EXCLUDE_FROM_ALL
@@ -107,23 +107,23 @@ set(stdlib_source_common_args
INCLUDE_DIRECTORIES_PRIVATE ../slang
FOLDER generated
EXPLICIT_SOURCE
- ./slang-embedded-stdlib-source.cpp
- ${stdlib_meta_generated_headers}
- REQUIRES generate-stdlib-headers
- EXTRA_COMPILE_DEFINITIONS_PRIVATE SLANG_EMBED_STDLIB_SOURCE
+ ./slang-embedded-core-module-source.cpp
+ ${core_module_meta_generated_headers}
+ REQUIRES generate-core-module-headers
+ EXTRA_COMPILE_DEFINITIONS_PRIVATE SLANG_EMBED_CORE_MODULE_SOURCE
INCLUDE_DIRECTORIES_PRIVATE
- ${stdlib_meta_output_dir}
+ ${core_module_meta_output_dir}
EXPORT_MACRO_PREFIX SLANG
EXPORT_TYPE_AS ${SLANG_LIB_TYPE}
)
slang_add_target(
- ${stdlib_source_common_args}
- TARGET_NAME slang-embedded-stdlib-source
- EXTRA_COMPILE_DEFINITIONS_PRIVATE SLANG_EMBED_STDLIB_SOURCE
+ ${core_module_source_common_args}
+ TARGET_NAME slang-embedded-core-module-source
+ EXTRA_COMPILE_DEFINITIONS_PRIVATE SLANG_EMBED_CORE_MODULE_SOURCE
)
slang_add_target(
- ${stdlib_source_common_args}
- TARGET_NAME slang-no-embedded-stdlib-source
+ ${core_module_source_common_args}
+ TARGET_NAME slang-no-embedded-core-module-source
)
diff --git a/source/slang-stdlib/slang-embedded-stdlib-source.cpp b/source/slang-stdlib/slang-embedded-core-module-source.cpp
index d77126c94..f8ea00045 100644
--- a/source/slang-stdlib/slang-embedded-stdlib-source.cpp
+++ b/source/slang-stdlib/slang-embedded-core-module-source.cpp
@@ -1,7 +1,7 @@
#include "slang-compiler.h"
#include "slang-ir.h"
#include "slang-ir-util.h"
-#include "slang-stdlib-textures.h"
+#include "slang-core-module-textures.h"
#define STRINGIZE(x) STRINGIZE2(x)
#define STRINGIZE2(x) #x
@@ -9,7 +9,7 @@
namespace Slang
{
- // We are going to generate the stdlib source code from a more compact
+ // We are going to generate the core module source code from a more compact
// description. For example, we need to generate all the `operator`
// declarations for the basic unary and binary math operations on
// builtin types. To do this, we will make a big array of all these
@@ -284,7 +284,7 @@ namespace Slang
ComPtr<ISlangBlob> Session::getCoreLibraryCode()
{
-#if SLANG_EMBED_STDLIB_SOURCE
+#if SLANG_EMBED_CORE_MODULE_SOURCE
if (!coreLibraryCode)
{
StringBuilder sb;
@@ -298,7 +298,7 @@ namespace Slang
ComPtr<ISlangBlob> Session::getHLSLLibraryCode()
{
-#if SLANG_EMBED_STDLIB_SOURCE
+#if SLANG_EMBED_CORE_MODULE_SOURCE
if (!hlslLibraryCode)
{
const String path = getStdlibPath();
@@ -312,7 +312,7 @@ namespace Slang
ComPtr<ISlangBlob> Session::getAutodiffLibraryCode()
{
-#if SLANG_EMBED_STDLIB_SOURCE
+#if SLANG_EMBED_CORE_MODULE_SOURCE
if (!autodiffLibraryCode)
{
const String path = getStdlibPath();
diff --git a/source/slang-stdlib/slang-embedded-stdlib.cpp b/source/slang-stdlib/slang-embedded-core-module.cpp
index 83e4a8c70..ceebcb940 100644
--- a/source/slang-stdlib/slang-embedded-stdlib.cpp
+++ b/source/slang-stdlib/slang-embedded-core-module.cpp
@@ -2,11 +2,11 @@
#include "../core/slang-array-view.h"
#include "../core/slang-blob.h"
-#ifdef SLANG_EMBED_STDLIB
+#ifdef SLANG_EMBED_CORE_MODULE
static const uint8_t g_coreModule[] =
{
-# include "slang-stdlib-generated.h"
+# include "slang-core-module-generated.h"
};
static Slang::StaticBlob g_coreModuleBlob((const void*)g_coreModule, sizeof(g_coreModule));