summaryrefslogtreecommitdiffstats
path: root/source/core/slang-cpp-compiler.h
diff options
context:
space:
mode:
authorjsmall-nvidia <jsmall@nvidia.com>2019-06-14 18:05:12 -0400
committerTim Foley <tfoleyNV@users.noreply.github.com>2019-06-14 15:05:12 -0700
commit1fe24d3a74a9cd51c4a025cd0e78642f3e29df79 (patch)
treea52d2b1e05f0d22accbb70eb4bea69d7c67455a4 /source/core/slang-cpp-compiler.h
parent8c56d83506ef92b15b15bdb5969008dd69c8d2a6 (diff)
Runtime Shared Library compilation and testing (#985)
* Removed the need for VisualStudio specific CPPCompiler Improved the version parsing for gcc/clang Removed need for slang-unix-cpp-compiler-util.cpp/.h Remove binary before compiling in the compile c tests * Moved VisualStudio calcArgs into CPPCompilerUtil - as code is not windows specific. * Set up compile time version for gcc and clang * Fix compilation on OSX - use remove instead of unlink for file deletion. * On OSX - clang uses different string format. * Removed /bin/sh invoking as not required for OSX. * First pass working testing with shared libraries.
Diffstat (limited to 'source/core/slang-cpp-compiler.h')
-rw-r--r--source/core/slang-cpp-compiler.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/source/core/slang-cpp-compiler.h b/source/core/slang-cpp-compiler.h
index 82930afd6..83c18bca2 100644
--- a/source/core/slang-cpp-compiler.h
+++ b/source/core/slang-cpp-compiler.h
@@ -23,6 +23,11 @@ public:
GHS,
CountOf,
};
+ enum class SourceType
+ {
+ C, ///< C source
+ CPP, ///< C++ source
+ };
struct Desc
{
@@ -70,9 +75,21 @@ public:
struct CompileOptions
{
+ typedef uint32_t Flags;
+ struct Flag
+ {
+ enum Enum : Flags
+ {
+ EnableExceptionHandling = 0x01,
+ };
+ };
+
OptimizationLevel optimizationLevel = OptimizationLevel::Debug;
DebugInfoType debugInfoType = DebugInfoType::Normal;
TargetType targetType = TargetType::Executable;
+ SourceType sourceType = SourceType::CPP;
+
+ Flags flags = Flag::EnableExceptionHandling;
String modulePath; ///< The path/name of the output module. Should not have the extension, as that will be added for each of the target types
@@ -162,6 +179,7 @@ struct CPPCompilerUtil
typedef CPPCompiler::OptimizationLevel OptimizationLevel;
typedef CPPCompiler::TargetType TargetType;
typedef CPPCompiler::DebugInfoType DebugInfoType;
+ typedef CPPCompiler::SourceType SourceType;
enum class MatchType
{