Issue #1962 - Follow-up: Fix build issues on Windows.

Do not pass -Wno-type-limits to MSVC.
Restore MSVC check for x86_vc
This commit is contained in:
Job Bautista 2022-07-22 23:02:22 +08:00 committed by roytam1
commit 2a1f9e3ef3

View file

@ -21,7 +21,8 @@ FINAL_LIBRARY = 'gkmedias'
DEFINES['THEORA_DISABLE_ENCODE'] = True
# Suppress warnings in third-party code.
CFLAGS += ['-Wno-type-limits']
if CONFIG['CC_TYPE'] in ('clang', 'clang-cl', 'gcc'):
CFLAGS += ['-Wno-type-limits']
if CONFIG['CC_TYPE'] in ('clang', 'clang-cl'):
CFLAGS += [
'-Wno-shift-negative-value',
@ -58,16 +59,18 @@ if CONFIG['INTEL_ARCHITECTURE']:
DEFINES['OC_X86_ASM'] = True
if CONFIG['CPU_ARCH'] == 'x86_64':
DEFINES['OC_X86_64_ASM'] = True
if CONFIG['CC_TYPE'] == 'clang-cl':
# clang-cl can't handle libtheora's inline asm.
pass
#SOURCES += [
# 'lib/x86_vc/mmxfrag.c',
# 'lib/x86_vc/mmxidct.c',
# 'lib/x86_vc/mmxstate.c',
# 'lib/x86_vc/x86cpu.c',
# 'lib/x86_vc/x86state.c',
#]
if CONFIG['_MSC_VER']:
if CONFIG['CC_TYPE'] == 'clang-cl':
# clang-cl can't handle libtheora's inline asm.
pass
elif CONFIG['CPU_ARCH'] == 'x86_64':
SOURCES += [
'lib/x86_vc/mmxfrag.c',
'lib/x86_vc/mmxidct.c',
'lib/x86_vc/mmxstate.c',
'lib/x86_vc/x86cpu.c',
'lib/x86_vc/x86state.c',
]
else:
SOURCES += [
'lib/x86/mmxfrag.c',