From 63fe7d802aad177107ef8e3bc0c9b7ea5118ad61 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 25 May 2018 12:09:50 -0400 Subject: SL-821, SL-826: Use BUGSPLAT_DB from environment on Windows and Mac. On TeamCity, set BUGSPLAT_DB from build-secrets. Use the presence of $BUGSPLAT_DB, rather than a new CMake BUGSPLAT option, to control whether CMake searches for BugSplat -- and passes LL_BUGSPLAT into C++. When BUGSPLAT_DB is present, make viewer_manifest.py set "BugSplat DB" in build_data.json, and "BugsplatServerURL" in Mac Info.plist. Make llappviewerwin32.cpp read "BugSplat DB" from build_data.json. Add placeholders for Mac hooks to suppress BugSplat prompt and send SecondLife.log. --- build.sh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index bb8d66599b..7e44c6fee3 100755 --- a/build.sh +++ b/build.sh @@ -95,17 +95,23 @@ pre_build() && [ -r "$master_message_template_checkout/message_template.msg" ] \ && template_verifier_master_url="-DTEMPLATE_VERIFIER_MASTER_URL=file://$master_message_template_checkout/message_template.msg" - # nat 2016-12-20: disable HAVOK on Mac until we get a 64-bit Mac build. RELEASE_CRASH_REPORTING=ON HAVOK=ON SIGNING=() - if [ "$arch" == "Darwin" ] - then - if [ "$variant" == "Release" ] - then SIGNING=("-DENABLE_SIGNING:BOOL=YES" \ - "-DSIGNING_IDENTITY:STRING=Developer ID Application: Linden Research, Inc.") - fi + if [ "$arch" == "Darwin" -a "$variant" == "Release" ] + then SIGNING=("-DENABLE_SIGNING:BOOL=YES" \ + "-DSIGNING_IDENTITY:STRING=Developer ID Application: Linden Research, Inc.") + fi + + # don't spew credentials into build log + bugsplat_sh="$build_secrets_checkout/bugsplat/bugsplat.sh" + set +x + if [ -r "$bugsplat_sh" ] + then # show that we're doing this, just not the contents + echo source "$bugsplat_sh" + source "$bugsplat_sh" fi + set -x "$autobuild" configure --quiet -c $variant -- \ -DPACKAGE:BOOL=ON \ -- cgit v1.3 From 8781b36d7ee5d6532fb6534caa595166ad00f04d Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Fri, 25 May 2018 16:08:00 -0400 Subject: SL-821: export BUGSPLAT_DB when loaded so child processes can detect. Produce CMake message when BugSplat is engaged so we can detect in build log. Don't try to copy BugSplat DLLs when NOT engaged. --- build.sh | 5 +++++ indra/cmake/Copy3rdPartyLibs.cmake | 8 +++++--- indra/cmake/bugsplat.cmake | 2 ++ 3 files changed, 12 insertions(+), 3 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 7e44c6fee3..cf18c3f541 100755 --- a/build.sh +++ b/build.sh @@ -110,6 +110,11 @@ pre_build() then # show that we're doing this, just not the contents echo source "$bugsplat_sh" source "$bugsplat_sh" + # important: we test this and use its value in [grand-]child processes + if [ -n "${BUGSPLAT_DB:-}" ] + then echo export BUGSPLAT_DB + export BUGSPLAT_DB + fi fi set -x diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 7f708bc27a..c9519b0e1d 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -51,15 +51,17 @@ if(WINDOWS) # Filenames are different for 32/64 bit BugSplat file and we don't # have any control over them so need to branch. - if(ADDRESS_SIZE EQUAL 32) + if (DEFINED ENV{BUGSPLAT_DB}) + if(ADDRESS_SIZE EQUAL 32) set(release_files ${release_files} BugSplat.dll) set(release_files ${release_files} BugSplatRc.dll) set(release_files ${release_files} BsSndRpt.exe) - else(ADDRESS_SIZE EQUAL 32) + else(ADDRESS_SIZE EQUAL 32) set(release_files ${release_files} BugSplat64.dll) set(release_files ${release_files} BugSplatRc64.dll) set(release_files ${release_files} BsSndRpt64.exe) - endif(ADDRESS_SIZE EQUAL 32) + endif(ADDRESS_SIZE EQUAL 32) + endif (DEFINED ENV{BUGSPLAT_DB}) if (FMODEX) diff --git a/indra/cmake/bugsplat.cmake b/indra/cmake/bugsplat.cmake index 4db9068b49..eb5808b1fb 100644 --- a/indra/cmake/bugsplat.cmake +++ b/indra/cmake/bugsplat.cmake @@ -3,10 +3,12 @@ # build). if (DEFINED ENV{BUGSPLAT_DB}) if (USESYSTEMLIBS) + message(STATUS "Looking for system BugSplat") set(BUGSPLAT_FIND_QUIETLY ON) set(BUGSPLAT_FIND_REQUIRED ON) include(FindBUGSPLAT) else (USESYSTEMLIBS) + message(STATUS "Engaging autobuild BugSplat") include(Prebuilt) use_prebuilt_binary(bugsplat) if (WINDOWS) -- cgit v1.3 From 0fedc97f3f9bb83e93624343072c9b3dd62c63ae Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 30 May 2018 10:32:47 -0400 Subject: always run tests --- build.sh | 1 - 1 file changed, 1 deletion(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index cf18c3f541..1196cb3813 100755 --- a/build.sh +++ b/build.sh @@ -125,7 +125,6 @@ pre_build() -DRELEASE_CRASH_REPORTING:BOOL="$RELEASE_CRASH_REPORTING" \ -DVIEWER_CHANNEL:STRING="${viewer_channel}" \ -DGRID:STRING="\"$viewer_grid\"" \ - -DLL_TESTS:BOOL="$run_tests" \ -DTEMPLATE_VERIFIER_OPTIONS:STRING="$template_verifier_options" $template_verifier_master_url \ "${SIGNING[@]}" \ || fatal "$variant configuration failed" -- cgit v1.3 From 837ca22924a4fc3ade6d592bc75c7921a6f4e668 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 30 May 2018 10:36:23 -0400 Subject: set shell nullglob option so that when a glob has no expansion you don't get the glob back ( *.sh expands to empty rather than to "*.sh") --- build.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 1196cb3813..b85e254c15 100755 --- a/build.sh +++ b/build.sh @@ -204,6 +204,8 @@ then exit 1 fi +shopt -s nullglob # if nothing matches a glob, expand to nothing + initialize_build # provided by master buildscripts build.sh begin_section "autobuild initialize" -- cgit v1.3 From d2fa5a53e8b91bd0aba10ab3917c722dc360b610 Mon Sep 17 00:00:00 2001 From: Oz Linden Date: Wed, 30 May 2018 13:14:43 -0400 Subject: remove unused UNATTENDED cmake variable that generates warnings --- build.sh | 1 - indra/cmake/Variables.cmake | 1 - indra/newview/CMakeLists.txt | 26 ++++++++++++-------------- 3 files changed, 12 insertions(+), 16 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index b85e254c15..efe96a0a6a 100755 --- a/build.sh +++ b/build.sh @@ -120,7 +120,6 @@ pre_build() "$autobuild" configure --quiet -c $variant -- \ -DPACKAGE:BOOL=ON \ - -DUNATTENDED:BOOL=ON \ -DHAVOK:BOOL="$HAVOK" \ -DRELEASE_CRASH_REPORTING:BOOL="$RELEASE_CRASH_REPORTING" \ -DVIEWER_CHANNEL:STRING="${viewer_channel}" \ diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index bd69c49856..b913d6398e 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -209,7 +209,6 @@ set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside") set(USESYSTEMLIBS OFF CACHE BOOL "Use libraries from your system rather than Linden-supplied prebuilt libraries.") -set(UNATTENDED OFF CACHE BOOL "Should be set to ON for building with VC Express editions.") set(USE_PRECOMPILED_HEADERS ON CACHE BOOL "Enable use of precompiled header directives where supported.") diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index cf275ef4b5..6b3db36efe 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -1853,23 +1853,21 @@ if (WINDOWS) add_dependencies(${VIEWER_BINARY_NAME} SLPlugin - windows-crash-logger + windows-crash-logger ) # sets the 'working directory' for debugging from visual studio. - if (NOT UNATTENDED) - add_custom_command( - TARGET ${VIEWER_BINARY_NAME} POST_BUILD - COMMAND ${CMAKE_SOURCE_DIR}/tools/vstool/vstool.exe - ARGS - --solution - ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.sln - --workingdir - ${VIEWER_BINARY_NAME} - "${CMAKE_CURRENT_SOURCE_DIR}" - COMMENT "Setting the ${VIEWER_BINARY_NAME} working directory for debugging." - ) - endif (NOT UNATTENDED) + add_custom_command( + TARGET ${VIEWER_BINARY_NAME} POST_BUILD + COMMAND ${CMAKE_SOURCE_DIR}/tools/vstool/vstool.exe + ARGS + --solution + ${CMAKE_BINARY_DIR}/${CMAKE_PROJECT_NAME}.sln + --workingdir + ${VIEWER_BINARY_NAME} + "${CMAKE_CURRENT_SOURCE_DIR}" + COMMENT "Setting the ${VIEWER_BINARY_NAME} working directory for debugging." + ) if (PACKAGE) add_custom_command( -- cgit v1.3 From 786f80b9426742f0c9fe964ce54168b7005d92c8 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 14 Jun 2018 19:03:17 -0400 Subject: SL-821: When using BugSplat, don't try to upload Breakpad symbols. With BugSplat, the Breakpad symbol files aren't generated; attempting to post them to codeticket will fail the build. --- build.sh | 2 ++ 1 file changed, 2 insertions(+) (limited to 'build.sh') diff --git a/build.sh b/build.sh index efe96a0a6a..56ec57818c 100755 --- a/build.sh +++ b/build.sh @@ -114,6 +114,8 @@ pre_build() if [ -n "${BUGSPLAT_DB:-}" ] then echo export BUGSPLAT_DB export BUGSPLAT_DB + echo RELEASE_CRASH_REPORTING=OFF + RELEASE_CRASH_REPORTING=OFF fi fi set -x -- cgit v1.3 From f6e7893a6e34190e8080d289a5f89d7f9c47d583 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Thu, 28 Jun 2018 12:39:42 -0400 Subject: MAINT-8797: Resurrect BugSplat crash reporting on Windows. The Breakpad symbol-file upload in the viewer's build.sh was failing on BugSplat builds since we weren't generating Breakpad symbol files. That upload was conditional on RELEASE_CRASH_REPORTING, so my first approach was to set RELEASE_CRASH_REPORTING=OFF for BugSplat builds. Unfortunately that symbol also propagates down into C++ compiles, and in llappviewerwin32.cpp, both Breakpad and BugSplat crash reporting is conditional on it. So that change inadvertently turned off the C++ logic to engage BugSplat. Stop forcing RELEASE_CRASH_REPORTING=OFF for BugSplat builds. Instead, make the Breakpad symbol-file upload check the BUGSPLAT_DB variable as well. Add #pragma messages to llappviewerwin32.cpp so we can detect whether it's being built for Breakpad or BugSplat or neither. --- build.sh | 6 +++--- indra/newview/llappviewerwin32.cpp | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 56ec57818c..d531c0b046 100755 --- a/build.sh +++ b/build.sh @@ -114,8 +114,6 @@ pre_build() if [ -n "${BUGSPLAT_DB:-}" ] then echo export BUGSPLAT_DB export BUGSPLAT_DB - echo RELEASE_CRASH_REPORTING=OFF - RELEASE_CRASH_REPORTING=OFF fi fi set -x @@ -428,7 +426,9 @@ then if [ "$last_built_variant" = "Release" ] then # nat 2016-12-22: without RELEASE_CRASH_REPORTING, we have no symbol file. - if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" ] + # Likewise, BUGSPLAT_DB suppresses generating the symbol file. + if [ "${RELEASE_CRASH_REPORTING:-}" != "OFF" \ + -a -z "${BUGSPLAT_DB:-}" ] then # Upload crash reporter file # These names must match the set of VIEWER_SYMBOL_FILE in indra/newview/CMakeLists.txt diff --git a/indra/newview/llappviewerwin32.cpp b/indra/newview/llappviewerwin32.cpp index 3efc94d7b5..247b94db3e 100644 --- a/indra/newview/llappviewerwin32.cpp +++ b/indra/newview/llappviewerwin32.cpp @@ -559,11 +559,13 @@ bool LLAppViewerWin32::init() #if LL_SEND_CRASH_REPORTS #if ! defined(LL_BUGSPLAT) +#pragma message("Building without BugSplat") LLAppViewer* pApp = LLAppViewer::instance(); pApp->initCrashReporting(); #else // LL_BUGSPLAT +#pragma message("Building with BugSplat") std::string build_data_fname( gDirUtilp->getExpandedFilename(LL_PATH_EXECUTABLE, "build_data.json")); @@ -579,7 +581,7 @@ bool LLAppViewerWin32::init() Json::Value build_data; if (! reader.parse(inf, build_data, false)) // don't collect comments { - // gah, the typo is baked into their API + // gah, the typo is baked into Json::Reader API LL_WARNS() << "Can't initialize BugSplat, can't parse '" << build_data_fname << "': " << reader.getFormatedErrorMessages() << LL_ENDL; } @@ -609,7 +611,7 @@ bool LLAppViewerWin32::init() // engage stringize() overload that converts from wstring LL_INFOS() << "Engaged BugSplat(" << LL_TO_STRING(LL_VIEWER_CHANNEL) - << stringize(version_string) << ')' << LL_ENDL; + << ' ' << stringize(version_string) << ')' << LL_ENDL; } // got BugSplat_DB } // parsed build_data.json } // opened build_data.json -- cgit v1.3 From f1eb3c1b63b97de2a91c967e5c66f7b25c4963a2 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 18 Jul 2018 20:32:35 -0400 Subject: DRTVWR-447: Temporarily suppress building for BugSplat on Mac. --- build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index d531c0b046..216ce5720a 100755 --- a/build.sh +++ b/build.sh @@ -106,7 +106,8 @@ pre_build() # don't spew credentials into build log bugsplat_sh="$build_secrets_checkout/bugsplat/bugsplat.sh" set +x - if [ -r "$bugsplat_sh" ] + # HACK: Suppress for Mac until BugSplat fixes the Mac client API + if [ -r "$bugsplat_sh" -a "$arch" != "Darwin" ] then # show that we're doing this, just not the contents echo source "$bugsplat_sh" source "$bugsplat_sh" -- cgit v1.3 From 3ca8263fb462bb0aba23b8d27d717a961db5bad6 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Wed, 15 Aug 2018 16:12:56 -0400 Subject: Backed out changeset 25b55601514d: re-enable building BugSplat on Mac. --- build.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'build.sh') diff --git a/build.sh b/build.sh index 216ce5720a..d531c0b046 100755 --- a/build.sh +++ b/build.sh @@ -106,8 +106,7 @@ pre_build() # don't spew credentials into build log bugsplat_sh="$build_secrets_checkout/bugsplat/bugsplat.sh" set +x - # HACK: Suppress for Mac until BugSplat fixes the Mac client API - if [ -r "$bugsplat_sh" -a "$arch" != "Darwin" ] + if [ -r "$bugsplat_sh" ] then # show that we're doing this, just not the contents echo source "$bugsplat_sh" source "$bugsplat_sh" -- cgit v1.3