diff --git a/appveyor.yml b/appveyor.yml index ace5bb97f00d5..b132f88e793df 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -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" diff --git a/ci/appveyor-cpp-setup.bat b/ci/appveyor-cpp-setup.bat index 3bf01ec12dd2f..cee9bc28e5fb8 100644 --- a/ci/appveyor-cpp-setup.bat +++ b/ci/appveyor-cpp-setup.bat @@ -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 diff --git a/cpp/src/arrow/compute/exec/sink_node.cc b/cpp/src/arrow/compute/exec/sink_node.cc index 5753c46bc59ca..b5f3ae4ee6003 100644 --- a/cpp/src/arrow/compute/exec/sink_node.cc +++ b/cpp/src/arrow/compute/exec/sink_node.cc @@ -64,22 +64,7 @@ class SinkNode : public ExecNode { AsyncGenerator>* out_gen) { PushGenerator> 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>, - // std::is_convertible::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>() && { // NOLINT runtime/explicit - return std::move(ret); - } - Future> ret; - }; - - return ConvertibleToFuture{push_gen()}; - }; + *out_gen = std::move(push_gen); return out; } diff --git a/cpp/src/gandiva/precompiled/CMakeLists.txt b/cpp/src/gandiva/precompiled/CMakeLists.txt index 1cd505b44a39b..650b80f6bd9a4 100644 --- a/cpp/src/gandiva/precompiled/CMakeLists.txt +++ b/cpp/src/gandiva/precompiled/CMakeLists.txt @@ -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}) diff --git a/docs/source/developers/cpp/building.rst b/docs/source/developers/cpp/building.rst index 12e4cf214c275..c84ff071db418 100644 --- a/docs/source/developers/cpp/building.rst +++ b/docs/source/developers/cpp/building.rst @@ -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 diff --git a/docs/source/developers/cpp/windows.rst b/docs/source/developers/cpp/windows.rst index c06ce225d73fb..ee5a613bc6dbe 100644 --- a/docs/source/developers/cpp/windows.rst +++ b/docs/source/developers/cpp/windows.rst @@ -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 @@ -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 =============================== @@ -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 ^ diff --git a/docs/source/developers/python.rst b/docs/source/developers/python.rst index bcecda000e1b2..3795512ef8c70 100644 --- a/docs/source/developers/python.rst +++ b/docs/source/developers/python.rst @@ -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 `_ -- `Microsoft Build Tools 2015 `_ -- Visual Studio 2015 - Visual Studio 2017 During the setup of Build Tools ensure at least one Windows SDK is selected. @@ -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 diff --git a/python/setup.py b/python/setup.py index 16785157aff7b..deab5c063a2fe 100755 --- a/python/setup.py +++ b/python/setup.py @@ -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()