Repository: pytorch
Issue: caffe2 install VS2019 CUDA 10.1 lib\torch.lib : fatal error LNK1248: image size (10028FA9F) exceeds maximum allowable size (FFFFFFFF) 
Labels: caffe2

## 🐛 Bug

Hi all I'm trying to build Caffe2 on Pytorch from Binaries, have used Python 2.7 with VS 2019 and CUDA 10.1. Cmake donwloaded manually and also updated via Conda as read from other users posting my issue. BUILD_SHARED_LIB=OFF per instructions in build_windows.bat, get error :
```
# #lib\torch.lib : fatal error LNK1248: image size (10028FA9F) exceeds maximum allowable size (FFFFFFFF)
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
  File "tools\build_libtorch.py", line 23, in <module>
    rerun_cmake=True, cmake_only=False, cmake=CMake())
  File "c:\projects\pytorch\pytorch\tools\build_pytorch_libs.py", line 59, in build_caffe2
    cmake.build(my_env)
  File "c:\projects\pytorch\pytorch\tools\setup_helpers\cmake.py", line 334, in build
    self.run(build_args, my_env)
  File "c:\projects\pytorch\pytorch\tools\setup_helpers\cmake.py", line 142, in run
    check_call(command, cwd=self.build_dir, env=env)
  File "C:\Python27\Lib\subprocess.py", line 190, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['cmake', '--build', '.', '--target', 'install', '--config', 'Release', '--', '-j', '12']' returned non-zero exit status 1
"Caffe2 building failed"
```
## To Reproduce

Steps to reproduce the behavior:

> cd c:\projects\pytorch
> caffe2env\Scripts\activate
> scripts\build_windows.bat

Warning Generated:
```
CMake Warning at CMakeLists.txt:628 (message):
  Generated cmake files are only available when building shared libs.
```
```

Summary;
******** Summary ********
-- General:
--   CMake version         : 3.15.3
--   CMake command         : C:/Program Files (x86)/CMake/bin/cmake.exe
--   System                : Windows
--   C++ compiler          : C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe
--   C++ compiler id       : MSVC
--   C++ compiler version  : 19.23.28105.4
--   BLAS                  : MKL
--   CXX flags             : /DWIN32 /D_WINDOWS /GR  /w /EHa /MP /bigobj -openmp:experimental
--   Build type            : Release
--   Compile definitions   : ONNX_ML=1;ONNX_NAMESPACE=onnx_c2;_CRT_SECURE_NO_DEPRECATE=1;WIN32_LEAN_AND_MEAN
--   CMAKE_PREFIX_PATH     : c:\projects\pytorch\caffe2env\Lib\site-packages;C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1
--   CMAKE_INSTALL_PREFIX  : C:/projects/pytorch/pytorch/torch
--
--   TORCH_VERSION         : 1.1.0
--   CAFFE2_VERSION        : 1.1.0
--   BUILD_CAFFE2_MOBILE   : ON
--   USE_STATIC_DISPATCH   : OFF
--   BUILD_BINARY          : OFF
--   BUILD_CUSTOM_PROTOBUF : ON
--     Protobuf compiler   :
--     Protobuf includes   :
--     Protobuf libraries  :
--   BUILD_DOCS            : OFF
--   BUILD_PYTHON          : False
--   BUILD_CAFFE2_OPS      : ON
--   BUILD_SHARED_LIBS     : OFF
--   BUILD_TEST            : True
--   INTERN_BUILD_MOBILE   :
--   USE_ASAN              : OFF
--   USE_CUDA              : True
--     CUDA static link    : OFF
--     USE_CUDNN           : OFF
--     CUDA version        : 10.1
--     CUDA root directory : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1
--     CUDA library        : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/lib/x64/cuda.lib
--     cudart library      : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/lib/x64/cudart_static.lib
--     cublas library      : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/lib/x64/cublas.lib
--     cufft library       : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/lib/x64/cufft.lib
--     curand library      : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/lib/x64/curand.lib
--     nvrtc               : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/lib/x64/nvrtc.lib
--     CUDA include path   : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/include
--     NVCC executable     : C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v10.1/bin/nvcc.exe
--     CUDA host compiler  : C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe
--     USE_TENSORRT        : OFF
--   USE_ROCM              : OFF
--   USE_EIGEN_FOR_BLAS    : ON
--   USE_FBGEMM            : OFF
--   USE_FFMPEG            : OFF
--   USE_GFLAGS            : OFF
--   USE_GLOG              : OFF
--   USE_LEVELDB           : OFF
--   USE_LITE_PROTO        : OFF
--   USE_LMDB              : OFF
--   USE_METAL             : OFF
--   USE_MKL               : OFF
--   USE_MKLDNN            : OFF
--   USE_NCCL              : OFF
--   USE_NNPACK            : OFF
--   USE_NUMPY             : True
--   USE_OBSERVERS         : OFF
--   USE_OPENCL            : OFF
--   USE_OPENCV            : OFF
--   USE_OPENMP            : ON
--   USE_TBB               : OFF
--   USE_PROF              : OFF
--   USE_QNNPACK           : OFF
--   USE_REDIS             : OFF
--   USE_ROCKSDB           : OFF
--   USE_ZMQ               : OFF
--   USE_DISTRIBUTED       : OFF
--   BUILD_NAMEDTENSOR   : OFF
--   Public Dependencies  : Threads::Threads
--   Private Dependencies : cpuinfo;fp16;aten_op_header_gen;foxi_loader
-- Configuring done
-- Generating done
```
CMake Warning:
  Manually-specified variables were not used by the project:

    NUMPY_INCLUDE_DIR
    PYTHON_INCLUDE_DIR