mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 00:43:07 +09:00
Add support for compiling under MinGW + fix Windows compiling in general
This commit is contained in:
parent
e3a45c193c
commit
a5cf494890
56 changed files with 243 additions and 76 deletions
|
|
@ -4,7 +4,8 @@
|
|||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||
|
||||
if CONFIG['COMPILE_ENVIRONMENT']:
|
||||
DIRS += ['typelib']
|
||||
if CONFIG['CC_TYPE'] == 'msvc':
|
||||
DIRS += ['typelib']
|
||||
|
||||
# With --disable-accessibility, we need to compile PDocAccessible.ipdl (which
|
||||
# also depends on COMPtrTypes.h), but not the C++.
|
||||
|
|
|
|||
|
|
@ -3,10 +3,11 @@
|
|||
# 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/.
|
||||
|
||||
FINAL_TARGET_FILES += [
|
||||
'!Accessible.tlb',
|
||||
]
|
||||
if CONFIG['CC_TYPE'] == 'msvc':
|
||||
FINAL_TARGET_FILES += [
|
||||
'!Accessible.tlb',
|
||||
]
|
||||
|
||||
GENERATED_FILES += [
|
||||
'Accessible.tlb',
|
||||
]
|
||||
GENERATED_FILES += [
|
||||
'Accessible.tlb',
|
||||
]
|
||||
|
|
|
|||
|
|
@ -7,9 +7,9 @@
|
|||
#include "mozilla/AppData.h"
|
||||
#include "application.ini.h"
|
||||
#include "nsXPCOMGlue.h"
|
||||
#include <stdlib.h>
|
||||
#if defined(XP_WIN)
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#elif defined(XP_UNIX)
|
||||
#include <sys/resource.h>
|
||||
#include <unistd.h>
|
||||
|
|
|
|||
|
|
@ -5,6 +5,8 @@
|
|||
|
||||
#include "nsWindowsShellService.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "imgIContainer.h"
|
||||
#include "imgIRequest.h"
|
||||
#include "mozilla/gfx/2D.h"
|
||||
|
|
|
|||
|
|
@ -14,14 +14,15 @@ if CONFIG['ENABLE_TESTS']:
|
|||
|
||||
NO_PGO = True
|
||||
|
||||
if CONFIG['WIN32_REDIST_DIR'] and CONFIG['COMPILE_ENVIRONMENT']:
|
||||
for f in ['MSVC_C_RUNTIME_DLL', 'MSVC_CMP_RUNTIME_DLL', 'MSVC_CXX_RUNTIME_DLL']:
|
||||
FINAL_TARGET_FILES += [
|
||||
'%%%s/%s' % (CONFIG['WIN32_REDIST_DIR'], CONFIG[f])
|
||||
]
|
||||
if CONFIG['CC_TYPE'] == 'msvc':
|
||||
if CONFIG['WIN32_REDIST_DIR'] and CONFIG['COMPILE_ENVIRONMENT']:
|
||||
for f in ['MSVC_C_RUNTIME_DLL', 'MSVC_CMP_RUNTIME_DLL', 'MSVC_CXX_RUNTIME_DLL']:
|
||||
FINAL_TARGET_FILES += [
|
||||
'%%%s/%s' % (CONFIG['WIN32_REDIST_DIR'], CONFIG[f])
|
||||
]
|
||||
|
||||
if CONFIG['WIN_UCRT_REDIST_DIR'] and CONFIG['COMPILE_ENVIRONMENT']:
|
||||
for f in ['api-ms-win-*.dll', 'ucrtbase.dll']:
|
||||
FINAL_TARGET_FILES += [
|
||||
'%%%s/%s' % (CONFIG['WIN_UCRT_REDIST_DIR'], f)
|
||||
]
|
||||
if CONFIG['WIN_UCRT_REDIST_DIR'] and CONFIG['COMPILE_ENVIRONMENT']:
|
||||
for f in ['api-ms-win-*.dll', 'ucrtbase.dll']:
|
||||
FINAL_TARGET_FILES += [
|
||||
'%%%s/%s' % (CONFIG['WIN_UCRT_REDIST_DIR'], f)
|
||||
]
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
#include "nsPrintfCString.h"
|
||||
#include "VideoUtils.h"
|
||||
|
||||
const CLSID CLSID_VideoProcessorMFT =
|
||||
const CLSID sCLSID_VideoProcessorMFT =
|
||||
{
|
||||
0x88753b26,
|
||||
0x5b24,
|
||||
|
|
@ -666,7 +666,7 @@ D3D11DXVA2Manager::Init(layers::KnowsCompositor* aKnowsCompositor,
|
|||
}
|
||||
|
||||
mTransform = new MFTDecoder();
|
||||
hr = mTransform->Create(CLSID_VideoProcessorMFT);
|
||||
hr = mTransform->Create(sCLSID_VideoProcessorMFT);
|
||||
if (!SUCCEEDED(hr)) {
|
||||
aFailureReason = nsPrintfCString("MFTDecoder::Create(CLSID_VideoProcessorMFT) failed with code %X", hr);
|
||||
return hr;
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ which makes Windows Media Foundation unavailable.
|
|||
#undef WINVER
|
||||
#define WINVER _WIN32_WINNT_WIN7
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <mfapi.h>
|
||||
#include <mfidl.h>
|
||||
|
|
|
|||
|
|
@ -21,12 +21,6 @@ WIN_LIBS= \
|
|||
---------------------------------------------------------------------- */
|
||||
|
||||
#include "plstr.h"
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
|
||||
#include <unknwn.h>
|
||||
#include <commdlg.h>
|
||||
|
||||
#include "nsIWebBrowserPrint.h"
|
||||
#include "nsString.h"
|
||||
#include "nsIServiceManager.h"
|
||||
|
|
@ -43,7 +37,13 @@ WIN_LIBS= \
|
|||
#include "nsCRT.h"
|
||||
#include "prenv.h" /* for PR_GetEnv */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <tchar.h>
|
||||
|
||||
#include <unknwn.h>
|
||||
#include <commdlg.h>
|
||||
|
||||
#include <winspool.h>
|
||||
|
||||
// For Localization
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#ifndef GFX_READBACKMANAGERD3D11_H
|
||||
#define GFX_READBACKMANAGERD3D11_H
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <d3d10_1.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ public:
|
|||
virtual ID3D11ShaderResourceView* GetShaderResourceView() override;
|
||||
|
||||
// Returns nullptr if this texture was created by a DXGI TextureHost.
|
||||
virtual DataTextureSource* AsDataTextureSource() override { return mAllowTextureUploads ? this : false; }
|
||||
virtual DataTextureSource* AsDataTextureSource() override { return mAllowTextureUploads ? this : nullptr; }
|
||||
|
||||
virtual void DeallocateDeviceData() override { mTexture = nullptr; }
|
||||
|
||||
|
|
|
|||
|
|
@ -709,7 +709,11 @@ GenerateRandomSeed()
|
|||
{
|
||||
uint64_t seed = 0;
|
||||
|
||||
#if defined(__linux__)
|
||||
#if defined(XP_WIN)
|
||||
if (SystemFunction036(&seed, sizeof(seed)))
|
||||
return seed;
|
||||
|
||||
#elif defined(__linux__)
|
||||
// Linux does not provide arc4random(), so use /dev/urandom.
|
||||
int fd = open("/dev/urandom", O_RDONLY);
|
||||
if (fd >= 0) {
|
||||
|
|
@ -732,8 +736,10 @@ GenerateRandomSeed()
|
|||
|
||||
#else
|
||||
// Generic fallback
|
||||
uint32_t lo = random();
|
||||
uint32_t hi = random();
|
||||
uint32_t lo = 0;
|
||||
uint32_t hi = 0;
|
||||
lo = static_cast<uint32_t>(rand());
|
||||
hi = static_cast<uint32_t>(rand());
|
||||
return (static_cast<uint64_t>(hi) << 32) | lo;
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@
|
|||
*/
|
||||
|
||||
#ifdef XP_WIN
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
// mmsystem isn't part of WIN32_LEAN_AND_MEAN, so we have
|
||||
// to manually include it
|
||||
|
|
|
|||
|
|
@ -1 +1,13 @@
|
|||
// Intentionally left blank
|
||||
/*
|
||||
* Stagefright's win32 include path shadows the toolchain <pthread.h>.
|
||||
* On MinGW we need the real pthread declarations for libstdc++ gthr.
|
||||
*/
|
||||
|
||||
#ifndef stagefright_win32_pthread_h
|
||||
#define stagefright_win32_pthread_h
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
# include_next <pthread.h>
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -43,9 +43,9 @@ public:
|
|||
}
|
||||
addr_ = buf;
|
||||
|
||||
is_vpn_ = (local_addr.interface.type & NR_INTERFACE_TYPE_VPN) != 0 ? 1 : 0;
|
||||
estimated_speed_ = local_addr.interface.estimated_speed;
|
||||
type_preference_ = GetNetworkTypePreference(local_addr.interface.type);
|
||||
is_vpn_ = (local_addr.if_info.type & NR_INTERFACE_TYPE_VPN) != 0 ? 1 : 0;
|
||||
estimated_speed_ = local_addr.if_info.estimated_speed;
|
||||
type_preference_ = GetNetworkTypePreference(local_addr.if_info.type);
|
||||
ip_version_ = local_addr.addr.ip_version;
|
||||
return true;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1996,8 +1996,8 @@ class WebRtcIcePrioritizerTest : public StunTest {
|
|||
std::string str_addr = "10.0.0." + num;
|
||||
std::string ifname = "eth" + num;
|
||||
nr_local_addr local_addr;
|
||||
local_addr.interface.type = type;
|
||||
local_addr.interface.estimated_speed = estimated_speed;
|
||||
local_addr.if_info.type = type;
|
||||
local_addr.if_info.estimated_speed = estimated_speed;
|
||||
|
||||
int r = nr_str_port_to_transport_addr(str_addr.c_str(), 0,
|
||||
IPPROTO_UDP, &(local_addr.addr));
|
||||
|
|
|
|||
|
|
@ -40,13 +40,13 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|||
int nr_local_addr_copy(nr_local_addr *to, nr_local_addr *from)
|
||||
{
|
||||
nr_transport_addr_copy(&(to->addr), &(from->addr));
|
||||
to->interface = from->interface;
|
||||
to->if_info = from->if_info;
|
||||
return(0);
|
||||
}
|
||||
|
||||
int nr_local_addr_fmt_info_string(nr_local_addr *addr, char *buf, int len)
|
||||
{
|
||||
int addr_type = addr->interface.type;
|
||||
int addr_type = addr->if_info.type;
|
||||
const char *vpn = (addr_type & NR_INTERFACE_TYPE_VPN) ? "VPN on " : "";
|
||||
|
||||
const char *type = (addr_type & NR_INTERFACE_TYPE_WIRED) ? "wired" :
|
||||
|
|
@ -55,7 +55,7 @@ int nr_local_addr_fmt_info_string(nr_local_addr *addr, char *buf, int len)
|
|||
"unknown";
|
||||
|
||||
snprintf(buf, len, "%s%s, estimated speed: %d kbps",
|
||||
vpn, type, addr->interface.estimated_speed);
|
||||
vpn, type, addr->if_info.estimated_speed);
|
||||
buf[len - 1] = '\0';
|
||||
return (0);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ typedef struct nr_interface_ {
|
|||
|
||||
typedef struct nr_local_addr_ {
|
||||
nr_transport_addr addr;
|
||||
nr_interface interface;
|
||||
nr_interface if_info;
|
||||
} nr_local_addr;
|
||||
|
||||
int nr_local_addr_copy(nr_local_addr *to, nr_local_addr *from);
|
||||
|
|
|
|||
|
|
@ -220,18 +220,18 @@ stun_get_win32_addrs(nr_local_addr addrs[], int maxaddrs, int *count)
|
|||
|
||||
strlcpy(addrs[n].addr.ifname, hex_hashed_ifname, sizeof(addrs[n].addr.ifname));
|
||||
if (tmpAddress->IfType == IF_TYPE_ETHERNET_CSMACD) {
|
||||
addrs[n].interface.type = NR_INTERFACE_TYPE_WIRED;
|
||||
addrs[n].if_info.type = NR_INTERFACE_TYPE_WIRED;
|
||||
} else if (tmpAddress->IfType == IF_TYPE_IEEE80211) {
|
||||
/* Note: this only works for >= Win Vista */
|
||||
addrs[n].interface.type = NR_INTERFACE_TYPE_WIFI;
|
||||
addrs[n].if_info.type = NR_INTERFACE_TYPE_WIFI;
|
||||
} else {
|
||||
addrs[n].interface.type = NR_INTERFACE_TYPE_UNKNOWN;
|
||||
addrs[n].if_info.type = NR_INTERFACE_TYPE_UNKNOWN;
|
||||
}
|
||||
#if (_WIN32_WINNT >= 0x0600)
|
||||
/* Note: only >= Vista provide link speed information */
|
||||
addrs[n].interface.estimated_speed = tmpAddress->TransmitLinkSpeed / 1000;
|
||||
addrs[n].if_info.estimated_speed = tmpAddress->TransmitLinkSpeed / 1000;
|
||||
#else
|
||||
addrs[n].interface.estimated_speed = 0;
|
||||
addrs[n].if_info.estimated_speed = 0;
|
||||
#endif
|
||||
if (++n >= maxaddrs)
|
||||
goto done;
|
||||
|
|
@ -300,11 +300,11 @@ stun_getifaddrs(nr_local_addr addrs[], int maxaddrs, int *count)
|
|||
{
|
||||
/* For wireless network, we won't get ethtool, it's a wired
|
||||
* connection */
|
||||
addrs[*count].interface.type = NR_INTERFACE_TYPE_WIRED;
|
||||
addrs[*count].if_info.type = NR_INTERFACE_TYPE_WIRED;
|
||||
#ifdef DONT_HAVE_ETHTOOL_SPEED_HI
|
||||
addrs[*count].interface.estimated_speed = ecmd.speed;
|
||||
addrs[*count].if_info.estimated_speed = ecmd.speed;
|
||||
#else
|
||||
addrs[*count].interface.estimated_speed = ((ecmd.speed_hi << 16) | ecmd.speed) * 1000;
|
||||
addrs[*count].if_info.estimated_speed = ((ecmd.speed_hi << 16) | ecmd.speed) * 1000;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
@ -312,20 +312,20 @@ stun_getifaddrs(nr_local_addr addrs[], int maxaddrs, int *count)
|
|||
e = ioctl(s, SIOCGIWRATE, &wrq);
|
||||
if (e == 0)
|
||||
{
|
||||
addrs[*count].interface.type = NR_INTERFACE_TYPE_WIFI;
|
||||
addrs[*count].interface.estimated_speed = wrq.u.bitrate.value / 1000;
|
||||
addrs[*count].if_info.type = NR_INTERFACE_TYPE_WIFI;
|
||||
addrs[*count].if_info.estimated_speed = wrq.u.bitrate.value / 1000;
|
||||
}
|
||||
|
||||
close(s);
|
||||
|
||||
if (if_addr->ifa_flags & IFF_POINTOPOINT)
|
||||
{
|
||||
addrs[*count].interface.type = NR_INTERFACE_TYPE_UNKNOWN | NR_INTERFACE_TYPE_VPN;
|
||||
addrs[*count].if_info.type = NR_INTERFACE_TYPE_UNKNOWN | NR_INTERFACE_TYPE_VPN;
|
||||
/* TODO (Bug 896913): find backend network type of this VPN */
|
||||
}
|
||||
#else
|
||||
addrs[*count].interface.type = NR_INTERFACE_TYPE_UNKNOWN;
|
||||
addrs[*count].interface.estimated_speed = 0;
|
||||
addrs[*count].if_info.type = NR_INTERFACE_TYPE_UNKNOWN;
|
||||
addrs[*count].if_info.estimated_speed = 0;
|
||||
#endif
|
||||
strlcpy(addrs[*count].addr.ifname, if_addr->ifa_name, sizeof(addrs[*count].addr.ifname));
|
||||
++(*count);
|
||||
|
|
|
|||
|
|
@ -73,11 +73,17 @@ void SetCurrentThreadName(const char* name) {
|
|||
DWORD dwFlags;
|
||||
} threadname_info = {0x1000, name, static_cast<DWORD>(-1), 0};
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
__try {
|
||||
::RaiseException(0x406D1388, 0, sizeof(threadname_info) / sizeof(DWORD),
|
||||
reinterpret_cast<ULONG_PTR*>(&threadname_info));
|
||||
} __except (EXCEPTION_EXECUTE_HANDLER) {
|
||||
}
|
||||
#else
|
||||
// MinGW does not support MSVC's __try/__except syntax.
|
||||
::RaiseException(0x406D1388, 0, sizeof(threadname_info) / sizeof(DWORD),
|
||||
reinterpret_cast<ULONG_PTR*>(&threadname_info));
|
||||
#endif
|
||||
#elif defined(WEBRTC_LINUX) || defined(WEBRTC_ANDROID)
|
||||
prctl(PR_SET_NAME, reinterpret_cast<unsigned long>(name));
|
||||
#elif defined(WEBRTC_MAC) || defined(WEBRTC_IOS)
|
||||
|
|
|
|||
|
|
@ -605,7 +605,7 @@ BOOL MyWinHttpGetProxyForUrl(pfnWinHttpGetProxyForUrl pWHGPFU,
|
|||
// error.
|
||||
BOOL success = FALSE;
|
||||
|
||||
#if (_HAS_EXCEPTIONS == 0)
|
||||
#if (_HAS_EXCEPTIONS == 0) && defined(_MSC_VER)
|
||||
__try {
|
||||
success = pWHGPFU(hWinHttp, url, options, info);
|
||||
} __except(EXCEPTION_EXECUTE_HANDLER) {
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ protected:
|
|||
int32_t capabilityIndex);
|
||||
|
||||
int32_t DisconnectGraph();
|
||||
HRESULT VideoCaptureDS::ConnectDVCamera();
|
||||
HRESULT ConnectDVCamera();
|
||||
|
||||
DeviceInfoDS _dsInfo;
|
||||
VideoCaptureCapability _activeCapability;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,8 @@
|
|||
|
||||
#include <assert.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef WIN32
|
||||
#include <direct.h>
|
||||
#include <tchar.h>
|
||||
|
|
@ -33,7 +35,6 @@
|
|||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "webrtc/typedefs.h" // For architecture defines
|
||||
|
|
|
|||
|
|
@ -212,6 +212,7 @@ static unsigned long tlsIndex = 0xffffffff;
|
|||
#define _pthread_self() __threadid()
|
||||
|
||||
/* use MSVC intrinsics */
|
||||
#if defined(_MSC_VER)
|
||||
#pragma intrinsic(_BitScanForward)
|
||||
static __forceinline int
|
||||
ffs(int x)
|
||||
|
|
@ -223,6 +224,16 @@ ffs(int x)
|
|||
|
||||
return (0);
|
||||
}
|
||||
#else
|
||||
static inline int
|
||||
ffs(int x)
|
||||
{
|
||||
if (x == 0)
|
||||
return (0);
|
||||
|
||||
return (__builtin_ctz((unsigned int)x) + 1);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Implement getenv without using malloc */
|
||||
static char mozillaMallocOptionsBuf[64];
|
||||
|
|
@ -243,11 +254,13 @@ typedef unsigned char uint8_t;
|
|||
typedef unsigned uint32_t;
|
||||
typedef unsigned long long uint64_t;
|
||||
typedef unsigned long long uintmax_t;
|
||||
#if !defined(_SSIZE_T_) && !defined(_SSIZE_T_DEFINED)
|
||||
#if defined(_WIN64)
|
||||
typedef long long ssize_t;
|
||||
#else
|
||||
typedef long ssize_t;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define MALLOC_DECOMMIT
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -36,6 +36,12 @@ typedef __m128i z_vec128i_t;
|
|||
#error chunkcopy.h inflate chunk SIMD is not defined for your build target
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#define Z_ALIGN16(type, name) __declspec(align(16)) type name
|
||||
#else
|
||||
#define Z_ALIGN16(type, name) type name __attribute__((aligned(16)))
|
||||
#endif
|
||||
|
||||
#ifdef _MSC_VER
|
||||
#if _MSC_VER < 1900
|
||||
#define inline
|
||||
|
|
@ -222,7 +228,7 @@ static inline z_vec128i_t v_load64_dup(const void* src) {
|
|||
#if 0//def _WIN64
|
||||
return _mm_set1_epi64x(i64);
|
||||
#else
|
||||
_declspec(align(16)) uint64_t temp[2] = {i64, i64};
|
||||
Z_ALIGN16(uint64_t, temp[2]) = {i64, i64};
|
||||
return _mm_load_si128((const __m128i*)temp);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,4 +88,8 @@ else:
|
|||
'inflate.c',
|
||||
]
|
||||
|
||||
if CONFIG['OS_ARCH'] == 'WINNT' and CONFIG['GNU_CC']:
|
||||
SOURCES['crc32_simd.c'].flags += ['-msse4.2', '-mpclmul']
|
||||
SOURCES['crc_folding.c'].flags += ['-msse4.2', '-mpclmul']
|
||||
|
||||
|
||||
|
|
|
|||
85
mozconfigs/uxp-win32-mingw32
Normal file
85
mozconfigs/uxp-win32-mingw32
Normal file
|
|
@ -0,0 +1,85 @@
|
|||
## UXP mozconfig thing based off roytam1's config and r3dfox config
|
||||
|
||||
##Uncomment PGO for release build
|
||||
|
||||
# 16 jobs for 16 cores
|
||||
mk_add_options MOZ_MAKE_FLAGS="-j6"
|
||||
|
||||
# x86 build
|
||||
ac_add_options --host=i686-pc-mingw32
|
||||
ac_add_options --target=i686-pc-mingw32
|
||||
WIN32_REDIST_DIR=$VCINSTALLDIR/Redist/MSVC/14.16.27012/x86
|
||||
WIN_UCRT_REDIST_DIR=$WINDOWSSDKDIR/Redist/10.0.19041.0/ucrt/DLLs/r86
|
||||
|
||||
CC=gcc
|
||||
CXX=g++
|
||||
LD=g++
|
||||
AR=ar
|
||||
AS=as
|
||||
RANLIB=ranlib
|
||||
|
||||
# Build only Hydra
|
||||
ac_add_options --enable-application=basilisk
|
||||
ac_add_options --disable-artifact-builds
|
||||
|
||||
# Updater stuffs
|
||||
ac_add_options --disable-updater
|
||||
# Enable if update server and signatures are figured out
|
||||
#ac_add_options --enable-nss-mar
|
||||
|
||||
# Optimization settings
|
||||
ac_add_options --disable-accessibility
|
||||
ac_add_options --disable-debug
|
||||
ac_add_options --disable-debug-js-modules
|
||||
ac_add_options --disable-debug-symbols
|
||||
ac_add_options --disable-tests
|
||||
ac_add_options --enable-devtools
|
||||
#ac_add_options --enable-install-strip
|
||||
ac_add_options --enable-jemalloc
|
||||
ac_add_options --enable-js-lto
|
||||
ac_add_options --enable-optimize="-O2"
|
||||
ac_add_options --enable-phoenix-extensions
|
||||
ac_add_options --enable-release
|
||||
ac_add_options --enable-shared-js
|
||||
ac_add_options --enable-strip
|
||||
MOZ_OPTIMIZE=1
|
||||
export MOZ_OPTIMIZE=1
|
||||
mk_add_options MOZ_OPTIMIZE=1
|
||||
export MOZILLA_OFFICIAL=1
|
||||
export STRIP_FLAGS="--strip-debug --strip-unneeded"
|
||||
|
||||
# Media settings
|
||||
ac_add_options --enable-av1
|
||||
ac_add_options --enable-jxl
|
||||
ac_add_options --enable-raw
|
||||
ac_add_options --disable-webrtc
|
||||
|
||||
|
||||
# Client settings
|
||||
ac_add_options --disable-crashreporter
|
||||
ac_add_options --disable-eme
|
||||
ac_add_options --disable-maintenance-service
|
||||
ac_add_options --disable-parental-controls
|
||||
mk_add_options MOZ_SERVICES_HEALTHREPORT=0
|
||||
export CROSS_COMPILE=0
|
||||
export MOZ_CRASHREPORTER=0
|
||||
export MOZ_DATA_REPORTING=0
|
||||
export MOZ_INCLUDE_SOURCE_INFO=1
|
||||
export MOZ_REQUIRE_SIGNING=
|
||||
export MOZ_SOURCE_CHANGESET=iloveneedingtobodgechangesetfornoreason
|
||||
export MOZ_TELEMETRY_REPORTING=
|
||||
export MOZ_PACKAGE_JSSHELL=1
|
||||
|
||||
# Set -Copt-level=3
|
||||
export OPT_LEVEL="3"
|
||||
ac_add_options OPT_LEVEL="3"
|
||||
|
||||
# Enable LTO
|
||||
export MOZ_LTO=1
|
||||
ac_add_options MOZ_LTO=1
|
||||
|
||||
# Stops the compiler from bitching
|
||||
export CFLAGS="-O2 -std=gnu++17"
|
||||
export CPPFLAGS="-O2 -std=gnu++17"
|
||||
export CXXFLAGS="-O2 -std=gnu++17"
|
||||
export VERBOSE=0
|
||||
|
|
@ -3,11 +3,12 @@
|
|||
* 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/. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <winsock2.h>
|
||||
#include <ws2ipdef.h>
|
||||
#include <iphlpapi.h>
|
||||
|
||||
#include "mozilla/UniquePtr.h"
|
||||
#include "mozilla/UniquePtrExtensions.h"
|
||||
|
||||
#include "NetworkInfoServiceImpl.h"
|
||||
|
||||
|
|
@ -17,7 +18,7 @@ namespace net {
|
|||
nsresult
|
||||
DoListAddresses(AddrMapType& aAddrMap)
|
||||
{
|
||||
UniquePtr<MIB_IPADDRTABLE> ipAddrTable;
|
||||
UniqueFreePtr<MIB_IPADDRTABLE> ipAddrTable;
|
||||
DWORD size = sizeof(MIB_IPADDRTABLE);
|
||||
|
||||
ipAddrTable.reset((MIB_IPADDRTABLE*) malloc(size));
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#if defined(XP_MACOSX) || defined(XP_LINUX)
|
||||
#include <unistd.h>
|
||||
#elif defined(XP_WIN)
|
||||
#include <stdlib.h>
|
||||
#include <winsock2.h>
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
// inet_ntop() doesn't exist on Windows XP.
|
||||
#define _WINSOCK_DEPRECATED_NO_WARNINGS
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
#include <windef.h>
|
||||
#include <winbase.h>
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ class VisualStudioBackend(CommonBackend):
|
|||
self._out_dir = os.path.join(self.environment.topobjdir, 'msvc')
|
||||
self._projsubdir = 'projects'
|
||||
|
||||
self._version = self.environment.substs.get('MSVS_VERSION', '2015')
|
||||
self._version = self.environment.substs.get('MSVS_VERSION')
|
||||
|
||||
self._paths_to_sources = {}
|
||||
self._paths_to_includes = {}
|
||||
|
|
@ -132,6 +132,12 @@ class VisualStudioBackend(CommonBackend):
|
|||
out_dir = self._out_dir
|
||||
out_proj_dir = os.path.join(self._out_dir, self._projsubdir)
|
||||
|
||||
# If we do not have an MSVC version, we should not generate Visual
|
||||
# Studio projects.
|
||||
version = self._version
|
||||
if not version:
|
||||
return
|
||||
|
||||
projects = self._write_projects_for_sources(self._libs_to_paths,
|
||||
"library", out_proj_dir)
|
||||
projects.update(self._write_projects_for_sources(self._progs_to_paths,
|
||||
|
|
|
|||
|
|
@ -3,13 +3,13 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#if defined(XP_WIN)
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#include "updatecommon.h"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* 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/. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <ras.h>
|
||||
#include <wininet.h>
|
||||
|
|
|
|||
|
|
@ -93,6 +93,7 @@
|
|||
|
||||
#ifdef XP_WIN
|
||||
#include "nsIWinAppHelper.h"
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <intrin.h>
|
||||
#include <math.h>
|
||||
|
|
@ -136,7 +137,6 @@
|
|||
#include "mozilla/StartupTimeline.h"
|
||||
#include "mozilla/LateWriteChecks.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <locale.h>
|
||||
|
||||
#ifdef XP_UNIX
|
||||
|
|
|
|||
|
|
@ -41,11 +41,11 @@
|
|||
#include "nsNativeCharsetUtils.h"
|
||||
#include "nsIAppStartup.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <windows.h>
|
||||
#include <shellapi.h>
|
||||
#include <ddeml.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <io.h>
|
||||
#include <direct.h>
|
||||
#include <fcntl.h>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* 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/. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <audiopolicy.h>
|
||||
#include <mmdeviceapi.h>
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@
|
|||
#ifndef __JumpListBuilder_h__
|
||||
#define __JumpListBuilder_h__
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <windows.h>
|
||||
|
||||
#undef NTDDI_VERSION
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* 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/. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "TaskbarPreview.h"
|
||||
#include <nsITaskbarPreviewController.h>
|
||||
#include <windows.h>
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* 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/. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "WinTaskbar.h"
|
||||
#include "TaskbarPreview.h"
|
||||
#include <nsITaskbarPreviewController.h>
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@
|
|||
|
||||
// Starting with version 10.0.22621.0 of the Windows SDK the AR_STATE enum and
|
||||
// types are only defined when building for Windows 8 instead of Windows 7.
|
||||
#if (WDK_NTDDI_VERSION >= 0x0A00000C) && (WINVER < 0x0602)
|
||||
#if (WDK_NTDDI_VERSION >= 0x0A00000C) && (WINVER < 0x0602) && !defined(MOZ_AR_STATE_DEFINED)
|
||||
|
||||
enum tagAR_STATE {
|
||||
AR_ENABLED = 0x0,
|
||||
|
|
@ -57,6 +57,8 @@ typedef enum tagAR_STATE AR_STATE;
|
|||
|
||||
using PAR_STATE = enum tagAR_STATE*;
|
||||
|
||||
#define MOZ_AR_STATE_DEFINED 1
|
||||
|
||||
#endif // (WDK_NTDDI_VERSION >= 0x0A00000C) && (WINVER < 0x0602)
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* 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/. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <winsdkver.h>
|
||||
#include "mozwrlbase.h"
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
#ifndef nsFilePicker_h__
|
||||
#define nsFilePicker_h__
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
|
||||
// For Vista IFileDialog interfaces which aren't exposed
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ typedef enum _AR_STATE
|
|||
AR_DOCKED = 0x40,
|
||||
AR_LAPTOP = 0x80
|
||||
} AR_STATE, *PAR_STATE;
|
||||
#define MOZ_AR_STATE_DEFINED 1
|
||||
#endif
|
||||
|
||||
class nsLookAndFeel: public nsXPLookAndFeel {
|
||||
|
|
|
|||
|
|
@ -10,9 +10,9 @@
|
|||
#error This file only makes sense on Windows.
|
||||
#endif
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <nscore.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#if defined(XP_WIN)
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <objbase.h>
|
||||
#elif defined(XP_MACOSX)
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
/*****************************
|
||||
Windows implementation of probes, using xperf
|
||||
*****************************/
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <wmistr.h>
|
||||
#include <evntrace.h>
|
||||
|
|
|
|||
|
|
@ -3,9 +3,9 @@
|
|||
* 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/. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <shlwapi.h>
|
||||
#include <stdlib.h>
|
||||
#include "nsWindowsRegKey.h"
|
||||
#include "nsString.h"
|
||||
#include "nsCOMPtr.h"
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
#include "FileUtilsWin.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <psapi.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
#ifndef mozilla_FileUtilsWin_h
|
||||
#define mozilla_FileUtilsWin_h
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include "mozilla/Scoped.h"
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* 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/. */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include "SpecialSystemDirectory.h"
|
||||
#include "nsString.h"
|
||||
#include "nsDependentString.h"
|
||||
|
|
@ -10,9 +11,9 @@
|
|||
|
||||
#if defined(XP_WIN)
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <direct.h>
|
||||
|
|
|
|||
|
|
@ -19,11 +19,11 @@
|
|||
#include <Carbon/Carbon.h>
|
||||
#include "nsILocalFileMac.h"
|
||||
#elif defined(XP_WIN)
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#elif defined(XP_UNIX)
|
||||
#include <unistd.h>
|
||||
#include <stdlib.h>
|
||||
#include <sys/param.h>
|
||||
#endif
|
||||
|
||||
|
|
|
|||
|
|
@ -19,9 +19,9 @@
|
|||
#include "nsIStringEnumerator.h"
|
||||
|
||||
#if defined(XP_WIN)
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include <shlobj.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#elif defined(XP_UNIX)
|
||||
#include <unistd.h>
|
||||
|
|
|
|||
|
|
@ -29,16 +29,16 @@
|
|||
#include "nsReadableUtils.h"
|
||||
|
||||
#include <direct.h>
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#include <shlwapi.h>
|
||||
#include <aclapi.h>
|
||||
#include <windows.h>
|
||||
|
||||
#include "shellapi.h"
|
||||
#include "shlguid.h"
|
||||
|
||||
#include <io.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <mbstring.h>
|
||||
|
||||
#include "nsXPIDLString.h"
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
// Windows
|
||||
//-----------------------------------------------------------------------------
|
||||
#if defined(XP_WIN)
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#include "nsString.h"
|
||||
#include "nsAString.h"
|
||||
|
|
|
|||
|
|
@ -519,14 +519,16 @@ nsTimerImpl::Fire(int32_t aGeneration)
|
|||
this, (TimeStamp::Now() - now).ToMilliseconds()));
|
||||
}
|
||||
|
||||
#if defined(HAVE_DLADDR) && defined(HAVE___CXA_DEMANGLE)
|
||||
#if defined(HAVE_DLADDR) && defined(HAVE___CXA_DEMANGLE) && !defined(XP_WIN)
|
||||
#define USE_DLADDR 1
|
||||
#endif
|
||||
|
||||
#ifdef USE_DLADDR
|
||||
#if !defined(XP_WIN)
|
||||
#include <cxxabi.h>
|
||||
#include <dlfcn.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// See the big comment above GetTimerFiringsLog() to understand this code.
|
||||
void
|
||||
|
|
|
|||
|
|
@ -4,8 +4,8 @@
|
|||
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
|
||||
|
||||
/* Windows only app to show a modal debug dialog - launched by nsDebug.cpp */
|
||||
#include <windows.h>
|
||||
#include <stdlib.h>
|
||||
#include <windows.h>
|
||||
#ifdef _MSC_VER
|
||||
#include <strsafe.h>
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue