Skip to content

Commit

Permalink
build: remove support for 32-bit Windows
Browse files Browse the repository at this point in the history
Closes: nodejs#42543
  • Loading branch information
targos committed May 28, 2024
1 parent 067ab06 commit 8d11da0
Show file tree
Hide file tree
Showing 11 changed files with 17 additions and 79 deletions.
16 changes: 5 additions & 11 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -111,11 +111,10 @@ platforms. This is true regardless of entries in the table below.
| 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 | 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 [^5] |
| 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 | |
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', 'x64')
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
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
12 changes: 1 addition & 11 deletions tools/msvs/msi/nodemsi/nodemsi.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,13 @@
<Import Project="Sdk.props" Sdk="WixToolset.Sdk" Version="4.0.0-rc.1" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
<Platform Condition=" '$(Platform)' == '' ">x64</Platform>
<ProductVersion>3.5</ProductVersion>
<ProjectGuid>{1d808ff0-b5a9-4be9-859d-b334b6f48be2}</ProjectGuid>
<OutputName>node-v$(FullVersion)-$(Platform)</OutputName>
<OutputType>Package</OutputType>
<NodeVersion Condition=" '$(NodeVersion)' == '' ">0.0.0.0</NodeVersion>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' ">
<OutputPath>..\..\..\..\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NpmSourceDir=..\..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\npm\;CorepackSourceDir=..\..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\corepack\;ProgramFilesFolderId=ProgramFilesFolder</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' ">
<OutputPath>..\..\..\..\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
<DefineConstants>Debug;ProductVersion=$(NodeVersion);FullVersion=$(FullVersion);DistTypeDir=$(DistTypeDir);NpmSourceDir=..\..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\npm\;CorepackSourceDir=..\..\..\..\Release\node-v$(FullVersion)-win-$(Platform)\node_modules\corepack\;ProgramFilesFolderId=ProgramFilesFolder</DefineConstants>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' ">
<OutputPath>..\..\..\..\</OutputPath>
<IntermediateOutputPath>obj\$(Configuration)\</IntermediateOutputPath>
Expand Down
16 changes: 0 additions & 16 deletions tools/v8_gypfiles/toolchain.gypi
Original file line number Diff line number Diff line change
Expand Up @@ -550,14 +550,6 @@
'CharacterSet': '1',
},
}],
['OS=="win" and v8_target_arch=="ia32"', {
'msvs_settings': {
'VCCLCompilerTool': {
# Ensure no surprising artifacts from 80bit double math with x86.
'AdditionalOptions': ['/arch:SSE2'],
},
},
}],
['OS=="win" and v8_enable_prof==1', {
'msvs_settings': {
'VCLinkerTool': {
Expand Down Expand Up @@ -962,13 +954,5 @@
4724, # https://crbug.com/v8/7771
4800, # Forcing value to bool.
],
# 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',
},
},
}, # target_defaults
}
5 changes: 0 additions & 5 deletions tools/v8_gypfiles/v8.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -1951,11 +1951,6 @@
'<(V8_ROOT)/src/heap/base/asm/x64/push_registers_masm.asm',
],
}],
['_toolset == "host" and host_arch == "ia32" or _toolset == "target" and target_arch=="ia32"', {
'sources': [
'<(V8_ROOT)/src/heap/base/asm/ia32/push_registers_masm.asm',
],
}],
['_toolset == "host" and host_arch == "arm64" or _toolset == "target" and target_arch=="arm64"', {
'sources': [
'<(V8_ROOT)/src/heap/base/asm/arm64/push_registers_masm.S',
Expand Down
14 changes: 8 additions & 6 deletions vcbuild.bat
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,11 @@ if defined debug_nghttp2 set configure_flags=%configure_flags% --debug-nghttp
if defined openssl_no_asm set configure_flags=%configure_flags% --openssl-no-asm
if defined no_shared_roheap set configure_flags=%configure_flags% --disable-shared-readonly-heap
if defined DEBUG_HELPER set configure_flags=%configure_flags% --verbose
if "%target_arch%"=="x86" if "%PROCESSOR_ARCHITECTURE%"=="AMD64" set configure_flags=%configure_flags% --no-cross-compiling

if "%target_arch%"=="x86" (
echo "32-bit Windows builds are not supported anymore."
exit /b 1
)

if not exist "%~dp0deps\icu" goto no-depsicu
if "%target%"=="Clean" echo deleting %~dp0deps\icu
Expand All @@ -220,7 +224,7 @@ if "%target%"=="TestClean" (
call tools\msvs\find_python.cmd
if errorlevel 1 goto :exit

REM NASM is only needed on IA32 and x86_64.
REM NASM is only needed on x86_64.
if not defined openssl_no_asm if "%target_arch%" NEQ "arm64" call tools\msvs\find_nasm.cmd
if errorlevel 1 echo Could not find NASM, install it or build with openssl-no-asm. See BUILDING.md.

Expand All @@ -236,9 +240,7 @@ if defined noprojgen if defined nobuild goto :after-build

@rem Set environment for msbuild

set msvs_host_arch=x86
if _%PROCESSOR_ARCHITECTURE%_==_AMD64_ set msvs_host_arch=amd64
if _%PROCESSOR_ARCHITEW6432%_==_AMD64_ set msvs_host_arch=amd64
set msvs_host_arch=amd64
if _%PROCESSOR_ARCHITECTURE%_==_ARM64_ set msvs_host_arch=arm64
@rem usually vcvarsall takes an argument: host + '_' + target
set vcvarsall_arg=%msvs_host_arch%_%target_arch%
Expand Down Expand Up @@ -753,7 +755,7 @@ set exit_code=1
goto exit

:help
echo vcbuild.bat [debug/release] [msi] [doc] [test/test-all/test-addons/test-doc/test-js-native-api/test-node-api/test-internet/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [clang-cl] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [nonpm] [nocorepack] [ltcg] [licensetf] [sign] [ia32/x86/x64/arm64] [vs2022] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-md] [lint-md-build] [format-md] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm]
echo vcbuild.bat [debug/release] [msi] [doc] [test/test-all/test-addons/test-doc/test-js-native-api/test-node-api/test-internet/test-tick-processor/test-known-issues/test-node-inspect/test-check-deopts/test-npm/test-v8/test-v8-intl/test-v8-benchmarks/test-v8-all] [ignore-flaky] [static/dll] [noprojgen] [projgen] [clang-cl] [small-icu/full-icu/without-intl] [nobuild] [nosnapshot] [nonpm] [nocorepack] [ltcg] [licensetf] [sign] [x64/arm64] [vs2022] [download-all] [enable-vtune] [lint/lint-ci/lint-js/lint-md] [lint-md-build] [format-md] [package] [build-release] [upload] [no-NODE-OPTIONS] [link-module path-to-module] [debug-http2] [debug-nghttp2] [clean] [cctest] [no-cctest] [openssl-no-asm]
echo Examples:
echo vcbuild.bat : builds release build
echo vcbuild.bat debug : builds debug build
Expand Down

0 comments on commit 8d11da0

Please sign in to comment.