Skip to content
This repository was archived by the owner on Jul 9, 2025. It is now read-only.

Commit 32d63fd

Browse files
committed
Bug 1477047 - make fewer assumptions about MSVC compiling for x86-ish code; r=chmanchester
ARM64 Windows is a thing now, so this assumption is no longer valid.
1 parent 09e16e7 commit 32d63fd

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

gfx/skia/generate_mozbuild.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,7 @@
9898
SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2']
9999
SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx']
100100
SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2']
101-
elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
101+
elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['INTEL_ARCHITECTURE']:
102102
# MSVC doesn't need special compiler flags, but Skia needs to be told that these files should
103103
# be built with the required SSE level or it will simply compile in stubs and cause runtime crashes
104104
SOURCES['skia/src/opts/SkBitmapProcState_opts_SSE2.cpp'].flags += ['-DSK_CPU_SSE_LEVEL=20']

gfx/skia/moz.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -772,7 +772,7 @@ if CONFIG['INTEL_ARCHITECTURE'] and (CONFIG['CC_TYPE'] in ('clang', 'clang-cl',
772772
SOURCES['skia/src/opts/SkOpts_sse42.cpp'].flags += ['-msse4.2']
773773
SOURCES['skia/src/opts/SkOpts_avx.cpp'].flags += ['-mavx']
774774
SOURCES['skia/src/opts/SkOpts_hsw.cpp'].flags += ['-mavx2']
775-
elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl'):
775+
elif CONFIG['CC_TYPE'] in ('msvc', 'clang-cl') and CONFIG['INTEL_ARCHITECTURE']:
776776
# MSVC doesn't need special compiler flags, but Skia needs to be told that these files should
777777
# be built with the required SSE level or it will simply compile in stubs and cause runtime crashes
778778
SOURCES['skia/src/opts/SkBitmapProcState_opts_SSE2.cpp'].flags += ['-DSK_CPU_SSE_LEVEL=20']

media/libaom/moz.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ if CONFIG['CC_TYPE'] != 'msvc':
121121
elif f.endswith('avx2.c'):
122122
SOURCES[f].flags += ['-mavx2']
123123

124-
if CONFIG['CC_TYPE'] == 'msvc':
124+
if CONFIG['CC_TYPE'] == 'msvc' and CONFIG['INTEL_ARCHITECTURE']:
125125
for f in SOURCES:
126126
if f.endswith('avx.c'):
127127
SOURCES[f].flags += ['-arch:AVX']

media/libvpx/moz.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ if CONFIG['CC_TYPE'] != 'msvc':
112112
if 'avx2.c' in f:
113113
SOURCES[f].flags += ['-mavx2']
114114

115-
if CONFIG['CC_TYPE'] == 'msvc':
115+
if CONFIG['CC_TYPE'] == 'msvc' and CONFIG['INTEL_ARCHITECTURE']:
116116
for f in SOURCES:
117117
if f.endswith('.c'):
118118
if 'avx.c' in f:

0 commit comments

Comments
 (0)