tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit e1d080bed3d693f359e9729331a2604f7138f370
parent 3905f930df89fff78eb4416b1e9d7c0c8971686d
Author: Greg Stoll <gstoll@mozilla.com>
Date:   Mon,  6 Oct 2025 20:49:48 +0000

Bug 1992783 - fix mingw builds by adding Windows App SDK toolchain dependency r=taskgraph-reviewers,win-reviewers,handyman,jmaher

Also turned off using the Windows App SDK in mingw since that seems to
be the pattern we follow for other advanced Windows features.

Also fixex win64-st-autotest build, and fixes another mingw bustage
in TestFile.cpp.

Differential Revision: https://phabricator.services.mozilla.com/D267643

Diffstat:
Mtaskcluster/kinds/build/windows-mingw.yml | 4++++
Mtaskcluster/kinds/static-analysis-autotest/kind.yml | 1+
Mwidget/windows/WindowsUIUtils.cpp | 4++++
Mxpcom/tests/gtest/TestFile.cpp | 6+++++-
4 files changed, 14 insertions(+), 1 deletion(-)

diff --git a/taskcluster/kinds/build/windows-mingw.yml b/taskcluster/kinds/build/windows-mingw.yml @@ -54,6 +54,7 @@ win32-mingwclang/opt: - linux64-dump_syms - sysroot-x86_64-linux-gnu - sysroot-wasm32-wasi + - winappsdk-x86-pc-windows-msvc win32-mingwclang/debug: description: "Win32 MinGW-Clang Debug" @@ -93,6 +94,7 @@ win32-mingwclang/debug: - linux64-dump_syms - sysroot-x86_64-linux-gnu - sysroot-wasm32-wasi + - winappsdk-x86-pc-windows-msvc win64-mingwclang/opt: description: "Win64 MinGW-Clang Opt" @@ -132,6 +134,7 @@ win64-mingwclang/opt: - linux64-dump_syms - sysroot-x86_64-linux-gnu - sysroot-wasm32-wasi + - winappsdk-x86_64-pc-windows-msvc win64-mingwclang/debug: description: "Win64 MinGW-Clang Debug" @@ -171,3 +174,4 @@ win64-mingwclang/debug: - linux64-dump_syms - sysroot-x86_64-linux-gnu - sysroot-wasm32-wasi + - winappsdk-x86_64-pc-windows-msvc diff --git a/taskcluster/kinds/static-analysis-autotest/kind.yml b/taskcluster/kinds/static-analysis-autotest/kind.yml @@ -100,5 +100,6 @@ tasks: - win64-winchecksec - vs - sysroot-wasm32-wasi + - winappsdk-x86_64-pc-windows-msvc fetch: - windows-rs diff --git a/widget/windows/WindowsUIUtils.cpp b/widget/windows/WindowsUIUtils.cpp @@ -1204,6 +1204,7 @@ enum TitleBarHeightOption : int32_t { } // namespace Microsoft } // namespace winrt +#ifndef __MINGW32__ static StaticRefPtr<winrt::Microsoft::UI::Windowing::IAppWindowStatics> sAppWindowStatics; using GetWindowIdFromWindowType = HRESULT(STDAPICALLTYPE*)( @@ -1303,8 +1304,10 @@ bool InitializeWindowsAppSDKStatics() { } return true; } +#endif void WindowsUIUtils::SetIsTitlebarCollapsed(HWND aWnd, bool aIsCollapsed) { +#ifndef __MINGW32__ // Used to avoid synchronization for loading libraries below MOZ_ASSERT(NS_IsMainThread()); // This function is needed to avoid drawing the titlebar buttons @@ -1427,4 +1430,5 @@ void WindowsUIUtils::SetIsTitlebarCollapsed(HWND aWnd, bool aIsCollapsed) { return; } } +#endif } diff --git a/xpcom/tests/gtest/TestFile.cpp b/xpcom/tests/gtest/TestFile.cpp @@ -64,6 +64,8 @@ static auto GetSecurityInfoStructured(nsIFile* aFile) { std::move(secDesc)); } +// SECURITY_SID_SIZE() is not defined in mingw headers +# if !defined(__MINGW32__) static void AddAcesForRandomSidToDir(nsIFile* aDir) { auto [dirPath, pDirDacl, secDesc] = GetSecurityInfoStructured(aDir); @@ -96,6 +98,7 @@ static void AddAcesForRandomSidToDir(nsIFile* aDir) { newDacl.get(), nullptr), (ULONG)ERROR_SUCCESS); } +# endif #endif static already_AddRefed<nsIFile> NewFile(nsIFile* aBase) { @@ -599,7 +602,8 @@ static void SetupAndTestFunctions(const nsAString& aDirName, // Test moving across directories and renaming at the same time ASSERT_TRUE(TestMove(subdir, base, "file2.txt", "file4.txt")); -#ifdef XP_WIN + // SECURITY_SID_SIZE() is not defined in mingw headers +#if defined(XP_WIN) && !defined(__MINGW32__) // On Windows if we move a file or directory to a directory on the same volume // where the inherited ACLs differ between the source and target dirs, then we // retain the ACEs from the original dir. Add inherited ACEs for random SIDs