Skip to content

Commit b68517c

Browse files
author
Stephen Gutekanst
committed
delineate changes for static dxcompiler vs dxil library
Signed-off-by: Stephen Gutekanst <[email protected]>
1 parent 42a21aa commit b68517c

File tree

10 files changed

+30
-24
lines changed

10 files changed

+30
-24
lines changed

include/dxc/Support/dxcapi.use.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,10 @@
1616

1717
namespace dxc {
1818

19-
// Mach change start: static
19+
// Mach change start: static dxcompiler
2020
// extern const char *kDxCompilerLib;
21+
// Mach change end
22+
// Mach change start: static dxil
2123
// extern const char *kDxilLib;
2224
// Mach change end
2325

@@ -89,7 +91,7 @@ class DxcDllSupport {
8991

9092
~DxcDllSupport() { Cleanup(); }
9193

92-
// Mach change start: static
94+
// Mach change start: static dxcompiler
9395
// HRESULT Initialize() {
9496
// return InitializeInternal(kDxCompilerLib, "DxcCreateInstance");
9597
// }

include/dxc/dxcapi.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#ifndef __DXC_API__
1414
#define __DXC_API__
1515

16-
// Mach change start: static
16+
// Mach change start: static dxcompiler
1717
#define DXC_API_IMPORT
1818
// Mach change end
1919
#ifdef _WIN32

lib/DxcSupport/dxcapi.use.cpp

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,21 @@
1515

1616
#include "dxc/Support/FileIOHelper.h"
1717
#include "dxc/Support/Global.h"
18-
// Mach change start: static
18+
// Mach change start: static dxcompiler
19+
// Mach change start: static dxil
1920
// #include "dxc/Support/SharedLibAffix.h" // header generated during DXC build
2021
// Mach change end
22+
// Mach change end
2123
#include "dxc/Support/Unicode.h"
2224
#include "dxc/Support/WinFunctions.h"
2325

2426
namespace dxc {
2527

26-
// Mach change start: static
28+
// Mach change start: static dxcompiler
2729
// const char *kDxCompilerLib =
2830
// CMAKE_SHARED_LIBRARY_PREFIX "dxcompiler" CMAKE_SHARED_LIBRARY_SUFFIX;
31+
// Mach change end
32+
// Mach change start: static dxil
2933
// const char *kDxilLib =
3034
// CMAKE_SHARED_LIBRARY_PREFIX "dxil" CMAKE_SHARED_LIBRARY_SUFFIX;
3135
//
@@ -79,7 +83,7 @@ void IFT_Data(HRESULT hr, LPCWSTR data) {
7983
}
8084

8185
void EnsureEnabled(DxcDllSupport &dxcSupport) {
82-
// Mach change start: static
86+
// Mach change start: static dxcompiler
8387
// if (!dxcSupport.IsEnabled()) {
8488
// IFT(dxcSupport.Initialize());
8589
// }

lib/DxilContainer/DxcContainerBuilder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424

2525
// This declaration is used for the locally-linked validator.
2626
HRESULT CreateDxcValidator(REFIID riid, LPVOID *ppv);
27-
// Mach change start: static
27+
// Mach change start: static dxil
2828
// template <class TInterface>
2929
// HRESULT DxilLibCreateInstance(REFCLSID rclsid, TInterface **ppInterface);
3030
// Mach change end

tools/clang/tools/dxclib/dxc.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1255,7 +1255,7 @@ void WriteDxCompilerVersionInfo(llvm::raw_ostream &OS, const char *ExternalLib,
12551255
CComPtr<IDxcVersionInfo2> VerInfo2;
12561256
#endif // SUPPORT_QUERY_GIT_COMMIT_INFO
12571257

1258-
// Mach change start: static
1258+
// Mach change start: static dxcompiler
12591259
// const char *dllName = !ExternalLib ? kDxCompilerLib : ExternalLib;
12601260
// std::string compilerName(dllName);
12611261
std::string compilerName("");
@@ -1279,7 +1279,7 @@ void WriteDxCompilerVersionInfo(llvm::raw_ostream &OS, const char *ExternalLib,
12791279
OS << compilerName;
12801280
}
12811281

1282-
// Mach change start: static
1282+
// Mach change start: static dxcompiler
12831283
// #ifdef _WIN32
12841284
// unsigned int version[4];
12851285
// if (GetDLLFileVersionInfo(dllName, version)) {
@@ -1308,7 +1308,7 @@ void WriteDxCompilerVersionInfo(llvm::raw_ostream &OS, const char *ExternalLib,
13081308

13091309
// Writes compiler version info to stream
13101310
void WriteDXILVersionInfo(llvm::raw_ostream &OS, DxcDllSupport &DxilSupport) {
1311-
// Mach change start: static
1311+
// Mach change start: static dxil
13121312
// if (DxilSupport.IsEnabled()) {
13131313
// CComPtr<IDxcVersionInfo> VerInfo;
13141314
// if (SUCCEEDED(DxilSupport.CreateInstance(CLSID_DxcValidator, &VerInfo))) {
@@ -1339,7 +1339,7 @@ void DxcContext::GetCompilerVersionInfo(llvm::raw_string_ostream &OS) {
13391339
m_Opts.ExternalFn.empty() ? nullptr : m_Opts.ExternalFn.data(),
13401340
m_dxcSupport);
13411341

1342-
// Mach change start: static
1342+
// Mach change start: static dxil
13431343
// // Print validator if exists
13441344
// DxcDllSupport DxilSupport;
13451345
// DxilSupport.InitializeForDll(kDxilLib, "DxcCreateInstance");

tools/clang/tools/dxcompiler/DXCompiler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ static HRESULT InitMaybeFail() throw() {
6565
fsSetup = true;
6666
IFC(hlsl::SetupRegistryPassForHLSL());
6767
IFC(hlsl::SetupRegistryPassForPIX());
68-
// Mach change start: static
68+
// Mach change start: static dxil
6969
// IFC(DxilLibInitialize());
7070
// Mach change end
7171
if (hlsl::options::initHlslOptTable()) {
@@ -112,7 +112,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD Reason, LPVOID reserved) {
112112
::hlsl::options::cleanupHlslOptTable();
113113
::llvm::sys::fs::CleanupPerThreadFileSystem();
114114
::llvm::llvm_shutdown();
115-
// Mach change start: static
115+
// Mach change start: static dxil
116116
// if (reserved ==
117117
// NULL) { // FreeLibrary has been called or the DLL load failed
118118
// DxilLibCleanup(DxilLibCleanUpType::UnloadLibrary);

tools/clang/tools/dxcompiler/dxcapi.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
#include <memory>
3030

3131
HRESULT CreateDxcCompiler(REFIID riid, _Out_ LPVOID *ppv);
32-
// Mach change start: static
32+
// Mach change start: static dxcompiler
3333
// HRESULT CreateDxcDiaDataSource(REFIID riid, _Out_ LPVOID *ppv);
3434
// Mach change end
3535
HRESULT CreateDxcIntelliSense(REFIID riid, _Out_ LPVOID *ppv);
@@ -59,19 +59,19 @@ HRESULT CreateDxcContainerReflection(REFIID riid, _Out_ LPVOID *ppv) {
5959
}
6060

6161
HRESULT CreateDxcContainerBuilder(REFIID riid, _Out_ LPVOID *ppv) {
62-
// Mach change start: static
62+
// Mach change start: static dxil
6363
// // Call dxil.dll's containerbuilder
6464
// *ppv = nullptr;
6565
// Mach change end
6666
const char *warning;
67-
// Mach change start: static
67+
// Mach change start: static dxil
6868
// HRESULT hr = DxilLibCreateInstance(CLSID_DxcContainerBuilder,
6969
// (IDxcContainerBuilder **)ppv);
7070
// if (FAILED(hr)) {
7171
// Mach change end
7272
warning = "Unable to create container builder from dxil.dll. Resulting "
7373
"container will not be signed.\n";
74-
// Mach change start: static
74+
// Mach change start: static dxil
7575
// } else {
7676
// return hr;
7777
// }
@@ -95,13 +95,13 @@ static HRESULT ThreadMallocDxcCreateInstance(REFCLSID rclsid, REFIID riid,
9595
} else if (IsEqualCLSID(rclsid, CLSID_DxcUtils)) {
9696
hr = CreateDxcUtils(riid, ppv);
9797
} else if (IsEqualCLSID(rclsid, CLSID_DxcValidator)) {
98-
// Mach change start: static
98+
// Mach change start: static dxil
9999
// if (DxilLibIsEnabled()) {
100100
// hr = DxilLibCreateInstance(rclsid, riid, (IUnknown **)ppv);
101101
// } else {
102102
// Mach change end
103103
hr = CreateDxcValidator(riid, ppv);
104-
// Mach change start: static
104+
// Mach change start: static dxil
105105
// }
106106
// Mach change end
107107
} else if (IsEqualCLSID(rclsid, CLSID_DxcAssembler)) {
@@ -121,7 +121,7 @@ static HRESULT ThreadMallocDxcCreateInstance(REFCLSID rclsid, REFIID riid,
121121
} else if (IsEqualCLSID(rclsid, CLSID_DxcLinker)) {
122122
hr = CreateDxcLinker(riid, ppv);
123123
}
124-
// Mach change start: static
124+
// Mach change start: static dxcompiler
125125
// // Note: The following targets are not yet enabled for non-Windows platforms.
126126
// #ifdef _WIN32
127127
// else if (IsEqualCLSID(rclsid, CLSID_DxcDiaDataSource)) {

tools/clang/tools/dxcompiler/dxcutil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ namespace {
5050
// AssembleToContainer helper functions.
5151

5252
bool CreateValidator(CComPtr<IDxcValidator> &pValidator) {
53-
// Mach change start: static
53+
// Mach change start: static dxil
5454
// if (DxilLibIsEnabled()) {
5555
// DxilLibCreateInstance(CLSID_DxcValidator, &pValidator);
5656
// }

tools/clang/tools/dxrfallbackcompiler/DXCompiler.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static HRESULT InitMaybeFail() throw() {
5858
}
5959
fsSetup = true;
6060
IFC(hlsl::SetupRegistryPassForHLSL());
61-
// Mach change start: static
61+
// Mach change start: static dxil
6262
// IFC(DxilLibInitialize());
6363
// Mach change end
6464
if (hlsl::options::initHlslOptTable()) {
@@ -94,7 +94,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD Reason, LPVOID reserved) {
9494
::hlsl::options::cleanupHlslOptTable();
9595
::llvm::sys::fs::CleanupPerThreadFileSystem();
9696
::llvm::llvm_shutdown();
97-
// Mach change start: static
97+
// Mach change start: static dxil
9898
// if (reserved ==
9999
// NULL) { // FreeLibrary has been called or the DLL load failed
100100
// DxilLibCleanup(DxilLibCleanUpType::UnloadLibrary);

tools/clang/tools/dxrfallbackcompiler/dxcutil.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ namespace {
4848
// AssembleToContainer helper functions.
4949

5050
bool CreateValidator(CComPtr<IDxcValidator> &pValidator) {
51-
// Mach change start: static
51+
// Mach change start: static dxil
5252
// if (DxilLibIsEnabled()) {
5353
// DxilLibCreateInstance(CLSID_DxcValidator, &pValidator);
5454
// }

0 commit comments

Comments
 (0)