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

Try new Mariner containers #412

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
2 changes: 1 addition & 1 deletion build-coredistools.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
setlocal EnableDelayedExpansion EnableExtensions

set TargetOSArchitecture=%1
set LLVMTargetsToBuild=AArch64;ARM;X86
set LLVMTargetsToBuild=AArch64;ARM;X86;LoongArch;RISCV

if /i "%TargetOSArchitecture%" == "win-arm64" (
set GeneratorPlatform=ARM64
Expand Down
3 changes: 1 addition & 2 deletions build-coredistools.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ EnsureCrossRootfsDirectoryExists () {
}

CMakeOSXArchitectures=
LLVMTargetsToBuild="AArch64;ARM;X86"
LLVMTargetsToBuild="AArch64;ARM;X86;LoongArch;RISCV"

# Figure out which `strip` to use. Prefer `llvm-strip` if it is available.
# `llvm-strip` is available in CBL-Mariner container,
Expand Down Expand Up @@ -53,7 +53,6 @@ case "$TargetOSArchitecture" in
CMakeCrossCompiling=ON
LLVMDefaultTargetTriple=thumbv7-linux-gnueabihf
LLVMHostTriple=arm-linux-gnueabihf
LLVMTargetsToBuild="ARM"
EnsureCrossRootfsDirectoryExists
;;

Expand Down
2 changes: 1 addition & 1 deletion build-tblgen.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ pushd "%BinariesDirectory%"
cmake.exe ^
-G "Visual Studio 17 2022" ^
-DCMAKE_INSTALL_PREFIX="%RootDirectory%\" ^
-DLLVM_TARGETS_TO_BUILD=AArch64;ARM;X86 ^
-DLLVM_TARGETS_TO_BUILD=AArch64;ARM;X86;LoongArch;RISCV ^
"%SourcesDirectory%\llvm-project\llvm"

popd
Expand Down
9 changes: 8 additions & 1 deletion build-tblgen.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,27 +22,31 @@ EnsureCrossRootfsDirectoryExists () {
}

CMakeOSXArchitectures=
LLVMTargetsToBuild="AArch64;ARM;X86"
LLVMTargetsToBuild="AArch64;ARM;X86;LoongArch;RISCV"

case "$TargetOSArchitecture" in
linux-x64)
LLVMHostTriple=x86_64-linux-gnu
if [ $CrossBuildUsingMariner -eq 1 ]; then
CMakeCrossCompiling=ON
CMakeSystemName=Linux
EnsureCrossRootfsDirectoryExists
else
CMakeCrossCompiling=OFF
CMakeSystemName=
fi
;;

linux-loongarch64)
CMakeCrossCompiling=OFF
CMakeSystemName=
LLVMHostTriple=loongarch64-linux-gnu
LLVMTargetsToBuild="LoongArch"
;;

osx-x64)
CMakeCrossCompiling=OFF
CMakeSystemName=
CMakeOSXArchitectures=x86_64
LLVMHostTriple=x86_64-apple-darwin
;;
Expand Down Expand Up @@ -79,6 +83,7 @@ if [ -z "$CrossRootfsDirectory" ]; then
cmake \
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_SYSTEM_NAME=$CMakeSystemName \
-DCMAKE_CROSSCOMPILING=$CMakeCrossCompiling \
-DCMAKE_C_COMPILER=$C_COMPILER \
-DCMAKE_CXX_COMPILER=$CXX_COMPILER \
Expand All @@ -95,6 +100,7 @@ elif [ $CrossBuildUsingMariner -eq 1 ]; then
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$RootDirectory \
-DCMAKE_SYSTEM_NAME=$CMakeSystemName \
-DCMAKE_CROSSCOMPILING=$CMakeCrossCompiling \
-DCMAKE_C_COMPILER=$C_COMPILER \
-DCMAKE_CXX_COMPILER=$CXX_COMPILER \
Expand All @@ -112,6 +118,7 @@ else
-G "Unix Makefiles" \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_INSTALL_PREFIX=$RootDirectory \
-DCMAKE_SYSTEM_NAME=$CMakeSystemName \
-DCMAKE_CROSSCOMPILING=$CMakeCrossCompiling \
-DCMAKE_C_COMPILER=$C_COMPILER \
-DCMAKE_CXX_COMPILER=$CXX_COMPILER \
Expand Down
8 changes: 4 additions & 4 deletions coredistools.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,11 @@ resources:
# The following containers are based on a later set of libs.
containers:
- container: linux_x64
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-ubuntu-18.04-amd64
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-amd64
- container: linux_arm
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-ubuntu-18.04-arm
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-arm
- container: linux_arm64
image: mcr.microsoft.com/dotnet-buildtools/prereqs:cbl-mariner-2.0-cross-ubuntu-18.04-arm64
image: mcr.microsoft.com/dotnet-buildtools/prereqs:azurelinux-3.0-net9.0-cross-arm64

# # Use the following for legacy Ubuntu 18.04 based Arm/Arm64 cross build (x64 build is not cross)
# resources:
Expand All @@ -56,7 +56,7 @@ resources:
variables:
LLVMRepositoryUri: https://github.com/llvm/llvm-project.git
LLVMSourceBundle: llvm-project.bundle
LLVMSourceVersion: llvmorg-17.0.6
LLVMSourceVersion: llvmorg-19.1.0

jobs:

Expand Down
4 changes: 2 additions & 2 deletions doc/building-coredistools.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ cd jitutils

2. Checkout the LLVM project repository into a subdirectory named src/llvm-project:
```
git clone --depth 1 --branch llvmorg-17.0.6 https://github.com/llvm/llvm-project.git src\llvm-project
git clone --depth 1 --branch llvmorg-19.1.0 https://github.com/llvm/llvm-project.git src\llvm-project
```

3. Build `llvm-tblgen.exe`:
Expand Down Expand Up @@ -57,7 +57,7 @@ cd jitutils

2. Checkout the LLVM project repository:
```
git clone --depth 1 --branch llvmorg-17.0.6 https://github.com/llvm/llvm-project.git src/llvm-project
git clone --depth 1 --branch llvmorg-19.1.0 https://github.com/llvm/llvm-project.git src/llvm-project
```

3. Build `llvm-tblgen` in Docker:
Expand Down
Loading