aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra
diff options
context:
space:
mode:
authorMcCabe Maxsted2011-07-13 19:22:52 -0700
committerMcCabe Maxsted2011-09-08 16:33:50 -0700
commitdffdf95bbfa5b071063a43281a330e741cf60e8c (patch)
treeb173172c0b9844aac9cb63f2804e1f1729bc86f5 /linden/indra
parentAdded basic copying of symbol files when the windows package project is run. ... (diff)
downloadmeta-impy-dffdf95bbfa5b071063a43281a330e741cf60e8c.zip
meta-impy-dffdf95bbfa5b071063a43281a330e741cf60e8c.tar.gz
meta-impy-dffdf95bbfa5b071063a43281a330e741cf60e8c.tar.bz2
meta-impy-dffdf95bbfa5b071063a43281a330e741cf60e8c.tar.xz
Ported SSE2 build target from Singularity, patch by Shyotl. Note that the package project still currently only supports 'Release'
Diffstat (limited to 'linden/indra')
-rw-r--r--linden/indra/CMakeLists.txt2
-rw-r--r--linden/indra/cmake/00-Common.cmake41
-rw-r--r--linden/indra/cmake/CopyWinLibs.cmake94
-rwxr-xr-xlinden/indra/develop.py5
4 files changed, 115 insertions, 27 deletions
diff --git a/linden/indra/CMakeLists.txt b/linden/indra/CMakeLists.txt
index 64e0079..ae1ca5f 100644
--- a/linden/indra/CMakeLists.txt
+++ b/linden/indra/CMakeLists.txt
@@ -26,7 +26,7 @@ endif (DARWIN)
26 26
27if (NOT CMAKE_BUILD_TYPE) 27if (NOT CMAKE_BUILD_TYPE)
28 set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING 28 set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING
29 "Build type. One of: Debug Release RelWithDebInfo" FORCE) 29 "Build type. One of: Debug Release ReleaseSSE2 RelWithDebInfo" FORCE)
30endif (NOT CMAKE_BUILD_TYPE) 30endif (NOT CMAKE_BUILD_TYPE)
31 31
32# For the library installation process; 32# For the library installation process;
diff --git a/linden/indra/cmake/00-Common.cmake b/linden/indra/cmake/00-Common.cmake
index 1a24a41..7d50f25 100644
--- a/linden/indra/cmake/00-Common.cmake
+++ b/linden/indra/cmake/00-Common.cmake
@@ -1,6 +1,6 @@
1# -*- cmake -*- 1# -*- cmake -*-
2# 2#
3# Compilation options shared by all Second Life components. 3# Compilation options shared by all viewer components.
4 4
5include(Variables) 5include(Variables)
6 6
@@ -10,6 +10,8 @@ include(Variables)
10set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1") 10set(CMAKE_CXX_FLAGS_DEBUG "-D_DEBUG -DLL_DEBUG=1")
11set(CMAKE_CXX_FLAGS_RELEASE 11set(CMAKE_CXX_FLAGS_RELEASE
12 "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=1 -DNDEBUG") 12 "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=1 -DNDEBUG")
13set(CMAKE_CXX_FLAGS_RELEASESSE2
14 "-DLL_RELEASE=1 -DLL_RELEASE_FOR_DOWNLOAD=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=1 -DNDEBUG")
13set(CMAKE_CXX_FLAGS_RELWITHDEBINFO 15set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
14 "-DLL_RELEASE=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1") 16 "-DLL_RELEASE=1 -D_SECURE_SCL=0 -DLL_SEND_CRASH_REPORTS=0 -DNDEBUG -DLL_RELEASE_WITH_DEBUG_INFO=1")
15 17
@@ -17,7 +19,7 @@ set(CMAKE_CXX_FLAGS_RELWITHDEBINFO
17# Available build types / configurations. 19# Available build types / configurations.
18# Add our current build type first, to coax Xcode into selecting it by default. 20# Add our current build type first, to coax Xcode into selecting it by default.
19 21
20set(TYPES ${CMAKE_BUILD_TYPE} RelWithDebInfo Release Debug) 22set(TYPES ${CMAKE_BUILD_TYPE} RelWithDebInfo Release ReleaseSSE2 Debug)
21list(REMOVE_DUPLICATES TYPES) 23list(REMOVE_DUPLICATES TYPES)
22set(CMAKE_CONFIGURATION_TYPES ${TYPES} CACHE STRING "Supported build types." FORCE) 24set(CMAKE_CONFIGURATION_TYPES ${TYPES} CACHE STRING "Supported build types." FORCE)
23unset(TYPES) 25unset(TYPES)
@@ -44,12 +46,18 @@ if (WINDOWS)
44 CACHE STRING "C++ compiler release-with-debug options" FORCE) 46 CACHE STRING "C++ compiler release-with-debug options" FORCE)
45 if (MSVC80) 47 if (MSVC80)
46 set(CMAKE_CXX_FLAGS_RELEASE 48 set(CMAKE_CXX_FLAGS_RELEASE
47 "${CMAKE_CXX_FLAGS_RELEASE} /O2 /Ob2 /Oi /Ot /GT /Zi /MD" 49 "${CMAKE_CXX_FLAGS_RELEASE} /O2 /Ob2 /Oi /Ot /GT /Zi /MD"
48 CACHE STRING "C++ compiler release options" FORCE) 50 CACHE STRING "C++ compiler release options" FORCE)
51 set(CMAKE_CXX_FLAGS_RELEASESSE2
52 "${CMAKE_CXX_FLAGS_RELEASESSE2} /O2 /Ob2 /Oi /Ot /GT /Zi /MD /arch:SSE2"
53 CACHE STRING "C++ compiler release (SSE2 optimized) options" FORCE)
49 else (MSVC80) 54 else (MSVC80)
50 set(CMAKE_CXX_FLAGS_RELEASE 55 set(CMAKE_CXX_FLAGS_RELEASE
51 "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD" 56 "${CMAKE_CXX_FLAGS_RELEASE} ${LL_CXX_FLAGS} /O2 /Zi /MD"
52 CACHE STRING "C++ compiler release options" FORCE) 57 CACHE STRING "C++ compiler release options" FORCE)
58 set(CMAKE_CXX_FLAGS_RELEASESSE2
59 "${CMAKE_CXX_FLAGS_RELEASESSE2} ${LL_CXX_FLAGS} /O2 /Zi /MD /arch:SSE2"
60 CACHE STRING "C++ compiler release (SSE2 optimized) options" FORCE)
53 endif (MSVC80) 61 endif (MSVC80)
54 62
55 set(CMAKE_CXX_STANDARD_LIBRARIES "") 63 set(CMAKE_CXX_STANDARD_LIBRARIES "")
@@ -73,6 +81,9 @@ if (WINDOWS)
73 set(CMAKE_CXX_FLAGS_RELEASE 81 set(CMAKE_CXX_FLAGS_RELEASE
74 "${CMAKE_CXX_FLAGS_RELEASE} -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0" 82 "${CMAKE_CXX_FLAGS_RELEASE} -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
75 CACHE STRING "C++ compiler release options" FORCE) 83 CACHE STRING "C++ compiler release options" FORCE)
84 set(CMAKE_CXX_FLAGS_RELEASESSE2
85 "${CMAKE_CXX_FLAGS_RELEASESSE2} -D_SECURE_STL=0 -D_HAS_ITERATOR_DEBUGGING=0"
86 CACHE STRING "C++ compiler release (SSE2 optimized) options" FORCE)
76 87
77 add_definitions( 88 add_definitions(
78 /Zc:wchar_t- 89 /Zc:wchar_t-
@@ -186,10 +197,12 @@ if (LINUX)
186 add_definitions(-DLINUX64=1 -pipe) 197 add_definitions(-DLINUX64=1 -pipe)
187 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fomit-frame-pointer -mmmx -msse -mfpmath=sse -msse2 -ffast-math -ftree-vectorize -fweb -fexpensive-optimizations -frename-registers") 198 set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -fomit-frame-pointer -mmmx -msse -mfpmath=sse -msse2 -ffast-math -ftree-vectorize -fweb -fexpensive-optimizations -frename-registers")
188 endif (${ARCH} STREQUAL "x86_64") 199 endif (${ARCH} STREQUAL "x86_64")
200 set(CMAKE_CXX_FLAGS_RELEASESSE2 "${CMAKE_CXX_FLAGS_RELEASESSE2} -mfpmath=sse2 -msse2")
189 endif (VIEWER) 201 endif (VIEWER)
190 202
191 set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}") 203 set(CMAKE_CXX_FLAGS_DEBUG "-fno-inline ${CMAKE_CXX_FLAGS_DEBUG}")
192 set(CMAKE_CXX_FLAGS_RELEASE "-O2 ${CMAKE_CXX_FLAGS_RELEASE}") 204 set(CMAKE_CXX_FLAGS_RELEASE "-O2 ${CMAKE_CXX_FLAGS_RELEASE}")
205 set(CMAKE_CXX_FLAGS_RELEASESSE2 "-O2 ${CMAKE_CXX_FLAGS_RELEASESSE2}")
193endif (LINUX) 206endif (LINUX)
194 207
195 208
@@ -203,6 +216,8 @@ if (DARWIN)
203 # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered. 216 # NOTE: it's critical to have both CXX_FLAGS and C_FLAGS covered.
204 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}") 217 set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_CXX_FLAGS_RELWITHDEBINFO}")
205 set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_C_FLAGS_RELWITHDEBINFO}") 218 set(CMAKE_C_FLAGS_RELWITHDEBINFO "-O0 ${CMAKE_C_FLAGS_RELWITHDEBINFO}")
219 set(CMAKE_CXX_FLAGS_RELEASESSE2 "-msse2 -mfpmath=sse ${CMAKE_CXX_FLAGS_RELEASESSE2}")
220 set(CMAKE_C_FLAGS_RELEASESSE2 "-msse2 -mfpmath=sse ${CMAKE_C_FLAGS_RELEASESSE2}")
206endif (DARWIN) 221endif (DARWIN)
207 222
208 223
@@ -255,3 +270,17 @@ endif (STANDALONE)
255if(SERVER) 270if(SERVER)
256 include_directories(${LIBS_PREBUILT_DIR}/include/havok) 271 include_directories(${LIBS_PREBUILT_DIR}/include/havok)
257endif(SERVER) 272endif(SERVER)
273
274SET(CMAKE_EXE_LINKER_FLAGS_RELEASESSE2
275 "${CMAKE_EXE_LINKER_FLAGS_RELEASE}" CACHE STRING
276 "Flags used for linking binaries under SSE2 optimized build."
277 FORCE )
278SET(CMAKE_SHARED_LINKER_FLAGS_RELEASESSE2
279 "${CMAKE_SHARED_LINKER_FLAGS_RELEASE}" CACHE STRING
280 "Flags used by the shared libraries linker under SSE2 optimized build."
281 FORCE )
282MARK_AS_ADVANCED(
283 CMAKE_CXX_FLAGS_RELEASESSE2
284 CMAKE_C_FLAGS_RELEASESSE2
285 CMAKE_EXE_LINKER_FLAGS_RELEASESSE2
286 CMAKE_SHARED_LINKER_FLAGS_RELEASESSE2 )
diff --git a/linden/indra/cmake/CopyWinLibs.cmake b/linden/indra/cmake/CopyWinLibs.cmake
index 78c7c96..e03f542 100644
--- a/linden/indra/cmake/CopyWinLibs.cmake
+++ b/linden/indra/cmake/CopyWinLibs.cmake
@@ -177,6 +177,15 @@ copy_if_different(
177 ) 177 )
178set(all_targets ${all_targets} ${out_targets}) 178set(all_targets ${all_targets} ${out_targets})
179 179
180
181 copy_if_different(
182 ${plugintest_release_src_dir}
183 "${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/ReleaseSSE2"
184 out_targets
185 ${plugintest_release_files}
186 )
187set(all_targets ${all_targets} ${out_targets})
188
180# Release & ReleaseDebInfo config runtime files required for the plugin test mule (Qt image format plugins) 189# Release & ReleaseDebInfo config runtime files required for the plugin test mule (Qt image format plugins)
181set(plugintest_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release/imageformats") 190set(plugintest_release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release/imageformats")
182set(plugintest_release_files 191set(plugintest_release_files
@@ -205,6 +214,14 @@ set(all_targets ${all_targets} ${out_targets})
205 214
206copy_if_different( 215copy_if_different(
207 ${plugintest_release_src_dir} 216 ${plugintest_release_src_dir}
217 "${CMAKE_CURRENT_BINARY_DIR}/../test_apps/llplugintest/ReleaseSSE2/imageformats"
218 out_targets
219 ${plugintest_release_files}
220 )
221set(all_targets ${all_targets} ${out_targets})
222
223copy_if_different(
224 ${plugintest_release_src_dir}
208 "${CMAKE_CURRENT_BINARY_DIR}/Release/llplugin/imageformats" 225 "${CMAKE_CURRENT_BINARY_DIR}/Release/llplugin/imageformats"
209 out_targets 226 out_targets
210 ${plugintest_release_files} 227 ${plugintest_release_files}
@@ -219,6 +236,14 @@ copy_if_different(
219 ) 236 )
220set(all_targets ${all_targets} ${out_targets}) 237set(all_targets ${all_targets} ${out_targets})
221 238
239copy_if_different(
240 ${plugintest_release_src_dir}
241 "${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2/llplugin/imageformats"
242 out_targets
243 ${plugintest_release_files}
244 )
245set(all_targets ${all_targets} ${out_targets})
246
222# Debug config runtime files required for the plugins 247# Debug config runtime files required for the plugins
223set(plugins_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug") 248set(plugins_debug_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/debug")
224set(plugins_debug_files 249set(plugins_debug_files
@@ -267,6 +292,14 @@ copy_if_different(
267 ) 292 )
268set(all_targets ${all_targets} ${out_targets}) 293set(all_targets ${all_targets} ${out_targets})
269 294
295copy_if_different(
296 ${plugins_release_src_dir}
297 "${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2/llplugin"
298 out_targets
299 ${plugins_release_files}
300 )
301set(all_targets ${all_targets} ${out_targets})
302
270set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release") 303set(release_src_dir "${CMAKE_SOURCE_DIR}/../libraries/i686-win32/lib/release")
271set(release_files 304set(release_files
272 alut.dll 305 alut.dll
@@ -364,14 +397,15 @@ copy_if_different(
364set(all_targets ${all_targets} ${out_targets}) 397set(all_targets ${all_targets} ${out_targets})
365 398
366copy_if_different( 399copy_if_different(
367 ${vivox_src_dir} 400 ${release_src_dir}
368 "${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo" 401 "${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2"
369 out_targets 402 out_targets
370 ${vivox_files} 403 ${release_files}
371 ) 404 )
372set(all_targets ${all_targets} ${out_targets}) 405set(all_targets ${all_targets} ${out_targets})
373 406
374 407
408
375# Copy MS C runtime dlls, required for packaging. 409# Copy MS C runtime dlls, required for packaging.
376# We always need the VS 2005 redist. 410# We always need the VS 2005 redist.
377# *TODO - Adapt this to support VC9 411# *TODO - Adapt this to support VC9
@@ -442,6 +476,14 @@ if(EXISTS ${release_msvc8_redist_path})
442 ) 476 )
443 set(all_targets ${all_targets} ${out_targets}) 477 set(all_targets ${all_targets} ${out_targets})
444 478
479 copy_if_different(
480 ${release_msvc8_redist_path}
481 "${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2"
482 out_targets
483 ${release_msvc8_files}
484 )
485 set(all_targets ${all_targets} ${out_targets})
486
445 set(release_appconfig_file ${CMAKE_CURRENT_BINARY_DIR}/Release/${VIEWER_BINARY_NAME}.exe.config) 487 set(release_appconfig_file ${CMAKE_CURRENT_BINARY_DIR}/Release/${VIEWER_BINARY_NAME}.exe.config)
446 add_custom_command( 488 add_custom_command(
447 OUTPUT ${release_appconfig_file} 489 OUTPUT ${release_appconfig_file}
@@ -455,25 +497,41 @@ if(EXISTS ${release_msvc8_redist_path})
455 COMMENT "Creating release app config file" 497 COMMENT "Creating release app config file"
456 ) 498 )
457 499
458 set(relwithdebinfo_appconfig_file ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/${VIEWER_BINARY_NAME}.exe.config) 500
459 add_custom_command( 501 set(releasesse2_appconfig_file ${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2/${VIEWER_BINARY_NAME}.exe.config)
460 OUTPUT ${relwithdebinfo_appconfig_file} 502 add_custom_command(
461 COMMAND ${PYTHON_EXECUTABLE} 503 OUTPUT ${releasesse2_appconfig_file}
462 ARGS 504 COMMAND ${PYTHON_EXECUTABLE}
463 ${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py 505 ARGS
464 ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/Microsoft.VC80.CRT.manifest 506 ${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
465 ${CMAKE_CURRENT_SOURCE_DIR}/Imprudence.exe.config 507 ${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2/Microsoft.VC80.CRT.manifest
466 ${relwithdebinfo_appconfig_file} 508 ${CMAKE_CURRENT_SOURCE_DIR}/Imprudence.exe.config
467 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/Microsoft.VC80.CRT.manifest 509 ${releasesse2_appconfig_file}
468 COMMENT "Creating relwithdebinfo app config file" 510 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/ReleaseSSE2/Microsoft.VC80.CRT.manifest
469 ) 511 COMMENT "Creating release (SSE2 optimized) app config file"
470 512 )
471endif (EXISTS ${release_msvc8_redist_path}) 513
514 set(relwithdebinfo_appconfig_file ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/${VIEWER_BINARY_NAME}.exe.config)
515 add_custom_command(
516 OUTPUT ${relwithdebinfo_appconfig_file}
517 COMMAND ${PYTHON_EXECUTABLE}
518 ARGS
519 ${CMAKE_CURRENT_SOURCE_DIR}/build_win32_appConfig.py
520 ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/Microsoft.VC80.CRT.manifest
521 ${CMAKE_CURRENT_SOURCE_DIR}/Imprudence.exe.config
522 ${relwithdebinfo_appconfig_file}
523 DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/RelWithDebInfo/Microsoft.VC80.CRT.manifest
524 COMMENT "Creating relwithdebinfo app config file"
525 )
526
527 endif (EXISTS ${release_msvc8_redist_path})
528endif (MSVC80)
472 529
473add_custom_target(copy_win_libs ALL 530add_custom_target(copy_win_libs ALL
474 DEPENDS 531 DEPENDS
475 ${all_targets} 532 ${all_targets}
476 ${release_appconfig_file} 533 ${release_appconfig_file}
534 ${releasesse2_appconfig_file}
477 ${relwithdebinfo_appconfig_file} 535 ${relwithdebinfo_appconfig_file}
478 ${debug_appconfig_file} 536 ${debug_appconfig_file}
479 ) 537 )
diff --git a/linden/indra/develop.py b/linden/indra/develop.py
index 094ce3b..69542da 100755
--- a/linden/indra/develop.py
+++ b/linden/indra/develop.py
@@ -70,7 +70,7 @@ def quote(opts):
70class PlatformSetup(object): 70class PlatformSetup(object):
71 generator = None 71 generator = None
72 build_types = {} 72 build_types = {}
73 for t in ('Debug', 'Release', 'RelWithDebInfo'): 73 for t in ('Debug', 'Release', 'ReleaseSSE2', 'RelWithDebInfo'):
74 build_types[t.lower()] = t 74 build_types[t.lower()] = t
75 75
76 build_type = build_types['relwithdebinfo'] 76 build_type = build_types['relwithdebinfo']
@@ -698,7 +698,8 @@ Options:
698 --unattended build unattended, do not invoke any tools requiring 698 --unattended build unattended, do not invoke any tools requiring
699 a human response 699 a human response
700 --universal build a universal binary on Mac OS X (unsupported) 700 --universal build a universal binary on Mac OS X (unsupported)
701 -t | --type=NAME build type ("Debug", "Release", or "RelWithDebInfo") 701 -t | --type=NAME build type ("Debug", "Release", "ReleaseSSE2", or "RelWithDebInfo")
702 -m32 | -m64 build architecture (32-bit or 64-bit)
702 -N | --no-distcc disable use of distcc 703 -N | --no-distcc disable use of distcc
703 -G | --generator=NAME generator name 704 -G | --generator=NAME generator name
704 Windows: VC71 or VS2003 (default), VC80 (VS2005) or 705 Windows: VC71 or VS2003 (default), VC80 (VS2005) or