[cfe-users] make cross compiler with Visual Studio 2017
Masaru Tsuchiyama via cfe-users
cfe-users at lists.llvm.org
Sun Apr 2 04:06:04 PDT 2017
Hi
Is it possible to make cross compiler with Visual Studio 2017?
If so, please tell me how.
I used the following bat file, but got some errors
set clang_format_vs_version=5.0.0
set buildir=build-ninja-arm
-------------------------------------------------------------------
call "C:\Program Files (x86)\Microsoft Visual
Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat" x86
set cmake_flags=-DCMAKE_BUILD_TYPE=Release
set cmake_flags=%cmake_flags% -DLLVM_ENABLE_ASSERTIONS=ON
set cmake_flags=%cmake_flags% -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON
set cmake_flags=%cmake_flags% -DCMAKE_INSTALL_UCRT_LIBRARIES=ON
set cmake_flags=%cmake_flags%
-DCLANG_FORMAT_VS_VERSION=%clang_format_vs_version%
set cmake_flags=%cmake_flags% -DPACKAGE_VERSION=%package_version%
set cmake_flags=%cmake_flags% -DLLDB_RELOCATABLE_PYTHON=1
set cmake_flags=%cmake_flags%
-DLLDB_TEST_COMPILER=%cd%\build32_stage0\bin\clang.exe
set cmake_flags=%cmake_flags% -DCMAKE_CL_SHOWINCLUDES_PREFIX="Note:
including file: "
set cmake_flags=%cmake_flags% -DCMAKE_CROSSCOMPILING=True
set cmake_flags=%cmake_flags%
-DLLVM_DEFAULT_TARGET_TRIPLE=arm-linux-gnueabihf
set cmake_flags=%cmake_flags% -DLLVM_TARGET_ARCH=ARM
set cmake_flags=%cmake_flags% -DLLVM_TARGETS_TO_BUILD=ARM
set cmake_flags=%cmake_flags% -DCMAKE_INSTALL_PREFIX=C:\clang-arm
rmdir /s /q %buildir%
rmdir /s /q %buildir%
rmdir /s /q %buildir%
if exist %buildir% exit 1
mkdir %buildir%
cd %buildir%
cmake -G Ninja %cmake_flags% ..\llvm
"C:\Program Files (x86)\ninja-win\ninja.exe" -v
--
Masaru Tsuchiyama <m.tmatma at gmail.com>
More information about the cfe-users
mailing list