Move ANGLE D3D compiler names define to a standalone header file draft
authorTed Mielczarek <ted@mielczarek.org>
Wed, 20 Sep 2017 11:55:21 -0400
changeset 668599 b38dc73ab4624f5e277dbde31543ccf9d93b5302
parent 668598 e75cbaad1bcdf7ff48f07219f8de2f2517d16b23
child 668600 2de521fa07b277d35b08a15bbe50f0bc27f87e60
push id81087
push userbmo:ted@mielczarek.org
push dateThu, 21 Sep 2017 20:59:05 +0000
milestone57.0a1
Move ANGLE D3D compiler names define to a standalone header file MozReview-Commit-ID: JU17M14ubCC
gfx/AngleD3DCompilerModuleNames.h
gfx/angle/src/libANGLE/moz.build
new file mode 100644
--- /dev/null
+++ b/gfx/AngleD3DCompilerModuleNames.h
@@ -0,0 +1,7 @@
+#ifndef gfx_AngleD3DCompilerModuleNames_h_
+#define gfx_AngleD3DCompilerModuleNames_h_
+
+// This is too hard to quote correctly on the compiler commandline.
+#define ANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES { TEXT("d3dcompiler_47.dll"), TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }
+
+#endif /* gfx_AngleD3DCompilerModuleNames_h_ */
--- a/gfx/angle/src/libANGLE/moz.build
+++ b/gfx/angle/src/libANGLE/moz.build
@@ -398,16 +398,17 @@ else:
   EXTRA_DSO_LDOPTS += [
     '\'%s/lib/%s/d3d9.lib\'' % (CONFIG['MOZ_DIRECTX_SDK_PATH'], CONFIG['MOZ_D3D_CPU_SUFFIX']),
     '\'%s/lib/%s/dxguid.lib\'' % (CONFIG['MOZ_DIRECTX_SDK_PATH'], CONFIG['MOZ_D3D_CPU_SUFFIX']),
   ]
 
 Library('libANGLE')
 
 
-SOURCES['renderer/d3d/HLSLCompiler.cpp'].flags += ['-DANGLE_PRELOADED_D3DCOMPILER_MODULE_NAMES=\'{ TEXT("d3dcompiler_47.dll"), TEXT("d3dcompiler_46.dll"), TEXT("d3dcompiler_43.dll") }\'']
+if CONFIG['_MSC_VER']:
+   CXXFLAGS += ['-FI', '../../../AngleD3DCompilerModuleNames.h']
 
 if CONFIG['MOZ_HAS_WINSDK_WITH_D3D']:
     SOURCES['renderer/d3d/d3d11/SwapChain11.cpp'].flags += ['-DANGLE_RESOURCE_SHARE_TYPE=D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX']
 
 # We allow warnings for third-party code that can be updated from upstream.
 ALLOW_COMPILER_WARNINGS = True