From 1185bd464092f372430cbfaa15a7be4dcaa90752 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 6 Nov 2018 14:28:25 -0500 Subject: Feature/shared library refactor (#712) * * Added ISlangSharedLibraryLoader and ISlangSharedLibrary * Implemented default implementations * Added slang API function to get/set the ISlangSharedLibraryLoader on the session * Put function caching onto the Session - so that if the loader is chaged, its easy to reset the shared libraries, and functions * Run premake. * Fix problem with setting null, would cause an unnecessary function/shared lib flush. * * Unload SharedLibrary when DefaultSharedLibrary is deleted. * Make SharedLibrary handle unload safely if already unloaded. * Refactor SharedLibrary, such that it becomes a utility class - simplifying it's semantics. * Simplified ISlangSharedLibrary such that doesn't have unload and isLoaded so easier to implement. Use updated SharedLibrary impl. * Disable aarch64 on windows * Premake windows files without aarch64 build. * Moved slang-shared-library to core (so can be used in code outside of main slang) Fixed problem in premake5 where on windows projects were incorrectly constructed * Allowed RefObject to base class of com types Added ConfigurableSharedLibraryLoader Added -dxc-path -fxc-path -glslang-path Fix problem with dxc-path not honoring it's path when loading dxil * Added documentation for command line control of dll loading paths. * Remove some tabbing issues. * Change name of include guard. --- docs/command-line-slangc.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'docs') diff --git a/docs/command-line-slangc.md b/docs/command-line-slangc.md index a37b3138e..8d59526d4 100644 --- a/docs/command-line-slangc.md +++ b/docs/command-line-slangc.md @@ -136,6 +136,18 @@ For completeness, here are the options that `slangc` currently accepts: * `--`: Stop parsing options, and treat the rest of the command line as input paths +### Specifying where dlls/shared libraries are loaded from + +On windows if you want a dll loaded from a specific path, the path must be specified absolutely. See the *'LoadLibrary'* documentation for more details. A relative path will cause Windows to check all locations along it's search procedure. + +On linux it's similar, but any path (relative or not) will override the regular search mechanism. See *'dlopen'* for more details. + +* `-dxc-path`: Sets the path where dxc dlls are loaded from (dxcompiler.dll & dxil). + +* `-fxc-path`: Sets the path where fxc dll is loaded from (d3dcompiler_47.dll). + +* `-glslang-path`: Sets where the slang specific 'slang-glslang' is loaded from + Limitations ----------- -- cgit v1.2.3