Skip to content

Commit

Permalink
ARROW-14070: [C++][CI] Remove support for VS2015
Browse files Browse the repository at this point in the history
VS2015 is buggy and Microsoft has withdrawn documentation/bug reporting so it's time for us to drop support.

See mailing list discussion: https://lists.apache.org/thread.html/rff3d8e837aee2964b49733b39a34cffef7c5438dbf2e5c929e878fdf%40%3Cdev.arrow.apache.org%3E

Closes apache#11211 from bkietz/14070-Remove-support-for-Visual

Authored-by: Benjamin Kietzman <[email protected]>
Signed-off-by: Antoine Pitrou <[email protected]>
  • Loading branch information
bkietz authored and pitrou committed Sep 29, 2021
1 parent b60bbb3 commit d7467f4
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 50 deletions.
3 changes: 0 additions & 3 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,9 +55,6 @@ environment:
matrix:
# NOTE: clcache seems to work best with Ninja and worst with msbuild
# (as generated by cmake)
- JOB: "Build"
GENERATOR: Ninja
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2015
- JOB: "Toolchain"
GENERATOR: Ninja
ARROW_S3: "ON"
Expand Down
9 changes: 4 additions & 5 deletions ci/appveyor-cpp-setup.bat
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,11 @@ if "%JOB%" NEQ "Build_Debug" (
@rem
if "%GENERATOR%"=="Ninja" set need_vcvarsall=1
if defined need_vcvarsall (
@rem Select desired compiler version
if "%APPVEYOR_BUILD_WORKER_IMAGE%" == "Visual Studio 2017" (
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
) else (
call "C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
if "%APPVEYOR_BUILD_WORKER_IMAGE%" NEQ "Visual Studio 2017" (
@rem ARROW-14070 Visual Studio 2015 no longer supported
exit /B
)
call "C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" amd64
)

@rem
Expand Down
17 changes: 1 addition & 16 deletions cpp/src/arrow/compute/exec/sink_node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -64,22 +64,7 @@ class SinkNode : public ExecNode {
AsyncGenerator<util::optional<ExecBatch>>* out_gen) {
PushGenerator<util::optional<ExecBatch>> push_gen;
auto out = push_gen.producer();
*out_gen = [push_gen] {
// Awful workaround for MSVC 19.0 (Visual Studio 2015) bug.
// For some types including Future<optional<ExecBatch>>,
// std::is_convertible<T, T>::value will be false causing
// SFINAE exclusion of the std::function constructor we need.
// Definining a convertible (but distinct) type soothes the
// faulty trait.
struct ConvertibleToFuture {
operator Future<util::optional<ExecBatch>>() && { // NOLINT runtime/explicit
return std::move(ret);
}
Future<util::optional<ExecBatch>> ret;
};

return ConvertibleToFuture{push_gen()};
};
*out_gen = std::move(push_gen);
return out;
}

Expand Down
9 changes: 4 additions & 5 deletions cpp/src/gandiva/precompiled/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@ set(PRECOMPILED_SRCS
../../arrow/util/basic_decimal.cc)

if(MSVC)
# clang pretends to be a particular version of MSVC. Version 1900 is
# Visual Studio 2015, 191[0-9] is Visual Studio 2017, and the standard
# library uses C++14 features, so we have to use that -std version to
# get the IR compilation to work
# clang pretends to be a particular version of MSVC. 191[0-9] is
# Visual Studio 2017, and the standard library uses C++14 features,
# so we have to use that -std version to get the IR compilation to work
if(MSVC_VERSION MATCHES "^191[0-9]$")
set(FMS_COMPATIBILITY 19.10)
else()
set(FMS_COMPATIBILITY 19)
message(FATAL_ERROR "Unsupported MSVC_VERSION=${MSVC_VERSION}")
endif()
set(PLATFORM_CLANG_OPTIONS -std=c++14 -fms-compatibility
-fms-compatibility-version=${FMS_COMPATIBILITY})
Expand Down
2 changes: 1 addition & 1 deletion docs/source/developers/cpp/building.rst
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ out-of-source. If you are not familiar with this terminology:
Building requires:

* A C++11-enabled compiler. On Linux, gcc 4.8 and higher should be
sufficient. For Windows, at least Visual Studio 2015 is required.
sufficient. For Windows, at least Visual Studio 2017 is required.
* CMake 3.5 or higher
* On Linux and macOS, either ``make`` or ``ninja`` build utilities

Expand Down
15 changes: 5 additions & 10 deletions docs/source/developers/cpp/windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,7 @@ Microsoft provides the free Visual Studio Community edition. When doing
development in the shell, you must initialize the development environment
each time you open the shell.

For Visual Studio 2015, execute the following batch script:

.. code-block:: shell
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
For Visual Studio 2017, the script is:
For Visual Studio 2017, execute the following batch script:

.. code-block:: shell
Expand Down Expand Up @@ -176,12 +170,13 @@ an out of source build by generating a MSVC solution:
cd cpp
mkdir build
cd build
cmake .. -G "Visual Studio 14 2015" -A x64 ^
cmake .. -G "Visual Studio 15 2017" -A x64 ^
-DARROW_BUILD_TESTS=ON
cmake --build . --config Release
For newer versions of Visual Studio, specify the generator
``Visual Studio 15 2017`` or ``Visual Studio 16 2019``.
``Visual Studio 16 2019`` or see ``cmake --help`` for available
generators.

Building with Ninja and clcache
===============================
Expand Down Expand Up @@ -310,7 +305,7 @@ The command line to build Arrow in Debug mode will look something like this:
cd cpp
mkdir build
cd build
cmake .. -G "Visual Studio 14 2015" -A x64 ^
cmake .. -G "Visual Studio 15 2017" -A x64 ^
-DARROW_BOOST_USE_SHARED=OFF ^
-DCMAKE_BUILD_TYPE=Debug ^
-DBOOST_ROOT=C:/local/boost_1_63_0 ^
Expand Down
9 changes: 0 additions & 9 deletions docs/source/developers/python.rst
Original file line number Diff line number Diff line change
Expand Up @@ -411,8 +411,6 @@ Building on Windows
Building on Windows requires one of the following compilers to be installed:

- `Build Tools for Visual Studio 2017 <https://download.visualstudio.microsoft.com/download/pr/3e542575-929e-4297-b6c6-bef34d0ee648/639c868e1219c651793aff537a1d3b77/vs_buildtools.exe>`_
- `Microsoft Build Tools 2015 <http://download.microsoft.com/download/5/F/7/5F7ACAEB-8363-451F-9425-68A90F98B238/visualcppbuildtools_full.exe>`_
- Visual Studio 2015
- Visual Studio 2017

During the setup of Build Tools ensure at least one Windows SDK is selected.
Expand Down Expand Up @@ -452,13 +450,6 @@ We set a number of environment variables:
set PATH=%ARROW_HOME%\bin;%PATH%
set PYARROW_CMAKE_GENERATOR=Visual Studio 15 2017 Win64
This assumes Visual Studio 2017 or its build tools are used. For Visual Studio
2015 and its build tools use the following instead:

.. code-block:: shell
set PYARROW_CMAKE_GENERATOR=Visual Studio 14 2015 Win64
Let's configure, build and install the Arrow C++ libraries:

.. code-block:: shell
Expand Down
2 changes: 1 addition & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ def initialize_options(self):
_build_ext.initialize_options(self)
self.cmake_generator = os.environ.get('PYARROW_CMAKE_GENERATOR')
if not self.cmake_generator and sys.platform == 'win32':
self.cmake_generator = 'Visual Studio 14 2015 Win64'
self.cmake_generator = 'Visual Studio 15 2017 Win64'
self.extra_cmake_args = os.environ.get('PYARROW_CMAKE_OPTIONS', '')
self.build_type = os.environ.get('PYARROW_BUILD_TYPE',
'release').lower()
Expand Down

0 comments on commit d7467f4

Please sign in to comment.