diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake
index 00baf626d20a86f37ffcbf0ec902f675eda24156..21cb87237ddf312ecd31ca2ff0ee36945c58ee37 100644
--- a/indra/cmake/00-Common.cmake
+++ b/indra/cmake/00-Common.cmake
@@ -51,6 +51,7 @@ if (WINDOWS)
   set(CMAKE_CXX_FLAGS_RELEASE
       "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD /MP /Ob2 -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
       CACHE STRING "C++ compiler release options" FORCE)
+  set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} /LARGEADDRESSAWARE")
 
   set(CMAKE_CXX_STANDARD_LIBRARIES "")
   set(CMAKE_C_STANDARD_LIBRARIES "")
@@ -206,6 +207,10 @@ if (DARWIN)
   # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
   set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
   set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
+  if (XCODE_VERSION GREATER 4.2)
+    set(ENABLE_SIGNING TRUE)
+    set(SIGNING_IDENTITY "Developer ID Application: Linden Research, Inc.")
+  endif (XCODE_VERSION GREATER 4.2)
 endif (DARWIN)
 
 
diff --git a/indra/cmake/LLAddBuildTest.cmake b/indra/cmake/LLAddBuildTest.cmake
index a6f69a09e9300daeecca1065f5166dcf8a87d826..543075db5bee22d520950149d38bb5982eb07ce1 100644
--- a/indra/cmake/LLAddBuildTest.cmake
+++ b/indra/cmake/LLAddBuildTest.cmake
@@ -201,6 +201,15 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
   endif(TEST_DEBUG)
   ADD_EXECUTABLE(INTEGRATION_TEST_${testname} ${source_files})
   SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}")
+  if (WINDOWS)
+    set_target_properties(INTEGRATION_TEST_${testname}
+      PROPERTIES 
+      LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /INCLUDE:__tcmalloc"
+      LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
+      LINK_FLAGS_RELEASE ""
+      )
+  endif(WINDOWS)
+
   if(STANDALONE)
     SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname} PROPERTIES COMPILE_FLAGS -I"${TUT_INCLUDE_DIR}")
   endif(STANDALONE)
diff --git a/indra/cmake/LLCommon.cmake b/indra/cmake/LLCommon.cmake
index 17e211cb9937eb8e5544423e1c3ddb03a675fabc..8f7bb296cec0617ae4b7d297eba1ac16c019c441 100644
--- a/indra/cmake/LLCommon.cmake
+++ b/indra/cmake/LLCommon.cmake
@@ -24,7 +24,7 @@ endif (LINUX)
 
 add_definitions(${TCMALLOC_FLAG})
 
-set(LLCOMMON_LINK_SHARED ON CACHE BOOL "Build the llcommon target as a shared library.")
+set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a static library.")
 if(LLCOMMON_LINK_SHARED)
   add_definitions(-DLL_COMMON_LINK_SHARED=1)
 endif(LLCOMMON_LINK_SHARED)
diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake
index 56ced20abf68c32cd4a56fa1df22e3f4343fce87..4b459f1a486195758e3caf1a4f9917c7ef66e276 100644
--- a/indra/cmake/Variables.cmake
+++ b/indra/cmake/Variables.cmake
@@ -99,10 +99,20 @@ endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
 if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
   set(DARWIN 1)
   
+  execute_process(
+    COMMAND sh -c "xcodebuild -version | grep Xcode  | cut -d ' ' -f2 | cut -d'.' -f1-2"
+    OUTPUT_VARIABLE XCODE_VERSION )
+
   # To support a different SDK update these Xcode settings:
-  set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
+  if (XCODE_VERSION GREATER 4.2)
+    set(CMAKE_OSX_DEPLOYMENT_TARGET 10.6)
+  else (XCODE_VERSION GREATER 4.2)
+    set(CMAKE_OSX_DEPLOYMENT_TARGET 10.5)
+  endif (XCODE_VERSION GREATER 4.2)
+
   set(CMAKE_OSX_SYSROOT macosx10.6)
   set(CMAKE_XCODE_ATTRIBUTE_GCC_VERSION "com.apple.compilers.llvmgcc42")
+      
   set(CMAKE_XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT dwarf-with-dsym)
 
   # NOTE: To attempt an i386/PPC Universal build, add this on the configure line:
