Skip to content

Commit

Permalink
build: remove support for 32-bit Windows
Browse files Browse the repository at this point in the history
Closes: #42543
PR-URL: #53184
Fixes: #42543
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Michael Dawson <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Robert Nagy <[email protected]>
Reviewed-By: Richard Lau <[email protected]>
Reviewed-By: Benjamin Gruenbaum <[email protected]>
Reviewed-By: Jiawen Geng <[email protected]>
Reviewed-By: Stefan Stojanovic <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
  • Loading branch information
targos authored May 30, 2024
1 parent 9f6c124 commit 7ad0cc3
Show file tree
Hide file tree
Showing 12 changed files with 34 additions and 173 deletions.
48 changes: 21 additions & 27 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,26 +100,25 @@ Node.js does not support a platform version if a vendor has expired support
for it. In other words, Node.js does not support running on End-of-Life (EoL)
platforms. This is true regardless of entries in the table below.

| Operating System | Architectures | Versions | Support Type | Notes |
| ---------------- | ---------------- | --------------------------------- | ----------------------------------------------- | ------------------------------------ |
| GNU/Linux | x64 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 1 | e.g. Ubuntu 20.04, Debian 10, RHEL 8 |
| GNU/Linux | x64 | kernel >= 3.10, musl >= 1.1.19 | Experimental | e.g. Alpine 3.8 |
| GNU/Linux | x86 | kernel >= 3.10, glibc >= 2.17 | Experimental | Downgraded as of Node.js 10 |
| GNU/Linux | arm64 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 1 | e.g. Ubuntu 20.04, Debian 10, RHEL 8 |
| GNU/Linux | armv7 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 1 | e.g. Ubuntu 20.04, Debian 11 |
| GNU/Linux | armv6 | kernel >= 4.14, glibc >= 2.24 | Experimental | Downgraded as of Node.js 12 |
| GNU/Linux | ppc64le >=power8 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. Ubuntu 20.04, RHEL 8 |
| GNU/Linux | s390x | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. RHEL 8 |
| GNU/Linux | loong64 | kernel >= 5.19, glibc >= 2.36 | Experimental | |
| Windows | x64, x86 (WoW64) | >= Windows 10/Server 2016 | Tier 1 | [^2],[^3] |
| Windows | x86 (native) | >= Windows 10/Server 2016 | Tier 1 (running) / Experimental (compiling)[^4] | |
| Windows | x64, x86 | Windows 8.1/Server 2012 | Experimental | |
| Windows | arm64 | >= Windows 10 | Tier 2 | |
| macOS | x64 | >= 11.0 | Tier 1 | For notes about compilation see [^5] |
| macOS | arm64 | >= 11.0 | Tier 1 | |
| SmartOS | x64 | >= 18 | Tier 2 | |
| AIX | ppc64be >=power8 | >= 7.2 TL04 | Tier 2 | |
| FreeBSD | x64 | >= 13.2 | Experimental | |
| Operating System | Architectures | Versions | Support Type | Notes |
| ---------------- | ---------------- | --------------------------------- | ------------ | ------------------------------------ |
| GNU/Linux | x64 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 1 | e.g. Ubuntu 20.04, Debian 10, RHEL 8 |
| GNU/Linux | x64 | kernel >= 3.10, musl >= 1.1.19 | Experimental | e.g. Alpine 3.8 |
| GNU/Linux | x86 | kernel >= 3.10, glibc >= 2.17 | Experimental | Downgraded as of Node.js 10 |
| GNU/Linux | arm64 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 1 | e.g. Ubuntu 20.04, Debian 10, RHEL 8 |
| GNU/Linux | armv7 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 1 | e.g. Ubuntu 20.04, Debian 11 |
| GNU/Linux | armv6 | kernel >= 4.14, glibc >= 2.24 | Experimental | Downgraded as of Node.js 12 |
| GNU/Linux | ppc64le >=power8 | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. Ubuntu 20.04, RHEL 8 |
| GNU/Linux | s390x | kernel >= 4.18[^1], glibc >= 2.28 | Tier 2 | e.g. RHEL 8 |
| GNU/Linux | loong64 | kernel >= 5.19, glibc >= 2.36 | Experimental | |
| Windows | x64 | >= Windows 10/Server 2016 | Tier 1 | [^2],[^3] |
| Windows | x64 | Windows 8.1/Server 2012 | Experimental | |
| Windows | arm64 | >= Windows 10 | Tier 2 | |
| macOS | x64 | >= 11.0 | Tier 1 | For notes about compilation see [^4] |
| macOS | arm64 | >= 11.0 | Tier 1 | |
| SmartOS | x64 | >= 18 | Tier 2 | |
| AIX | ppc64be >=power8 | >= 7.2 TL04 | Tier 2 | |
| FreeBSD | x64 | >= 13.2 | Experimental | |

