Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 62c13743 authored by dianlujitao's avatar dianlujitao
Browse files

kernel: Check HIP support of clang before disabling it

Old clang releases don't support --hip-path, so passing this flag will
break the build.

Change-Id: If36defb0e74893581849700fb67e6aa4617908a8
parent ef686781
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -239,7 +239,11 @@ ifneq ($(TARGET_KERNEL_CLANG_COMPILE),false)
    endif
    PATH_OVERRIDE += PATH=$(TARGET_KERNEL_CLANG_PATH)/bin:$$PATH
    ifeq ($(KERNEL_CC),)
        KERNEL_CC := CC="$(CCACHE_BIN) clang --cuda-path=/dev/null --hip-path=/dev/null"
        CLANG_EXTRA_FLAGS := --cuda-path=/dev/null
        ifeq ($(shell $(TARGET_KERNEL_CLANG_PATH)/bin/clang -v --hip-path=/dev/null >/dev/null 2>&1; echo $$?),0)
            CLANG_EXTRA_FLAGS += --hip-path=/dev/null
        endif
        KERNEL_CC := CC="$(CCACHE_BIN) clang $(CLANG_EXTRA_FLAGS)"
    endif
endif