1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00

Roll back r96959 again.

llvm-svn: 96981
This commit is contained in:
Jeffrey Yasskin 2010-02-23 20:53:37 +00:00
parent 7e4227c8e1
commit 82c2f2fd24
13 changed files with 12 additions and 169 deletions

View File

@ -30,8 +30,8 @@ ifeq ($(BUILD_DIRS_ONLY),1)
DIRS := lib/System lib/Support utils DIRS := lib/System lib/Support utils
OPTIONAL_DIRS := OPTIONAL_DIRS :=
else else
DIRS := lib/System lib/Support utils lib/VMCore lib tools/llvm-shlib \ DIRS := lib/System lib/Support utils lib/VMCore lib tools/llvm-config \
tools/llvm-config tools runtime docs unittests tools runtime docs unittests
OPTIONAL_DIRS := projects bindings OPTIONAL_DIRS := projects bindings
endif endif

View File

@ -262,11 +262,6 @@ ENABLE_THREADS := @ENABLE_THREADS@
# Do we want to build with position independent code? # Do we want to build with position independent code?
ENABLE_PIC := @ENABLE_PIC@ ENABLE_PIC := @ENABLE_PIC@
# Do we want to link the tools shared?
ifndef ENABLE_SHARED
ENABLE_SHARED := @ENABLE_SHARED@
endif
# Use -fvisibility-inlines-hidden? # Use -fvisibility-inlines-hidden?
ENABLE_VISIBILITY_INLINES_HIDDEN := @ENABLE_VISIBILITY_INLINES_HIDDEN@ ENABLE_VISIBILITY_INLINES_HIDDEN := @ENABLE_VISIBILITY_INLINES_HIDDEN@
@ -277,9 +272,6 @@ ENABLE_VISIBILITY_INLINES_HIDDEN := @ENABLE_VISIBILITY_INLINES_HIDDEN@
# Enable JIT for this platform # Enable JIT for this platform
TARGET_HAS_JIT = @TARGET_HAS_JIT@ TARGET_HAS_JIT = @TARGET_HAS_JIT@
# Environment variable to set to change the runtime shared library search path.
SHLIBPATH_VAR = @SHLIBPATH_VAR@
# Shared library extension for host platform. # Shared library extension for host platform.
SHLIBEXT = @SHLIBEXT@ SHLIBEXT = @SHLIBEXT@

View File

@ -623,12 +623,11 @@ endif
ifneq ($(HOST_OS),Darwin) ifneq ($(HOST_OS),Darwin)
ifneq ($(DARWIN_MAJVERS),4) ifneq ($(DARWIN_MAJVERS),4)
ifdef TOOLNAME ifdef TOOLNAME
LD.Flags += $(RPATH) -Wl,'$$ORIGIN/../lib' ifdef EXAMPLE_TOOL
ifdef EXAMPLE_TOOL LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(RDYNAMIC)
LD.Flags += $(RPATH) -Wl,$(ExmplDir) $(RDYNAMIC) else
else LD.Flags += $(RPATH) -Wl,$(ToolDir) $(RDYNAMIC)
LD.Flags += $(RPATH) -Wl,$(ToolDir) $(RDYNAMIC) endif
endif
endif endif
endif endif
endif endif
@ -961,16 +960,11 @@ $(LLVM_CONFIG):
$(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT): $(LLVM_CONFIG) $(ToolDir)/$(strip $(TOOLNAME))$(EXEEXT): $(LLVM_CONFIG)
ifeq ($(ENABLE_SHARED), 1)
LLVMLibsOptions += -lLLVM-$(LLVMVersion)
LLVMLibsPaths += $(LibDir)/libLLVM-$(LLVMVersion)$(SHLIBEXT)
else
LLVMLibsOptions += $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS)) LLVMLibsOptions += $(shell $(LLVM_CONFIG) --libs $(LINK_COMPONENTS))
LLVMLibsPaths += $(LLVM_CONFIG) \ LLVMLibsPaths += $(LLVM_CONFIG) \
$(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS)) $(shell $(LLVM_CONFIG) --libfiles $(LINK_COMPONENTS))
endif endif
endif endif
endif
############################################################################### ###############################################################################
# Library Build Rules: Four ways to build a library # Library Build Rules: Four ways to build a library
@ -1175,13 +1169,11 @@ endif
# If neither BUILD_ARCHIVE or LOADABLE_MODULE are specified, default to # If neither BUILD_ARCHIVE or LOADABLE_MODULE are specified, default to
# building an archive. # building an archive.
#--------------------------------------------------------- #---------------------------------------------------------
ifndef NO_BUILD_ARCHIVE
ifndef BUILD_ARCHIVE ifndef BUILD_ARCHIVE
ifndef LOADABLE_MODULE ifndef LOADABLE_MODULE
BUILD_ARCHIVE = 1 BUILD_ARCHIVE = 1
endif endif
endif endif
endif
#--------------------------------------------------------- #---------------------------------------------------------
# Archive Library Targets: # Archive Library Targets:

