Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build compiler-rt from the runtimes directory. #6

Merged
merged 2 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
runs-on: windows-latest
env:
LLVM_VERSION: 18.1.8
LLVM_MAJOR_VERSION: 18

strategy:
fail-fast: false
Expand Down
14 changes: 10 additions & 4 deletions build.bat
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,20 @@ cd %WORKING_DIR%

set THIS_DIR=%CD%

cd llvm-project

mkdir llvm\build
cd llvm\build
mkdir llvm-project\llvm\build
cd llvm-project\llvm\build
cmake .. %LLVM_CMAKE_CONFIGURE_FLAGS%
cmake --build . %CMAKE_BUILD_FLAGS%
cmake --build . --target install %CMAKE_BUILD_FLAGS%

cd %THIS_DIR%

mkdir llvm-project\runtimes\build
cd llvm-project\runtimes\build
cmake .. %RUNTIMES_CMAKE_CONFIGURE_FLAGS%
cmake --build . %CMAKE_BUILD_FLAGS%
cmake --build . --target install %CMAKE_BUILD_FLAGS%

cd %THIS_DIR%

7z a -t7z %GITHUB_WORKSPACE%\%LLVM_RELEASE_FILE% %LLVM_RELEASE_NAME%
25 changes: 19 additions & 6 deletions set-env.bat
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ goto :loop
set CONFIGURATION=Release
set DEBUG_SUFFIX=
set LLVM_CMAKE_CONFIGURE_EXTRA_FLAGS=
set RUNTIME_CMAKE_CONFIGURE_EXTRA_FLAGS=
set CLANG_CMAKE_CONFIGURE_EXTRA_FLAGS=
shift
goto :loop
Expand All @@ -127,6 +128,7 @@ goto :loop
set CONFIGURATION=Debug
set DEBUG_SUFFIX=-dbg
set LLVM_CMAKE_CONFIGURE_EXTRA_FLAGS=-DLLVM_BUILD_TOOLS=OFF -DLLVM_ENABLE_ASSERTIONS=ON
set RUNTIME_CMAKE_CONFIGURE_EXTRA_FLAGS=
set CLANG_CMAKE_CONFIGURE_EXTRA_FLAGS=-DCLANG_BUILD_TOOLS=OFF
shift
goto :loop
Expand Down Expand Up @@ -165,17 +167,29 @@ set LLVM_CMAKE_CONFIGURE_FLAGS= ^
-DCMAKE_DISABLE_FIND_PACKAGE_LibXml2=TRUE ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=%CMAKE_CRT% ^
-DCMAKE_MT=mt ^
-DLLVM_TEMPORARILY_ALLOW_OLD_TOOLCHAIN=ON ^
-DLLVM_ENABLE_TERMINFO=OFF ^
-DLLVM_ENABLE_ZLIB=OFF ^
-DLLVM_INCLUDE_BENCHMARKS=OFF ^
-DLLVM_INCLUDE_DOCS=OFF ^
-DLLVM_ENABLE_PROJECTS=clang;lld ^
-DLLVM_ENABLE_PROJECTS=lld ^
-DLLVM_INCLUDE_EXAMPLES=OFF ^
-DLLVM_INCLUDE_GO_TESTS=OFF ^
-DLLVM_INCLUDE_RUNTIMES=OFF ^
-DLLVM_INCLUDE_TESTS=OFF ^
-DLLVM_INCLUDE_UTILS=OFF ^
%LLVM_CMAKE_CONFIGURE_EXTRA_FLAGS%

set RUNTIMES_CMAKE_CONFIGURE_FLAGS= ^
-G "%CMAKE_GENERATOR%%CMAKE_GENERATOR_SUFFIX%" ^
-Thost=x64 ^
-DCMAKE_INSTALL_PREFIX=%LLVM_RELEASE_DIR%/lib/clang/%LLVM_MAJOR_VERSION% ^
-DCMAKE_MSVC_RUNTIME_LIBRARY=%CMAKE_CRT% ^
-DCMAKE_MT=mt ^
-DCMAKE_C_COMPILER_TARGET="x86_64-pc-windows-msvc" ^
-DLLVM_ENABLE_RUNTIMES=compiler-rt ^
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON ^
-DCOMPILER_RT_BUILD_BUILTINS=OFF ^
%RUNTIME_CMAKE_CONFIGURE_EXTRA_FLAGS%

set CMAKE_BUILD_FLAGS= ^
--config %CONFIGURATION% ^
-- ^
Expand All @@ -188,15 +202,14 @@ set DEPLOY_FILE=%LLVM_RELEASE_FILE%

echo ---------------------------------------------------------------------------
echo LLVM_VERSION: %LLVM_VERSION%
echo LLVM_MAJOR_VERSION: %LLVM_MAJOR_VERSION%
echo LLVM_MASTER_URL: %LLVM_MASTER_URL%
echo LLVM_DOWNLOAD_URL: %LLVM_DOWNLOAD_URL%
echo LLVM_RELEASE_FILE: %LLVM_RELEASE_FILE%
echo LLVM_RELEASE_URL: %LLVM_RELEASE_URL%
echo LLVM_CMAKE_CONFIGURE_FLAGS: %LLVM_CMAKE_CONFIGURE_FLAGS%
echo ---------------------------------------------------------------------------
echo CLANG_DOWNLOAD_URL: %CLANG_DOWNLOAD_URL%
echo CLANG_RELEASE_FILE: %CLANG_RELEASE_FILE%
echo CLANG_CMAKE_CONFIGURE_FLAGS: %CLANG_CMAKE_CONFIGURE_FLAGS%
echo RUNTIMES_CMAKE_CONFIGURE_FLAGS: %RUNTIMES_CMAKE_CONFIGURE_FLAGS%
echo ---------------------------------------------------------------------------
echo DEPLOY_FILE: %DEPLOY_FILE%
echo ---------------------------------------------------------------------------
Loading