From b39c99661b3ad482bbd419c24991ed325b5738a9 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Thu, 2 Jun 2022 14:13:35 -0400 Subject: COM interfaces with host callable (#2258) * #include an absolute path didn't work - because paths were taken to always be relative. * Use TerminatedUnownedStringSlice for literals in output C++. * Remove Escape/Unescape functions used in slang-token-reader.cpp Add target type of 'host-cpp' etc to map to the target types. * Fix some corner cases around string encoding. * Added unit test for string escaping. Fixed some assorted escaping bugs. * Updated test output. * Added decode test. * Stop using hex output, to get around 'greedy' aspect. Use octal instead. * Added HostHostCallable Small changes to use ArtifactDesc/Info instead of large switches. * Fix C++ emit to handle arbitrary function export. * Add options handling for callable without an output being specified. * Can compile with COM interface. Added example using com interface. * Use the IR Ptr type instead of hack in C++ emit for interfaces. * Fix issue with outputting the COM call when ptr is used. * Fix crash issue on compilation failure. --- .../cpu-com-example/cpu-com-example.vcxproj | 293 +++++++++++++++++++++ .../cpu-com-example.vcxproj.filters | 18 ++ 2 files changed, 311 insertions(+) create mode 100644 build/visual-studio/cpu-com-example/cpu-com-example.vcxproj create mode 100644 build/visual-studio/cpu-com-example/cpu-com-example.vcxproj.filters (limited to 'build/visual-studio/cpu-com-example') diff --git a/build/visual-studio/cpu-com-example/cpu-com-example.vcxproj b/build/visual-studio/cpu-com-example/cpu-com-example.vcxproj new file mode 100644 index 000000000..d5f326bfe --- /dev/null +++ b/build/visual-studio/cpu-com-example/cpu-com-example.vcxproj @@ -0,0 +1,293 @@ + + + + + Debug + Win32 + + + Debug + x64 + + + Debug + ARM + + + Debug aarch64 + Win32 + + + Debug aarch64 + x64 + + + Debug aarch64 + ARM + + + Release + Win32 + + + Release + x64 + + + Release + ARM + + + Release aarch64 + Win32 + + + Release aarch64 + x64 + + + Release aarch64 + ARM + + + + {0996B38F-F512-A7D2-1E90-A7E60A6C4366} + true + Win32Proj + cpu-com-example + + + + Application + true + Unicode + v142 + + + Application + true + Unicode + v142 + + + Application + true + Unicode + v142 + true + + + Application + false + Unicode + v142 + + + Application + false + Unicode + v142 + + + Application + false + Unicode + v142 + true + + + + + + + + + + + + + + + + + + + + + + + + + true + ..\..\..\bin\windows-x86\debug\ + ..\..\..\intermediate\windows-x86\debug\cpu-com-example\ + cpu-com-example + .exe + + + true + ..\..\..\bin\windows-x64\debug\ + ..\..\..\intermediate\windows-x64\debug\cpu-com-example\ + cpu-com-example + .exe + + + true + ..\..\..\bin\windows-aarch64\debug\ + ..\..\..\intermediate\windows-aarch64\debug\cpu-com-example\ + cpu-com-example + .exe + + + false + ..\..\..\bin\windows-x86\release\ + ..\..\..\intermediate\windows-x86\release\cpu-com-example\ + cpu-com-example + .exe + + + false + ..\..\..\bin\windows-x64\release\ + ..\..\..\intermediate\windows-x64\release\cpu-com-example\ + cpu-com-example + .exe + + + false + ..\..\..\bin\windows-aarch64\release\ + ..\..\..\intermediate\windows-aarch64\release\cpu-com-example\ + cpu-com-example + .exe + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + ..\..\..;..\..\..\tools;%(AdditionalIncludeDirectories) + ProgramDatabase + Disabled + MultiThreadedDebug + + + Console + true + + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + ..\..\..;..\..\..\tools;%(AdditionalIncludeDirectories) + ProgramDatabase + Disabled + MultiThreadedDebug + + + Console + true + + + + + NotUsing + Level3 + _DEBUG;%(PreprocessorDefinitions) + ..\..\..;..\..\..\tools;%(AdditionalIncludeDirectories) + ProgramDatabase + Disabled + MultiThreadedDebug + + + Console + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + ..\..\..;..\..\..\tools;%(AdditionalIncludeDirectories) + Full + true + true + false + true + MultiThreaded + + + Console + true + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + ..\..\..;..\..\..\tools;%(AdditionalIncludeDirectories) + Full + true + true + false + true + MultiThreaded + + + Console + true + true + + + + + NotUsing + Level3 + NDEBUG;%(PreprocessorDefinitions) + ..\..\..;..\..\..\tools;%(AdditionalIncludeDirectories) + Full + true + true + false + true + MultiThreaded + + + Console + true + true + + + + + + + + + + + {37BED5B5-23FA-D81F-8C0C-F1167867813A} + + + {DB00DA62-0533-4AFD-B59F-A67D5B3A0808} + + + {222F7498-B40C-4F3F-A704-DDEB91A4484A} + + + {F5ADB74E-02A7-44FB-AA3B-FC02F8AC7A4B} + + + {3565FE5E-4FA3-11EB-AE93-0242AC130002} + + + {F9BE7957-8399-899E-0C49-E714FDDD4B65} + + + + + + \ No newline at end of file diff --git a/build/visual-studio/cpu-com-example/cpu-com-example.vcxproj.filters b/build/visual-studio/cpu-com-example/cpu-com-example.vcxproj.filters new file mode 100644 index 000000000..ad9cb293f --- /dev/null +++ b/build/visual-studio/cpu-com-example/cpu-com-example.vcxproj.filters @@ -0,0 +1,18 @@ + + + + + {E9C7FDCE-D52A-8D73-7EB0-C5296AF258F6} + + + + + Source Files + + + + + Source Files + + + \ No newline at end of file -- cgit v1.2.3