finally fix gcc building fully

This commit is contained in:
wuggy 2026-04-19 19:28:17 -07:00
commit 7917e6bed3
12 changed files with 60 additions and 13 deletions

View file

@ -6,7 +6,8 @@
"Test-Path": true,
"mkdir": true,
"cp": true,
"hdiutil": true
"hdiutil": true,
"&": true
},
"files.associations": {
"limits.h": "c"

View file

@ -843,9 +843,11 @@ WebGLContext::ThrowEvent_WebGLContextCreationError(const nsACString& text)
}
NS_IMETHODIMP
WebGLContext::InitializeWithDrawTarget(nsIDocShell*,
NotNull<gfx::DrawTarget*>)
WebGLContext::InitializeWithDrawTarget(nsIDocShell* aDocShell,
NotNull<gfx::DrawTarget*> aTarget)
{
(void)aDocShell;
(void)aTarget;
return NS_ERROR_NOT_IMPLEMENTED;
}

View file

@ -0,0 +1,30 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
/* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#if defined(__MINGW32__) && defined(__i386__)
#include "WebGLContext.h"
namespace mozilla {
extern "C" nsresult __attribute__((stdcall))
WebGLContext_InitializeWithDrawTarget_stdcall(
WebGLContext* self,
nsIDocShell* aDocShell,
NotNull<gfx::DrawTarget*> aDrawTarget)
__asm__("__ZN7mozilla12WebGLContext24InitializeWithDrawTargetEP11nsIDocShellNS_7NotNullIPNS_3gfx10DrawTargetEEE@12");
extern "C" nsresult __attribute__((stdcall))
WebGLContext_InitializeWithDrawTarget_stdcall(
WebGLContext* self,
nsIDocShell* aDocShell,
NotNull<gfx::DrawTarget*> aDrawTarget)
{
return self->WebGLContext::InitializeWithDrawTarget(aDocShell, aDrawTarget);
}
} // namespace mozilla
#endif

View file

@ -57,6 +57,11 @@ SOURCES += [
'ImageUtils.cpp',
]
if CONFIG['GNU_CC'] and CONFIG['CPU_ARCH'] == 'x86' and CONFIG['OS_ARCH'] == 'WINNT':
SOURCES += [
'WebGLContext_mingw_compat.cpp',
]
# WebGL Sources
UNIFIED_SOURCES += [
'TexUnpackBlob.cpp',
@ -79,7 +84,6 @@ UNIFIED_SOURCES += [
'WebGL2ContextVertices.cpp',
'WebGLActiveInfo.cpp',
'WebGLBuffer.cpp',
'WebGLContext.cpp',
'WebGLContextBuffers.cpp',
'WebGLContextDraw.cpp',
'WebGLContextExtensions.cpp',
@ -151,6 +155,7 @@ UNIFIED_SOURCES += [
SOURCES += [
'MurmurHash3.cpp',
'WebGLContext.cpp',
]
# Suppress warnings from third-party code.

View file

@ -17,6 +17,8 @@ SOURCES += [
'utf_info.cxx',
]
DISABLE_STL_WRAPPING = True
DEFINES['BUILDING_LIBHUNSPELL'] = True
# Hunspell must be built into libxul on SunOS. See UXP Issue #2290.

View file

@ -62,6 +62,8 @@ if CONFIG['GKMEDIAS_SHARED_LIBRARY']:
# We allow warnings for third-party code that can be updated from upstream.
ALLOW_COMPILER_WARNINGS = True
DISABLE_STL_WRAPPING = True
FINAL_LIBRARY = 'gkmedias'
DEFINES['PACKAGE_VERSION'] = '"moz"'

View file

@ -1034,8 +1034,10 @@ case "${OS_TARGET}" in
WINNT|Darwin|Android)
;;
*)
STL_FLAGS="-I${DIST}/stl_wrappers"
WRAP_STL_INCLUDES=1
if test -z "$GNU_CC"; then
STL_FLAGS="-I${DIST}/stl_wrappers"
WRAP_STL_INCLUDES=1
fi
;;
esac

View file

@ -114,6 +114,8 @@ EXPORTS.jxl += [
DEFINES["JPEGXL_ENABLE_BOXES"] = "0"
DEFINES["JPEGXL_ENABLE_TRANSCODE_JPEG"] = "0"
DISABLE_STL_WRAPPING = True
FINAL_LIBRARY = "gkmedias"
# We allow warnings for third-party code that can be updated from upstream.

View file

@ -16,11 +16,7 @@
* Note: MOZ_NORETURN seems to break crash stacks on ARM, so we don't
* use that annotation there.
*/
#if defined(__MINGW32__)
# define MOZALLOC_ABORT_API
#else
# define MOZALLOC_ABORT_API MFBT_API
#endif
#define MOZALLOC_ABORT_API MFBT_API
MOZALLOC_ABORT_API
#if !defined(__arm__)

View file

@ -27,4 +27,6 @@ LOCAL_INCLUDES += [
# We allow warnings for third-party code that can be updated from upstream.
ALLOW_COMPILER_WARNINGS = True
DISABLE_STL_WRAPPING = True
Library('woff2')

View file

@ -34,6 +34,7 @@ EXPORTS
_wcsdup=wrap_wcsdup
jemalloc_stats
jemalloc_free_dirty_pages
_Z14mozalloc_abortPKc
; A hack to work around the CRT (see giant comment in Makefile.in)
frex=dumb_free_thunk
#endif

View file

@ -1230,8 +1230,10 @@ case "${OS_TARGET}" in
Darwin)
;;
*)
STL_FLAGS="-I${DIST}/stl_wrappers"
WRAP_STL_INCLUDES=1
if test -z "$GNU_CC"; then
STL_FLAGS="-I${DIST}/stl_wrappers"
WRAP_STL_INCLUDES=1
fi
;;
esac