mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-25 00:03:43 +00:00
build: Don't error out if clang is too old. Instead, build with GCC.
This commit is contained in:
parent
684df97ef0
commit
ad925955d8
7
configure
vendored
7
configure
vendored
@ -287,12 +287,17 @@ then
|
||||
case $CFG_CLANG_VERSION in
|
||||
(3.0svn | 3.0)
|
||||
step_msg "found ok version of CLANG: $CFG_CLANG_VERSION"
|
||||
CFG_C_COMPILER="clang"
|
||||
;;
|
||||
(*)
|
||||
err "bad CLANG version: $CFG_CLANG_VERSION, need >=3.0svn"
|
||||
msg "bad CLANG version: $CFG_CLANG_VERSION, need >=3.0svn; disabling"
|
||||
CFG_C_COMPILER="gcc"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
CFG_C_COMPILER="gcc"
|
||||
fi
|
||||
putvar CFG_C_COMPILER
|
||||
|
||||
putvar CFG_LLVM_ROOT
|
||||
putvar CFG_LLVM_INCDIR
|
||||
|
@ -135,8 +135,8 @@ ifdef CFG_WINDOWSY
|
||||
endif
|
||||
|
||||
|
||||
ifdef CFG_CLANG
|
||||
CFG_INFO := $(info cfg: using clang)
|
||||
CFG_INFO := $(info cfg: using $(CFG_C_COMPILER))
|
||||
ifeq ($(CFG_C_COMPILER),clang)
|
||||
CFG_GCCISH_CFLAGS += -Wall -Werror -fno-rtti -fno-exceptions -g
|
||||
CFG_GCCISH_LINK_FLAGS += -g
|
||||
CFG_COMPILE_C = $(CFG_GCCISH_CROSS)clang++ $(CFG_GCCISH_CFLAGS) \
|
||||
@ -146,8 +146,7 @@ ifdef CFG_CLANG
|
||||
CFG_LINK_C = $(CFG_GCCISH_CROSS)clang++ $(CFG_GCCISH_LINK_FLAGS) -o $(1) \
|
||||
$(CFG_GCCISH_DEF_FLAG)$(3) $(2)
|
||||
else
|
||||
ifdef CFG_GCC
|
||||
CFG_INFO := $(info cfg: using gcc)
|
||||
ifeq ($(CFG_C_COMPILER),gcc)
|
||||
CFG_GCCISH_CFLAGS += -Wall -Werror -fno-rtti -fno-exceptions -g
|
||||
CFG_GCCISH_LINK_FLAGS += -g
|
||||
CFG_COMPILE_C = $(CFG_GCCISH_CROSS)g++ $(CFG_GCCISH_CFLAGS) \
|
||||
|
Loading…
Reference in New Issue
Block a user