Hello,

I've uploaded binaries for Windows on Arm:
081373cc76e88224020fea42eba2161d972f03bb83ebc055fb3cd4f2cfcdfb95
 LLVM-12.0.0-rc1-woa64.exe

It was built from the current release/12.x branch (commit b46924ee) with
two patches applied on top:
- https://reviews.llvm.org/D96259
- https://reviews.llvm.org/D96498

It contains "clang;clang-tools-extra;lld;compiler-rt” projects.
Compiler-RT has sanitizers disabled (MEMPROF and XRAY use sanitizer
infrastucture).  I.e.,
===
+  -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;compiler-rt" ^
+  -DCOMPILER_RT_BUILD_SANITIZERS=OFF ^
+  -DCOMPILER_RT_BUILD_MEMPROF=OFF ^
+  -DCOMPILER_RT_BUILD_XRAY=OFF ^
===

I've attached the changes we had to make to
llvm/utils/releases/build_llvm_package.bat. @Maxim Kuvyrkov is going to
clean them up and post a patch in the next couple of weeks (he's been doing
all the hard work, I'm just uploading).

This is the first time we're trying to provide a release for Windows on
Arm, so if anyone has any comments or questions, feel free to send an email
:)

Cheers,
Diana

On Thu, 28 Jan 2021 at 05:05, Tom Stellard via lldb-dev <
lldb-dev@lists.llvm.org> wrote:

> Hi,
>
> I've tagged the 12.0.0-rc1 release.  Testers can begin testing and upload
> binaries.
>
> -Tom
>
> _______________________________________________
> lldb-dev mailing list
> lldb-dev@lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev
>
diff --git a/llvm/utils/release/build_llvm_package.bat b/llvm/utils/release/build_llvm_package.bat
index 35dcd9f613c4..8d083f1985df 100755
--- a/llvm/utils/release/build_llvm_package.bat
+++ b/llvm/utils/release/build_llvm_package.bat
@@ -19,14 +19,18 @@ REM   https://github.com/swig/swig/issues/769
 
 
 REM You need to modify the paths below:
-set vsdevcmd=C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\Common7\Tools\VsDevCmd.bat
+set vsdevcmd=C:\BuildTools\Common7\Tools\VsDevCmd.bat
 
 set python32_dir=C:\Users\%USERNAME%\AppData\Local\Programs\Python\Python36-32
 set python64_dir=C:\Users\%USERNAME%\AppData\Local\Programs\Python\Python36
 
+set 7z=C:\Program Files\7-Zip\7z
+
 for /f "usebackq" %%i in (`PowerShell ^(Get-Date^).ToString^('yyyyMMdd'^)`) do set datestamp=%%i
 
 set revision=%1
+git -C C:\Users\%USERNAME%\source\llvm-project remote update -p
+for /f "usebackq" %%i in (`git -C C:\Users\%USERNAME%\source\llvm-project rev-parse refs/remotes/origin/release/12.x`) do set revision=%%i
 set package_version=12.0.0-%revision:~0,8%
 set clang_format_vs_version=12.0.0.%datestamp%
 set build_dir=llvm_package_%revision:~0,8%
@@ -36,15 +40,20 @@ echo Package version: %package_version%
 echo Clang format plugin version: %clang_format_vs_version%
 echo Build dir: %build_dir%
 echo.
-pause
+REM pause
 
 mkdir %build_dir%
 cd %build_dir%
 
 echo Checking out %revision%
-curl -L https://github.com/llvm/llvm-project/archive/%revision%.zip -o src.zip || exit /b
-7z x src.zip || exit /b
-mv llvm-project-* llvm-project || exit /b
+git clone --single-branch --branch release/12.x --reference C:\Users\%USERNAME%\source\llvm-project https://github.com/llvm/llvm-project.git || exit /b
+git -C llvm-project fetch origin 71c29b4cf3fb2b5610991bfbc12b8bda97d60005 || exit /b
+git -C llvm-project cherry-pick FETCH_HEAD || exit /b
+git -C llvm-project fetch C:\Users\%USERNAME%\source\llvm-project refs/heads/exegesis-fix || exit /b
+git -C llvm-project cherry-pick FETCH_HEAD || exit /b
+REM curl -L https://github.com/llvm/llvm-project/archive/%revision%.zip -o src.zip || exit /b
+REM %7z% x src.zip || exit /b
+REM mv llvm-project-* llvm-project || exit /b
 
 REM Setting CMAKE_CL_SHOWINCLUDES_PREFIX to work around PR27226.
 set cmake_flags=^
@@ -53,51 +62,61 @@ set cmake_flags=^
   -DLLVM_INSTALL_TOOLCHAIN_ONLY=ON ^
   -DLLVM_BUILD_LLVM_C_DYLIB=ON ^
   -DCMAKE_INSTALL_UCRT_LIBRARIES=ON ^
-  -DCLANG_FORMAT_VS_VERSION=%clang_format_vs_version% ^
   -DPACKAGE_VERSION=%package_version% ^
-  -DLLDB_RELOCATABLE_PYTHON=1 ^
-  -DLLDB_TEST_COMPILER=%cd%\build32_stage0\bin\clang.exe ^
   -DCMAKE_CL_SHOWINCLUDES_PREFIX="Note: including file: " ^
-  -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;compiler-rt;openmp;lldb"
+  -DLLVM_DEFAULT_TARGET_TRIPLE=aarch64-windows-msvc ^
+  -DLLVM_HOST_TRIPLE=aarch64-windows-msvc ^
+  -DLLVM_TARGET_ARCH=AArch64
 
 REM TODO: Run the "check-all" tests.
 
 set "VSCMD_START_DIR=%CD%"
-call "%vsdevcmd%" -arch=x86
-set CC=
-set CXX=
+call "%vsdevcmd%" -host_arch=x86 -arch=arm64
+set "PATH=C:\Users\%USERNAME%\source\llvm-package\bin;C:\Users\%USERNAME%\source\ninja;%PATH%;C:\msys32\usr\bin;C:\Program Files (x86)\NSIS"
+set CC=clang-cl
+set CXX=clang-cl
 mkdir build32_stage0
 cd build32_stage0
-cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python32_dir% -DPYTHON_EXECUTABLE=%python32_dir%\python.exe ..\llvm-project\llvm || exit /b
+cmake -GNinja %cmake_flags% ^
+  -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld" ^
+  -DLLVM_TARGETS_TO_BUILD="AArch64" ^
+  ..\llvm-project\llvm || exit /b
 ninja all || ninja all || ninja all || exit /b
-ninja check || ninja check || ninja check || exit /b
-ninja check-clang || ninja check-clang || ninja check-clang || exit /b
-ninja check-lld || ninja check-lld || ninja check-lld || exit /b
-ninja check-sanitizer || ninja check-sanitizer || ninja check-sanitizer || exit /b
-ninja check-clang-tools || ninja check-clang-tools || ninja check-clang-tools || exit /b
-ninja check-clangd || ninja check-clangd || ninja check-clangd || exit /b
+REM ninja check || ninja check || ninja check || exit /b
+REM ninja check-clang || ninja check-clang || ninja check-clang || exit /b
+REM ninja check-lld || ninja check-lld || ninja check-lld || exit /b
+REM ninja check-sanitizer || ninja check-sanitizer || ninja check-sanitizer || exit /b
+REM ninja check-clang-tools || ninja check-clang-tools || ninja check-clang-tools || exit /b
+REM ninja check-clangd || ninja check-clangd || ninja check-clangd || exit /b
 cd..
 
 mkdir build32
 cd build32
 set CC=..\build32_stage0\bin\clang-cl
 set CXX=..\build32_stage0\bin\clang-cl
-cmake -GNinja %cmake_flags% -DPYTHON_HOME=%python32_dir% -DPYTHON_EXECUTABLE=%python32_dir%\python.exe ..\llvm-project\llvm || exit /b
+cmake -GNinja %cmake_flags% ^
+  -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;compiler-rt" ^
+  -DCOMPILER_RT_BUILD_SANITIZERS=OFF ^
+  -DCOMPILER_RT_BUILD_MEMPROF=OFF ^
+  -DCOMPILER_RT_BUILD_XRAY=OFF ^
+  ..\llvm-project\llvm || exit /b
 ninja all || ninja all || ninja all || exit /b
-ninja check || ninja check || ninja check || exit /b
-ninja check-clang || ninja check-clang || ninja check-clang || exit /b
-ninja check-lld || ninja check-lld || ninja check-lld || exit /b
-ninja check-sanitizer || ninja check-sanitizer || ninja check-sanitizer || exit /b
-ninja check-clang-tools || ninja check-clang-tools || ninja check-clang-tools || exit /b
-ninja check-clangd || ninja check-clangd || ninja check-clangd || exit /b
+REM ninja check || ninja check || ninja check || exit /b
+REM ninja check-clang || ninja check-clang || ninja check-clang || exit /b
+REM ninja check-lld || ninja check-lld || ninja check-lld || exit /b
+REM ninja check-sanitizer || ninja check-sanitizer || ninja check-sanitizer || exit /b
+REM ninja check-clang-tools || ninja check-clang-tools || ninja check-clang-tools || exit /b
+REM ninja check-clangd || ninja check-clangd || ninja check-clangd || exit /b
 ninja package || exit /b
 
-7z x LLVM-%package_version%-win32.exe -orepack
+rename LLVM-%package_version%-win64.exe LLVM-%package_version%-woa64.exe
+%7z% x LLVM-%package_version%-woa64.exe -orepack
 rmdir /s /q repack\$PLUGINSDIR
 del repack\Uninstall.exe
-7z a LLVM-%package_version%-win32.zip .\repack\* -mx9
+%7z% a LLVM-%package_version%-woa64.zip .\repack\* -mx9
 cd ..
 
+exit /b
 
 REM The plug-in is built separately as it uses a statically linked clang-format.exe.
 mkdir build_vsix
@@ -142,8 +161,8 @@ ninja check-clang-tools || ninja check-clang-tools || ninja check-clang-tools ||
 ninja check-clangd || ninja check-clangd || ninja check-clangd || exit /b
 ninja package || exit /b
 
-7z x LLVM-%package_version%-win64.exe -orepack
+%7z% x LLVM-%package_version%-win64.exe -orepack
 rmdir /s /q repack\$PLUGINSDIR
 del repack\Uninstall.exe
-7z a LLVM-%package_version%-win64.zip .\repack\* -mx9
+%7z% a LLVM-%package_version%-win64.zip .\repack\* -mx9
 cd ..
_______________________________________________
lldb-dev mailing list
lldb-dev@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-dev

Reply via email to