Commit ee373659 authored by NiranV's avatar NiranV
Browse files

Merge Linden Release.

parents a284f3a7 e8b31d03
......@@ -13,14 +13,17 @@
LICENSES
build-darwin-*
build-linux-*
build-stamp
build-vc120*
build-vc150*
configure-stamp
debian/files
debian/secondlife-appearance-utility*
debian/secondlife-viewer*
indra/.distcc
build-vc80/
build-vc100/
build-vc120/
build-vc120-32/
build-vc120-64/
build-vc150-32/
build-vc150-64/
indra/CMakeFiles
indra/build-vc[0-9]*
indra/lib/mono/1.0/*.dll
......@@ -68,6 +71,7 @@ indra/web/doc/asset-upload/plugins/verify-texture
installed.xml
libraries
tarfile_tmp
trivial_change_force_build
web/config.*
web/locale.*
web/secondlife.com.*
Black Dragon Viewer
====================
This project manages the source code for the
[Black Dragon](https://niranv-sl.blogspot.de/) Viewer.
......
This diff is collapsed.
......@@ -28,7 +28,7 @@ build_dir_Linux()
build_dir_CYGWIN()
{
echo build-vc120-${AUTOBUILD_ADDRSIZE}
echo build-vc${AUTOBUILD_VSVER:-120}-${AUTOBUILD_ADDRSIZE}
}
viewer_channel_suffix()
......
......@@ -1088,6 +1088,8 @@ Nicky Dasmijn
SL-10293
SL-11061
SL-11072
SL-13141
SL-13642
Nicky Perian
OPEN-1
STORM-1087
......
......@@ -15,6 +15,11 @@ set(CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
include(Variables)
include(BuildVersion)
set(LEGACY_STDIO_LIBS)
if (WINDOWS)
set(LEGACY_STDIO_LIBS legacy_stdio_definitions)
endif (WINDOWS)
if (NOT CMAKE_BUILD_TYPE)
set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
"Build type. One of: Debug Release RelWithDebInfo" FORCE)
......
......@@ -70,9 +70,10 @@ if (WINDOWS)
"${CMAKE_CXX_FLAGS_RELEASE} /clang:-Ofast /clang:-ffast-math /Oi /Ot /Gy /Zi /MD /Ob2 /Oy- /Zc:inline /EHsc /fp:fast -D_ITERATOR_DEBUG_LEVEL=0")
endif()
if (ADDRESS_SIZE EQUAL 32)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
endif (ADDRESS_SIZE EQUAL 32)
# Without PreferredToolArchitecture=x64, as of 2020-06-26 the 32-bit
# compiler on our TeamCity build hosts has started running out of virtual
# memory for the precompiled header file.
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /MP /p:PreferredToolArchitecture=x64")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /DEBUG /IGNORE:4099")
......@@ -154,9 +155,9 @@ if (WINDOWS)
set(GLOBAL_CXX_FLAGS "${GLOBAL_CXX_FLAGS} /favor:INTEL64")
endif()
if (NOT VS_DISABLE_FATAL_WARNINGS)
set(GLOBAL_CXX_FLAGS "${GLOBAL_CXX_FLAGS} /WX")
endif (NOT VS_DISABLE_FATAL_WARNINGS)
#if (NOT VS_DISABLE_FATAL_WARNINGS)
# set(GLOBAL_CXX_FLAGS "${GLOBAL_CXX_FLAGS} /WX")
#endif (NOT VS_DISABLE_FATAL_WARNINGS)
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${GLOBAL_CXX_FLAGS}" CACHE STRING "C++ compiler debug options" FORCE)
set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "${CMAKE_CXX_FLAGS_RELWITHDEBINFO} ${GLOBAL_CXX_FLAGS}" CACHE STRING "C++ compiler release-with-debug options" FORCE)
......
......@@ -8,7 +8,7 @@ if (USESYSTEMLIBS)
include(FindBoost)
set(BOOST_CONTEXT_LIBRARY boost_context-mt)
set(BOOST_COROUTINE_LIBRARY boost_coroutine-mt)
set(BOOST_FIBER_LIBRARY boost_fiber-mt)
set(BOOST_FILESYSTEM_LIBRARY boost_filesystem-mt)
set(BOOST_PROGRAM_OPTIONS_LIBRARY boost_program_options-mt)
set(BOOST_REGEX_LIBRARY boost_regex-mt)
......@@ -18,11 +18,15 @@ if (USESYSTEMLIBS)
else (USESYSTEMLIBS)
use_prebuilt_binary(boost)
set(Boost_INCLUDE_DIRS ${LIBS_PREBUILT_DIR}/include)
set(BOOST_VERSION "1.55")
# As of sometime between Boost 1.67 and 1.72, Boost libraries are suffixed
# with the address size.
set(addrsfx "-x${ADDRESS_SIZE}")
if (WINDOWS)
if(MSVC80)
# This should be obsolete at this point
set(BOOST_VERSION "1.55")
set(BOOST_CONTEXT_LIBRARY
optimized libboost_context-vc80-mt-${BOOST_VERSION}
debug libboost_context-vc80-mt-gd-${BOOST_VERSION})
......@@ -47,80 +51,80 @@ else (USESYSTEMLIBS)
else(MSVC80)
# MSVC 10.0 config
set(BOOST_CONTEXT_LIBRARY
optimized libboost_context-mt
debug libboost_context-mt-gd)
set(BOOST_COROUTINE_LIBRARY
optimized libboost_coroutine-mt
debug libboost_coroutine-mt-gd)
optimized libboost_context-mt${addrsfx}
debug libboost_context-mt${addrsfx}-gd)
set(BOOST_FIBER_LIBRARY
optimized libboost_fiber-mt${addrsfx}
debug libboost_fiber-mt${addrsfx}-gd)
set(BOOST_FILESYSTEM_LIBRARY
optimized libboost_filesystem-mt
debug libboost_filesystem-mt-gd)
optimized libboost_filesystem-mt${addrsfx}
debug libboost_filesystem-mt${addrsfx}-gd)
set(BOOST_PROGRAM_OPTIONS_LIBRARY
optimized libboost_program_options-mt
debug libboost_program_options-mt-gd)
optimized libboost_program_options-mt${addrsfx}
debug libboost_program_options-mt${addrsfx}-gd)
set(BOOST_REGEX_LIBRARY
optimized libboost_regex-mt
debug libboost_regex-mt-gd)
optimized libboost_regex-mt${addrsfx}
debug libboost_regex-mt${addrsfx}-gd)
set(BOOST_SIGNALS_LIBRARY
optimized libboost_signals-mt
debug libboost_signals-mt-gd)
optimized libboost_signals-mt${addrsfx}
debug libboost_signals-mt${addrsfx}-gd)
set(BOOST_SYSTEM_LIBRARY
optimized libboost_system-mt
debug libboost_system-mt-gd)
optimized libboost_system-mt${addrsfx}
debug libboost_system-mt${addrsfx}-gd)
set(BOOST_THREAD_LIBRARY
optimized libboost_thread-mt
debug libboost_thread-mt-gd)
optimized libboost_thread-mt${addrsfx}
debug libboost_thread-mt${addrsfx}-gd)
endif (MSVC80)
elseif (LINUX)
set(BOOST_CONTEXT_LIBRARY
optimized boost_context-mt
debug boost_context-mt-d)
set(BOOST_COROUTINE_LIBRARY
optimized boost_coroutine-mt
debug boost_coroutine-mt-d)
optimized boost_context-mt${addrsfx}
debug boost_context-mt${addrsfx}-d)
set(BOOST_FIBER_LIBRARY
optimized boost_fiber-mt${addrsfx}
debug boost_fiber-mt${addrsfx}-d)
set(BOOST_FILESYSTEM_LIBRARY
optimized boost_filesystem-mt
debug boost_filesystem-mt-d)
optimized boost_filesystem-mt${addrsfx}
debug boost_filesystem-mt${addrsfx}-d)
set(BOOST_PROGRAM_OPTIONS_LIBRARY
optimized boost_program_options-mt
debug boost_program_options-mt-d)
optimized boost_program_options-mt${addrsfx}
debug boost_program_options-mt${addrsfx}-d)
set(BOOST_REGEX_LIBRARY
optimized boost_regex-mt
debug boost_regex-mt-d)
optimized boost_regex-mt${addrsfx}
debug boost_regex-mt${addrsfx}-d)
set(BOOST_SIGNALS_LIBRARY
optimized boost_signals-mt
debug boost_signals-mt-d)
optimized boost_signals-mt${addrsfx}
debug boost_signals-mt${addrsfx}-d)
set(BOOST_SYSTEM_LIBRARY
optimized boost_system-mt
debug boost_system-mt-d)
optimized boost_system-mt${addrsfx}
debug boost_system-mt${addrsfx}-d)
set(BOOST_THREAD_LIBRARY
optimized boost_thread-mt
debug boost_thread-mt-d)
optimized boost_thread-mt${addrsfx}
debug boost_thread-mt${addrsfx}-d)
elseif (DARWIN)
set(BOOST_CONTEXT_LIBRARY
optimized boost_context-mt
debug boost_context-mt-d)
set(BOOST_COROUTINE_LIBRARY
optimized boost_coroutine-mt
debug boost_coroutine-mt-d)
optimized boost_context-mt${addrsfx}
debug boost_context-mt${addrsfx}-d)
set(BOOST_FIBER_LIBRARY
optimized boost_fiber-mt${addrsfx}
debug boost_fiber-mt${addrsfx}-d)
set(BOOST_FILESYSTEM_LIBRARY
optimized boost_filesystem-mt
debug boost_filesystem-mt-d)
optimized boost_filesystem-mt${addrsfx}
debug boost_filesystem-mt${addrsfx}-d)
set(BOOST_PROGRAM_OPTIONS_LIBRARY
optimized boost_program_options-mt
debug boost_program_options-mt-d)
optimized boost_program_options-mt${addrsfx}
debug boost_program_options-mt${addrsfx}-d)
set(BOOST_REGEX_LIBRARY
optimized boost_regex-mt
debug boost_regex-mt-d)
optimized boost_regex-mt${addrsfx}
debug boost_regex-mt${addrsfx}-d)
set(BOOST_SIGNALS_LIBRARY
optimized boost_signals-mt
debug boost_signals-mt-d)
optimized boost_signals-mt${addrsfx}
debug boost_signals-mt${addrsfx}-d)
set(BOOST_SYSTEM_LIBRARY
optimized boost_system-mt
debug boost_system-mt-d)
optimized boost_system-mt${addrsfx}
debug boost_system-mt${addrsfx}-d)
set(BOOST_THREAD_LIBRARY
optimized boost_thread-mt
debug boost_thread-mt-d)
optimized boost_thread-mt${addrsfx}
debug boost_thread-mt${addrsfx}-d)
endif (WINDOWS)
endif (USESYSTEMLIBS)
......
# -*- cmake -*-
# Construct the version and copyright information based on package data.
include(Python)
include(FindAutobuild)
# packages-formatter.py runs autobuild install --versions, which needs to know
# the build_directory, which (on Windows) depends on AUTOBUILD_ADDRSIZE.
......@@ -13,7 +14,7 @@ add_custom_command(OUTPUT packages-info.txt
DEPENDS ${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py
${CMAKE_SOURCE_DIR}/../autobuild.xml
COMMAND ${PYTHON_EXECUTABLE}
${CMAKE_SOURCE_DIR}/cmake/run_build_test.py -DAUTOBUILD_ADDRSIZE=${ADDRESS_SIZE}
${CMAKE_SOURCE_DIR}/cmake/run_build_test.py -DAUTOBUILD_ADDRSIZE=${ADDRESS_SIZE} -DAUTOBUILD=${AUTOBUILD_EXECUTABLE}
${PYTHON_EXECUTABLE}
${CMAKE_SOURCE_DIR}/../scripts/packages-formatter.py "${VIEWER_CHANNEL}" "${VIEWER_SHORT_VERSION}.${VIEWER_VERSION_REVISION}" > packages-info.txt
)
......@@ -7,6 +7,21 @@
include(CMakeCopyIfDifferent)
include(Linking)
# When we copy our dependent libraries, we almost always want to copy them to
# both the Release and the RelWithDebInfo staging directories. This has
# resulted in duplicate (or worse, erroneous attempted duplicate)
# copy_if_different commands. Encapsulate that usage.
# Pass FROM_DIR, TARGETS and the files to copy. TO_DIR is implicit.
# to_staging_dirs diverges from copy_if_different in that it appends to TARGETS.
MACRO(to_staging_dirs from_dir targets)
foreach(staging_dir
"${SHARED_LIB_STAGING_DIR_RELEASE}"
"${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}")
copy_if_different("${from_dir}" "${staging_dir}" out_targets ${ARGN})
list(APPEND "${targets}" "${out_targets}")
endforeach()
ENDMACRO(to_staging_dirs from_dir to_dir targets)
###################################################################
# set up platform specific lists of files that need to be copied
###################################################################
......@@ -69,95 +84,54 @@ if(WINDOWS)
#*******************************
# Copy MS C runtime dlls, required for packaging.
# *TODO - Adapt this to support VC9
if (MSVC80)
list(APPEND LMSVC_VER 80)
list(APPEND LMSVC_VERDOT 8.0)
set(MSVC_VER 80)
elseif (MSVC_VERSION EQUAL 1600) # VisualStudio 2010
MESSAGE(STATUS "MSVC_VERSION ${MSVC_VERSION}")
elseif (MSVC_VERSION EQUAL 1800) # VisualStudio 2013, which is (sigh) VS 12
list(APPEND LMSVC_VER 120)
list(APPEND LMSVC_VERDOT 12.0)
set(MSVC_VER 120)
elseif (MSVC_VERSION GREATER_EQUAL 1910 AND MSVC_VERSION LESS 1920) # Visual Studio 2017
set(MSVC_VER 140)
else (MSVC80)
MESSAGE(WARNING "New MSVC_VERSION ${MSVC_VERSION} of MSVC: adapt Copy3rdPartyLibs.cmake")
endif (MSVC80)
# try to copy VS2010 redist independently of system version
# maint-7360 CP
# list(APPEND LMSVC_VER 100)
# list(APPEND LMSVC_VERDOT 10.0)
list(LENGTH LMSVC_VER count)
math(EXPR count "${count}-1")
foreach(i RANGE ${count})
list(GET LMSVC_VER ${i} MSVC_VER)
list(GET LMSVC_VERDOT ${i} MSVC_VERDOT)
MESSAGE(STATUS "Copying redist libs for VC ${MSVC_VERDOT}")
FIND_PATH(debug_msvc_redist_path NAME msvcr${MSVC_VER}d.dll
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\VisualStudio\\${MSVC_VERDOT}\\Setup\\VC;ProductDir]/redist/Debug_NonRedist/x86/Microsoft.VC${MSVC_VER}.DebugCRT
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64
[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32
${MSVC_DEBUG_REDIST_PATH}
NO_DEFAULT_PATH
if(ADDRESS_SIZE EQUAL 32)
# this folder contains the 32bit DLLs.. (yes really!)
set(registry_find_path "[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64")
else(ADDRESS_SIZE EQUAL 32)
# this folder contains the 64bit DLLs.. (yes really!)
set(registry_find_path "[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32")
endif(ADDRESS_SIZE EQUAL 32)
# Having a string containing the system registry path is a start, but to
# get CMake to actually read the registry, we must engage some other
# operation.
get_filename_component(registry_path "${registry_find_path}" ABSOLUTE)
# These are candidate DLL names. Empirically, VS versions before 2015 have
# msvcp*.dll and msvcr*.dll. VS 2017 has msvcp*.dll and vcruntime*.dll.
# Check each of them.
foreach(release_msvc_file
msvcp${MSVC_VER}.dll
msvcr${MSVC_VER}.dll
vcruntime${MSVC_VER}.dll
)
if(EXISTS ${debug_msvc_redist_path})
set(debug_msvc_files
msvcr${MSVC_VER}d.dll
msvcp${MSVC_VER}d.dll
)
copy_if_different(
${debug_msvc_redist_path}
"${SHARED_LIB_STAGING_DIR_DEBUG}"
out_targets
${debug_msvc_files}
)
set(third_party_targets ${third_party_targets} ${out_targets})
unset(debug_msvc_redist_path CACHE)
endif()
if(ADDRESS_SIZE EQUAL 32)
# this folder contains the 32bit DLLs.. (yes really!)
set(registry_find_path "[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/SysWOW64")
else(ADDRESS_SIZE EQUAL 32)
# this folder contains the 64bit DLLs.. (yes really!)
set(registry_find_path "[HKEY_LOCAL_MACHINE\\SYSTEM\\CurrentControlSet\\Control\\Windows;Directory]/System32")
endif(ADDRESS_SIZE EQUAL 32)
FIND_PATH(release_msvc_redist_path NAME msvcr${MSVC_VER}.dll
PATHS
${registry_find_path}
NO_DEFAULT_PATH
)
if(EXISTS ${release_msvc_redist_path})
set(release_msvc_files
msvcr${MSVC_VER}.dll
msvcp${MSVC_VER}.dll
)
copy_if_different(
${release_msvc_redist_path}
"${SHARED_LIB_STAGING_DIR_RELEASE}"
out_targets
${release_msvc_files}
)
set(third_party_targets ${third_party_targets} ${out_targets})
copy_if_different(
${release_msvc_redist_path}
"${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
out_targets
${release_msvc_files}
)
set(third_party_targets ${third_party_targets} ${out_targets})
unset(release_msvc_redist_path CACHE)
if(EXISTS "${registry_path}/${release_msvc_file}")
to_staging_dirs(
${registry_path}
third_party_targets
${release_msvc_file})
else()
# This isn't a WARNING because, as noted above, every VS version
# we've observed has only a subset of the specified DLL names.
MESSAGE(STATUS "Redist lib ${release_msvc_file} not found")
endif()
endforeach()
MESSAGE(STATUS "Will copy redist files for MSVC ${MSVC_VER}:")
foreach(target ${third_party_targets})
MESSAGE(STATUS "${target}")
endforeach()
elseif(DARWIN)
set(SHARED_LIB_STAGING_DIR_DEBUG "${SHARED_LIB_STAGING_DIR}/Debug/Resources")
......@@ -182,10 +156,11 @@ elseif(DARWIN)
libexception_handler.dylib
${EXPAT_COPY}
libGLOD.dylib
libhunspell-1.3.0.dylib
libndofdev.dylib
libnghttp2.dylib
libnghttp2.14.dylib
libnghttp2.14.14.0.dylib
libnghttp2.14.19.0.dylib
)
if (USE_FMODSTUDIO)
......@@ -268,52 +243,28 @@ endif(WINDOWS)
# Done building the file lists, now set up the copy commands.
################################################################
copy_if_different(
${vivox_lib_dir}
"${SHARED_LIB_STAGING_DIR_DEBUG}"
out_targets
${vivox_libs}
)
set(third_party_targets ${third_party_targets} ${out_targets})
# Curiously, slvoice_files are only copied to SHARED_LIB_STAGING_DIR_RELEASE.
# It's unclear whether this is oversight or intentional, but anyway leave the
# single copy_if_different command rather than using to_staging_dirs.
copy_if_different(
${slvoice_src_dir}
"${SHARED_LIB_STAGING_DIR_RELEASE}"
out_targets
${slvoice_files}
)
copy_if_different(
${vivox_lib_dir}
"${SHARED_LIB_STAGING_DIR_RELEASE}"
out_targets
${vivox_libs}
)
set(third_party_targets ${third_party_targets} ${out_targets})
list(APPEND third_party_targets ${out_targets})
copy_if_different(
to_staging_dirs(
${vivox_lib_dir}
"${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
out_targets
third_party_targets
${vivox_libs}
)
set(third_party_targets ${third_party_targets} ${out_targets})
copy_if_different(
to_staging_dirs(
${release_src_dir}
"${SHARED_LIB_STAGING_DIR_RELEASE}"
out_targets
${release_files}
)
set(third_party_targets ${third_party_targets} ${out_targets})
copy_if_different(
${release_src_dir}
"${SHARED_LIB_STAGING_DIR_RELWITHDEBINFO}"
out_targets
third_party_targets
${release_files}
)
set(third_party_targets ${third_party_targets} ${out_targets})
if(NOT USESYSTEMLIBS)
add_custom_target(
......
......@@ -53,7 +53,7 @@ INCLUDE(GoogleMock)
${GOOGLEMOCK_INCLUDE_DIRS}
)
SET(alltest_LIBRARIES
${BOOST_COROUTINE_LIBRARY}
${BOOST_FIBER_LIBRARY}
${BOOST_CONTEXT_LIBRARY}
${BOOST_SYSTEM_LIBRARY}
${GOOGLEMOCK_LIBRARIES}
......@@ -200,8 +200,9 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
)
SET(libraries
${LEGACY_STDIO_LIBS}
${library_dependencies}
${BOOST_COROUTINE_LIBRARY}
${BOOST_FIBER_LIBRARY}
${BOOST_CONTEXT_LIBRARY}
${BOOST_SYSTEM_LIBRARY}
${GOOGLEMOCK_LIBRARIES}
......
......@@ -18,7 +18,7 @@ endif (BUILD_HEADLESS)
set(LLAPPEARANCE_LIBRARIES llappearance
llmessage
llcorehttp
${BOOST_COROUTINE_LIBRARY}
${BOOST_FIBER_LIBRARY}
${BOOST_CONTEXT_LIBRARY}
${BOOST_SYSTEM_LIBRARY}
)
......
......@@ -19,7 +19,7 @@ if (LINUX)
# specify all libraries that llcommon uses.
# llcommon uses `clock_gettime' which is provided by librt on linux.
set(LLCOMMON_LIBRARIES llcommon
${BOOST_COROUTINE_LIBRARY}
${BOOST_FIBER_LIBRARY}
${BOOST_CONTEXT_LIBRARY}
${BOOST_THREAD_LIBRARY}
${BOOST_SYSTEM_LIBRARY}
......@@ -27,7 +27,7 @@ if (LINUX)
)
else (LINUX)
set(LLCOMMON_LIBRARIES llcommon
${BOOST_COROUTINE_LIBRARY}
${BOOST_FIBER_LIBRARY}
${BOOST_CONTEXT_LIBRARY}
${BOOST_THREAD_LIBRARY}
${BOOST_SYSTEM_LIBRARY} )
......
......@@ -12,6 +12,6 @@ set(LLCOREHTTP_INCLUDE_DIRS
)
set(LLCOREHTTP_LIBRARIES llcorehttp
${BOOST_COROUTINE_LIBRARY}
${BOOST_FIBER_LIBRARY}
${BOOST_CONTEXT_LIBRARY}
${BOOST_SYSTEM_LIBRARY})
......@@ -87,7 +87,6 @@ def main(command, arguments=[], libpath=[], vars={}):
# might not exist; instead of KeyError, just use an empty string.
dirs = os.environ.get(var, "").split(os.pathsep)
# Append the sequence in libpath
log.info("%s += %r" % (var, libpath))
for dir in libpath:
# append system paths at the end
if dir in ('/lib', '/usr/lib'):
......@@ -105,16 +104,21 @@ def main(command, arguments=[], libpath=[], vars={}):
# Now rebuild the path string. This way we use a minimum of separators
# -- and we avoid adding a pointless separator when libpath is empty.
os.environ[var] = os.pathsep.join(clean_dirs)
log.info("%s = %r" % (var, os.environ[var]))
# This output format is intended to make it straightforward to copy
# the variable settings and the command itself from the build output
# and paste the whole thing at a command prompt to rerun it manually.
log.info("%s='%s' \\" % (var, os.environ[var]))
# Now handle arbitrary environment variables. The tricky part is ensuring
# that all the keys and values we try to pass are actually strings.
if vars:
log.info("Setting: %s" % ("\n".join(["%s=%s" % (key, value) for key, value in vars.iteritems()])))
for key, value in vars.items():
# As noted a few lines above, facilitate copy-paste rerunning.
log.info("%s='%s' \\" % (key, value))
os.environ.update(dict([(str(key), str(value)) for key, value in vars.iteritems()]))
# Run the child process.
command_list = [command]
command_list.extend(arguments)
log.info("Running: %s" % " ".join(command_list))
log.info(" ".join((("'%s'" % w) if ' ' in w else w) for w in command_list))
# Make sure we see all relevant output *before* child-process output.
sys.stdout.flush()
try:
......@@ -305,8 +309,11 @@ def get_windows_table():
return _windows_table
log=logging.getLogger(__name__)
logging.basicConfig()
# Use this instead of logging.basicConfig() because the latter prefixes
# every line of output with INFO:__main__:...
log=logging.getLogger()
log.setLevel(logging.INFO)
log.addHandler(logging.StreamHandler())
if __name__ == "__main__":
import argparse
......
......@@ -64,6 +64,7 @@ endif (DARWIN)
# Libraries on which this application depends on
# Sort by high-level to low-level
target_link_libraries(llimage_libtest
${LEGACY_STDIO_LIBS}
${LLCOMMON_LIBRARIES}
${LLVFS_LIBRARIES}
${LLMATH_LIBRARIES}
......