ifneq ($(CROSS_COMPILE),) | |
CLANG_FLAGS += --target=$(notdir $(CROSS_COMPILE:%-=%)) | |
endif | |
ifeq ($(LLVM_IAS),1) | |
CLANG_FLAGS += -integrated-as | |
else | |
CLANG_FLAGS += -no-integrated-as | |
GCC_TOOLCHAIN_DIR := $(dir $(shell which $(CROSS_COMPILE)elfedit)) | |
CLANG_FLAGS += --prefix=$(GCC_TOOLCHAIN_DIR)$(notdir $(CROSS_COMPILE)) | |
endif | |
CLANG_FLAGS += -Werror=unknown-warning-option | |
KBUILD_CFLAGS += $(CLANG_FLAGS) | |
KBUILD_AFLAGS += $(CLANG_FLAGS) | |
export CLANG_FLAGS |