1 2 include $(BUILD_SYSTEM)/clang/x86_64.mk 3 include $(BUILD_SYSTEM)/clang/HOST_x86_common.mk 4 5 ifeq ($(HOST_OS),linux) 6 CLANG_CONFIG_x86_64_HOST_TRIPLE := x86_64-linux-gnu 7 CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_ASFLAGS := $(CLANG_CONFIG_x86_LINUX_HOST_EXTRA_ASFLAGS) 8 CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_CFLAGS := $(CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CFLAGS) 9 CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_CPPFLAGS := $(CLANG_CONFIG_x86_LINUX_HOST_EXTRA_CPPFLAGS) 10 CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_LDFLAGS := $(CLANG_CONFIG_x86_LINUX_HOST_EXTRA_LDFLAGS) 11 endif 12 ifeq ($(HOST_OS),darwin) 13 CLANG_CONFIG_x86_64_HOST_TRIPLE := x86_64-apple-darwin 14 CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_ASFLAGS := $(CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_ASFLAGS) 15 CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_CFLAGS := $(CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_CFLAGS) 16 CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_CPPFLAGS := $(CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_CPPFLAGS) 17 CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_LDFLAGS := $(CLANG_CONFIG_x86_DARWIN_HOST_EXTRA_LDFLAGS) 18 endif 19 ifeq ($(HOST_OS),windows) 20 CLANG_CONFIG_x86_64_HOST_TRIPLE := x86_64-pc-mingw64 21 endif 22 23 CLANG_CONFIG_x86_64_HOST_EXTRA_ASFLAGS := \ 24 $(CLANG_CONFIG_EXTRA_ASFLAGS) \ 25 $(CLANG_CONFIG_HOST_EXTRA_ASFLAGS) \ 26 $(CLANG_CONFIG_x86_64_EXTRA_ASFLAGS) \ 27 $(CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_ASFLAGS) \ 28 -target $(CLANG_CONFIG_x86_64_HOST_TRIPLE) 29 30 CLANG_CONFIG_x86_64_HOST_EXTRA_CFLAGS := \ 31 $(CLANG_CONFIG_EXTRA_CFLAGS) \ 32 $(CLANG_CONFIG_HOST_EXTRA_CFLAGS) \ 33 $(CLANG_CONFIG_x86_64_EXTRA_CFLAGS) \ 34 $(CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_CFLAGS) \ 35 $(CLANG_CONFIG_x86_64_HOST_EXTRA_ASFLAGS) 36 37 CLANG_CONFIG_x86_64_HOST_EXTRA_CONLYFLAGS := \ 38 $(CLANG_CONFIG_EXTRA_CONLYFLAGS) \ 39 $(CLANG_CONFIG_HOST_EXTRA_CONLYFLAGS) \ 40 $(CLANG_CONFIG_x86_64_EXTRA_CONLYFLAGS) \ 41 $(CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_CONLYFLAGS) 42 43 CLANG_CONFIG_x86_64_HOST_EXTRA_CPPFLAGS := \ 44 $(CLANG_CONFIG_EXTRA_CPPFLAGS) \ 45 $(CLANG_CONFIG_HOST_EXTRA_CPPFLAGS) \ 46 $(CLANG_CONFIG_x86_64_EXTRA_CPPFLAGS) \ 47 $(CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_CPPFLAGS) \ 48 -target $(CLANG_CONFIG_x86_64_HOST_TRIPLE) 49 50 CLANG_CONFIG_x86_64_HOST_EXTRA_LDFLAGS := \ 51 $(CLANG_CONFIG_EXTRA_LDFLAGS) \ 52 $(CLANG_CONFIG_HOST_EXTRA_LDFLAGS) \ 53 $(CLANG_CONFIG_x86_64_EXTRA_LDFLAGS) \ 54 $(CLANG_CONFIG_x86_64_HOST_COMBO_EXTRA_LDFLAGS) \ 55 -target $(CLANG_CONFIG_x86_64_HOST_TRIPLE) 56 57 define convert-to-host-clang-flags 58 $(strip \ 59 $(call subst-clang-incompatible-x86_64-flags,\ 60 $(filter-out $(CLANG_CONFIG_x86_64_UNKNOWN_CFLAGS),\ 61 $(1)))) 62 endef 63 64 CLANG_HOST_GLOBAL_CFLAGS := \ 65 $(call convert-to-host-clang-flags,$(HOST_GLOBAL_CFLAGS)) \ 66 $(CLANG_CONFIG_x86_64_HOST_EXTRA_CFLAGS) 67 68 CLANG_HOST_GLOBAL_CONLYFLAGS := \ 69 $(call convert-to-host-clang-flags,$(HOST_GLOBAL_CONLYFLAGS)) \ 70 $(CLANG_CONFIG_x86_64_HOST_EXTRA_CONLYFLAGS) 71 72 CLANG_HOST_GLOBAL_CPPFLAGS := \ 73 $(call convert-to-host-clang-flags,$(HOST_GLOBAL_CPPFLAGS)) \ 74 $(CLANG_CONFIG_x86_64_HOST_EXTRA_CPPFLAGS) 75 76 CLANG_HOST_GLOBAL_LDFLAGS := \ 77 $(call convert-to-host-clang-flags,$(HOST_GLOBAL_LDFLAGS)) \ 78 $(CLANG_CONFIG_x86_64_HOST_EXTRA_LDFLAGS) 79 80 HOST_LIBPROFILE_RT := $(LLVM_RTLIB_PATH)/libclang_rt.profile-x86_64.a 81