Skip to content

let clang build llvm & change the order of llvm include path #1656

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,9 @@ LLVM_INCDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --includedir)
LLVM_LIBDIR_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libdir)
LLVM_LIBS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --libs $$(LLVM_COMPONENTS))
LLVM_LDFLAGS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --ldflags)
LLVM_CXXFLAGS_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --cxxflags)
# On FreeBSD, it may search wrong headers (that are for pre-installed LLVM),
# so we replace -I with -iquote to ensure that it searches bundled LLVM first.
LLVM_CXXFLAGS_$(1)=$$(subst -I, -iquote , $$(shell "$$(LLVM_CONFIG_$(1))" --cxxflags))
LLVM_HOST_TRIPLE_$(1)=$$(shell "$$(LLVM_CONFIG_$(1))" --host-target)

LLVM_AS_$(1)=$$(CFG_LLVM_INST_DIR_$(1))/bin/llvm-as$$(X)
Expand Down
19 changes: 15 additions & 4 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -536,14 +536,25 @@ do
# Disable unused LLVM features
LLVM_OPTS="$LLVM_DBG_OPTS --disable-docs --disable-jit --enable-bindings=none --disable-threads --disable-pthreads"

LLVM_CXX_32="g++ -m32"
LLVM_CC_32="gcc -m32"
if [ "$CFG_C_COMPILER" = "clang" ]
then
LLVM_CXX_32="clang++ -m32"
LLVM_CC_32="clang -m32"

LLVM_CXX_64="clang++"
LLVM_CC_64="clang"
else
LLVM_CXX_32="g++ -m32"
LLVM_CC_32="gcc -m32"

LLVM_CXX_64="g++"
LLVM_CC_64="gcc"
fi

LLVM_CFLAGS_32="-m32"
LLVM_CXXFLAGS_32="-m32"
LLVM_LDFLAGS_32="-m32"

LLVM_CXX_64="g++"
LLVM_CC_64="gcc"
LLVM_CFLAGS_64=""
LLVM_CXXFLAGS_64=""
LLVM_LDFLAGS_64=""
Expand Down