From fa31d21ba92669a521a7768467246918e3947e02 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 1 Apr 2021 13:39:11 -0400 Subject: Added compiler-core project (#1775) * #include an absolute path didn't work - because paths were taken to always be relative. * Split out compiler-core initially with just slang-source-loc.cpp * More lexer, name, token to compiler-core. * Split Lexer and Core diagnostics. * Move slang-file-system to core. * Add slang-file-system to core. * More DownstreamCompiler into compiler-core * Fix typo. * Add compiler-core to bootstrap proj. * Small fixes to premake * For linux try with compiler-core * Remove compiler-core from examples. * Added NameConventionUtil to compiler-core * Add global function to CharUtil to *hopefully* avoid linking issue. * Hack to make linkage of CharUtil work on linux. --- source/core/slang-string.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/core/slang-string.cpp') diff --git a/source/core/slang-string.cpp b/source/core/slang-string.cpp index 62bc19754..0a5b7d260 100644 --- a/source/core/slang-string.cpp +++ b/source/core/slang-string.cpp @@ -5,6 +5,12 @@ namespace Slang { + // HACK! + // JS: Many of the inlined functions of CharUtil just access a global map. That referencing this global is *NOT* enough to + // link correctly with CharUtil on linux for a shared library. The following call exists to try and force linkage of CharUtil + // for anything that uses core + static const auto s_charUtilLink = CharUtil::_ensureLink(); + // TODO: this belongs in a different file: SLANG_RETURN_NEVER void signalUnexpectedError(char const* message) -- cgit v1.2.3