From ac966a52337a7ee08675931c300837d1c90d6ff6 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Wed, 24 Jul 2024 23:13:45 +0700 Subject: [PATCH 1/8] "README.md: Added instructions for building ARM and ARM64." --- README.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/README.md b/README.md index 56cd3ab20b1..53b973bf68d 100644 --- a/README.md +++ b/README.md @@ -147,6 +147,8 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem This will ensure that you're using supported versions of CMake and Ninja. * Otherwise, install [CMake][] 3.29.0 or later, and [Ninja][] 1.11.0 or later. * Make sure [Python][] 3.12 or later is available to CMake. + * Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" if you would like to build ARM64/ARM64EC library. + * Select "MSVC v143 - VS 2022 C++ ARM build tools (Latest)" if you would like to build ARM library. 2. Open Visual Studio, and choose the "Clone or check out code" option. Enter the URL of this repository, `https://github.com/microsoft/STL`. 3. Open a terminal in the IDE with `` Ctrl + ` `` (by default) or press on "View" in the top bar, and then "Terminal". @@ -180,6 +182,30 @@ To build the x64 target (recommended): 3. `cmake --preset x64` 4. `cmake --build --preset x64` +To build the ARM target: + +1. Open an "x64 Native Tools Command Prompt for VS 2022 Preview". +2. Change directories to the previously cloned `STL` directory. +3. `"C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm` +4. `cmake --preset ARM` +5. `cmake --build --preset ARM` + +To build the ARM64 target: + +1. Open an "x64 Native Tools Command Prompt for VS 2022 Preview". +2. Change directories to the previously cloned `STL` directory. +3. `"C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64` +4. `cmake --preset ARM64` +5. `cmake --build --preset ARM64` + +To build the ARM64EC target: + +1. Open an "x64 Native Tools Command Prompt for VS 2022 Preview". +2. Change directories to the previously cloned `STL` directory. +3. `"C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64` +4. `cmake --preset ARM64EC` +5. `cmake --build --preset ARM64EC` + # How To Consume Consumption of the built library is largely based on the build system you're using. There are at least 2 directories From 46aa9105c410ccbe7714cdc01e2148d7f0ba1fdf Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Wed, 24 Jul 2024 23:20:35 +0700 Subject: [PATCH 2/8] fix --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 53b973bf68d..bed38c5525f 100644 --- a/README.md +++ b/README.md @@ -164,6 +164,8 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem This will ensure that you're using supported versions of CMake and Ninja. * Otherwise, install [CMake][] 3.29.0 or later, and [Ninja][] 1.11.0 or later. * Make sure [Python][] 3.12 or later is available to CMake. + * Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" if you would like to build ARM64/ARM64EC library. + * Select "MSVC v143 - VS 2022 C++ ARM build tools (Latest)" if you would like to build ARM library. 2. Open a command prompt. 3. Change directories to a location where you'd like a clone of this STL repository. 4. `git clone https://github.com/microsoft/STL.git --recurse-submodules` From e30306dc690b05cffc9c31d05e6002679729e484 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Wed, 24 Jul 2024 23:22:21 +0700 Subject: [PATCH 3/8] reordering --- README.md | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index bed38c5525f..cdb5b0b5fa5 100644 --- a/README.md +++ b/README.md @@ -143,12 +143,12 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem 1. Install Visual Studio 2022 17.11 Preview 3 or later. * Select "Windows 11 SDK (10.0.22621.0)" in the VS Installer. + * Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" in the VS Installer if you would like to build ARM64/ARM64EC library. + * Select "MSVC v143 - VS 2022 C++ ARM build tools (Latest)" in the VS Installer if you would like to build ARM library. * We recommend selecting "C++ CMake tools for Windows" in the VS Installer. This will ensure that you're using supported versions of CMake and Ninja. * Otherwise, install [CMake][] 3.29.0 or later, and [Ninja][] 1.11.0 or later. * Make sure [Python][] 3.12 or later is available to CMake. - * Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" if you would like to build ARM64/ARM64EC library. - * Select "MSVC v143 - VS 2022 C++ ARM build tools (Latest)" if you would like to build ARM library. 2. Open Visual Studio, and choose the "Clone or check out code" option. Enter the URL of this repository, `https://github.com/microsoft/STL`. 3. Open a terminal in the IDE with `` Ctrl + ` `` (by default) or press on "View" in the top bar, and then "Terminal". @@ -160,12 +160,13 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem 1. Install Visual Studio 2022 17.11 Preview 3 or later. * Select "Windows 11 SDK (10.0.22621.0)" in the VS Installer. + * Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" in the VS Installer if you would like to build ARM64/ARM64EC library. + * Select "MSVC v143 - VS 2022 C++ ARM build tools (Latest)" in the VS Installer if you would like to build ARM library. * We recommend selecting "C++ CMake tools for Windows" in the VS Installer. This will ensure that you're using supported versions of CMake and Ninja. * Otherwise, install [CMake][] 3.29.0 or later, and [Ninja][] 1.11.0 or later. * Make sure [Python][] 3.12 or later is available to CMake. - * Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" if you would like to build ARM64/ARM64EC library. - * Select "MSVC v143 - VS 2022 C++ ARM build tools (Latest)" if you would like to build ARM library. + 2. Open a command prompt. 3. Change directories to a location where you'd like a clone of this STL repository. 4. `git clone https://github.com/microsoft/STL.git --recurse-submodules` From 53cc559cb6905bbff32043145419af9c2791db44 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Wed, 24 Jul 2024 23:23:18 +0700 Subject: [PATCH 4/8] remove empty line --- README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/README.md b/README.md index cdb5b0b5fa5..c80c2bbe632 100644 --- a/README.md +++ b/README.md @@ -166,7 +166,6 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem This will ensure that you're using supported versions of CMake and Ninja. * Otherwise, install [CMake][] 3.29.0 or later, and [Ninja][] 1.11.0 or later. * Make sure [Python][] 3.12 or later is available to CMake. - 2. Open a command prompt. 3. Change directories to a location where you'd like a clone of this STL repository. 4. `git clone https://github.com/microsoft/STL.git --recurse-submodules` From c41bc37738e0f48bd1e743ce1dc78f756bbe5e83 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Wed, 24 Jul 2024 23:44:53 +0700 Subject: [PATCH 5/8] no more than 120 characters per line --- README.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c80c2bbe632..73f0f0b481f 100644 --- a/README.md +++ b/README.md @@ -143,8 +143,10 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem 1. Install Visual Studio 2022 17.11 Preview 3 or later. * Select "Windows 11 SDK (10.0.22621.0)" in the VS Installer. - * Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" in the VS Installer if you would like to build ARM64/ARM64EC library. - * Select "MSVC v143 - VS 2022 C++ ARM build tools (Latest)" in the VS Installer if you would like to build ARM library. + * Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" in the VS Installer + if you would like to build the ARM64/ARM64EC target. + * Select "MSVC v143 - VS 2022 C++ ARM build tools (Latest)" in the VS Installer + if you would like to build the ARM target. * We recommend selecting "C++ CMake tools for Windows" in the VS Installer. This will ensure that you're using supported versions of CMake and Ninja. * Otherwise, install [CMake][] 3.29.0 or later, and [Ninja][] 1.11.0 or later. @@ -160,8 +162,10 @@ Just try to follow these rules, so we can spend more time fixing bugs and implem 1. Install Visual Studio 2022 17.11 Preview 3 or later. * Select "Windows 11 SDK (10.0.22621.0)" in the VS Installer. - * Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" in the VS Installer if you would like to build ARM64/ARM64EC library. - * Select "MSVC v143 - VS 2022 C++ ARM build tools (Latest)" in the VS Installer if you would like to build ARM library. + * Select "MSVC v143 - VS 2022 C++ ARM64/ARM64EC build tools (Latest)" in the VS Installer + if you would like to build the ARM64/ARM64EC target. + * Select "MSVC v143 - VS 2022 C++ ARM build tools (Latest)" in the VS Installer + if you would like to build the ARM target. * We recommend selecting "C++ CMake tools for Windows" in the VS Installer. This will ensure that you're using supported versions of CMake and Ninja. * Otherwise, install [CMake][] 3.29.0 or later, and [Ninja][] 1.11.0 or later. From 0e7ddd4003f34a061977175cba8183c164d25830 Mon Sep 17 00:00:00 2001 From: Igor Zhukov Date: Sat, 27 Jul 2024 21:22:09 +0700 Subject: [PATCH 6/8] use %VSINSTALLDIR% --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 73f0f0b481f..e70e8da9f7a 100644 --- a/README.md +++ b/README.md @@ -192,7 +192,7 @@ To build the ARM target: 1. Open an "x64 Native Tools Command Prompt for VS 2022 Preview". 2. Change directories to the previously cloned `STL` directory. -3. `"C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm` +3. `"%VSINSTALLDIR%VC\Auxiliary\Build\vcvarsall.bat" amd64_arm` 4. `cmake --preset ARM` 5. `cmake --build --preset ARM` @@ -200,7 +200,7 @@ To build the ARM64 target: 1. Open an "x64 Native Tools Command Prompt for VS 2022 Preview". 2. Change directories to the previously cloned `STL` directory. -3. `"C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64` +3. `"%VSINSTALLDIR%VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64` 4. `cmake --preset ARM64` 5. `cmake --build --preset ARM64` @@ -208,7 +208,7 @@ To build the ARM64EC target: 1. Open an "x64 Native Tools Command Prompt for VS 2022 Preview". 2. Change directories to the previously cloned `STL` directory. -3. `"C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64` +3. `"%VSINSTALLDIR%VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64` 4. `cmake --preset ARM64EC` 5. `cmake --build --preset ARM64EC` From 48b4e102057754be7284405622f1d32bd5ddf992 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 31 Jul 2024 20:30:05 -0700 Subject: [PATCH 7/8] amd64_MEOW => x64_MEOW --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e70e8da9f7a..57587cd931c 100644 --- a/README.md +++ b/README.md @@ -192,7 +192,7 @@ To build the ARM target: 1. Open an "x64 Native Tools Command Prompt for VS 2022 Preview". 2. Change directories to the previously cloned `STL` directory. -3. `"%VSINSTALLDIR%VC\Auxiliary\Build\vcvarsall.bat" amd64_arm` +3. `"%VSINSTALLDIR%VC\Auxiliary\Build\vcvarsall.bat" x64_arm` 4. `cmake --preset ARM` 5. `cmake --build --preset ARM` @@ -200,7 +200,7 @@ To build the ARM64 target: 1. Open an "x64 Native Tools Command Prompt for VS 2022 Preview". 2. Change directories to the previously cloned `STL` directory. -3. `"%VSINSTALLDIR%VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64` +3. `"%VSINSTALLDIR%VC\Auxiliary\Build\vcvarsall.bat" x64_arm64` 4. `cmake --preset ARM64` 5. `cmake --build --preset ARM64` @@ -208,7 +208,7 @@ To build the ARM64EC target: 1. Open an "x64 Native Tools Command Prompt for VS 2022 Preview". 2. Change directories to the previously cloned `STL` directory. -3. `"%VSINSTALLDIR%VC\Auxiliary\Build\vcvarsall.bat" amd64_arm64` +3. `"%VSINSTALLDIR%VC\Auxiliary\Build\vcvarsall.bat" x64_arm64` 4. `cmake --preset ARM64EC` 5. `cmake --build --preset ARM64EC` From 48181382997f0e71e4d485797fc844bfe52eeff1 Mon Sep 17 00:00:00 2001 From: "Stephan T. Lavavej" Date: Wed, 31 Jul 2024 20:34:39 -0700 Subject: [PATCH 8/8] Depict a single invocation of vcvarsall.bat. --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 57587cd931c..44265d23844 100644 --- a/README.md +++ b/README.md @@ -190,27 +190,27 @@ To build the x64 target (recommended): To build the ARM target: -1. Open an "x64 Native Tools Command Prompt for VS 2022 Preview". +1. `"C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Auxiliary\Build\vcvarsall.bat" x64_arm` + * If you installed VS to a non-default location, change this path accordingly. 2. Change directories to the previously cloned `STL` directory. -3. `"%VSINSTALLDIR%VC\Auxiliary\Build\vcvarsall.bat" x64_arm` -4. `cmake --preset ARM` -5. `cmake --build --preset ARM` +3. `cmake --preset ARM` +4. `cmake --build --preset ARM` To build the ARM64 target: -1. Open an "x64 Native Tools Command Prompt for VS 2022 Preview". +1. `"C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Auxiliary\Build\vcvarsall.bat" x64_arm64` + * If you installed VS to a non-default location, change this path accordingly. 2. Change directories to the previously cloned `STL` directory. -3. `"%VSINSTALLDIR%VC\Auxiliary\Build\vcvarsall.bat" x64_arm64` -4. `cmake --preset ARM64` -5. `cmake --build --preset ARM64` +3. `cmake --preset ARM64` +4. `cmake --build --preset ARM64` To build the ARM64EC target: -1. Open an "x64 Native Tools Command Prompt for VS 2022 Preview". +1. `"C:\Program Files\Microsoft Visual Studio\2022\Preview\VC\Auxiliary\Build\vcvarsall.bat" x64_arm64` + * If you installed VS to a non-default location, change this path accordingly. 2. Change directories to the previously cloned `STL` directory. -3. `"%VSINSTALLDIR%VC\Auxiliary\Build\vcvarsall.bat" x64_arm64` -4. `cmake --preset ARM64EC` -5. `cmake --build --preset ARM64EC` +3. `cmake --preset ARM64EC` +4. `cmake --build --preset ARM64EC` # How To Consume