Parcourir la source

Fixed UWP build.

Branimir Karadžić il y a 8 ans
Parent
commit
14cf17f700
2 fichiers modifiés avec 7 ajouts et 0 suppressions
  1. 4 0
      include/bx/inline/cpu.inl
  2. 3 0
      scripts/toolchain.lua

+ 4 - 0
include/bx/inline/cpu.inl

@@ -8,6 +8,10 @@
 #endif // BX_CPU_H_HEADER_GUARD
 #endif // BX_CPU_H_HEADER_GUARD
 
 
 #if BX_COMPILER_MSVC
 #if BX_COMPILER_MSVC
+#	if BX_PLATFORM_WINRT
+#		include <windows.h>
+#	endif // BX_PLATFORM_WINRT
+
 #	include <emmintrin.h> // _mm_fence
 #	include <emmintrin.h> // _mm_fence
 
 
 extern "C" void _ReadBarrier();
 extern "C" void _ReadBarrier();

+ 3 - 0
scripts/toolchain.lua

@@ -611,6 +611,9 @@ function toolchain(_buildDir, _libDir)
 			"StaticRuntime",
 			"StaticRuntime",
 			"NoExceptions",
 			"NoExceptions",
 		}
 		}
+		linkoptions {
+			"/ignore:4264" -- LNK4264: archiving object file compiled with /ZW into a static library; note that when authoring Windows Runtime types it is not recommended to link with a static library that contains Windows Runtime metadata
+		}
 
 
 	configuration { "*-gcc* or osx" }
 	configuration { "*-gcc* or osx" }
 		buildoptions {
 		buildoptions {