CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
78 lines
1.8 KiB
Bash
Executable File
78 lines
1.8 KiB
Bash
Executable File
#!/usr/bin/env bash
|
||
|
||
set -uex
|
||
|
||
section_start perfetto "Building perfetto"
|
||
|
||
BASE_PWD=$PWD
|
||
|
||
PERFETTO_REVISION=$(grep -Po '^source_url = .*/(\Kv\d+\.\d+)(?=/)' subprojects/perfetto-sdk.wrap)
|
||
|
||
patch_files=(
|
||
"build-perfetto-Fix-C-standard-library-build-errors-with-Debian-13.patch"
|
||
)
|
||
|
||
# Set PERFETTO_ARCH based on DEBIAN_ARCH
|
||
if [[ -z "${PERFETTO_ARCH:-}" ]]; then
|
||
case "$DEBIAN_ARCH" in
|
||
amd64) PERFETTO_ARCH=x64;;
|
||
arm64) PERFETTO_ARCH=arm64;;
|
||
esac
|
||
fi
|
||
|
||
git clone --branch "$PERFETTO_REVISION" --depth 1 https://github.com/google/perfetto /perfetto
|
||
|
||
pushd /perfetto
|
||
|
||
for patch in "${patch_files[@]}"; do
|
||
echo "Applying patch: $patch"
|
||
git am "$BASE_PWD/.gitlab-ci/container/patches/$patch"
|
||
done
|
||
|
||
# Base GN args
|
||
mkdir -p _build
|
||
cat >_build/args.gn <<EOF
|
||
is_debug=false
|
||
target_cpu="${PERFETTO_ARCH}"
|
||
target_os="${PERFETTO_TARGET}"
|
||
EOF
|
||
|
||
case "$PERFETTO_TARGET" in
|
||
linux)
|
||
# Override Perfetto’s default toolchain selection here, as the bundled
|
||
# arm64 toolchain is an x86-64 -> arm64 cross-compiler.
|
||
cat >>_build/args.gn <<EOF
|
||
is_system_compiler = true
|
||
is_hermetic_clang = false
|
||
ar = "ar"
|
||
cc = "clang-${LLVM_VERSION}"
|
||
cxx = "clang++-${LLVM_VERSION}"
|
||
extra_ldflags = "-fuse-ld=lld-${LLVM_VERSION} -lpthread -ldl"
|
||
EOF
|
||
./tools/install-build-deps
|
||
;;
|
||
android)
|
||
# No additional args needed when cross-building for Android
|
||
./tools/install-build-deps --android
|
||
;;
|
||
*)
|
||
echo "Unexpected PERFETTO_TARGET value: $PERFETTO_TARGET"
|
||
exit 1
|
||
;;
|
||
esac
|
||
|
||
./tools/gn gen _build/
|
||
./tools/ninja -C _build/ tracebox
|
||
|
||
mkdir -p build
|
||
cp _build/tracebox build/
|
||
|
||
"${STRIP_CMD:-strip}" build/tracebox || true
|
||
|
||
# Cleanup everything except build/
|
||
find . -mindepth 1 -maxdepth 1 ! -name build -exec rm -rf {} +
|
||
|
||
popd
|
||
|
||
section_end perfetto
|