Skip to content
Snippets Groups Projects
Verified Commit fad83635 authored by Pier Angelo Vendrame's avatar Pier Angelo Vendrame :jack_o_lantern:
Browse files

Bug 41448: Update toolchains for ESR140 (Windows).

Windows specific updates for Firefox 140.
parent 3e26939c
Branches
Tags
1 merge request!1212Bug 41448: Desktop toolchain update
Showing
with 335 additions and 654 deletions
#!/bin/bash
[% c("var/set_default_env") -%]
distdir=/var/tmp/dist/[% project %]
mkdir -p /var/tmp/dist
tar -C /var/tmp/dist -xf [% c('input_files_by_name/cmake') %]
tar -C /var/tmp/dist -xf [% c('input_files_by_name/ninja') %]
export PATH="/var/tmp/dist/ninja:/var/tmp/dist/cmake/bin:$PATH"
[% IF c("var/linux") %]
[% pc('gcc', 'var/setup', { compiler_tarfile => c('input_files_by_name/gcc'),
hardened_gcc => 0 }) %]
......@@ -12,10 +14,16 @@ export PATH="/var/tmp/dist/ninja:/var/tmp/dist/cmake/bin:$PATH"
tar -C /var/tmp/dist -xf [% c('input_files_by_name/binutils') %]
export PATH="/var/tmp/dist/binutils/bin:$PATH"
[% END -%]
mkdir -p /var/tmp/build
cd /var/tmp/build
tar -xf $rootdir/[% c('input_files_by_name/clang-source') %]
cd clang-source
[% IF c("var/windows") -%]
patch -p1 < $rootdir/gnullvm-environment.diff
[% END -%]
export LLVM_HOME=$(pwd)
mkdir build
cd build
......
......@@ -29,3 +29,8 @@ input_files:
- project: python
name: python
enable: '[% c("var/linux") %]'
# Suppress the "version 'llvm' in target triple 'x86_64-pc-windows-gnullvm' is
# invalid" error.
# https://github.com/llvm/llvm-project/issues/137933
- filename: gnullvm-environment.diff
enable: '[% c("var/windows") %]'
diff --git a/llvm/lib/TargetParser/Triple.cpp b/llvm/lib/TargetParser/Triple.cpp
index 21d6c74b5956..f30388d976a4 100644
--- a/llvm/lib/TargetParser/Triple.cpp
+++ b/llvm/lib/TargetParser/Triple.cpp
@@ -1346,7 +1346,7 @@ StringRef Triple::getEnvironmentVersionString() const {
// none is a valid environment type - it basically amounts to a freestanding
// environment.
- if (EnvironmentName == "none")
+ if (EnvironmentName == "none" || EnvironmentName == "gnullvm")
return "";
StringRef EnvironmentTypeName = getEnvironmentTypeName(getEnvironment());
......@@ -15,7 +15,7 @@ mkdir -p [% out_dir %]
export PATH="/var/tmp/dist/fxc2/bin:$PATH"
tar -C /var/tmp/dist -xf [% c('input_files_by_name/windows-rs') %]
export MOZ_WINDOWS_RS_DIR=/var/tmp/dist/windows-rs/
export MOZ_WINDOWS_RS_DIR="$(realpath /var/tmp/dist/windows-*)"
[% END -%]
tar -C /var/tmp/dist -xf [% c('input_files_by_name/rust') %]
......
......@@ -220,11 +220,11 @@ input_files:
enable: '[% c("var/windows") %]'
target_prepend:
- torbrowser-windows-x86_64
- project: windows-rs
- URL: https://crates.io/api/v1/crates/windows/0.58.0/download
name: windows-rs
filename: windows-rs-0.58.0.tar.zst
sha256sum: dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6
enable: '[% c("var/windows") %]'
norec:
sha256sum: b26e710d553733cd1202bf932624d51a43d1f8679217c97bd05c0248e0c1c090
- filename: abicheck.cc
enable: '[% c("var/linux") %]'
- project: translation
......
......@@ -52,14 +52,14 @@ check_update_needed libtapi "$needed" "$current"
[% IF c("var/windows") %]
# mingw-w64
# mingw-w64-clang
read -d '' p << 'EOF' || true
my $d = YAML::XS::LoadFile('taskcluster/kinds/fetch/toolchains.yml');
print $d->{'mingw-w64'}{fetch}{revision};
EOF
needed=$(perl -MYAML::XS -e "$p")
current='[% pc("mingw-w64", "git_hash") %]'
check_update_needed mingw-w64 "$needed" "$current"
current='[% pc("mingw-w64-clang", "git_hash") %]'
check_update_needed mingw-w64-clang "$needed" "$current"
# fxc2
......
......@@ -6,7 +6,7 @@ Subject: [PATCH] Bug 26205: Don't build the uninstaller for Windows during
diff --git a/browser/Makefile.in b/browser/Makefile.in
index 2eb9e708f68e..0c9442183942 100644
index 364f590f5116d..6bda1c5aadaac 100644
--- a/browser/Makefile.in
+++ b/browser/Makefile.in
@@ -6,10 +6,6 @@ include $(topsrcdir)/config/rules.mk
......@@ -17,14 +17,14 @@ index 2eb9e708f68e..0c9442183942 100644
-# uninstaller is included with the application for mar file generation.
-libs::
- $(MAKE) -C installer/windows uninstaller
ifdef MOZ_MAINTENANCE_SERVICE
$(MAKE) -C installer/windows maintenanceservice_installer
endif
ifdef ENABLE_TESTS
$(MAKE) -C installer/windows install_deps
endif #ENABLE_TESTS
diff --git a/browser/installer/Makefile.in b/browser/installer/Makefile.in
index 0325f0ffab9a..a5a9488623a3 100644
index 3827c46cefa8e..f10451b8cada4 100644
--- a/browser/installer/Makefile.in
+++ b/browser/installer/Makefile.in
@@ -98,10 +98,6 @@ ifdef NECKO_WIFI
@@ -88,10 +88,6 @@ ifdef NECKO_WIFI
DEFINES += -DNECKO_WIFI
endif
......
......@@ -84,12 +84,11 @@ EOF
# Apply the same patches as Firefox
cd $builddir/mingw-w64-clang
patch -p1 < "$rootdir/mingw-dwrite_3.patch"
patch -p1 < "$rootdir/mingw-unknown.patch"
patch -p1 < "$rootdir/mingw-enum.patch"
patch -p1 < "$rootdir/mingw-widl.patch"
patch -p1 < "$rootdir/mingw-dispatchqueue.patch"
patch -p1 < "$rootdir/mingw-ts_sd.patch"
patch -p1 < "$rootdir/mingw-composition.patch"
patch -p1 < "$rootdir/mingw-foundation_redef.patch"
patch -p1 < "$rootdir/mingw-webrtc.patch"
cd $builddir/mingw-w64-clang/mingw-w64-headers
......
# vim: filetype=yaml sw=2
filename: '[% project %]-[% c("version") %]-[% pc("llvm-project", "version") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
git_url: https://git.code.sf.net/p/mingw-w64/mingw-w64
git_hash: 4ef04b0a7f7a20735de2f58b5c0496fcb4c7d191
git_hash: 2ca6f1348cab58b5b994fd5916ff57445ade22f8
version: '[% c("abbrev") %]'
container:
use_container: 1
......@@ -32,10 +32,9 @@ input_files:
- filename: windres-wrapper.c
# Patches from Firefox's source code
- filename: mingw-dwrite_3.patch
- filename: mingw-unknown.patch
- filename: mingw-enum.patch
- filename: mingw-widl.patch
- filename: mingw-dispatchqueue.patch
- filename: mingw-ts_sd.patch
- filename: mingw-composition.patch
- filename: mingw-foundation_redef.patch
- filename: mingw-webrtc.patch
diff --git a/mingw-w64-headers/include/windows.ui.composition.h b/mingw-w64-headers/include/windows.ui.composition.h
index 9dac0f1..58872d5 100644
--- a/mingw-w64-headers/include/windows.ui.composition.h
+++ b/mingw-w64-headers/include/windows.ui.composition.h
@@ -4916,13 +4916,13 @@ namespace ABI {
ICompositionDrawingSurface : public IInspectable
{
virtual HRESULT STDMETHODCALLTYPE get_AlphaMode(
- enum DirectXAlphaMode *value) = 0;
+ ABI::Windows::Graphics::DirectX::DirectXAlphaMode *value) = 0;
virtual HRESULT STDMETHODCALLTYPE get_PixelFormat(
- enum DirectXPixelFormat *value) = 0;
+ ABI::Windows::Graphics::DirectX::DirectXPixelFormat *value) = 0;
virtual HRESULT STDMETHODCALLTYPE get_Size(
- struct Size *value) = 0;
+ ABI::Windows::Foundation::Size *value) = 0;
};
}
@@ -5704,8 +5704,8 @@ namespace ABI {
{
virtual HRESULT STDMETHODCALLTYPE CreateDrawingSurface(
struct Size pixels,
- enum DirectXPixelFormat format,
- enum DirectXAlphaMode mode,
+ ABI::Windows::Graphics::DirectX::DirectXPixelFormat format,
+ ABI::Windows::Graphics::DirectX::DirectXAlphaMode mode,
ABI::Windows::UI::Composition::ICompositionDrawingSurface **result) = 0;
virtual HRESULT STDMETHODCALLTYPE add_RenderingDeviceReplaced(
@@ -9338,7 +9338,7 @@ namespace ABI {
boolean value) = 0;
virtual HRESULT STDMETHODCALLTYPE get_Offset(
- struct Vector3 *value) = 0;
+ ABI::Windows::Foundation::Numerics::Vector3 *value) = 0;
virtual HRESULT STDMETHODCALLTYPE put_Offset(
struct Vector3 value) = 0;
@@ -9383,7 +9383,7 @@ namespace ABI {
struct Vector3 value) = 0;
virtual HRESULT STDMETHODCALLTYPE get_Size(
- struct Vector2 *value) = 0;
+ ABI::Windows::Foundation::Numerics::Vector2 *value) = 0;
virtual HRESULT STDMETHODCALLTYPE put_Size(
struct Vector2 value) = 0;
......@@ -12,10 +12,10 @@ GetGlyphImageFormats.
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/mingw-w64-headers/include/dwrite_3.h b/mingw-w64-headers/include/dwrite_3.h
index 205c47f04..352731bf1 100644
index 0cd8ad6..e22513c 100644
--- a/mingw-w64-headers/include/dwrite_3.h
+++ b/mingw-w64-headers/include/dwrite_3.h
@@ -8181,7 +8181,7 @@ DEFINE_GUID(IID_IDWriteFontFace4, 0x27f2a904, 0x4eb8, 0x441d, 0x96,0x78, 0x05,0x
@@ -8697,7 +8697,7 @@ DEFINE_GUID(IID_IDWriteFontFace4, 0x27f2a904, 0x4eb8, 0x441d, 0x96,0x78, 0x05,0x
MIDL_INTERFACE("27f2a904-4eb8-441d-9678-0563f53e3e2f")
IDWriteFontFace4 : public IDWriteFontFace3
{
......@@ -24,7 +24,7 @@ index 205c47f04..352731bf1 100644
UINT16 glyph,
UINT32 ppem_first,
UINT32 ppem_last,
@@ -8481,7 +8481,7 @@ typedef struct IDWriteFontFace4Vtbl {
@@ -8997,7 +8997,7 @@ typedef struct IDWriteFontFace4Vtbl {
WINBOOL *are_local);
/*** IDWriteFontFace4 methods ***/
......@@ -33,7 +33,7 @@ index 205c47f04..352731bf1 100644
IDWriteFontFace4 *This,
UINT16 glyph,
UINT32 ppem_first,
@@ -8562,7 +8562,7 @@ interface IDWriteFontFace4 {
@@ -9078,7 +9078,7 @@ interface IDWriteFontFace4 {
#define IDWriteFontFace4_AreCharactersLocal(This,characters,count,enqueue_if_not,are_local) (This)->lpVtbl->AreCharactersLocal(This,characters,count,enqueue_if_not,are_local)
#define IDWriteFontFace4_AreGlyphsLocal(This,glyphs,count,enqueue_if_not,are_local) (This)->lpVtbl->AreGlyphsLocal(This,glyphs,count,enqueue_if_not,are_local)
/*** IDWriteFontFace4 methods ***/
......@@ -42,18 +42,18 @@ index 205c47f04..352731bf1 100644
#define IDWriteFontFace4_GetGlyphImageFormats(This) (This)->lpVtbl->GetGlyphImageFormats(This)
#define IDWriteFontFace4_GetGlyphImageData(This,glyph,ppem,format,data,context) (This)->lpVtbl->GetGlyphImageData(This,glyph,ppem,format,data,context)
#define IDWriteFontFace4_ReleaseGlyphImageData(This,context) (This)->lpVtbl->ReleaseGlyphImageData(This,context)
@@ -8705,8 +8705,8 @@ static __WIDL_INLINE HRESULT IDWriteFontFace4_AreGlyphsLocal(IDWriteFontFace4* T
@@ -9221,8 +9221,8 @@ static inline HRESULT IDWriteFontFace4_AreGlyphsLocal(IDWriteFontFace4* T
return This->lpVtbl->AreGlyphsLocal(This,glyphs,count,enqueue_if_not,are_local);
}
/*** IDWriteFontFace4 methods ***/
-static __WIDL_INLINE HRESULT IDWriteFontFace4_GetGlyphImageFormats_(IDWriteFontFace4* This,UINT16 glyph,UINT32 ppem_first,UINT32 ppem_last,DWRITE_GLYPH_IMAGE_FORMATS *formats) {
-static inline HRESULT IDWriteFontFace4_GetGlyphImageFormats_(IDWriteFontFace4* This,UINT16 glyph,UINT32 ppem_first,UINT32 ppem_last,DWRITE_GLYPH_IMAGE_FORMATS *formats) {
- return This->lpVtbl->GetGlyphImageFormats_(This,glyph,ppem_first,ppem_last,formats);
+static __WIDL_INLINE HRESULT IDWriteFontFace4_GetGlyphImageFormats(IDWriteFontFace4* This,UINT16 glyph,UINT32 ppem_first,UINT32 ppem_last,DWRITE_GLYPH_IMAGE_FORMATS *formats) {
+static inline HRESULT IDWriteFontFace4_GetGlyphImageFormats(IDWriteFontFace4* This,UINT16 glyph,UINT32 ppem_first,UINT32 ppem_last,DWRITE_GLYPH_IMAGE_FORMATS *formats) {
+ return This->lpVtbl->GetGlyphImageFormats(This,glyph,ppem_first,ppem_last,formats);
}
static __WIDL_INLINE DWRITE_GLYPH_IMAGE_FORMATS IDWriteFontFace4_GetGlyphImageFormats(IDWriteFontFace4* This) {
static inline DWRITE_GLYPH_IMAGE_FORMATS IDWriteFontFace4_GetGlyphImageFormats(IDWriteFontFace4* This) {
return This->lpVtbl->GetGlyphImageFormats(This);
@@ -9033,7 +9033,7 @@ typedef struct IDWriteFontFace5Vtbl {
@@ -9549,7 +9549,7 @@ typedef struct IDWriteFontFace5Vtbl {
WINBOOL *are_local);
/*** IDWriteFontFace4 methods ***/
......@@ -62,7 +62,7 @@ index 205c47f04..352731bf1 100644
IDWriteFontFace5 *This,
UINT16 glyph,
UINT32 ppem_first,
@@ -9134,7 +9134,7 @@ interface IDWriteFontFace5 {
@@ -9650,7 +9650,7 @@ interface IDWriteFontFace5 {
#define IDWriteFontFace5_AreCharactersLocal(This,characters,count,enqueue_if_not,are_local) (This)->lpVtbl->AreCharactersLocal(This,characters,count,enqueue_if_not,are_local)
#define IDWriteFontFace5_AreGlyphsLocal(This,glyphs,count,enqueue_if_not,are_local) (This)->lpVtbl->AreGlyphsLocal(This,glyphs,count,enqueue_if_not,are_local)
/*** IDWriteFontFace4 methods ***/
......@@ -71,17 +71,54 @@ index 205c47f04..352731bf1 100644
#define IDWriteFontFace5_GetGlyphImageFormats(This) (This)->lpVtbl->GetGlyphImageFormats(This)
#define IDWriteFontFace5_GetGlyphImageData(This,glyph,ppem,format,data,context) (This)->lpVtbl->GetGlyphImageData(This,glyph,ppem,format,data,context)
#define IDWriteFontFace5_ReleaseGlyphImageData(This,context) (This)->lpVtbl->ReleaseGlyphImageData(This,context)
@@ -9283,8 +9283,8 @@ static __WIDL_INLINE HRESULT IDWriteFontFace5_AreGlyphsLocal(IDWriteFontFace5* T
@@ -9799,8 +9799,8 @@ static inline HRESULT IDWriteFontFace5_AreGlyphsLocal(IDWriteFontFace5* T
return This->lpVtbl->AreGlyphsLocal(This,glyphs,count,enqueue_if_not,are_local);
}
/*** IDWriteFontFace4 methods ***/
-static __WIDL_INLINE HRESULT IDWriteFontFace5_GetGlyphImageFormats_(IDWriteFontFace5* This,UINT16 glyph,UINT32 ppem_first,UINT32 ppem_last,DWRITE_GLYPH_IMAGE_FORMATS *formats) {
-static inline HRESULT IDWriteFontFace5_GetGlyphImageFormats_(IDWriteFontFace5* This,UINT16 glyph,UINT32 ppem_first,UINT32 ppem_last,DWRITE_GLYPH_IMAGE_FORMATS *formats) {
- return This->lpVtbl->GetGlyphImageFormats_(This,glyph,ppem_first,ppem_last,formats);
+static __WIDL_INLINE HRESULT IDWriteFontFace5_GetGlyphImageFormats(IDWriteFontFace5* This,UINT16 glyph,UINT32 ppem_first,UINT32 ppem_last,DWRITE_GLYPH_IMAGE_FORMATS *formats) {
+static inline HRESULT IDWriteFontFace5_GetGlyphImageFormats(IDWriteFontFace5* This,UINT16 glyph,UINT32 ppem_first,UINT32 ppem_last,DWRITE_GLYPH_IMAGE_FORMATS *formats) {
+ return This->lpVtbl->GetGlyphImageFormats(This,glyph,ppem_first,ppem_last,formats);
}
static __WIDL_INLINE DWRITE_GLYPH_IMAGE_FORMATS IDWriteFontFace5_GetGlyphImageFormats(IDWriteFontFace5* This) {
static inline DWRITE_GLYPH_IMAGE_FORMATS IDWriteFontFace5_GetGlyphImageFormats(IDWriteFontFace5* This) {
return This->lpVtbl->GetGlyphImageFormats(This);
--
2.25.1
@@ -10452,8 +10452,24 @@ IDWritePaintReader : public IUnknown
D2D_RECT_F *clip_box,
DWRITE_PAINT_ATTRIBUTES *glyph_attributes = 0) = 0;
+ HRESULT SetCurrentGlyph(
+ UINT32 glyph_index,
+ DWRITE_PAINT_ELEMENT* paint_element,
+ D2D_RECT_F* clip_box,
+ DWRITE_PAINT_ATTRIBUTES* glyph_attributes = nullptr
+ )
+ {
+ return SetCurrentGlyph(
+ glyph_index,
+ paint_element,
+ sizeof(DWRITE_PAINT_ELEMENT),
+ clip_box,
+ glyph_attributes
+ );
+ }
+
virtual HRESULT STDMETHODCALLTYPE SetTextColor(
- const DWRITE_COLOR_F *text_color) = 0;
+ DWRITE_COLOR_F const& text_color) = 0;
virtual HRESULT STDMETHODCALLTYPE SetColorPaletteIndex(
UINT32 color_palette_index) = 0;
@@ -10464,11 +10480,11 @@ IDWritePaintReader : public IUnknown
virtual HRESULT STDMETHODCALLTYPE MoveToFirstChild(
DWRITE_PAINT_ELEMENT *paint_element,
- UINT32 struct_size) = 0;
+ UINT32 struct_size = sizeof(DWRITE_PAINT_ELEMENT)) = 0;
virtual HRESULT STDMETHODCALLTYPE MoveToNextSibling(
DWRITE_PAINT_ELEMENT *paint_element,
- UINT32 struct_size) = 0;
+ UINT32 struct_size = sizeof(DWRITE_PAINT_ELEMENT)) = 0;
virtual HRESULT STDMETHODCALLTYPE MoveToParent(
) = 0;
From c8a7600f9bee5d605b5559dda16b7ae09a17beba Mon Sep 17 00:00:00 2001
From: Biswapriyo Nath <nathbappai@gmail.com>
Date: Tue, 5 Nov 2024 06:33:12 +0000
Subject: [PATCH] headers-git: Workaround redefinition error in
windows.foundation.h
diff --git a/mingw-w64-headers/include/windows.foundation.h b/mingw-w64-headers/include/windows.foundation.h
index 8be88e4..95aa62d 100644
--- a/mingw-w64-headers/include/windows.foundation.h
+++ b/mingw-w64-headers/include/windows.foundation.h
@@ -898,14 +898,6 @@ typedef interface __FIReference_1_TimeSpan __FIReference_1_TimeSpan;
#endif /* __cplusplus */
#endif
-#ifndef ____FIReference_1_boolean_FWD_DEFINED__
-#define ____FIReference_1_boolean_FWD_DEFINED__
-typedef interface __FIReference_1_boolean __FIReference_1_boolean;
-#ifdef __cplusplus
-#define __FIReference_1_boolean ABI::Windows::Foundation::IReference<boolean >
-#endif /* __cplusplus */
-#endif
-
#ifndef ____FITypedEventHandler_2_IInspectable_IInspectable_FWD_DEFINED__
#define ____FITypedEventHandler_2_IInspectable_IInspectable_FWD_DEFINED__
typedef interface __FITypedEventHandler_2_IInspectable_IInspectable __FITypedEventHandler_2_IInspectable_IInspectable;
@@ -1798,14 +1790,6 @@ typedef interface __FIReference_1_TimeSpan __FIReference_1_TimeSpan;
#endif /* __cplusplus */
#endif
-#ifndef ____FIReference_1_boolean_FWD_DEFINED__
-#define ____FIReference_1_boolean_FWD_DEFINED__
-typedef interface __FIReference_1_boolean __FIReference_1_boolean;
-#ifdef __cplusplus
-#define __FIReference_1_boolean ABI::Windows::Foundation::IReference<boolean >
-#endif /* __cplusplus */
-#endif
-
/*****************************************************************************
* IAsyncActionCompletedHandler interface
*/
@@ -13624,128 +13608,6 @@ static inline HRESULT __FIReference_1_TimeSpan_get_Value(__FIReference_1_TimeSpa
#endif /* ____FIReference_1_TimeSpan_INTERFACE_DEFINED__ */
-/*****************************************************************************
- * IReference<boolean > interface
- */
-#ifndef ____FIReference_1_boolean_INTERFACE_DEFINED__
-#define ____FIReference_1_boolean_INTERFACE_DEFINED__
-
-DEFINE_GUID(IID___FIReference_1_boolean, 0x3c00fd60, 0x2950, 0x5939, 0xa2,0x1a, 0x2d,0x12,0xc5,0xa0,0x1b,0x8a);
-#if defined(__cplusplus) && !defined(CINTERFACE)
-} /* extern "C" */
-namespace ABI {
- namespace Windows {
- namespace Foundation {
- template<>
- MIDL_INTERFACE("3c00fd60-2950-5939-a21a-2d12c5a01b8a")
- IReference<boolean > : IReference_impl<boolean >
- {
- };
- }
- }
-}
-extern "C" {
-#ifdef __CRT_UUID_DECL
-__CRT_UUID_DECL(__FIReference_1_boolean, 0x3c00fd60, 0x2950, 0x5939, 0xa2,0x1a, 0x2d,0x12,0xc5,0xa0,0x1b,0x8a)
-#endif
-#else
-typedef struct __FIReference_1_booleanVtbl {
- BEGIN_INTERFACE
-
- /*** IUnknown methods ***/
- HRESULT (STDMETHODCALLTYPE *QueryInterface)(
- __FIReference_1_boolean *This,
- REFIID riid,
- void **ppvObject);
-
- ULONG (STDMETHODCALLTYPE *AddRef)(
- __FIReference_1_boolean *This);
-
- ULONG (STDMETHODCALLTYPE *Release)(
- __FIReference_1_boolean *This);
-
- /*** IInspectable methods ***/
- HRESULT (STDMETHODCALLTYPE *GetIids)(
- __FIReference_1_boolean *This,
- ULONG *iidCount,
- IID **iids);
-
- HRESULT (STDMETHODCALLTYPE *GetRuntimeClassName)(
- __FIReference_1_boolean *This,
- HSTRING *className);
-
- HRESULT (STDMETHODCALLTYPE *GetTrustLevel)(
- __FIReference_1_boolean *This,
- TrustLevel *trustLevel);
-
- /*** IReference<boolean > methods ***/
- HRESULT (STDMETHODCALLTYPE *get_Value)(
- __FIReference_1_boolean *This,
- boolean *value);
-
- END_INTERFACE
-} __FIReference_1_booleanVtbl;
-
-interface __FIReference_1_boolean {
- CONST_VTBL __FIReference_1_booleanVtbl* lpVtbl;
-};
-
-#ifdef COBJMACROS
-#ifndef WIDL_C_INLINE_WRAPPERS
-/*** IUnknown methods ***/
-#define __FIReference_1_boolean_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
-#define __FIReference_1_boolean_AddRef(This) (This)->lpVtbl->AddRef(This)
-#define __FIReference_1_boolean_Release(This) (This)->lpVtbl->Release(This)
-/*** IInspectable methods ***/
-#define __FIReference_1_boolean_GetIids(This,iidCount,iids) (This)->lpVtbl->GetIids(This,iidCount,iids)
-#define __FIReference_1_boolean_GetRuntimeClassName(This,className) (This)->lpVtbl->GetRuntimeClassName(This,className)
-#define __FIReference_1_boolean_GetTrustLevel(This,trustLevel) (This)->lpVtbl->GetTrustLevel(This,trustLevel)
-/*** IReference<boolean > methods ***/
-#define __FIReference_1_boolean_get_Value(This,value) (This)->lpVtbl->get_Value(This,value)
-#else
-/*** IUnknown methods ***/
-static inline HRESULT __FIReference_1_boolean_QueryInterface(__FIReference_1_boolean* This,REFIID riid,void **ppvObject) {
- return This->lpVtbl->QueryInterface(This,riid,ppvObject);
-}
-static inline ULONG __FIReference_1_boolean_AddRef(__FIReference_1_boolean* This) {
- return This->lpVtbl->AddRef(This);
-}
-static inline ULONG __FIReference_1_boolean_Release(__FIReference_1_boolean* This) {
- return This->lpVtbl->Release(This);
-}
-/*** IInspectable methods ***/
-static inline HRESULT __FIReference_1_boolean_GetIids(__FIReference_1_boolean* This,ULONG *iidCount,IID **iids) {
- return This->lpVtbl->GetIids(This,iidCount,iids);
-}
-static inline HRESULT __FIReference_1_boolean_GetRuntimeClassName(__FIReference_1_boolean* This,HSTRING *className) {
- return This->lpVtbl->GetRuntimeClassName(This,className);
-}
-static inline HRESULT __FIReference_1_boolean_GetTrustLevel(__FIReference_1_boolean* This,TrustLevel *trustLevel) {
- return This->lpVtbl->GetTrustLevel(This,trustLevel);
-}
-/*** IReference<boolean > methods ***/
-static inline HRESULT __FIReference_1_boolean_get_Value(__FIReference_1_boolean* This,boolean *value) {
- return This->lpVtbl->get_Value(This,value);
-}
-#endif
-#ifdef WIDL_using_Windows_Foundation
-#define IID_IReference_boolean IID___FIReference_1_boolean
-#define IReference_booleanVtbl __FIReference_1_booleanVtbl
-#define IReference_boolean __FIReference_1_boolean
-#define IReference_boolean_QueryInterface __FIReference_1_boolean_QueryInterface
-#define IReference_boolean_AddRef __FIReference_1_boolean_AddRef
-#define IReference_boolean_Release __FIReference_1_boolean_Release
-#define IReference_boolean_GetIids __FIReference_1_boolean_GetIids
-#define IReference_boolean_GetRuntimeClassName __FIReference_1_boolean_GetRuntimeClassName
-#define IReference_boolean_GetTrustLevel __FIReference_1_boolean_GetTrustLevel
-#define IReference_boolean_get_Value __FIReference_1_boolean_get_Value
-#endif /* WIDL_using_Windows_Foundation */
-#endif
-
-#endif
-
-#endif /* ____FIReference_1_boolean_INTERFACE_DEFINED__ */
-
/*****************************************************************************
* ITypedEventHandler<IInspectable*,IInspectable* > interface
*/
diff --git a/mingw-w64-headers/include/windows.foundation.idl b/mingw-w64-headers/include/windows.foundation.idl
index 88a9f57..7a64459 100644
--- a/mingw-w64-headers/include/windows.foundation.idl
+++ b/mingw-w64-headers/include/windows.foundation.idl
@@ -150,7 +150,6 @@ namespace Windows.Foundation {
interface Windows.Foundation.IReference<Windows.Foundation.Rect>;
interface Windows.Foundation.IReference<Windows.Foundation.Size>;
interface Windows.Foundation.IReference<Windows.Foundation.TimeSpan>;
- interface Windows.Foundation.IReference<boolean>;
interface Windows.Foundation.TypedEventHandler<IInspectable *, IInspectable *>;
interface Windows.Foundation.TypedEventHandler<Windows.Foundation.IMemoryBufferReference *, IInspectable *>;
}
From 753c3ad7018936ef9a9d2af8b75efbfa14c149b7 Mon Sep 17 00:00:00 2001
From: Tom Ritter <tom@ritter.vg>
Date: Thu, 2 Feb 2023 12:26:22 -0500
Subject: [PATCH 2/7] Add back the IUnknown_QI functions
---
mingw-w64-headers/include/unknwn.h | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/mingw-w64-headers/include/unknwn.h b/mingw-w64-headers/include/unknwn.h
index f3ada04a2..f33e8f270 100644
--- a/mingw-w64-headers/include/unknwn.h
+++ b/mingw-w64-headers/include/unknwn.h
@@ -169,6 +169,29 @@ static __WIDL_INLINE ULONG IUnknown_Release(IUnknown* This) {
#endif
+HRESULT STDMETHODCALLTYPE IUnknown_QueryInterface_Proxy(
+ IUnknown* This,
+ REFIID riid,
+ void **ppvObject);
+void __RPC_STUB IUnknown_QueryInterface_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+ULONG STDMETHODCALLTYPE IUnknown_AddRef_Proxy(
+ IUnknown* This);
+void __RPC_STUB IUnknown_AddRef_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
+ULONG STDMETHODCALLTYPE IUnknown_Release_Proxy(
+ IUnknown* This);
+void __RPC_STUB IUnknown_Release_Stub(
+ IRpcStubBuffer* This,
+ IRpcChannelBuffer* pRpcChannelBuffer,
+ PRPC_MESSAGE pRpcMessage,
+ DWORD* pdwStubPhase);
#endif /* __IUnknown_INTERFACE_DEFINED__ */
--
2.25.1
This diff is collapsed.
......@@ -74,11 +74,6 @@ mkdir -p /var/tmp/build
tar -C /var/tmp/build -xf [% c('input_files_by_name/rust') %]
cd /var/tmp/build/rustc-[% c('version') %]-src
[% IF c("var/windows") -%]
patch -p1 < $rootdir/chkstk.patch
sed -i 's/117b50d6725ee0af0a7b3d197ea580655561f66a870ebc450d96af22bf7f39f6/1eebe6e65b11cae356e3c19a886d7585d3cfed41899b5387209516d957613032/g' vendor/compiler_builtins/.cargo-checksum.json
[% END -%]
# This is a workaround to get access to the libunwind header files. Our LLVM_CONFIG
# thinks that the llvm source root is at /var/tmp/dist/clang-source because that's
# where it was when clang was compiled.
......
From d32d5eeeb565c3c6f4288976e4bc07d82d9694fd Mon Sep 17 00:00:00 2001
From: Kleis Auke Wolthuizen <github@kleisauke.nl>
Date: Sat, 10 Feb 2024 14:47:03 +0100
Subject: [PATCH] Sync x86 chkstk intrinsics with LLVM
Incorporates the following commits:
https://github.com/llvm/llvm-project/commit/885d7b759b5c166c07c07f4c58c6e0ba110fb0c2
https://github.com/llvm/llvm-project/commit/1f9eff100ce8faea1284d68b779d844c6e019b77
https://github.com/llvm/llvm-project/commit/7a5cba8bea8f774d48db1b0426bcc102edd2b69f
---
diff --git a/vendor/compiler_builtins/src/x86.rs b/vendor/compiler_builtins/src/x86.rs
index fd1f32e3..5016816e 100644
--- a/vendor/compiler_builtins/src/x86.rs
+++ b/vendor/compiler_builtins/src/x86.rs
@@ -6,7 +6,6 @@ use core::intrinsics;
// calling convention which can't be implemented using a normal Rust function
// NOTE These functions are never mangled as they are not tested against compiler-rt
-// and mangling ___chkstk would break the `jmp ___chkstk` instruction in __alloca
intrinsics! {
#[naked]
@@ -15,50 +14,8 @@ intrinsics! {
target_env = "gnu",
not(feature = "no-asm")
))]
- pub unsafe extern "C" fn ___chkstk_ms() {
- core::arch::asm!(
- "push %ecx",
- "push %eax",
- "cmp $0x1000,%eax",
- "lea 12(%esp),%ecx",
- "jb 1f",
- "2:",
- "sub $0x1000,%ecx",
- "test %ecx,(%ecx)",
- "sub $0x1000,%eax",
- "cmp $0x1000,%eax",
- "ja 2b",
- "1:",
- "sub %eax,%ecx",
- "test %ecx,(%ecx)",
- "pop %eax",
- "pop %ecx",
- "ret",
- options(noreturn, att_syntax)
- );
- }
-
- // FIXME: __alloca should be an alias to __chkstk
- #[naked]
- #[cfg(all(
- windows,
- target_env = "gnu",
- not(feature = "no-asm")
- ))]
- pub unsafe extern "C" fn __alloca() {
- core::arch::asm!(
- "jmp ___chkstk", // Jump to ___chkstk since fallthrough may be unreliable"
- options(noreturn, att_syntax)
- );
- }
-
- #[naked]
- #[cfg(all(
- windows,
- target_env = "gnu",
- not(feature = "no-asm")
- ))]
- pub unsafe extern "C" fn ___chkstk() {
+ pub unsafe extern "C" fn _alloca() {
+ // _chkstk and _alloca are the same function
core::arch::asm!(
"push %ecx",
"cmp $0x1000,%eax",
......@@ -65,5 +65,3 @@ input_files:
- project: python
name: python
enable: '[% c("var/linux") %]'
- filename: chkstk.patch
enable: '[% c("var/windows") %]'
#!/bin/bash
[% c("var/set_default_env") -%]
mkdir -p /var/tmp/build /var/tmp/dist
distdir=/var/tmp/dist
builddir=/var/tmp/build/[% project %]-[% c('version') %]
tar -C /var/tmp/dist -xf $rootdir/[% c('input_files_by_name/rust') %]
export PATH="/var/tmp/dist/rust/bin:$PATH"
tar -C /var/tmp/build -xf [% project %]-[% c('version') %].tar.[% c('compress_tar') %]
cd "$builddir/crates/libs/windows"
cargo package
cd $distdir
tar -xf $builddir/target/package/windows-*.crate
mv windows-* windows-rs
[% c('tar', {
tar_src => [ project ],
tar_args => '-caf ' _ dest_dir _ '/' _ c('filename'),
}) %]
version: 0.52.0
filename: '[% project %]-[% c("version") %]-[% c("var/build_id") %].tar.[% c("compress_tar") %]'
git_url: https://github.com/microsoft/windows-rs.git
git_hash: 3a605cba064b26f2a198ac58085f8c8836f47c38
container:
use_container: 1
disable_network:
# It seems Cargo really does not want to use the projects in the same path.
# So, build this package with network enabled, and check the hash of the
# output in the consumers (currently only Firefox).
build: 0
input_files:
- project: container-image
- name: rust
project: rust
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment