[llvm] build_llvm_release.bat: add tarball export to x64 release (PR #79840)
BenoƮt Amiaux via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 21 11:53:50 PST 2024
https://github.com/bamiaux updated https://github.com/llvm/llvm-project/pull/79840
>From 3bbe344a594e56c662bcc46048fbc6d803442af2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Beno=C3=AEt=20Amiaux?= <benoit.amiaux at gmail.com>
Date: Sat, 27 Jan 2024 14:14:53 +0100
Subject: [PATCH 1/3] build_llvm_release.bat: add tarball export to x64 release
Like linux releases, export a tar.xz files containing most llvm tools,
including non toolchain utilities, llvm-config, llvm-link and others.
We do this by reconfiguring cmake one last time at the last step,
running the install target so we do not need to recompile anything.
Fix #51192
---
llvm/utils/release/build_llvm_release.bat | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/llvm/utils/release/build_llvm_release.bat b/llvm/utils/release/build_llvm_release.bat
index 67bb22de7606df..86294417551de5 100755
--- a/llvm/utils/release/build_llvm_release.bat
+++ b/llvm/utils/release/build_llvm_release.bat
@@ -287,7 +287,16 @@ ninja check-sanitizer || ninja check-sanitizer || ninja check-sanitizer || exit
ninja check-clang-tools || ninja check-clang-tools || ninja check-clang-tools || exit /b 1
ninja check-clangd || ninja check-clangd || ninja check-clangd || exit /b 1
ninja package || exit /b 1
+
+:: generate tarball with install toolchain only off
+set filename=clang+llvm-%version%-x86_64-pc-windows-msvc
+cmake -GNinja %cmake_flags% -DLLVM_INSTALL_TOOLCHAIN_ONLY=OFF ^
+ -DCMAKE_INSTALL_PREFIX=%build_dir%/%filename% ..\llvm-project\llvm || exit /b 1
+ninja install || exit /b 1
+:: check llvm_config is present & returns something
+%build_dir%/%filename%/bin/llvm-config.exe --bindir
cd ..
+7z a -ttar -so %filename%.tar %filename% | 7z a -txz -si %filename%.tar.xz
exit /b 0
::==============================================================================
>From 2562560fb2622c660422c2978bd4a0c2480b6d0d Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Beno=C3=AEt=20Amiaux?= <benoit.amiaux at gmail.com>
Date: Wed, 21 Feb 2024 20:17:12 +0100
Subject: [PATCH 2/3] build_llvm_release.bat: return error if llvm-config is
not found
---
llvm/utils/release/build_llvm_release.bat | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/utils/release/build_llvm_release.bat b/llvm/utils/release/build_llvm_release.bat
index 86294417551de5..67f6f87abd88ce 100755
--- a/llvm/utils/release/build_llvm_release.bat
+++ b/llvm/utils/release/build_llvm_release.bat
@@ -294,7 +294,7 @@ cmake -GNinja %cmake_flags% -DLLVM_INSTALL_TOOLCHAIN_ONLY=OFF ^
-DCMAKE_INSTALL_PREFIX=%build_dir%/%filename% ..\llvm-project\llvm || exit /b 1
ninja install || exit /b 1
:: check llvm_config is present & returns something
-%build_dir%/%filename%/bin/llvm-config.exe --bindir
+%build_dir%/%filename%/bin/llvm-config.exe --bindir || exit /b 1
cd ..
7z a -ttar -so %filename%.tar %filename% | 7z a -txz -si %filename%.tar.xz
>From 87bab7015d6b9ce46df3b4dc9265b6b3358d7a50 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Beno=C3=AEt=20Amiaux?= <benoit.amiaux at gmail.com>
Date: Wed, 21 Feb 2024 20:17:33 +0100
Subject: [PATCH 3/3] build_llvm_release.bat: add missing cmake profile flags
---
llvm/utils/release/build_llvm_release.bat | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/llvm/utils/release/build_llvm_release.bat b/llvm/utils/release/build_llvm_release.bat
index 67f6f87abd88ce..dc63fdac1e4adc 100755
--- a/llvm/utils/release/build_llvm_release.bat
+++ b/llvm/utils/release/build_llvm_release.bat
@@ -290,7 +290,7 @@ ninja package || exit /b 1
:: generate tarball with install toolchain only off
set filename=clang+llvm-%version%-x86_64-pc-windows-msvc
-cmake -GNinja %cmake_flags% -DLLVM_INSTALL_TOOLCHAIN_ONLY=OFF ^
+cmake -GNinja %cmake_flags% %cmake_profile_flags% -DLLVM_INSTALL_TOOLCHAIN_ONLY=OFF ^
-DCMAKE_INSTALL_PREFIX=%build_dir%/%filename% ..\llvm-project\llvm || exit /b 1
ninja install || exit /b 1
:: check llvm_config is present & returns something
More information about the llvm-commits
mailing list