llvm.org GIT mirror llvm / fc6cc0e
With rpaths being set correctly, SHLIBPATH_VAR is not needed anymore. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@202510 91177308-0d34-0410-b5e6-96231b3b80d8 Rafael Espindola 5 years ago
11 changed file(s) with 6 addition(s) and 53 deletion(s). Raw diff Collapse all Expand all
344344 # Enable JIT for this platform
345345 TARGET_HAS_JIT = @TARGET_HAS_JIT@
346346
347 # Environment variable to set to change the runtime shared library search path.
348 SHLIBPATH_VAR = @SHLIBPATH_VAR@
349
350347 # Shared library extension for host platform.
351348 SHLIBEXT = @SHLIBEXT@
352349
19011901 dnl the Makefiles so we can use it there too
19021902 AC_SUBST(SHLIBEXT,$libltdl_cv_shlibext)
19031903
1904 dnl Propagate the run-time library path variable that the libltdl
1905 dnl checks found to the Makefiles so we can use it there too
1906 AC_SUBST(SHLIBPATH_VAR,$libltdl_cv_shlibpath_var)
1907
19081904 dnl Translate the various configuration directories and other basic
19091905 dnl information into substitutions that will end up in Makefile.config.in
19101906 dnl that these configured values can be used by the makefiles
570570 set(LLVM_SHARED_LIBS_ENABLED "0")
571571 endif(BUILD_SHARED_LIBS)
572572
573 if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
574 set(SHLIBPATH_VAR "DYLD_LIBRARY_PATH")
575 else() # Default for all other unix like systems.
576 # CMake hardcodes the library locaction using rpath.
577 # Therefore LD_LIBRARY_PATH is not required to run binaries in the
578 # build dir. We pass it anyways.
579 set(SHLIBPATH_VAR "LD_LIBRARY_PATH")
580 endif()
581
582573 # Configuration-time: See Unit/lit.site.cfg.in
583574 if (CMAKE_CFG_INTDIR STREQUAL ".")
584575 set(LLVM_BUILD_MODE ".")
597588
598589 set(PYTHON_EXECUTABLE ${PYTHON_EXECUTABLE})
599590 set(ENABLE_SHARED ${LLVM_SHARED_LIBS_ENABLED})
600 set(SHLIBPATH_VAR ${SHLIBPATH_VAR})
601591
602592 if(LLVM_ENABLE_ASSERTIONS AND NOT MSVC_IDE)
603593 set(ENABLE_ASSERTIONS "1")
789789 HUGE_VAL_SANITY
790790 MMAP_FILE
791791 SHLIBEXT
792 SHLIBPATH_VAR
793792 LLVM_PREFIX
794793 LLVM_BINDIR
795794 LLVM_DATADIR
1070910708 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1071010709 lt_status=$lt_dlunknown
1071110710 cat > conftest.$ac_ext <
10712 #line 10713 "configure"
10711 #line 10712 "configure"
1071310712 #include "confdefs.h"
1071410713
1071510714 #if HAVE_DLFCN_H
2234222341
2234322342
2234422343 SHLIBEXT=$libltdl_cv_shlibext
22345
22346
22347 SHLIBPATH_VAR=$libltdl_cv_shlibpath_var
2234822344
2234922345
2235022346 if test "${prefix}" = "NONE" ; then
2355523551 HUGE_VAL_SANITY!$HUGE_VAL_SANITY$ac_delim
2355623552 MMAP_FILE!$MMAP_FILE$ac_delim
2355723553 SHLIBEXT!$SHLIBEXT$ac_delim
23558 SHLIBPATH_VAR!$SHLIBPATH_VAR$ac_delim
2355923554 LLVM_PREFIX!$LLVM_PREFIX$ac_delim
2356023555 LLVM_BINDIR!$LLVM_BINDIR$ac_delim
2356123556 LLVM_DATADIR!$LLVM_DATADIR$ac_delim
2356223557 LLVM_DOCSDIR!$LLVM_DOCSDIR$ac_delim
2356323558 LLVM_ETCDIR!$LLVM_ETCDIR$ac_delim
23559 LLVM_INCLUDEDIR!$LLVM_INCLUDEDIR$ac_delim
2356423560 _ACEOF
2356523561
2356623562 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 97; then
2360223598 ac_delim='%!_!# '
2360323599 for ac_last_try in false false false false false :; do
2360423600 cat >conf$$subs.sed <<_ACEOF
23605 LLVM_INCLUDEDIR!$LLVM_INCLUDEDIR$ac_delim
2360623601 LLVM_INFODIR!$LLVM_INFODIR$ac_delim
2360723602 LLVM_MANDIR!$LLVM_MANDIR$ac_delim
2360823603 LLVM_CONFIGTIME!$LLVM_CONFIGTIME$ac_delim
2361723612 LTLIBOBJS!$LTLIBOBJS$ac_delim
2361823613 _ACEOF
2361923614
23620 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 13; then
23615 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 12; then
2362123616 break
2362223617 elif $ac_last_try; then
2362323618 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
261261 # Enable JIT for this platform
262262 TARGET_HAS_JIT = @TARGET_HAS_JIT@
263263
264 # Environment variable to set to change the runtime shared library search path.
265 SHLIBPATH_VAR = @SHLIBPATH_VAR@
266
267264 # Shared library extension for host platform.
268265 SHLIBEXT = @SHLIBEXT@
269266
14001400 dnl the Makefiles so we can use it there too
14011401 AC_SUBST(SHLIBEXT,$libltdl_cv_shlibext)
14021402
1403 dnl Propagate the run-time library path variable that the libltdl
1404 dnl checks found to the Makefiles so we can use it there too
1405 AC_SUBST(SHLIBPATH_VAR,$libltdl_cv_shlibpath_var)
1406
14071403 # Translate the various configuration directories and other basic
14081404 # information into substitutions that will end up in Makefile.config.in
14091405 # that these configured values can be used by the makefiles
770770 HUGE_VAL_SANITY
771771 MMAP_FILE
772772 SHLIBEXT
773 SHLIBPATH_VAR
774773 LLVM_PREFIX
775774 LLVM_BINDIR
776775 LLVM_DATADIR
1038210381 lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
1038310382 lt_status=$lt_dlunknown
1038410383 cat > conftest.$ac_ext <
10385 #line 10386 "configure"
10384 #line 10385 "configure"
1038610385 #include "confdefs.h"
1038710386
1038810387 #if HAVE_DLFCN_H
2126221261
2126321262
2126421263 SHLIBEXT=$libltdl_cv_shlibext
21265
21266
21267 SHLIBPATH_VAR=$libltdl_cv_shlibpath_var
2126821264
2126921265
2127021266 # Translate the various configuration directories and other basic
2239122387 HUGE_VAL_SANITY!$HUGE_VAL_SANITY$ac_delim
2239222388 MMAP_FILE!$MMAP_FILE$ac_delim
2239322389 SHLIBEXT!$SHLIBEXT$ac_delim
22394 SHLIBPATH_VAR!$SHLIBPATH_VAR$ac_delim
2239522390 LLVM_PREFIX!$LLVM_PREFIX$ac_delim
2239622391 LLVM_BINDIR!$LLVM_BINDIR$ac_delim
2239722392 LLVM_DATADIR!$LLVM_DATADIR$ac_delim
2241122406 LTLIBOBJS!$LTLIBOBJS$ac_delim
2241222407 _ACEOF
2241322408
22414 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 92; then
22409 if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 91; then
2241522410 break
2241622411 elif $ac_last_try; then
2241722412 { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
145145 @$(ECHOPATH) s=@LLVM_BUILD_MODE@=$(BuildMode)=g >> unit.tmp
146146 @$(ECHOPATH) s=@ENABLE_SHARED@=$(ENABLE_SHARED)=g >> unit.tmp
147147 @$(ECHOPATH) s=@SHLIBDIR@=$(SharedLibDir)=g >> unit.tmp
148 @$(ECHOPATH) s=@SHLIBPATH_VAR@=$(SHLIBPATH_VAR)=g >> unit.tmp
149148 @$(ECHOPATH) s=@HOST_OS@=$(HOST_OS)=g >> unit.tmp
150149 @$(ECHOPATH) s=@HOST_ARCH@=$(HOST_ARCH)=g >> lit.tmp
151150 @sed -f unit.tmp $(PROJ_SRC_DIR)/Unit/lit.site.cfg.in > $@
7979 lit_config.note('using out-of-tree build at %r' % llvm_obj_root)
8080 lit_config.load_config(config, site_cfg)
8181 raise SystemExit
82
83 # If necessary, point the dynamic loader at libLLVM.so.
84 if config.enable_shared:
85 shlibpath = config.environment.get(config.shlibpath_var,'')
86 if shlibpath:
87 shlibpath = os.pathsep + shlibpath
88 shlibpath = config.shlibdir + shlibpath
89 config.environment[config.shlibpath_var] = shlibpath
77 config.llvm_build_mode = "@LLVM_BUILD_MODE@"
88 config.enable_shared = @ENABLE_SHARED@
99 config.shlibdir = "@SHLIBDIR@"
10 config.shlibpath_var = "@SHLIBPATH_VAR@"
1110
1211 # Support substitution of the tools_dir and build_mode with user parameters.
1312 # This is used when we can't determine the tool dir at configuration time.
5151 # we'll never install unittests.
5252 LD.Flags += $(RPATH) -Wl,$(SharedLibDir)
5353 endif
54 # Also set {DYLD,LD}_LIBRARY_PATH because OSX ignores the rpath most
55 # of the time.
56 Run.Shared := $(SHLIBPATH_VAR)="$(SharedLibDir)$${$(SHLIBPATH_VAR):+:}$$$(SHLIBPATH_VAR)"
5754 endif
5855
5956 $(LLVMUnitTestExe): $(ObjectsO) $(ProjLibsPaths) $(LLVMLibsPaths)
6663 all:: $(LLVMUnitTestExe)
6764
6865 unitcheck:: $(LLVMUnitTestExe)
69 $(Run.Shared) $(LLVMUnitTestExe)
66 $(LLVMUnitTestExe)
7067
7168 endif