Visual Studio Code从1.60(2021年8月版)开始重新支持CentOS 7

在2021年1月Visual Studio Code发布1.53时,开始不支持CentOS 7,这是因为升级引入了Electron 11,构建的gcc-5 toolchain所需的GLIBCXX要求最低版本为3.4.21。当时的文档里面有如下描述【1】:

Electron 11 update

In this milestone, we finished the exploration to bundle Electron 11 into VS Code, thanks to everyone involved with testing and self-hosting on insiders. This is a major Electron release and comes with Chromium 87.0.4280.141 and Node.js 12.18.3.

Breaking change

As a side effect of this update, we had to bump our build image to use Ubuntu-18.04 for x64 linux machines to consume Electron. This update raised the minimum GLIBCXX requirement to 3.4.22 for our native modules, which breaks support for older distros on desktop. After some changes to the build system, we were able to go back as far as using gcc-5 toolchain, which brings the minimum GLIBCXX requirement to 3.4.21. With these changes, the following are the distros known to work for the x64 desktop app:

Ubuntu 16.04 and newer
Fedora 24 and newer
Debian 9 and newer
CentOS 8 and newer

不过几个月后的2021年8月,Visual Studio Code发布的1.60版本开始重新支持CentOS 7【2】。发布文档内容如下【3】:

Fix support for RHEL7 and Centos7 distros

In VS Code version 1.53, we updated our build images to consume newer Electron versions causing a change in CXXABI requirements for native modules that broke our rpm packages in some distros issue #115784. With update to Electron v13, we are now able to build our native modules with the same compiler toolchain as the runtime, specifically we now use Clang and statically link the libcxx from the runtime. This allows us to bypass the CXXABI requirements for only a small increase in binary size ~10 MB and bring back support for these distros. Thanks for your patience and help with testing on Insiders.

CentOS 7用户又可以愉快地使用Visual Studio Code了。