Merge pull request #43009 from mattn:build-mingw-fix
PiperOrigin-RevId: 330636137 Change-Id: I2dfd79772175ed435767ab41e282312dea852998
This commit is contained in:
commit
ad66f588c1
tensorflow/lite
@ -177,7 +177,11 @@ if(CMAKE_SYSTEM_NAME MATCHES "Windows")
|
||||
list(APPEND TFLITE_TARGET_PRIVATE_OPTIONS "-DNOMINMAX" "-DNOGDI")
|
||||
# lite/kernels/conv.cc has more than 64k sections so enable /bigobj to
|
||||
# support compilation with MSVC2015.
|
||||
list(APPEND TFLITE_TARGET_PRIVATE_OPTIONS "/bigobj")
|
||||
if(MSVC)
|
||||
list(APPEND TFLITE_TARGET_PRIVATE_OPTIONS "/bigobj")
|
||||
elseif(CMAKE_COMPILER_IS_GNUCXX)
|
||||
list(APPEND TFLITE_TARGET_PRIVATE_OPTIONS "-Wa,-mbig-obj")
|
||||
endif()
|
||||
endif()
|
||||
# Build a list of source files to compile into the TF Lite library.
|
||||
populate_tflite_source_vars("." TFLITE_SRCS)
|
||||
|
@ -33,11 +33,11 @@ class SharedLibrary {
|
||||
return ::LoadLibrary(lib);
|
||||
}
|
||||
static inline void* GetLibrarySymbol(void* handle, const char* symbol) {
|
||||
return static_cast<void*>(
|
||||
return reinterpret_cast<void*>(
|
||||
GetProcAddress(static_cast<HMODULE>(handle), symbol));
|
||||
}
|
||||
static inline void* GetSymbol(const char* symbol) {
|
||||
return static_cast<void*>(GetProcAddress(nullptr, symbol));
|
||||
return reinterpret_cast<void*>(GetProcAddress(nullptr, symbol));
|
||||
}
|
||||
static inline int UnLoadLibrary(void* handle) {
|
||||
return FreeLibrary(static_cast<HMODULE>(handle));
|
||||
|
Loading…
Reference in New Issue
Block a user