View File

@ -472,18 +472,6 @@ esac
AC_DEFINE_UNQUOTED([ENABLE_PIC],$ENABLE_PIC, AC_DEFINE_UNQUOTED([ENABLE_PIC],$ENABLE_PIC,
[Define if position independent code is enabled]) [Define if position independent code is enabled])
dnl Allow linking tools against the shared library.
AC_ARG_ENABLE(shared,
AS_HELP_STRING([--enable-shared],
[Link LLVM tools shared (default is NO)]),,
enableval=default)
case "$enableval" in
yes) AC_SUBST(ENABLE_SHARED,[1]) ;;
no) AC_SUBST(ENABLE_SHARED,[0]) ;;
default) AC_SUBST(ENABLE_SHARED,[0]) ;;
*) AC_MSG_ERROR([Invalid setting for --enable-shared. Use "yes" or "no"]) ;;
esac
dnl Allow specific targets to be specified for building (or not) dnl Allow specific targets to be specified for building (or not)
TARGETS_TO_BUILD="" TARGETS_TO_BUILD=""
AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets], AC_ARG_ENABLE([targets],AS_HELP_STRING([--enable-targets],
@ -1348,10 +1336,6 @@ dnl Propagate the shared library extension that the libltdl checks did to
dnl the Makefiles so we can use it there too dnl the Makefiles so we can use it there too
AC_SUBST(SHLIBEXT,$libltdl_cv_shlibext) AC_SUBST(SHLIBEXT,$libltdl_cv_shlibext)
dnl Propagate the run-time library path variable that the libltdl
dnl checks found to the Makefiles so we can use it there too
AC_SUBST(SHLIBPATH_VAR,$libltdl_cv_shlibpath_var)
# Translate the various configuration directories and other basic # Translate the various configuration directories and other basic
# information into substitutions that will end up in Makefile.config.in # information into substitutions that will end up in Makefile.config.in
# that these configured values can be used by the makefiles # that these configured values can be used by the makefiles

33
configure vendored
View File

@ -689,7 +689,6 @@ TARGET_HAS_JIT
ENABLE_DOXYGEN ENABLE_DOXYGEN
ENABLE_THREADS ENABLE_THREADS
ENABLE_PIC ENABLE_PIC
ENABLE_SHARED
TARGETS_TO_BUILD TARGETS_TO_BUILD
LLVM_ENUM_TARGETS LLVM_ENUM_TARGETS
LLVM_ENUM_ASM_PRINTERS LLVM_ENUM_ASM_PRINTERS
@ -771,7 +770,6 @@ LLVMCC1PLUS
LLVMGCCDIR LLVMGCCDIR
LLVMGCC_LANGS LLVMGCC_LANGS
SHLIBEXT SHLIBEXT
SHLIBPATH_VAR
LLVM_PREFIX LLVM_PREFIX
LLVM_BINDIR LLVM_BINDIR
LLVM_LIBDIR LLVM_LIBDIR
@ -1404,7 +1402,6 @@ Optional Features:
--enable-threads Use threads if available (default is YES) --enable-threads Use threads if available (default is YES)
--enable-pic Build LLVM with Position Independent Code (default --enable-pic Build LLVM with Position Independent Code (default
is YES) is YES)
--enable-shared Link LLVM tools shared (default is NO)
--enable-targets Build specific host targets: all or --enable-targets Build specific host targets: all or
target1,target2,... Valid targets are: host, x86, target1,target2,... Valid targets are: host, x86,
x86_64, sparc, powerpc, alpha, arm, mips, spu, x86_64, sparc, powerpc, alpha, arm, mips, spu,
@ -4870,25 +4867,6 @@ cat >>confdefs.h <<_ACEOF
_ACEOF _ACEOF
# Check whether --enable-shared was given.
if test "${enable_shared+set}" = set; then
enableval=$enable_shared;
else
enableval=default
fi
case "$enableval" in
yes) ENABLE_SHARED=1
;;
no) ENABLE_SHARED=0
;;
default) ENABLE_SHARED=0
;;
*) { { echo "$as_me:$LINENO: error: Invalid setting for --enable-shared. Use \"yes\" or \"no\"" >&5
echo "$as_me: error: Invalid setting for --enable-shared. Use \"yes\" or \"no\"" >&2;}
{ (exit 1); exit 1; }; } ;;
esac
TARGETS_TO_BUILD="" TARGETS_TO_BUILD=""
# Check whether --enable-targets was given. # Check whether --enable-targets was given.
if test "${enable_targets+set}" = set; then if test "${enable_targets+set}" = set; then
@ -11132,7 +11110,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<EOF cat > conftest.$ac_ext <<EOF
#line 11130 "configure" #line 11108 "configure"
#include "confdefs.h" #include "confdefs.h"
#if HAVE_DLFCN_H #if HAVE_DLFCN_H
@ -19713,9 +19691,6 @@ fi
SHLIBEXT=$libltdl_cv_shlibext SHLIBEXT=$libltdl_cv_shlibext
SHLIBPATH_VAR=$libltdl_cv_shlibpath_var
# Translate the various configuration directories and other basic # Translate the various configuration directories and other basic
# information into substitutions that will end up in Makefile.config.in # information into substitutions that will end up in Makefile.config.in
# that these configured values can be used by the makefiles # that these configured values can be used by the makefiles
@ -20773,7 +20748,6 @@ TARGET_HAS_JIT!$TARGET_HAS_JIT$ac_delim
ENABLE_DOXYGEN!$ENABLE_DOXYGEN$ac_delim ENABLE_DOXYGEN!$ENABLE_DOXYGEN$ac_delim
ENABLE_THREADS!$ENABLE_THREADS$ac_delim ENABLE_THREADS!$ENABLE_THREADS$ac_delim
ENABLE_PIC!$ENABLE_PIC$ac_delim ENABLE_PIC!$ENABLE_PIC$ac_delim
ENABLE_SHARED!$ENABLE_SHARED$ac_delim
TARGETS_TO_BUILD!$TARGETS_TO_BUILD$ac_delim TARGETS_TO_BUILD!$TARGETS_TO_BUILD$ac_delim
LLVM_ENUM_TARGETS!$LLVM_ENUM_TARGETS$ac_delim LLVM_ENUM_TARGETS!$LLVM_ENUM_TARGETS$ac_delim
LLVM_ENUM_ASM_PRINTERS!$LLVM_ENUM_ASM_PRINTERS$ac_delim LLVM_ENUM_ASM_PRINTERS!$LLVM_ENUM_ASM_PRINTERS$ac_delim
@ -20783,6 +20757,7 @@ ENABLE_CBE_PRINTF_A!$ENABLE_CBE_PRINTF_A$ac_delim
CLANGPATH!$CLANGPATH$ac_delim CLANGPATH!$CLANGPATH$ac_delim
CLANGXXPATH!$CLANGXXPATH$ac_delim CLANGXXPATH!$CLANGXXPATH$ac_delim
ENABLE_BUILT_CLANG!$ENABLE_BUILT_CLANG$ac_delim ENABLE_BUILT_CLANG!$ENABLE_BUILT_CLANG$ac_delim
OPTIMIZE_OPTION!$OPTIMIZE_OPTION$ac_delim
_ACEOF _ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
@ -20824,7 +20799,6 @@ _ACEOF
ac_delim='%!_!# ' ac_delim='%!_!# '
for ac_last_try in false false false false false :; do for ac_last_try in false false false false false :; do
cat >conf$$subs.sed <<_ACEOF cat >conf$$subs.sed <<_ACEOF
OPTIMIZE_OPTION!$OPTIMIZE_OPTION$ac_delim
EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim EXTRA_OPTIONS!$EXTRA_OPTIONS$ac_delim
BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim BINUTILS_INCDIR!$BINUTILS_INCDIR$ac_delim
ENABLE_LLVMC_DYNAMIC!$ENABLE_LLVMC_DYNAMIC$ac_delim ENABLE_LLVMC_DYNAMIC!$ENABLE_LLVMC_DYNAMIC$ac_delim
@ -20896,7 +20870,6 @@ LLVMCC1PLUS!$LLVMCC1PLUS$ac_delim
LLVMGCCDIR!$LLVMGCCDIR$ac_delim LLVMGCCDIR!$LLVMGCCDIR$ac_delim
LLVMGCC_LANGS!$LLVMGCC_LANGS$ac_delim LLVMGCC_LANGS!$LLVMGCC_LANGS$ac_delim
SHLIBEXT!$SHLIBEXT$ac_delim SHLIBEXT!$SHLIBEXT$ac_delim
SHLIBPATH_VAR!$SHLIBPATH_VAR$ac_delim
LLVM_PREFIX!$LLVM_PREFIX$ac_delim LLVM_PREFIX!$LLVM_PREFIX$ac_delim
LLVM_BINDIR!$LLVM_BINDIR$ac_delim LLVM_BINDIR!$LLVM_BINDIR$ac_delim
LLVM_LIBDIR!$LLVM_LIBDIR$ac_delim LLVM_LIBDIR!$LLVM_LIBDIR$ac_delim
@ -20917,7 +20890,7 @@ LIBOBJS!$LIBOBJS$ac_delim
LTLIBOBJS!$LTLIBOBJS$ac_delim LTLIBOBJS!$LTLIBOBJS$ac_delim
_ACEOF _ACEOF
if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 89; then
break break
elif $ac_last_try; then elif $ac_last_try; then
{ { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5

View File

@ -9,9 +9,6 @@
LEVEL = ../.. LEVEL = ../..
TOOLNAME = BrainF TOOLNAME = BrainF
EXAMPLE_TOOL = 1 EXAMPLE_TOOL = 1
# To keep the shared library working, we link a few of the examples
# against it unconditionally.
ENABLE_SHARED = 1
LINK_COMPONENTS := jit bitwriter nativecodegen interpreter LINK_COMPONENTS := jit bitwriter nativecodegen interpreter

View File

@ -10,9 +10,6 @@
LEVEL = ../.. LEVEL = ../..
TOOLNAME = Fibonacci TOOLNAME = Fibonacci
EXAMPLE_TOOL = 1 EXAMPLE_TOOL = 1
# To keep the shared library working, we link a few of the examples
# against it unconditionally.
ENABLE_SHARED = 1
# Link in JIT support # Link in JIT support
LINK_COMPONENTS := jit interpreter nativecodegen LINK_COMPONENTS := jit interpreter nativecodegen

View File

@ -9,9 +9,6 @@
LEVEL = ../.. LEVEL = ../..
TOOLNAME = HowToUseJIT TOOLNAME = HowToUseJIT
EXAMPLE_TOOL = 1 EXAMPLE_TOOL = 1
# To keep the shared library working, we link a few of the examples
# against it unconditionally.
ENABLE_SHARED = 1
LINK_COMPONENTS := jit interpreter nativecodegen LINK_COMPONENTS := jit interpreter nativecodegen

View File

@ -198,6 +198,4 @@ Unit/lit.site.cfg: $(PROJ_OBJ_DIR)/Unit/.dir FORCE
-e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \ -e "s#@LLVM_TOOLS_DIR@#$(ToolDir)#g" \
-e "s#@LLVMGCCDIR@#$(LLVMGCCDIR)#g" \ -e "s#@LLVMGCCDIR@#$(LLVMGCCDIR)#g" \
-e "s#@LLVM_BUILD_MODE@#$(BuildMode)#g" \ -e "s#@LLVM_BUILD_MODE@#$(BuildMode)#g" \
-e "s#@ENABLE_SHARED@#$(ENABLE_SHARED)#g" \
-e "s#@SHLIBPATH_VAR@#$(SHLIBPATH_VAR)#g" \
$(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@ $(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@

View File

@ -23,14 +23,7 @@ config.test_format = lit.formats.GoogleTest(llvm_build_mode, 'Tests')
### ###
# If necessary, point the dynamic loader at libLLVM.so. import os
if config.enable_shared:
libdir = os.path.join(config.llvm_obj_root, config.llvm_build_mode, 'lib')
shlibpath = config.environment.get(config.shlibpath_var,'')
if shlibpath:
shlibpath = ':' + shlibpath
shlibpath = libdir + shlibpath
config.environment[config.shlibpath_var] = shlibpath
# Check that the object root is known. # Check that the object root is known.
if config.test_exec_root is None: if config.test_exec_root is None:

View File

@ -5,8 +5,6 @@ config.llvm_obj_root = "@LLVM_BINARY_DIR@"
config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
config.llvmgcc_dir = "@LLVMGCCDIR@" config.llvmgcc_dir = "@LLVMGCCDIR@"
config.llvm_build_mode = "@LLVM_BUILD_MODE@" config.llvm_build_mode = "@LLVM_BUILD_MODE@"
config.enable_shared = @ENABLE_SHARED@
config.shlibpath_var = "@SHLIBPATH_VAR@"
# Let the main config do the real work. # Let the main config do the real work.
lit.load_config(config, "@LLVM_SOURCE_DIR@/test/Unit/lit.cfg") lit.load_config(config, "@LLVM_SOURCE_DIR@/test/Unit/lit.cfg")

View File

@ -1,67 +0,0 @@
##===- tools/shlib/Makefile --------------------------------*- Makefile -*-===##
#
# The LLVM Compiler Infrastructure
#
# This file is distributed under the University of Illinois Open Source
# License. See LICENSE.TXT for details.
#
##===----------------------------------------------------------------------===##
LEVEL = ../..
LIBRARYNAME = LLVM-$(LLVMVersion)
NO_BUILD_ARCHIVE = 1
LINK_LIBS_IN_SHARED = 1
SHARED_LIBRARY = 1
include $(LEVEL)/Makefile.common
# Include all archives in libLLVM.(so|dylib) except the ones that have
# their own dynamic libraries.
Archives := $(wildcard $(LibDir)/libLLVM*.a)
SharedLibraries := $(wildcard $(LibDir)/libLLVM*$(SHLIBEXT))
IncludeInLibLlvm := $(filter-out $(basename $(SharedLibraries)).a, $(Archives))
LLVMLibsOptions := $(IncludeInLibLlvm:$(LibDir)/lib%.a=-l%)
LLVMLibsPaths := $(IncludeInLibLlvm)
$(LibName.SO): $(LLVMLibsPaths)
ifeq ($(HOST_OS),Darwin)
# set dylib internal version number to llvmCore submission number
ifdef LLVM_SUBMIT_VERSION
LLVMLibsOptions := $(LLVMLibsOptions) -Wl,-current_version \
-Wl,$(LLVM_SUBMIT_VERSION).$(LLVM_SUBMIT_SUBVERSION) \
-Wl,-compatibility_version -Wl,1
endif
# Include everything from the .a's into the shared library.
LLVMLibsOptions := $(LLVMLibsOptions) -all_load
# extra options to override libtool defaults
LLVMLibsOptions := $(LLVMLibsOptions) \
-avoid-version \
-Wl,-dead_strip \
-Wl,-seg1addr -Wl,0xE0000000
# Mac OS X 10.4 and earlier tools do not allow a second -install_name on command line
DARWIN_VERS := $(shell echo $(TARGET_TRIPLE) | sed 's/.*darwin\([0-9]*\).*/\1/')
ifneq ($(DARWIN_VERS),8)
LLVMLibsOptions := $(LLVMLibsOptions) \
-Wl,-install_name \
-Wl,"@executable_path/../lib/lib$(LIBRARYNAME)$(SHLIBEXT)"
endif
endif
ifeq ($(HOST_OS), Linux)
# Include everything from the .a's into the shared library.
LLVMLibsOptions := -Wl,--whole-archive $(LLVMLibsOptions) \
-Wl,--no-whole-archive
# Warn if we'll need to modify the text segment when loading libLLVM.so.
LLVMLibsOptions += -Wl,--warn-shared-textrel
# Don't allow unresolved symbols.
LLVMLibsOptions += -Wl,--no-undefined
ifeq ($(ARCH), ARM)
# ARM's shared libgcc omits several of the __sync functions that are
# present in the static libgcc, so we also link in the static gcc. This
# is described at http://gcc.gnu.org/PR40133.
LLVMLibsOptions += -lgcc
endif
endif

View File

@ -28,17 +28,6 @@ CPP.Flags += -I$(LLVM_SRC_ROOT)/utils/unittest/googletest/include/
CPP.Flags += $(NO_VARIADIC_MACROS) CPP.Flags += $(NO_VARIADIC_MACROS)
TESTLIBS = -lGoogleTest -lUnitTestMain TESTLIBS = -lGoogleTest -lUnitTestMain
ifeq ($(ENABLE_SHARED), 1)
# Add the absolute path to the dynamic library. This is ok because
# we'll never install unittests.
LD.Flags += $(RPATH) -Wl,$(LibDir)
endif
ifeq ($(ENABLE_SHARED), 1)
# Also set {DYLD,LD}_LIBRARY_PATH because OSX ignores the rpath most
# of the time.
Run.Shared := $(SHLIBPATH_VAR)="$(LibDir)$${$(SHLIBPATH_VAR):+:}$$$(SHLIBPATH_VAR)"
endif
$(LLVMUnitTestExe): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths) $(LLVMUnitTestExe): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
$(Echo) Linking $(BuildMode) unit test $(TESTNAME) $(StripWarnMsg) $(Echo) Linking $(BuildMode) unit test $(TESTNAME) $(StripWarnMsg)
$(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \ $(Verb) $(Link) -o $@ $(TOOLLINKOPTS) $(ObjectsO) $(ProjLibsOptions) \
@ -49,6 +38,6 @@ $(LLVMUnitTestExe): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
all:: $(LLVMUnitTestExe) all:: $(LLVMUnitTestExe)
unitcheck:: $(LLVMUnitTestExe) unitcheck:: $(LLVMUnitTestExe)
$(Run.Shared) $(LLVMUnitTestExe) $(LLVMUnitTestExe)
endif endif