From e4a1b12e7a9c4bb8cbc2a1e41fddb8cec5a1b1e0 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 15 Dec 2011 12:48:07 -0500 Subject: SH-2789 WIP - build without tcmalloc, force alignment in various places --- indra/cmake/FindGooglePerfTools.cmake | 2 ++ indra/cmake/GooglePerfTools.cmake | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) mode change 100644 => 100755 indra/cmake/FindGooglePerfTools.cmake mode change 100644 => 100755 indra/cmake/GooglePerfTools.cmake (limited to 'indra/cmake') diff --git a/indra/cmake/FindGooglePerfTools.cmake b/indra/cmake/FindGooglePerfTools.cmake old mode 100644 new mode 100755 index bb125d538e..1c785d3461 --- a/indra/cmake/FindGooglePerfTools.cmake +++ b/indra/cmake/FindGooglePerfTools.cmake @@ -64,3 +64,5 @@ MARK_AS_ADVANCED( PROFILER_LIBRARY GOOGLE_PERFTOOLS_INCLUDE_DIR ) + +SET(GOOGLE_PERFTOOLS_FOUND "NO") diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake old mode 100644 new mode 100755 index d9f91193be..2e96912769 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -29,7 +29,7 @@ if (GOOGLE_PERFTOOLS_FOUND) endif (GOOGLE_PERFTOOLS_FOUND) if (WINDOWS) - set(USE_GOOGLE_PERFTOOLS ON) + set(USE_GOOGLE_PERFTOOLS OFF) endif (WINDOWS) if (USE_GOOGLE_PERFTOOLS) -- cgit v1.2.3 From ba67b9359f13968b13b1facbb1e4c7948405b767 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 5 Jan 2012 17:37:02 -0500 Subject: SH-2789 WIP - allow building with or without tcmalloc, default to tcmalloc enabled --- indra/cmake/FindGooglePerfTools.cmake | 2 -- indra/cmake/GooglePerfTools.cmake | 38 ++++++++++++++++++++++++++--------- 2 files changed, 28 insertions(+), 12 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/FindGooglePerfTools.cmake b/indra/cmake/FindGooglePerfTools.cmake index 1c785d3461..bb125d538e 100755 --- a/indra/cmake/FindGooglePerfTools.cmake +++ b/indra/cmake/FindGooglePerfTools.cmake @@ -64,5 +64,3 @@ MARK_AS_ADVANCED( PROFILER_LIBRARY GOOGLE_PERFTOOLS_INCLUDE_DIR ) - -SET(GOOGLE_PERFTOOLS_FOUND "NO") diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index 2e96912769..0c31d73655 100755 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -1,20 +1,32 @@ # -*- cmake -*- include(Prebuilt) +# If you want to enable or disable TCMALLOC in viewer builds, this is the place. +# set ON or OFF as desired. +set (USE_TCMALLOC ON) + if (STANDALONE) include(FindGooglePerfTools) else (STANDALONE) if (WINDOWS) - use_prebuilt_binary(tcmalloc) - set(TCMALLOC_LIBRARIES - debug libtcmalloc_minimal-debug - optimized libtcmalloc_minimal) + if (USE_TCMALLOC) + use_prebuilt_binary(tcmalloc) + set(TCMALLOC_LIBRARIES + debug libtcmalloc_minimal-debug + optimized libtcmalloc_minimal) + else (USE_TCMALLOC) + set(TCMALLOC_LIBRARIES) + endif (USE_TCMALLOC) set(GOOGLE_PERFTOOLS_FOUND "YES") endif (WINDOWS) if (LINUX) - use_prebuilt_binary(tcmalloc) - set(TCMALLOC_LIBRARIES - tcmalloc) + if (USE_TCMALLOC) + use_prebuilt_binary(tcmalloc) + set(TCMALLOC_LIBRARIES + tcmalloc) + else (USE_TCMALLOC) + set(TCMALLOC_LIBRARIES) + endif (USE_TCMALLOC) set(PROFILER_LIBRARIES profiler) set(GOOGLE_PERFTOOLS_INCLUDE_DIR ${LIBS_PREBUILT_DIR}/include) @@ -29,13 +41,19 @@ if (GOOGLE_PERFTOOLS_FOUND) endif (GOOGLE_PERFTOOLS_FOUND) if (WINDOWS) - set(USE_GOOGLE_PERFTOOLS OFF) + set(USE_GOOGLE_PERFTOOLS ON) endif (WINDOWS) -if (USE_GOOGLE_PERFTOOLS) +# Apparently buggy - LL_USE_TCMALLOC never gets set. Fix when we have time to test the +# corresponding source code. +if (USE_TCMALLOC) set(TCMALLOC_FLAG -ULL_USE_TCMALLOC=1) +else (USE_TCMALLOC) + set(TCMALLOC_FLAG -ULL_USE_TCMALLOC) +endif (USE_TCMALLOC) + +if (USE_GOOGLE_PERFTOOLS) include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR}) set(GOOGLE_PERFTOOLS_LIBRARIES ${TCMALLOC_LIBRARIES} ${STACKTRACE_LIBRARIES} ${PROFILER_LIBRARIES}) else (USE_GOOGLE_PERFTOOLS) - set(TCMALLOC_FLAG -ULL_USE_TCMALLOC) endif (USE_GOOGLE_PERFTOOLS) -- cgit v1.2.3 From d3b0a1375509f772ec3ddbc790b5a5d9f4fa7594 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 5 Jan 2012 18:24:42 -0500 Subject: SH-2789 WIP - fix for linux build failure --- indra/cmake/GooglePerfTools.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index 0c31d73655..834da6d9b8 100755 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -47,7 +47,7 @@ endif (WINDOWS) # Apparently buggy - LL_USE_TCMALLOC never gets set. Fix when we have time to test the # corresponding source code. if (USE_TCMALLOC) - set(TCMALLOC_FLAG -ULL_USE_TCMALLOC=1) + set(TCMALLOC_FLAG -ULL_USE_TCMALLOC) # was -ULL_USE_TCMALLOC=1 which makes no sense. else (USE_TCMALLOC) set(TCMALLOC_FLAG -ULL_USE_TCMALLOC) endif (USE_TCMALLOC) -- cgit v1.2.3 From bfe6e94f5388b887253ba77f633ae332affe9f92 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 6 Jan 2012 13:01:17 -0500 Subject: SH-2789 WIP - fixing the LL_USE_TCMALLOC code, make tests build with the same tcmalloc options as the sl executable --- indra/cmake/GooglePerfTools.cmake | 16 +++++++++------- indra/cmake/LLAddBuildTest.cmake | 9 +++++++++ 2 files changed, 18 insertions(+), 7 deletions(-) mode change 100644 => 100755 indra/cmake/LLAddBuildTest.cmake (limited to 'indra/cmake') diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index 834da6d9b8..09501e0406 100755 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -14,8 +14,10 @@ else (STANDALONE) set(TCMALLOC_LIBRARIES debug libtcmalloc_minimal-debug optimized libtcmalloc_minimal) + set(TCMALLOC_LINK_FLAGS "/INCLUDE:__tcmalloc") else (USE_TCMALLOC) set(TCMALLOC_LIBRARIES) + set(TCMALLOC_LINK_FLAGS) endif (USE_TCMALLOC) set(GOOGLE_PERFTOOLS_FOUND "YES") endif (WINDOWS) @@ -44,13 +46,13 @@ if (WINDOWS) set(USE_GOOGLE_PERFTOOLS ON) endif (WINDOWS) -# Apparently buggy - LL_USE_TCMALLOC never gets set. Fix when we have time to test the -# corresponding source code. -if (USE_TCMALLOC) - set(TCMALLOC_FLAG -ULL_USE_TCMALLOC) # was -ULL_USE_TCMALLOC=1 which makes no sense. -else (USE_TCMALLOC) - set(TCMALLOC_FLAG -ULL_USE_TCMALLOC) -endif (USE_TCMALLOC) +if (USE_GOOGLE_PERFTOOLS) + if (USE_TCMALLOC) + set(TCMALLOC_FLAG -DLL_USE_TCMALLOC=1) + else (USE_TCMALLOC) + set(TCMALLOC_FLAG -ULL_USE_TCMALLOC) + endif (USE_TCMALLOC) +endif (USE_GOOGLE_PERFTOOLS) if (USE_GOOGLE_PERFTOOLS) include_directories(${GOOGLE_PERFTOOLS_INCLUDE_DIR}) diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake old mode 100644 new mode 100755 index 08feab6e36..a6f69a09e9 --- a/indra/cmake/LLAddBuildTest.cmake +++ b/indra/cmake/LLAddBuildTest.cmake @@ -205,6 +205,15 @@ FUNCTION(LL_ADD_INTEGRATION_TEST SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}") endif(STANDALONE) + if (WINDOWS) + SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} + PROPERTIES + LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS}" + LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO" + LINK_FLAGS_RELEASE "" + ) + endif (WINDOWS) + # Add link deps to the executable if(TEST_DEBUG) message(STATUS "TARGET_LINK_LIBRARIES(INTEGRATION_TEST_${testname} ${libraries})") -- cgit v1.2.3 From c0fffdea8812e5eed8da9f341d3bfc9590301ada Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 12 Jan 2012 16:11:06 -0500 Subject: SH-2789 WIP --- indra/cmake/GooglePerfTools.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index 09501e0406..73b3642ae6 100755 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -3,7 +3,7 @@ include(Prebuilt) # If you want to enable or disable TCMALLOC in viewer builds, this is the place. # set ON or OFF as desired. -set (USE_TCMALLOC ON) +set (USE_TCMALLOC OFF) if (STANDALONE) include(FindGooglePerfTools) -- cgit v1.2.3 From e0f919711034ee4a112ae4b583486693bc104a7b Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Wed, 25 Jan 2012 14:58:47 -0500 Subject: Fix for build failures when tcmalloc disabled --- indra/cmake/Copy3rdPartyLibs.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 394db362b1..8e5d901779 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -55,10 +55,10 @@ if(WINDOWS) glod.dll ) - if(USE_GOOGLE_PERFTOOLS) + if(USE_TCMALLOC) set(debug_files ${debug_files} libtcmalloc_minimal-debug.dll) set(release_files ${release_files} libtcmalloc_minimal.dll) - endif(USE_GOOGLE_PERFTOOLS) + endif(USE_TCMALLOC) if (FMOD) set(debug_files ${debug_files} fmod.dll) -- cgit v1.2.3 From 16b6595fa75047c6c53ee11a6c3004e99ae0937d Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Thu, 26 Jan 2012 13:38:11 -0500 Subject: trying to fix linux build error --- indra/cmake/Copy3rdPartyLibs.cmake | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/Copy3rdPartyLibs.cmake b/indra/cmake/Copy3rdPartyLibs.cmake index 8e5d901779..966300f1c7 100644 --- a/indra/cmake/Copy3rdPartyLibs.cmake +++ b/indra/cmake/Copy3rdPartyLibs.cmake @@ -268,13 +268,16 @@ elseif(LINUX) libopenal.so libopenjpeg.so libssl.so - libtcmalloc_minimal.so libuuid.so.16 libuuid.so.16.0.22 libssl.so.1.0.0 libfontconfig.so.1.4.4 ) + if (USE_TCMALLOC) + set(release_files ${release_files} "libtcmalloc_minimal.so") + endif (USE_TCMALLOC) + if (FMOD) set(release_files ${release_files} "libfmod-3.75.so") endif (FMOD) -- cgit v1.2.3 From b13fe12fb950f714a2e2fd97708a3baef39ef285 Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 3 Feb 2012 14:10:51 -0500 Subject: tcmalloc on by default --- indra/cmake/GooglePerfTools.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/cmake') diff --git a/indra/cmake/GooglePerfTools.cmake b/indra/cmake/GooglePerfTools.cmake index 73b3642ae6..09501e0406 100755 --- a/indra/cmake/GooglePerfTools.cmake +++ b/indra/cmake/GooglePerfTools.cmake @@ -3,7 +3,7 @@ include(Prebuilt) # If you want to enable or disable TCMALLOC in viewer builds, this is the place. # set ON or OFF as desired. -set (USE_TCMALLOC OFF) +set (USE_TCMALLOC ON) if (STANDALONE) include(FindGooglePerfTools) -- cgit v1.2.3 From ad745867ed820c39718de9519b15f25a5526ae37 Mon Sep 17 00:00:00 2001 From: Dave Parks Date: Fri, 8 Jun 2012 14:19:36 -0500 Subject: MAINT-646 Enable /fp:fast in Visual Studio --- indra/cmake/00-Common.cmake | 1 + 1 file changed, 1 insertion(+) (limited to 'indra/cmake') diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 98eeed09b3..00baf626d2 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -69,6 +69,7 @@ if (WINDOWS) /Oy- /Zc:wchar_t- /arch:SSE2 + /fp:fast ) # Are we using the crummy Visual Studio KDU build workaround? -- cgit v1.2.3