Skip to content

Commit

Permalink
Support for experimental targets
Browse files Browse the repository at this point in the history
Added LLVM_EXPERIMENTAL_TARGETS_TO_BUILD in CMake and --enable-experimental-targets in configure.



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161561 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
Victor Oliveira authored and Victor Oliveira committed Aug 9, 2012
1 parent 9bac676 commit 0e80e18
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 1 deletion.
8 changes: 8 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ else( MSVC )
CACHE STRING "Semicolon-separated list of targets to build, or \"all\".")
endif( MSVC )

set(LLVM_EXPERIMENTAL_TARGETS_TO_BUILD ""
CACHE STRING "Semicolon-separated list of experimental targets to build.")

option(BUILD_SHARED_LIBS
"Build all libraries as shared libraries instead of static" OFF)

Expand Down Expand Up @@ -136,6 +139,11 @@ foreach(c ${LLVM_TARGETS_TO_BUILD})
endif()
endforeach(c)

set(LLVM_TARGETS_TO_BUILD
${LLVM_TARGETS_TO_BUILD}
${LLVM_EXPERIMENTAL_TARGETS_TO_BUILD}
)

set(llvm_builded_incs_dir ${LLVM_BINARY_DIR}/include/llvm)

include(AddLLVMDefinitions)
Expand Down
11 changes: 11 additions & 0 deletions autoconf/configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,17 @@ case "$enableval" in
done
;;
esac

AC_ARG_ENABLE([experimental-targets],AS_HELP_STRING([--enable-experimental-targets],
[Build experimental host targets: disable or target1,target2,...
(default=disable)]),,
enableval=disable)

if test ${enableval} != "disable"
then
TARGETS_TO_BUILD="$enableval $TARGETS_TO_BUILD"
fi

AC_SUBST(TARGETS_TO_BUILD,$TARGETS_TO_BUILD)

dnl Determine whether we are building LLVM support for the native architecture.
Expand Down
19 changes: 18 additions & 1 deletion configure
Original file line number Diff line number Diff line change
Expand Up @@ -1425,6 +1425,9 @@ Optional Features:
target1,target2,... Valid targets are: host, x86,
x86_64, sparc, powerpc, arm, mips, spu, hexagon,
xcore, msp430, nvptx, and cpp (default=all)
--enable-experimental-targets
Build experimental host targets: disable or
target1,target2,... (default=disable)
--enable-bindings Build specific language bindings:
all,auto,none,{binding-name} (default=auto)
--enable-libffi Check for the presence of libffi (default is NO)
Expand Down Expand Up @@ -5415,6 +5418,20 @@ echo "$as_me: error: Unrecognized target $a_target" >&2;}
done
;;
esac

# Check whether --enable-experimental-targets was given.
if test "${enable_experimental_targets+set}" = set; then
enableval=$enable_experimental_targets;
else
enableval=disable
fi


if test ${enableval} != "disable"
then
TARGETS_TO_BUILD="$enableval $TARGETS_TO_BUILD"
fi

TARGETS_TO_BUILD=$TARGETS_TO_BUILD


Expand Down Expand Up @@ -10255,7 +10272,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF
#line 10258 "configure"
#line 10275 "configure"
#include "confdefs.h"

#if HAVE_DLFCN_H
Expand Down

0 comments on commit 0e80e18

Please sign in to comment.