<!--lint disable final-definition-->

Expand All @@ -141,12 +140,7 @@ platforms. This is true regardless of entries in the table below.
Windows binary (`node.exe`) in WSL will not work without workarounds such as
stdio redirection.

[^4]: Running Node.js on x86 Windows should work and binaries
are provided. However, tests in our infrastructure only run on WoW64.
Furthermore, compiling on x86 Windows is Experimental and
may not be possible.

[^5]: Our macOS x64 Binaries are compiled with 11.0 as a target. Xcode 13 is
[^4]: Our macOS x64 Binaries are compiled with 11.0 as a target. Xcode 13 is
required to compile.

<!--lint enable final-definition-->
Expand Down Expand Up @@ -175,7 +169,7 @@ Binaries at <https://nodejs.org/download/release/> are produced on:
| linux-ppc64le | RHEL 8 with gcc-toolset-10[^6] |
| linux-s390x | RHEL 8 with gcc-toolset-10[^6] |
| linux-x64 | RHEL 8 with gcc-toolset-10[^6] |
| win-x64 and win-x86 | Windows Server 2022 (x64) with Visual Studio 2022 |
| win-x64 | Windows Server 2022 (x64) with Visual Studio 2022 |

<!--lint disable final-definition-->

Expand Down
5 changes: 2 additions & 3 deletions configure.py
Original file line number Diff line number Diff line change
Expand Up @@ -1270,18 +1270,17 @@ def host_arch_cc():
def host_arch_win():
"""Host architecture check using environ vars (better way to do this?)"""

observed_arch = os.environ.get('PROCESSOR_ARCHITECTURE', 'x86')
observed_arch = os.environ.get('PROCESSOR_ARCHITECTURE', 'AMD64')
arch = os.environ.get('PROCESSOR_ARCHITEW6432', observed_arch)

matchup = {
'AMD64' : 'x64',
'x86' : 'ia32',
'arm' : 'arm',
'mips' : 'mips',
'ARM64' : 'arm64'
}

return matchup.get(arch, 'ia32')
return matchup.get(arch, 'x64')


def configure_arm(o):
Expand Down
9 changes: 0 additions & 9 deletions node.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -475,15 +475,6 @@
],
},

# Relevant only for x86.
# Refs: https://github.com/nodejs/node/pull/25852
# Refs: https://docs.microsoft.com/en-us/cpp/build/reference/safeseh-image-has-safe-exception-handlers
'msvs_settings': {
'VCLinkerTool': {
'ImageHasSafeExceptionHandlers': 'false',
},
},

