From f9432467cac85eae6f7120cd94208f3a3dd9aa19 Mon Sep 17 00:00:00 2001 From: jsmall-nvidia Date: Tue, 26 Apr 2022 12:43:28 -0400 Subject: Improvements around Artifacts (#2192) * #include an absolute path didn't work - because paths were taken to always be relative. * Compile to a dxil library. * Added CompileProduct. * Support handling of ModuleLibrary. * CacheBehavior -> Cache * Use CompileProduct for -r references. * CompileProduct -> Artifact. * Determining an artifact type on binding. * Determine binary linkability. * Added Artifact::exists. * Added ArtifactKeep. * Small fixes. * Small improvements to Artifact. * Add zip extension. * Fix some comments. * Fix multiple adding of PublicDecoration. Make public output export for DXIL/lib. Add checking for simpleDecorations such that only added once. * Use 'whole program' to identify library build. * Move slang-artifact into compiler-core. * Split out Keep free functions. * Artifact::Keep -> ArtifactKeep. * Handle libraries as artifacts. * Add -target dxil so test infrastructure knows it needs DXC. * Linking working in DXC. * Improve handling around emit for 'export'. * Add comment around Artifact name. * Render test working with linking. * Improvements around Artifact handling. --- source/slang/slang.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'source/slang/slang.cpp') diff --git a/source/slang/slang.cpp b/source/slang/slang.cpp index 5b65cd15a..83c52c660 100644 --- a/source/slang/slang.cpp +++ b/source/slang/slang.cpp @@ -4361,8 +4361,10 @@ SlangResult EndToEndCompileRequest::addLibraryReference(const void* libData, siz RefPtr library; SLANG_RETURN_ON_FAIL(loadModuleLibrary((const Byte*)libData, libDataSize, this, library)); - const auto desc = ArtifactDesc::make(ArtifactKind::Library, ArtifactPayload::SlangIR, ArtifactStyle::Unknown); - RefPtr artifact = new Artifact(desc); + const auto desc = ArtifactDesc::make(ArtifactKind::Library, ArtifactPayload::SlangIR); + + // Create an artifact without any name (as one is not provided) + RefPtr artifact = new Artifact(desc, String()); artifact->add(Artifact::Entry::Style::Artifact, library); -- cgit v1.2.3