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
60 lines
1.5 KiB
Plaintext
60 lines
1.5 KiB
Plaintext
NDK_ROOT := $(shell dirname $(CC))/../../../../..
|
|
|
|
ifeq "$(HOST_OS)" "Linux"
|
|
HOST_TAG := linux-x86_64
|
|
else ifeq "$(HOST_OS)" "Darwin"
|
|
HOST_TAG := darwin-x86_64
|
|
else
|
|
HOST_TAG := windows-x86_64
|
|
endif
|
|
|
|
TOOLCHAIN_ROOT := $(NDK_ROOT)/toolchains/llvm/prebuilt/$(HOST_TAG)
|
|
TOOLCHAIN_SYSROOT := $(TOOLCHAIN_ROOT)/sysroot
|
|
|
|
OBJCOPY ?= $(TOOLCHAIN_ROOT)/bin/llvm-objcopy
|
|
ARCHIVER ?= $(TOOLCHAIN_ROOT)/bin/llvm-ar
|
|
|
|
ifeq "$(wildcard $(TOOLCHAIN_SYSROOT)/.)" ""
|
|
# Compiling test inferiors for Android requires an NDK with the unified
|
|
# toolchain introduced in version r19.
|
|
$(error "No unified toolchain sysroot found in $(NDK_ROOT). NDK must be r19 or later.")
|
|
endif
|
|
|
|
ifeq "$(ARCH)" "arm"
|
|
TRIPLE := armv7-none-linux-androideabi
|
|
ARCH_CFLAGS += -march=armv7-a -mfloat-abi=softfp -mfpu=vfpv3-d16 -marm
|
|
else ifeq "$(ARCH)" "aarch64"
|
|
TRIPLE := aarch64-none-linux-android
|
|
else ifeq "$(ARCH)" "i386"
|
|
TRIPLE := i686-none-linux-android
|
|
else
|
|
TRIPLE := $(ARCH)-none-linux-android
|
|
endif
|
|
|
|
# lowest 64-bit API level
|
|
API_LEVEL := 21
|
|
|
|
ifeq "$(ARCH)" "arm"
|
|
ARCH_DIR := arm-linux-androideabi
|
|
else
|
|
ARCH_DIR := $(subst -none,,$(TRIPLE))
|
|
endif
|
|
|
|
ARCH_CFLAGS += \
|
|
--target=$(TRIPLE) \
|
|
--sysroot=$(TOOLCHAIN_SYSROOT) \
|
|
-D__ANDROID_API__=$(API_LEVEL)
|
|
|
|
ARCH_CXXFLAGS += \
|
|
-isystem $(TOOLCHAIN_SYSROOT)/usr/include/c++/v1
|
|
|
|
ARCH_LDFLAGS += \
|
|
--target=$(TRIPLE) \
|
|
--sysroot=$(TOOLCHAIN_SYSROOT) \
|
|
--prefix=$(TOOLCHAIN_SYSROOT)/usr/lib/$(ARCH_DIR)/$(API_LEVEL) \
|
|
-L$(TOOLCHAIN_SYSROOT)/usr/lib/$(ARCH_DIR)/$(API_LEVEL) \
|
|
$(TOOLCHAIN_SYSROOT)/usr/lib/$(ARCH_DIR)/libc++_static.a \
|
|
-lm \
|
|
-lc++abi \
|
|
-nostdlib++
|