@@ -134,6 +144,11 @@ set(VIEWER ON CACHE BOOL "Build Second Life viewer.")
 set(VIEWER_CHANNEL "LindenDeveloper" CACHE STRING "Viewer Channel Name")
 set(VIEWER_LOGIN_CHANNEL ${VIEWER_CHANNEL} CACHE STRING "Fake login channel for A/B Testing")
 
+if (XCODE_VERSION GREATER 4.2)
+  set(ENABLE_SIGNING OFF CACHE BOOL "Enable signing the viewer")
+  set(SIGNING_IDENTITY "" CACHE STRING "Specifies the signing identity to use, if necessary.")
+endif (XCODE_VERSION GREATER 4.2)
+
 set(VERSION_BUILD "0" CACHE STRING "Revision number passed in from the outside")
 set(STANDALONE OFF CACHE BOOL "Do not use Linden-supplied prebuilt libraries.")
 set(UNATTENDED OFF CACHE BOOL "Should be set to ON for building with VC Express editions.")
diff --git a/indra/llcorehttp/CMakeLists.txt b/indra/llcorehttp/CMakeLists.txt
index f3df9bb94f2d09a2e9b9d41dbb729e05f7ae73be..8632a2b72234d4e435fe2b6b4b3caee8aefa866b 100644
--- a/indra/llcorehttp/CMakeLists.txt
+++ b/indra/llcorehttp/CMakeLists.txt
@@ -164,7 +164,19 @@ if (LL_TESTS)
                  ${llcorehttp_EXAMPLE_SOURCE_FILES}
                  )
   set_target_properties(http_texture_load
-                        PROPERTIES RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}")
+                        PROPERTIES
+                        RUNTIME_OUTPUT_DIRECTORY "${EXE_STAGING_DIR}"
+                        )
+
+  if (WINDOWS)
+    # The following come from LLAddBuildTest.cmake's INTEGRATION_TEST_xxxx target.
+    set_target_properties(http_texture_load
+                          PROPERTIES
+                          LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS /INCLUDE:__tcmalloc"
+                          LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
+                          LINK_FLAGS_RELEASE ""
+                          )
+  endif (WINDOWS)
 
   target_link_libraries(http_texture_load ${example_libs})
 
diff --git a/indra/llcorehttp/tests/test_httprequest.hpp b/indra/llcorehttp/tests/test_httprequest.hpp
index ec144693c36894d40924461824eb0f94fffa1a45..e5488cf941e7a8b7c0892965aa6664d596a44edf 100644
--- a/indra/llcorehttp/tests/test_httprequest.hpp
+++ b/indra/llcorehttp/tests/test_httprequest.hpp
@@ -697,10 +697,9 @@ void HttpRequestTestObjectType::test<7>()
 	
 		ensure("Two handler calls on the way out", 2 == mHandlerCalls);
 
-#if defined(WIN32)
-		// Can only do this memory test on Windows.  On other platforms,
-		// the LL logging system holds on to memory and produces what looks
-		// like memory leaks...
+#if 0 // defined(WIN32)
+		// Can't do this on any platform anymore, the LL logging system holds
+		// on to memory and produces what looks like memory leaks...
 	
 		// printf("Old mem:  %d, New mem:  %d\n", mMemTotal, GetMemTotal());
 		ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal());
@@ -1036,10 +1035,9 @@ void HttpRequestTestObjectType::test<10>()
 	
 		ensure("Two handler calls on the way out", 2 == mHandlerCalls);
 
-#if defined(WIN32)
-		// Can only do this memory test on Windows.  On other platforms,
-		// the LL logging system holds on to memory and produces what looks
-		// like memory leaks...
+#if 0 // defined(WIN32)
+		// Can't do this on any platform anymore, the LL logging system holds
+		// on to memory and produces what looks like memory leaks...
 	
 		// printf("Old mem:  %d, New mem:  %d\n", mMemTotal, GetMemTotal());
 		ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal());
@@ -1271,10 +1269,9 @@ void HttpRequestTestObjectType::test<12>()
 	
 		ensure("Two handler calls on the way out", 2 == mHandlerCalls);
 
-#if defined(WIN32)
-		// Can only do this memory test on Windows.  On other platforms,
-		// the LL logging system holds on to memory and produces what looks
-		// like memory leaks...
+#if 0	// defined(WIN32)
+		// Can't do this on any platform anymore, the LL logging system holds
+		// on to memory and produces what looks like memory leaks...
 	
 		// printf("Old mem:  %d, New mem:  %d\n", mMemTotal, GetMemTotal());
 		ensure("Memory usage back to that at entry", mMemTotal == GetMemTotal());