-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #26601 - alexcrichton:xp, r=brson
This series of commits (currently rebased on #26569 to avoid conflicts) adds support for the standard library to run on Windows XP. The main motivation behind this PR is that to enable any Rust code in Firefox we need to support Windows XP. This PR doesn't yet intend to be a move to make Windows XP an officially supported platform, but instead simply get Rust code running on it. APIs like condition variables and RWLocks will immediately panic currently on XP, and it's unclear if that story wants to change much. Additionally, we may bind APIs like IOCP which aren't available on XP and would be *very* difficult to provide a fallback implementation. Essentially this PR enables running Rust on XP, but you still have to be careful to avoid non-XP portions of the standard library. The major components of this PR are: * Support for a new `i686-pc-windows-msvc` triple. This primarily involves a lot of build system hackery, but there are also a number of floating point functions which had to get switched up a bit. * All APIs not available on Windows are now accessed through our dynamic-detection mechanism * Mutexes on Windows were rewritten to use SRWLOCK as an optimization but can fall back to CRITICAL_SECTION.
- Loading branch information
Showing
21 changed files
with
677 additions
and
321 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# i686-pc-windows-msvc configuration | ||
CC_i686-pc-windows-msvc="$(CFG_MSVC_CL_i386)" -nologo | ||
LINK_i686-pc-windows-msvc="$(CFG_MSVC_LINK_i386)" -nologo | ||
CXX_i686-pc-windows-msvc="$(CFG_MSVC_CL_i386)" -nologo | ||
CPP_i686-pc-windows-msvc="$(CFG_MSVC_CL_i386)" -nologo | ||
AR_i686-pc-windows-msvc="$(CFG_MSVC_LIB_i386)" -nologo | ||
CFG_LIB_NAME_i686-pc-windows-msvc=$(1).dll | ||
CFG_STATIC_LIB_NAME_i686-pc-windows-msvc=$(1).lib | ||
CFG_LIB_GLOB_i686-pc-windows-msvc=$(1)-*.{dll,lib} | ||
CFG_LIB_DSYM_GLOB_i686-pc-windows-msvc=$(1)-*.dylib.dSYM | ||
CFG_JEMALLOC_CFLAGS_i686-pc-windows-msvc := | ||
CFG_GCCISH_CFLAGS_i686-pc-windows-msvc := -MD | ||
CFG_GCCISH_CXXFLAGS_i686-pc-windows-msvc := -MD | ||
CFG_GCCISH_LINK_FLAGS_i686-pc-windows-msvc := | ||
CFG_GCCISH_DEF_FLAG_i686-pc-windows-msvc := | ||
CFG_LLC_FLAGS_i686-pc-windows-msvc := | ||
CFG_INSTALL_NAME_i686-pc-windows-msvc = | ||
CFG_EXE_SUFFIX_i686-pc-windows-msvc := .exe | ||
CFG_WINDOWSY_i686-pc-windows-msvc := 1 | ||
CFG_UNIXY_i686-pc-windows-msvc := | ||
CFG_LDPATH_i686-pc-windows-msvc := | ||
CFG_RUN_i686-pc-windows-msvc=$(2) | ||
CFG_RUN_TARG_i686-pc-windows-msvc=$(call CFG_RUN_i686-pc-windows-msvc,,$(2)) | ||
CFG_GNU_TRIPLE_i686-pc-windows-msvc := i686-pc-win32 | ||
|
||
# All windows nightiles are currently a GNU triple, so this MSVC triple is not | ||
# bootstrapping from itself. This is relevant during stage0, and other parts of | ||
# the build system take this into account. | ||
BOOTSTRAP_FROM_i686-pc-windows-msvc := i686-pc-windows-gnu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.