'conditions': [
# Pointer authentication for ARM64.
['target_arch=="arm64"', {
Expand Down
4 changes: 1 addition & 3 deletions src/node_metadata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,9 +146,7 @@ Metadata::Release::Release() : name(NODE_RELEASE) {
source_url = NODE_RELEASE_URLFPFX ".tar.gz";
headers_url = NODE_RELEASE_URLFPFX "-headers.tar.gz";
#ifdef _WIN32
lib_url = strcmp(NODE_ARCH, "ia32") ? NODE_RELEASE_URLPFX "win-" NODE_ARCH
"/node.lib"
: NODE_RELEASE_URLPFX "win-x86/node.lib";
lib_url = NODE_RELEASE_URLPFX "win-" NODE_ARCH "/node.lib";
#endif // _WIN32

#endif // NODE_HAS_RELEASE_URLS
Expand Down
4 changes: 0 additions & 4 deletions test/parallel/parallel.status
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,6 @@ test-error-serdes: PASS, FLAKY

[$system==win32]

# Windows on x86
[$system==win32 && $arch==ia32]
test-worker-nearheaplimit-deadlock: PASS, FLAKY

# Windows on ARM
[$system==win32 && $arch==arm64]

Expand Down
1 change: 0 additions & 1 deletion test/parallel/test-navigator.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,6 @@ assert.strictEqual(getNavigatorPlatform({ arch: 'arm64', platform: 'darwin' }),
assert.strictEqual(getNavigatorPlatform({ arch: 'ia32', platform: 'linux' }), 'Linux i686');
assert.strictEqual(getNavigatorPlatform({ arch: 'x64', platform: 'linux' }), 'Linux x86_64');
assert.strictEqual(getNavigatorPlatform({ arch: 'arm64', platform: 'linux' }), 'Linux arm64');
assert.strictEqual(getNavigatorPlatform({ arch: 'ia32', platform: 'win32' }), 'Win32');
assert.strictEqual(getNavigatorPlatform({ arch: 'x64', platform: 'win32' }), 'Win32');
assert.strictEqual(getNavigatorPlatform({ arch: 'arm64', platform: 'win32' }), 'Win32');
assert.strictEqual(getNavigatorPlatform({ arch: 'ia32', platform: 'freebsd' }), 'FreeBSD i386');
Expand Down
76 changes: 0 additions & 76 deletions tools/msvs/msi/custom_actions/custom_actions.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,6 @@
<Configuration>Debug</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
Expand All @@ -17,10 +13,6 @@
<Configuration>Release</Configuration>
<Platform>ARM64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
Expand All @@ -33,12 +25,6 @@
<ProjectName>custom_actions</ProjectName>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>$(PlatformToolset)</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>$(PlatformToolset)</PlatformToolset>
Expand All @@ -51,11 +37,6 @@
<CharacterSet>Unicode</CharacterSet>
<WholeProgramOptimization>true</WholeProgramOptimization>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>$(PlatformToolset)</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<PlatformToolset>$(PlatformToolset)</PlatformToolset>
Expand All @@ -69,18 +50,12 @@
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
Expand All @@ -91,43 +66,18 @@
<PropertyGroup>
<_ProjectFileVersion>12.0.30501.0</_ProjectFileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>$(PkgWixToolset_WcaUtil)\build\native\include;$(PkgWixToolset_DUtil)\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
</ClCompile>
<Link>
<AdditionalDependencies>msi.lib;dutil.lib;wcautil.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(PkgWixToolset_WcaUtil)\build\native\v14\x86;$(PkgWixToolset_DUtil)\build\native\v14\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>custom_actions.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|ARM64'">
<ClCompile>
<Optimization>Disabled</Optimization>
Expand Down Expand Up @@ -166,32 +116,6 @@
<SubSystem>Windows</SubSystem>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
<IntrinsicFunctions>true</IntrinsicFunctions>
<AdditionalIncludeDirectories>$(PkgWixToolset_WcaUtil)\build\native\include;$(PkgWixToolset_DUtil)\build\native\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>ProgramDatabase</DebugInformationFormat>
<PrecompiledHeader>NotUsing</PrecompiledHeader>
<PrecompiledHeaderFile>
</PrecompiledHeaderFile>
<PrecompiledHeaderOutputFile>
</PrecompiledHeaderOutputFile>
</ClCompile>
<Link>
<AdditionalDependencies>msi.lib;dutil.lib;wcautil.lib;version.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(PkgWixToolset_WcaUtil)\build\native\v14\x86;$(PkgWixToolset_DUtil)\build\native\v14\x86;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ModuleDefinitionFile>custom_actions.def</ModuleDefinitionFile>
<GenerateDebugInformation>true</GenerateDebugInformation>
<SubSystem>Windows</SubSystem>
<OptimizeReferences>true</OptimizeReferences>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<ClCompile>
<Optimization>MaxSpeed</Optimization>
Expand Down
10 changes: 0 additions & 10 deletions tools/msvs/msi/nodemsi.sln
Original file line number Diff line number Diff line change
Expand Up @@ -13,36 +13,26 @@ Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|ARM64 = Debug|ARM64
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|ARM64 = Release|ARM64
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1D808FF0-B5A9-4BE9-859D-B334B6F48BE2}.Debug|ARM64.ActiveCfg = Debug|arm64
{1D808FF0-B5A9-4BE9-859D-B334B6F48BE2}.Debug|ARM64.Build.0 = Debug|arm64
{1D808FF0-B5A9-4BE9-859D-B334B6F48BE2}.Debug|x64.ActiveCfg = Debug|x64
{1D808FF0-B5A9-4BE9-859D-B334B6F48BE2}.Debug|x64.Build.0 = Debug|x64
{1D808FF0-B5A9-4BE9-859D-B334B6F48BE2}.Debug|x86.ActiveCfg = Debug|x86
{1D808FF0-B5A9-4BE9-859D-B334B6F48BE2}.Debug|x86.Build.0 = Debug|x86
{1D808FF0-B5A9-4BE9-859D-B334B6F48BE2}.Release|ARM64.ActiveCfg = Release|arm64
{1D808FF0-B5A9-4BE9-859D-B334B6F48BE2}.Release|ARM64.Build.0 = Release|arm64
{1D808FF0-B5A9-4BE9-859D-B334B6F48BE2}.Release|x64.ActiveCfg = Release|x64
{1D808FF0-B5A9-4BE9-859D-B334B6F48BE2}.Release|x64.Build.0 = Release|x64
{1D808FF0-B5A9-4BE9-859D-B334B6F48BE2}.Release|x86.ActiveCfg = Release|x86
{1D808FF0-B5A9-4BE9-859D-B334B6F48BE2}.Release|x86.Build.0 = Release|x86
{B70585F8-DAB7-40FA-9904-13CF53A73A06}.Debug|ARM64.ActiveCfg = Debug|ARM64
{B70585F8-DAB7-40FA-9904-13CF53A73A06}.Debug|ARM64.Build.0 = Debug|ARM64
{B70585F8-DAB7-40FA-9904-13CF53A73A06}.Debug|x64.ActiveCfg = Debug|x64
{B70585F8-DAB7-40FA-9904-13CF53A73A06}.Debug|x64.Build.0 = Debug|x64
{B70585F8-DAB7-40FA-9904-13CF53A73A06}.Debug|x86.ActiveCfg = Debug|Win32
{B70585F8-DAB7-40FA-9904-13CF53A73A06}.Debug|x86.Build.0 = Debug|Win32
{B70585F8-DAB7-40FA-9904-13CF53A73A06}.Release|ARM64.ActiveCfg = Release|ARM64
{B70585F8-DAB7-40FA-9904-13CF53A73A06}.Release|ARM64.Build.0 = Release|ARM64
{B70585F8-DAB7-40FA-9904-13CF53A73A06}.Release|x64.ActiveCfg = Release|x64
{B70585F8-DAB7-40FA-9904-13CF53A73A06}.Release|x64.Build.0 = Release|x64
{B70585F8-DAB7-40FA-9904-13CF53A73A06}.Release|x86.ActiveCfg = Release|Win32
{B70585F8-DAB7-40FA-9904-13CF53A73A06}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
Loading

0 comments on commit 7ad0cc3

Please sign in to comment.