Cleanup LLVM build rules after rebase onto x64 changes
This commit is contained in:
parent
225f50ea96
commit
a4e1a438f6
@ -196,6 +196,7 @@ COMPILER_INPUTS := $(wildcard $(addprefix $(S)src/comp/, \
|
||||
# LLVM macros
|
||||
######################################################################
|
||||
|
||||
# Any rules that depend on LLVM should depend on LLVM_CONFIG
|
||||
LLVM_CONFIG:=$(CFG_LLVM_INST_DIR)/bin/llvm-config
|
||||
LLVM_VERSION=$(shell "$(LLVM_CONFIG)" --version)
|
||||
LLVM_BINDIR=$(shell "$(LLVM_CONFIG)" --bindir)
|
||||
@ -206,8 +207,8 @@ LLVM_LDFLAGS=$(shell "$(LLVM_CONFIG)" --ldflags)
|
||||
LLVM_CXXFLAGS=$(shell "$(LLVM_CONFIG)" --cxxflags)
|
||||
LLVM_HOST_TRIPLE=$(shell "$(LLVM_CONFIG)" --host-target)
|
||||
|
||||
LLVM_AS=$(CFG_LLVM_BINDIR)/llvm-as$(X)
|
||||
LLC=$(CFG_LLVM_BINDIR)/llc$(X)
|
||||
LLVM_AS=$(LLVM_BINDIR)/llvm-as$(X)
|
||||
LLC=$(LLVM_BINDIR)/llc$(X)
|
||||
|
||||
######################################################################
|
||||
# Exports for sub-utilities
|
||||
|
13
configure
vendored
13
configure
vendored
@ -204,7 +204,7 @@ esac
|
||||
case $CFG_CPUTYPE in
|
||||
|
||||
i386 | i486 | i686 | i786 | x86)
|
||||
CFG_CPUTYPE=i686
|
||||
CFG_CPUTYPE=i386
|
||||
;;
|
||||
|
||||
xscale | arm)
|
||||
@ -212,7 +212,8 @@ case $CFG_CPUTYPE in
|
||||
;;
|
||||
|
||||
x86_64 | x86-64 | x64)
|
||||
CFG_CPUTYPE=x86_64
|
||||
# FIME: Once we do a 64-bit build this should be x86_64
|
||||
CFG_CPUTYPE=i386
|
||||
;;
|
||||
|
||||
*)
|
||||
@ -306,17 +307,17 @@ fi
|
||||
|
||||
if [ ! -z "$CFG_LLVM_ROOT" -a -e "$CFG_LLVM_ROOT/bin/llvm-config" ]
|
||||
then
|
||||
step_msg "using custom LLVM"
|
||||
step_msg "using custom LLVM at $CFG_LLVM_ROOT"
|
||||
|
||||
LLVM_CONFIG="$CFG_LLVM_ROOT/bin/llvm-config"
|
||||
LLVM_VERSION=$($CFG_LLVM_CONFIG --version)
|
||||
LLVM_VERSION=$($LLVM_CONFIG --version)
|
||||
|
||||
case $LLVM_VERSION in
|
||||
(3.0svn | 3.0 | 3.1svn)
|
||||
step_msg "found ok version of LLVM: $CFG_LLVM_VERSION"
|
||||
step_msg "found ok version of LLVM: $LLVM_VERSION"
|
||||
;;
|
||||
(*)
|
||||
err "bad LLVM version: $CFG_LLVM_VERSION, need >=3.0svn"
|
||||
err "bad LLVM version: $LLVM_VERSION, need >=3.0svn"
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
|
@ -39,7 +39,7 @@ endif
|
||||
|
||||
ifneq ($(findstring linux,$(CFG_OSTYPE)),)
|
||||
CFG_LIB_NAME=lib$(1).so
|
||||
CFG_GCCISH_CFLAGS += -fPIC -march=i686
|
||||
CFG_GCCISH_CFLAGS += -fPIC
|
||||
CFG_GCCISH_LINK_FLAGS += -shared -fPIC -ldl -lpthread -lrt
|
||||
CFG_GCCISH_DEF_FLAG := -Wl,--export-dynamic,--dynamic-list=
|
||||
CFG_GCCISH_PRE_LIB_FLAGS := -Wl,-whole-archive
|
||||
|
@ -26,8 +26,7 @@ rustllvm/$(1)/$(CFG_RUSTLLVM): $$(RUSTLLVM_OBJS_OBJS_$(1)) \
|
||||
$$(CFG_GCCISH_POST_LIB_FLAGS) \
|
||||
$$(LLVM_LDFLAGS),$$(RUSTLLVM_DEF_$(1)),$$(CFG_RUSTLLVM))
|
||||
|
||||
rustllvm/$(1)/%.o: rustllvm/%.cpp $$(MKFILES) \
|
||||
$$(CFG_LLVM_INST_DIR)/bin/llvm-config
|
||||
rustllvm/$(1)/%.o: rustllvm/%.cpp $$(MKFILES) $$(LLVM_CONFIG)
|
||||
@$$(call E, compile: $$@)
|
||||
$$(Q)$$(call CFG_COMPILE_C_$(1), $$@, $$(LLVM_CXXFLAGS) $$(RUSTLLVM_INCS_$(1))) $$<
|
||||
endef
|
||||
|
@ -12,7 +12,8 @@ $$(TARGET_LIB$(1)$(2))/intrinsics.ll: \
|
||||
@$$(call E, sed: $$@)
|
||||
$$(Q)sed s/@CFG_TARGET_TRIPLE@/$(2)/ $$< > $$@
|
||||
|
||||
$$(TARGET_LIB$(1)$(2))/intrinsics.bc: $$(TARGET_LIB$(1)$(2))/intrinsics.ll
|
||||
$$(TARGET_LIB$(1)$(2))/intrinsics.bc: $$(TARGET_LIB$(1)$(2))/intrinsics.ll \
|
||||
$$(LLVM_CONFIG)
|
||||
@$$(call E, llvms-as: $$@)
|
||||
$$(Q)$$(LLVM_AS) -o $$@ $$<
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user