From f611c05355cf0c16829bd83ada57e64d324ed450 Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 22 Apr 2016 12:57:11 +0200 Subject: Add windows64 config. (transplanted from 96ec064688376d0f4bfbabcfe8d478227403b630) --- autobuild.xml | 188 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) diff --git a/autobuild.xml b/autobuild.xml index 34ea70cb11..9c2e1dffd1 100755 --- a/autobuild.xml +++ b/autobuild.xml @@ -3702,6 +3702,194 @@ name windows + windows64 + + build_directory + build-vc120_x64 + configurations + + RelWithDebInfo + + build + + arguments + + SecondLife.sln + + command + devenv + options + + /build + "RelWithDebInfo|x64" + + + configure + + arguments + + ..\indra + && + ..\indra\tools\vstool\VSTool.exe + --solution + SecondLife.sln + --config + RelWithDebInfo + --startup + secondlife-bin + + options + + -G + "Visual Studio 12 Win64" + -DLL_64BIT_BUILD=TRUE + + + default + True + name + RelWithDebInfo + + RelWithDebInfoOS + + build + + arguments + + SecondLife.sln + + command + msbuild.exe + options + + /p:Configuration=RelWithDebInfo + /p:Platform=x64 + /t:Build + /p:useenv=true + /verbosity:minimal + /toolsversion:4.0 + /p:"VCBuildAdditionalOptions= /incremental" + + + configure + + arguments + + ..\indra + && + ..\indra\tools\vstool\VSTool.exe + --solution + SecondLife.sln + --config + RelWithDebInfo + --startup + secondlife-bin + + options + + -G + "Visual Studio 12 Win64" + -DUNATTENDED:BOOL=ON + -DINSTALL_PROPRIETARY=FALSE + -DUSE_KDU=FALSE + -DLL_64BIT_BUILD=TRUE + + + name + RelWithDebInfoOS + + Release + + build + + arguments + + SecondLife.sln + + command + devenv + options + + /build + "Release|x64" + + + configure + + arguments + + ..\indra + && + ..\indra\tools\vstool\VSTool.exe + --solution + SecondLife.sln + --config + Release + --startup + secondlife-bin + + options + + -G + "Visual Studio 12 Win64" + -DLL_64BIT_BUILD=TRUE + + + name + Release + + ReleaseOS + + build + + arguments + + SecondLife.sln + + command + msbuild.exe + options + + /p:Configuration=Release + /p:Platform=x64 + /t:Build + /p:useenv=true + /verbosity:minimal + /toolsversion:4.0 + /p:"VCBuildAdditionalOptions= /incremental" + + + configure + + arguments + + ..\indra + && + ..\indra\tools\vstool\VSTool.exe + --solution + SecondLife.sln + --config + Release + --startup + secondlife-bin + + options + + -G + "Visual Studio 12 Win64" + -DUNATTENDED:BOOL=ON + -DINSTALL_PROPRIETARY=FALSE + -DUSE_KDU=FALSE + -DLL_64BIT_BUILD=TRUE + + + name + ReleaseOS + + + name + windows + version_file newview/viewer_version.txt -- cgit v1.2.3 From d75a6ecbe533fb115d8130122df710790ba9610b Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 22 Apr 2016 12:58:20 +0200 Subject: Windows x64: Disable warning 4267 (it causes too much noise) and do not enable /arch:SSE2 (x64 implies SSE2 and setting the flag causes warnings). (transplanted from 5a7cc3874065b13a83b8c7aa044fb07f38edd283) --- indra/cmake/00-Common.cmake | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 86fc2dfff5..84d70bd7b1 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -74,9 +74,18 @@ if (WINDOWS) /nologo /Oy- /Zc:wchar_t- - /arch:SSE2 +# /arch:SSE2 /fp:fast ) + + # Nicky: x64 implies SSE2 + if( NOT LL_64BIT_BUILD ) + add_definitions( /arch:SSE2 ) + else() + # Otherwise disable 4267 ('var' : conversion from 'size_t' to 'type', possible loss of data) + # This warning alas is all over the place and fixing it will touch a lot of code. + add_definitions("/wd4267 /DLL_64BIT_BUILD" ) + endif() # Are we using the crummy Visual Studio KDU build workaround? if (NOT VS_DISABLE_FATAL_WARNINGS) -- cgit v1.2.3 From 056f0983029000041555ca53c61cbe5e8689cae9 Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 22 Apr 2016 12:58:51 +0200 Subject: Windows x64: Cannot use inline assembly. (transplanted from ee32840fc591f5529a0b544243e7b4146eb8f531) --- indra/llcommon/llfasttimer.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index f56e5596f5..0336f9d0e9 100644 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -91,6 +91,7 @@ public: static U32 getCPUClockCount32() { U32 ret_val; +#if !defined(_M_AMD64) __asm { _emit 0x0f @@ -100,6 +101,11 @@ public: or eax, edx mov dword ptr [ret_val], eax } +#else + unsigned __int64 val = __rdtsc(); + val = val >> 8; + ret_val = static_cast(val); +#endif return ret_val; } @@ -107,6 +113,7 @@ public: static U64 getCPUClockCount64() { U64 ret_val; +#if !defined(_M_AMD64) __asm { _emit 0x0f @@ -116,6 +123,9 @@ public: mov dword ptr [ret_val+4], edx mov dword ptr [ret_val], eax } +#else + ret_val = static_cast( __rdtsc() ); +#endif return ret_val; } -- cgit v1.2.3 From 637dc1f5a98e1c6cc6eecfb476ab1c20dca0c6aa Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 22 Apr 2016 12:59:41 +0200 Subject: Windows x64: 64 bit implies SSE2, handle this accordingly when detecting if SSE2 is enabled. (transplanted from 93492b84cb752dc79c74d9667f11edd76ace8f0b) --- indra/llmath/llsimdmath.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llmath/llsimdmath.h b/indra/llmath/llsimdmath.h index cebd2ace7d..9f078ec1ef 100644 --- a/indra/llmath/llsimdmath.h +++ b/indra/llmath/llsimdmath.h @@ -31,7 +31,7 @@ #error "Please include llmath.h before this file." #endif -#if ( ( LL_DARWIN || LL_LINUX ) && !(__SSE2__) ) || ( LL_WINDOWS && ( _M_IX86_FP < 2 ) ) +#if ( ( LL_DARWIN || LL_LINUX ) && !(__SSE2__) ) || ( LL_WINDOWS && ( _M_IX86_FP < 2 && !_M_AMD64 ) ) #error SSE2 not enabled. LLVector4a and related class will not compile. #endif -- cgit v1.2.3 From 7640c2fb446846005a191abb62d3cce1a64d2a6e Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 22 Apr 2016 12:59:59 +0200 Subject: Windows x64: Cannot use inline assembly. (transplanted from 0b621f8a1ee707527325eb70e59ef02c63e2bd10) --- indra/llmath/llmath.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index 93b9f22b25..b66a3c63d6 100644 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -153,7 +153,7 @@ inline F64 llabs(const F64 a) inline S32 lltrunc( F32 f ) { -#if LL_WINDOWS && !defined( __INTEL_COMPILER ) +#if LL_WINDOWS && !defined( __INTEL_COMPILER ) && !defined( _M_AMD64 ) // Avoids changing the floating point control word. // Add or subtract 0.5 - epsilon and then round const static U32 zpfp[] = { 0xBEFFFFFF, 0x3EFFFFFF }; @@ -179,7 +179,7 @@ inline S32 lltrunc( F64 f ) inline S32 llfloor( F32 f ) { -#if LL_WINDOWS && !defined( __INTEL_COMPILER ) +#if LL_WINDOWS && !defined( __INTEL_COMPILER ) && !defined( _M_AMD64 ) // Avoids changing the floating point control word. // Accurate (unlike Stereopsis version) for all values between S32_MIN and S32_MAX and slightly faster than Stereopsis version. // Add -(0.5 - epsilon) and then round -- cgit v1.2.3 From f86c1e4ebc7187cc3d7c14671fb285250e959cea Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 22 Apr 2016 13:00:21 +0200 Subject: Add build-vc120_x64/ to the ignore list. (transplanted from 98e2f67eded2d68f9a3780e7f6ed1dbf2dc3a0a7) --- .hgignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.hgignore b/.hgignore index 1b7a9019a2..09031ac0fa 100755 --- a/.hgignore +++ b/.hgignore @@ -17,6 +17,7 @@ build-darwin-* build-vc80/ build-vc100/ build-vc120/ +build-vc120_x64/ indra/build-vc[0-9]* indra/CMakeFiles indra/lib/mono/1.0/*.dll -- cgit v1.2.3 From a116f96a2fce19fa7e5dc56316044332c13d97d5 Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 22 Apr 2016 13:02:37 +0200 Subject: Windows: USe the correct datatypes when calling the Windows API. (transplanted from 8b0c42b1a4f0416a17c8ec6078a85c5773f69a25) --- indra/llcommon/llprocessor.cpp | 2 +- indra/llcommon/llthread.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/indra/llcommon/llprocessor.cpp b/indra/llcommon/llprocessor.cpp index e3e1d0c391..65b4507e2d 100644 --- a/indra/llcommon/llprocessor.cpp +++ b/indra/llcommon/llprocessor.cpp @@ -398,7 +398,7 @@ static F64 calculate_cpu_frequency(U32 measure_msecs) HANDLE hThread = GetCurrentThread(); unsigned long dwCurPriorityClass = GetPriorityClass(hProcess); int iCurThreadPriority = GetThreadPriority(hThread); - unsigned long dwProcessMask, dwSystemMask, dwNewMask = 1; + DWORD_PTR dwProcessMask, dwSystemMask, dwNewMask = 1; GetProcessAffinityMask(hProcess, &dwProcessMask, &dwSystemMask); SetPriorityClass(hProcess, REALTIME_PRIORITY_CLASS); diff --git a/indra/llcommon/llthread.cpp b/indra/llcommon/llthread.cpp index c3f235c6ee..52255bfaeb 100644 --- a/indra/llcommon/llthread.cpp +++ b/indra/llcommon/llthread.cpp @@ -63,7 +63,7 @@ void set_thread_name( DWORD dwThreadID, const char* threadName) __try { - ::RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(DWORD), (DWORD*)&info ); + ::RaiseException( MS_VC_EXCEPTION, 0, sizeof(info)/sizeof(DWORD), (ULONG_PTR*)&info ); } __except(EXCEPTION_CONTINUE_EXECUTION) { -- cgit v1.2.3 From 30dcad4b95d355e07f0807360f2e5f65b0460fe3 Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 22 Apr 2016 14:55:19 +0200 Subject: Windows: 1. GWL_USERDATA must be GWLP_USERDATA to be compatible with x86 and x64. (GWL_USERDATA is deprecated anyway). 3. Replace Get/SetWindowLong with Get/SetWindoeLongPtr or placing this into GWLP_USERDATA will truncate the pointer. (transplanted from 5f50745bff03700d3862a6bb1eb5936be0fdc6cd) --- indra/llwindow/lldragdropwin32.cpp | 8 ++++---- indra/llwindow/llwindowwin32.cpp | 6 +++--- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/indra/llwindow/lldragdropwin32.cpp b/indra/llwindow/lldragdropwin32.cpp index d00d9ab47e..0d1a47408b 100644 --- a/indra/llwindow/lldragdropwin32.cpp +++ b/indra/llwindow/lldragdropwin32.cpp @@ -113,7 +113,7 @@ class LLDragDropWin32Target: PVOID data = GlobalLock( stgmed.hGlobal ); mDropUrl = std::string( (char*)data ); // XXX MAJOR MAJOR HACK! - LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(mAppWindowHandle, GWL_USERDATA); + LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLongPtr( mAppWindowHandle, GWLP_USERDATA ); if (NULL != window_imp) { LLCoordGL gl_coord( 0, 0 ); @@ -168,7 +168,7 @@ class LLDragDropWin32Target: if ( mAllowDrop ) { // XXX MAJOR MAJOR HACK! - LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(mAppWindowHandle, GWL_USERDATA); + LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLongPtr( mAppWindowHandle, GWLP_USERDATA ); if (NULL != window_imp) { LLCoordGL gl_coord( 0, 0 ); @@ -215,7 +215,7 @@ class LLDragDropWin32Target: HRESULT __stdcall DragLeave( void ) { // XXX MAJOR MAJOR HACK! - LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(mAppWindowHandle, GWL_USERDATA); + LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLongPtr( mAppWindowHandle, GWLP_USERDATA ); if (NULL != window_imp) { LLCoordGL gl_coord( 0, 0 ); @@ -232,7 +232,7 @@ class LLDragDropWin32Target: if ( mAllowDrop ) { // window impl stored in Window data (neat!) - LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong( mAppWindowHandle, GWL_USERDATA ); + LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLongPtr( mAppWindowHandle, GWLP_USERDATA ); if ( NULL != window_imp ) { POINT pt_client; diff --git a/indra/llwindow/llwindowwin32.cpp b/indra/llwindow/llwindowwin32.cpp index 875ffe4cd4..d111bea3fd 100644 --- a/indra/llwindow/llwindowwin32.cpp +++ b/indra/llwindow/llwindowwin32.cpp @@ -759,7 +759,7 @@ void LLWindowWin32::close() LL_DEBUGS("Window") << "Destroying Window" << LL_ENDL; // Don't process events in our mainWindowProc any longer. - SetWindowLong(mWindowHandle, GWL_USERDATA, NULL); + SetWindowLongPtr(mWindowHandle, GWLP_USERDATA, NULL); // Make sure we don't leave a blank toolbar button. ShowWindow(mWindowHandle, SW_HIDE); @@ -1538,7 +1538,7 @@ BOOL LLWindowWin32::switchContext(BOOL fullscreen, const LLCoordScreen &size, BO LL_DEBUGS("Window") << "Keeping vertical sync" << LL_ENDL; } - SetWindowLong(mWindowHandle, GWL_USERDATA, (U32)this); + SetWindowLongPtr(mWindowHandle, GWLP_USERDATA, (LONG_PTR)this); // register this window as handling drag/drop events from the OS DragAcceptFiles( mWindowHandle, TRUE ); @@ -1850,7 +1850,7 @@ LRESULT CALLBACK LLWindowWin32::mainWindowProc(HWND h_wnd, UINT u_msg, WPARAM w_ // This is to avoid triggering double click teleport after returning focus (see MAINT-3786). static bool sHandleDoubleClick = true; - LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLong(h_wnd, GWL_USERDATA); + LLWindowWin32 *window_imp = (LLWindowWin32 *)GetWindowLongPtr( h_wnd, GWLP_USERDATA ); if (NULL != window_imp) -- cgit v1.2.3 From e8aa2dd71fff7a39f2b03039b23afa8bdf804fcb Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 22 Apr 2016 14:58:25 +0200 Subject: x64: Do not use a union of LLColor4U. Especially having the two pointer in there will blow up the struct to at least 8 byte, which will break VBO packing as this class needs to be 4 byte in size. (transplanted from 847df86d6b5daa69dcfc428df18876a9c1e8bef6) --- indra/llimage/llimage.cpp | 3 ++- indra/llmath/v4coloru.h | 42 ++++++++++++++++++++++++++++++++++-------- indra/newview/llface.cpp | 4 ++-- indra/newview/llnetmap.cpp | 6 +++--- indra/newview/llvosky.cpp | 2 +- indra/newview/llvosky.h | 4 ++-- 6 files changed, 44 insertions(+), 17 deletions(-) diff --git a/indra/llimage/llimage.cpp b/indra/llimage/llimage.cpp index f71607096c..a6cbcc131e 100644 --- a/indra/llimage/llimage.cpp +++ b/indra/llimage/llimage.cpp @@ -1218,9 +1218,10 @@ void LLImageRaw::fill( const LLColor4U& color ) if( 4 == getComponents() ) { U32* data = (U32*) getData(); + U32 rgbaColor = color.asRGBA(); for( S32 i = 0; i < pixels; i++ ) { - data[i] = color.mAll; + data[ i ] = rgbaColor; } } else diff --git a/indra/llmath/v4coloru.h b/indra/llmath/v4coloru.h index fddad34978..31ae3e3c1a 100644 --- a/indra/llmath/v4coloru.h +++ b/indra/llmath/v4coloru.h @@ -47,14 +47,7 @@ class LLColor4U { public: - union - { - U8 mV[LENGTHOFCOLOR4U]; - U32 mAll; - LLColor4* mSources; - LLColor4U* mSourcesU; - }; - + U8 mV[LENGTHOFCOLOR4U]; LLColor4U(); // Initializes LLColor4U to (0, 0, 0, 1) LLColor4U(U8 r, U8 g, U8 b); // Initializes LLColor4U to (r, g, b, 1) @@ -132,6 +125,9 @@ public: return LLColor4(*this); } + U32 asRGBA() const; + void fromRGBA( U32 aVal ); + static LLColor4U white; static LLColor4U black; static LLColor4U red; @@ -565,6 +561,36 @@ void LLColor4U::setVecScaleClamp(const LLColor3& color) mV[3] = 255; } +inline U32 LLColor4U::asRGBA() const +{ + U32 nRet( 0 ); + + // Little endian: values are swapped in memory. The original code access the array like a U32, so we need to swap here + + nRet |= mV[ 3 ]; + nRet <<= 8; + nRet |= mV[ 2 ]; + nRet <<= 8; + nRet |= mV[ 1 ]; + nRet <<= 8; + nRet |= mV[ 0 ]; + + return nRet; +} + +inline void LLColor4U::fromRGBA( U32 aVal ) +{ + // Little endian: values are swapped in memory. The original code access the array like a U32, so we need to swap here + + mV[ 0 ] = aVal & 0xFF; + aVal >>= 8; + mV[ 1 ] = aVal & 0xFF; + aVal >>= 8; + mV[ 2 ] = aVal & 0xFF; + aVal >>= 8; + mV[ 3 ] = aVal & 0xFF; +} + #endif diff --git a/indra/newview/llface.cpp b/indra/newview/llface.cpp index de349a03d4..481c66aaf5 100644 --- a/indra/newview/llface.cpp +++ b/indra/newview/llface.cpp @@ -2132,7 +2132,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, LLVector4a src; U32 vec[4]; - vec[0] = vec[1] = vec[2] = vec[3] = color.mAll; + vec[0] = vec[1] = vec[2] = vec[3] = color.asRGBA(); src.loadua((F32*) vec); @@ -2168,7 +2168,7 @@ BOOL LLFace::getGeometryVolume(const LLVolume& volume, LLColor4U glow4u = LLColor4U(0,0,0,glow); - U32 glow32 = glow4u.mAll; + U32 glow32 = glow4u.asRGBA(); U32 vec[4]; vec[0] = vec[1] = vec[2] = vec[3] = glow32; diff --git a/indra/newview/llnetmap.cpp b/indra/newview/llnetmap.cpp index 5fc73c67d1..72faa5a9e7 100644 --- a/indra/newview/llnetmap.cpp +++ b/indra/newview/llnetmap.cpp @@ -735,7 +735,7 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color, continue; } S32 offset = px + py * image_width; - ((U32*)datap)[offset] = color.mAll; + ((U32*)datap)[offset] = color.asRGBA(); } // top line @@ -748,7 +748,7 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color, continue; } S32 offset = px + py * image_width; - ((U32*)datap)[offset] = color.mAll; + ((U32*)datap)[offset] = color.asRGBA(); } } else @@ -770,7 +770,7 @@ void LLNetMap::renderPoint(const LLVector3 &pos_local, const LLColor4U &color, continue; } S32 offset = p_x + p_y * image_width; - ((U32*)datap)[offset] = color.mAll; + ((U32*)datap)[offset] = color.asRGBA(); } } } diff --git a/indra/newview/llvosky.cpp b/indra/newview/llvosky.cpp index 4dab213fa0..6b4a450e6f 100644 --- a/indra/newview/llvosky.cpp +++ b/indra/newview/llvosky.cpp @@ -283,7 +283,7 @@ void LLSkyTex::create(const F32 brightness) S32 offset = basic_offset * sComponents; U32* pix = (U32*)(data + offset); LLColor4U temp = LLColor4U(mSkyData[basic_offset]); - *pix = temp.mAll; + *pix = temp.asRGBA(); } } createGLImage(sCurrent); diff --git a/indra/newview/llvosky.h b/indra/newview/llvosky.h index ee8e91fb71..9cfb9773bd 100644 --- a/indra/newview/llvosky.h +++ b/indra/newview/llvosky.h @@ -171,7 +171,7 @@ protected: { S32 offset = (i * sResolution + j) * sComponents; U32* pix = (U32*) &(mImageRaw[sCurrent]->getData()[offset]); - *pix = col.mAll; + *pix = col.asRGBA(); } LLColor4U getPixel(const S32 i, const S32 j) @@ -179,7 +179,7 @@ protected: LLColor4U col; S32 offset = (i * sResolution + j) * sComponents; U32* pix = (U32*) &(mImageRaw[sCurrent]->getData()[offset]); - col.mAll = *pix; + col.fromRGBA( *pix ); return col; } -- cgit v1.2.3 From c87d24ac71c662ab37b6b937f92d960c6d8d092f Mon Sep 17 00:00:00 2001 From: Nicky Date: Fri, 22 Apr 2016 23:59:28 +0200 Subject: Fasttimers: Windows) Always use the __rdtsc() intrinsic rather than inline assembly. Linux/OSX) The rtdsc assembly intruction is clobbering EAX and EDX, the snippet was not protecting EDX accordingly. (transplanted from 6307b134f821390367d4c86a03b9a492ac7ed282) --- indra/llcommon/llfasttimer.h | 44 ++++++++------------------------------------ 1 file changed, 8 insertions(+), 36 deletions(-) diff --git a/indra/llcommon/llfasttimer.h b/indra/llcommon/llfasttimer.h index 0336f9d0e9..2024d707da 100644 --- a/indra/llcommon/llfasttimer.h +++ b/indra/llcommon/llfasttimer.h @@ -90,43 +90,15 @@ public: #if LL_FASTTIMER_USE_RDTSC static U32 getCPUClockCount32() { - U32 ret_val; -#if !defined(_M_AMD64) - __asm - { - _emit 0x0f - _emit 0x31 - shr eax,8 - shl edx,24 - or eax, edx - mov dword ptr [ret_val], eax - } -#else unsigned __int64 val = __rdtsc(); val = val >> 8; - ret_val = static_cast(val); -#endif - return ret_val; + return static_cast(val); } // return full timer value, *not* shifted by 8 bits static U64 getCPUClockCount64() { - U64 ret_val; -#if !defined(_M_AMD64) - __asm - { - _emit 0x0f - _emit 0x31 - mov eax,eax - mov edx,edx - mov dword ptr [ret_val+4], edx - mov dword ptr [ret_val], eax - } -#else - ret_val = static_cast( __rdtsc() ); -#endif - return ret_val; + return static_cast( __rdtsc() ); } #else @@ -183,16 +155,16 @@ public: // Mac+Linux+Solaris FAST x86 implementation of CPU clock static U32 getCPUClockCount32() { - U64 x; - __asm__ volatile (".byte 0x0f, 0x31": "=A"(x)); - return (U32)(x >> 8); + U32 low(0),high(0); + __asm__ volatile (".byte 0x0f, 0x31": "=a"(low), "=d"(high) ); + return (low>>8) | (high<<24); } static U64 getCPUClockCount64() { - U64 x; - __asm__ volatile (".byte 0x0f, 0x31": "=A"(x)); - return x; + U32 low(0),high(0); + __asm__ volatile (".byte 0x0f, 0x31": "=a"(low), "=d"(high) ); + return (U64)low | ( ((U64)high) << 32); } #endif -- cgit v1.2.3 From a590d1c63ae4c1434da600d60b5c32c9b8a7a1de Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 24 Apr 2016 12:51:26 +0200 Subject: Windows z64: Disable warning 4267 via llpreprocessor rather than cmake files (transplanted from 165fa5852652a1da005cf3b2201c192f028efd43) --- indra/cmake/00-Common.cmake | 4 ---- indra/llcommon/llpreprocessor.h | 6 ++++++ 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 84d70bd7b1..69d00afda3 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -81,10 +81,6 @@ if (WINDOWS) # Nicky: x64 implies SSE2 if( NOT LL_64BIT_BUILD ) add_definitions( /arch:SSE2 ) - else() - # Otherwise disable 4267 ('var' : conversion from 'size_t' to 'type', possible loss of data) - # This warning alas is all over the place and fixing it will touch a lot of code. - add_definitions("/wd4267 /DLL_64BIT_BUILD" ) endif() # Are we using the crummy Visual Studio KDU build workaround? diff --git a/indra/llcommon/llpreprocessor.h b/indra/llcommon/llpreprocessor.h index 2c4bcc91f6..7c277c2bed 100644 --- a/indra/llcommon/llpreprocessor.h +++ b/indra/llcommon/llpreprocessor.h @@ -138,6 +138,12 @@ #pragma warning( 3 : 4266 ) // 'function' : no override available for virtual member function from base 'type'; function is hidden #pragma warning (disable : 4180) // qualifier applied to function type has no meaning; ignored //#pragma warning( disable : 4284 ) // silly MS warning deep inside their include file + +#ifdef _M_AMD64 +// That one is all over the place for x64 builds. +#pragma warning( disable : 4267 ) // 'var' : conversion from 'size_t' to 'type', possible loss of data) +#endif + #pragma warning( disable : 4503 ) // 'decorated name length exceeded, name was truncated'. Does not seem to affect compilation. #pragma warning( disable : 4800 ) // 'BOOL' : forcing value to bool 'true' or 'false' (performance warning) #pragma warning( disable : 4996 ) // warning: deprecated -- cgit v1.2.3 From c4e21cf2828517e761657eb70bf516d84f17fc77 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 24 Apr 2016 12:55:13 +0200 Subject: Fix a crash is drawn vertices is 0. (transplanted from 89b3e585218ddb8d6a3e62af29f8daf889371e5e) --- indra/llrender/llrender.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/indra/llrender/llrender.cpp b/indra/llrender/llrender.cpp index 69420dd0bb..0e242a20f6 100644 --- a/indra/llrender/llrender.cpp +++ b/indra/llrender/llrender.cpp @@ -2039,7 +2039,8 @@ void LLRender::vertexBatchPreTransformed(LLVector3* verts, S32 vert_count) } } - mVerticesp[mCount] = mVerticesp[mCount-1]; + if( mCount > 0 ) // ND: Guard against crashes if mCount is zero, yes it can happen + mVerticesp[mCount] = mVerticesp[mCount-1]; } void LLRender::vertexBatchPreTransformed(LLVector3* verts, LLVector2* uvs, S32 vert_count) -- cgit v1.2.3 From 944c497090b09e30377a67d60049c641b5e10e55 Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 24 Apr 2016 12:55:50 +0200 Subject: Code stylistics. (transplanted from 570ea799407270069974021eca3a5056d6908f58) --- indra/llmath/v4coloru.h | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/indra/llmath/v4coloru.h b/indra/llmath/v4coloru.h index 31ae3e3c1a..704ce852d9 100644 --- a/indra/llmath/v4coloru.h +++ b/indra/llmath/v4coloru.h @@ -563,19 +563,9 @@ void LLColor4U::setVecScaleClamp(const LLColor3& color) inline U32 LLColor4U::asRGBA() const { - U32 nRet( 0 ); - // Little endian: values are swapped in memory. The original code access the array like a U32, so we need to swap here - nRet |= mV[ 3 ]; - nRet <<= 8; - nRet |= mV[ 2 ]; - nRet <<= 8; - nRet |= mV[ 1 ]; - nRet <<= 8; - nRet |= mV[ 0 ]; - - return nRet; + return (mV[3] << 24) | (mV[2] << 16) | (mV[1] << 8) | mV[0]; } inline void LLColor4U::fromRGBA( U32 aVal ) -- cgit v1.2.3 From 6c7a97286113b1d3335d585d0d7cbc047baae021 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 15 Nov 2016 15:53:24 -0500 Subject: DRTVWR-418: Fold windows64 into windows platform with new autobuild. autobuild 1.1 now supports expanding $variables within a config file -- support that was explicitly added to address this very problem. So now the windows platform in autobuild.xml uses $AUTOBUILD_ADDRSIZE, $AUTOBUILD_WIN_VSPLATFORM and $AUTOBUILD_WIN_CMAKE_GEN, which should handle most of the deltas between the windows platform and windows64. This permits removing the windows64 platform definition from autobuild.xml. The one remaining delta between the windows64 and windows platform definitions was -DLL_64BIT_BUILD=TRUE. But we can handle that instead by checking ADDRESS_SIZE. Change all existing references to WORD_SIZE to ADDRESS_SIZE instead, and set ADDRESS_SIZE to $AUTOBUILD_ADDRSIZE. Change the one existing LL_64BIT_BUILD reference to test (ADDRESS_SIZE EQUAL 64) instead. --- autobuild.xml | 212 ++---------------------- indra/cmake/00-Common.cmake | 12 +- indra/cmake/ConfigurePkgConfig.cmake | 6 +- indra/cmake/Variables.cmake | 28 ++-- indra/llcommon/CMakeLists.txt | 4 +- indra/llcommon/llcoros.cpp | 2 +- indra/llplugin/CMakeLists.txt | 4 +- indra/media_plugins/base/CMakeLists.txt | 4 +- indra/media_plugins/cef/CMakeLists.txt | 4 +- indra/media_plugins/example/CMakeLists.txt | 4 +- indra/media_plugins/gstreamer010/CMakeLists.txt | 4 +- indra/media_plugins/libvlc/CMakeLists.txt | 4 +- 12 files changed, 50 insertions(+), 238 deletions(-) diff --git a/autobuild.xml b/autobuild.xml index 9c2e1dffd1..3ab7cdcbf3 100755 --- a/autobuild.xml +++ b/autobuild.xml @@ -3204,7 +3204,7 @@ options -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo - -DWORD_SIZE:STRING=32 + -DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE -DROOT_PROJECT_NAME:STRING=SecondLife -DINSTALL_PROPRIETARY=TRUE @@ -3225,7 +3225,7 @@ options -DCMAKE_BUILD_TYPE:STRING=RelWithDebInfo - -DWORD_SIZE:STRING=32 + -DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE -DROOT_PROJECT_NAME:STRING=SecondLife -DINSTALL_PROPRIETARY=FALSE @@ -3245,7 +3245,7 @@ options -DCMAKE_BUILD_TYPE:STRING=Release - -DWORD_SIZE:STRING=32 + -DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE -DROOT_PROJECT_NAME:STRING=SecondLife -DINSTALL_PROPRIETARY=TRUE @@ -3266,7 +3266,7 @@ options -DCMAKE_BUILD_TYPE:STRING=Release - -DWORD_SIZE:STRING=32 + -DADDRESS_SIZE:STRING=$AUTOBUILD_ADDRSIZE -DROOT_PROJECT_NAME:STRING=SecondLife -DINSTALL_PROPRIETARY=FALSE @@ -3537,7 +3537,7 @@ options /build - "RelWithDebInfo|Win32" + "RelWithDebInfo|${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}" configure @@ -3557,7 +3557,7 @@ options -G - "Visual Studio 12" + ${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN} default @@ -3578,7 +3578,7 @@ options /p:Configuration=RelWithDebInfo - /p:Platform=Win32 + /p:Platform=${AUTOBUILD_WIN_VSPLATFORM|NOTWIN} /t:Build /p:useenv=true /verbosity:minimal @@ -3603,7 +3603,7 @@ options -G - "Visual Studio 12" + ${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN} -DUNATTENDED:BOOL=ON -DINSTALL_PROPRIETARY=FALSE -DUSE_KDU=FALSE @@ -3625,7 +3625,7 @@ options /build - "Release|Win32" + "Release|${AUTOBUILD_WIN_VSPLATFORM|NOTWIN}" configure @@ -3645,7 +3645,7 @@ options -G - "Visual Studio 12" + ${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN} name @@ -3664,7 +3664,7 @@ options /p:Configuration=Release - /p:Platform=Win32 + /p:Platform=${AUTOBUILD_WIN_VSPLATFORM|NOTWIN} /t:Build /p:useenv=true /verbosity:minimal @@ -3689,7 +3689,7 @@ options -G - "Visual Studio 12" + ${AUTOBUILD_WIN_CMAKE_GEN|NOTWIN} -DUNATTENDED:BOOL=ON -DINSTALL_PROPRIETARY=FALSE -DUSE_KDU=FALSE @@ -3702,194 +3702,6 @@ name windows - windows64 - - build_directory - build-vc120_x64 - configurations - - RelWithDebInfo - - build - - arguments - - SecondLife.sln - - command - devenv - options - - /build - "RelWithDebInfo|x64" - - - configure - - arguments - - ..\indra - && - ..\indra\tools\vstool\VSTool.exe - --solution - SecondLife.sln - --config - RelWithDebInfo - --startup - secondlife-bin - - options - - -G - "Visual Studio 12 Win64" - -DLL_64BIT_BUILD=TRUE - - - default - True - name - RelWithDebInfo - - RelWithDebInfoOS - - build - - arguments - - SecondLife.sln - - command - msbuild.exe - options - - /p:Configuration=RelWithDebInfo - /p:Platform=x64 - /t:Build - /p:useenv=true - /verbosity:minimal - /toolsversion:4.0 - /p:"VCBuildAdditionalOptions= /incremental" - - - configure - - arguments - - ..\indra - && - ..\indra\tools\vstool\VSTool.exe - --solution - SecondLife.sln - --config - RelWithDebInfo - --startup - secondlife-bin - - options - - -G - "Visual Studio 12 Win64" - -DUNATTENDED:BOOL=ON - -DINSTALL_PROPRIETARY=FALSE - -DUSE_KDU=FALSE - -DLL_64BIT_BUILD=TRUE - - - name - RelWithDebInfoOS - - Release - - build - - arguments - - SecondLife.sln - - command - devenv - options - - /build - "Release|x64" - - - configure - - arguments - - ..\indra - && - ..\indra\tools\vstool\VSTool.exe - --solution - SecondLife.sln - --config - Release - --startup - secondlife-bin - - options - - -G - "Visual Studio 12 Win64" - -DLL_64BIT_BUILD=TRUE - - - name - Release - - ReleaseOS - - build - - arguments - - SecondLife.sln - - command - msbuild.exe - options - - /p:Configuration=Release - /p:Platform=x64 - /t:Build - /p:useenv=true - /verbosity:minimal - /toolsversion:4.0 - /p:"VCBuildAdditionalOptions= /incremental" - - - configure - - arguments - - ..\indra - && - ..\indra\tools\vstool\VSTool.exe - --solution - SecondLife.sln - --config - Release - --startup - secondlife-bin - - options - - -G - "Visual Studio 12 Win64" - -DUNATTENDED:BOOL=ON - -DINSTALL_PROPRIETARY=FALSE - -DUSE_KDU=FALSE - -DLL_64BIT_BUILD=TRUE - - - name - ReleaseOS - - - name - windows - version_file newview/viewer_version.txt diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index 69d00afda3..e270a43006 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -79,7 +79,7 @@ if (WINDOWS) ) # Nicky: x64 implies SSE2 - if( NOT LL_64BIT_BUILD ) + if( ADDRESS_SIZE EQUAL 64 ) add_definitions( /arch:SSE2 ) endif() @@ -178,9 +178,9 @@ if (LINUX) add_definitions(-fvisibility=hidden) # don't catch SIGCHLD in our base application class for the viewer - some of our 3rd party libs may need their *own* SIGCHLD handler to work. Sigh! The viewer doesn't need to catch SIGCHLD anyway. add_definitions(-DLL_IGNORE_SIGCHLD) - if (WORD_SIZE EQUAL 32) + if (ADDRESS_SIZE EQUAL 32) add_definitions(-march=pentium4) - endif (WORD_SIZE EQUAL 32) + endif (ADDRESS_SIZE EQUAL 32) add_definitions(-mfpmath=sse) #add_definitions(-ftree-vectorize) # THIS CRASHES GCC 3.1-3.2 if (NOT USESYSTEMLIBS) @@ -231,13 +231,13 @@ if (LINUX OR DARWIN) set(CMAKE_C_FLAGS "${GCC_WARNINGS} ${CMAKE_C_FLAGS}") set(CMAKE_CXX_FLAGS "${GCC_CXX_WARNINGS} ${CMAKE_CXX_FLAGS}") - if (WORD_SIZE EQUAL 32) + if (ADDRESS_SIZE EQUAL 32) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m32") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m32") - elseif (WORD_SIZE EQUAL 64) + elseif (ADDRESS_SIZE EQUAL 64) set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -m64") set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -m64") - endif (WORD_SIZE EQUAL 32) + endif (ADDRESS_SIZE EQUAL 32) endif (LINUX OR DARWIN) diff --git a/indra/cmake/ConfigurePkgConfig.cmake b/indra/cmake/ConfigurePkgConfig.cmake index 82ee3e7a5b..55d865392e 100644 --- a/indra/cmake/ConfigurePkgConfig.cmake +++ b/indra/cmake/ConfigurePkgConfig.cmake @@ -6,17 +6,17 @@ SET(DEBUG_PKG_CONFIG "YES") IF("$ENV{PKG_CONFIG_LIBDIR}" STREQUAL "") # Guess at architecture-specific system library paths. - if (WORD_SIZE EQUAL 32) + if (ADDRESS_SIZE EQUAL 32) SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib32 /usr/lib) SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib32 /usr/local/lib) SET(PKG_CONFIG_MULTI_GUESS /usr/lib/i386-linux-gnu) SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/i386-linux-gnu) - else (WORD_SIZE EQUAL 32) + else (ADDRESS_SIZE EQUAL 32) SET(PKG_CONFIG_NO_MULTI_GUESS /usr/lib64 /usr/lib) SET(PKG_CONFIG_NO_MULTI_LOCAL_GUESS /usr/local/lib64 /usr/local/lib) SET(PKG_CONFIG_MULTI_GUESS /usr/local/lib/x86_64-linux-gnu) SET(PKG_CONFIG_MULTI_LOCAL_GUESS /usr/local/lib/x86_64-linux-gnu) - endif (WORD_SIZE EQUAL 32) + endif (ADDRESS_SIZE EQUAL 32) # Use DPKG architecture, if available. IF (${DPKG_ARCH}) diff --git a/indra/cmake/Variables.cmake b/indra/cmake/Variables.cmake index 63e296b556..464b4c402c 100644 --- a/indra/cmake/Variables.cmake +++ b/indra/cmake/Variables.cmake @@ -65,7 +65,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Windows") set(ARCH i686) set(LL_ARCH ${ARCH}_win32) set(LL_ARCH_DIR ${ARCH}-win32) - set(WORD_SIZE 32) + set(ADDRESS_SIZE 32) endif (${CMAKE_SYSTEM_NAME} MATCHES "Windows") if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") @@ -73,33 +73,33 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux") # If someone has specified a word size, use that to determine the # architecture. Otherwise, let the architecture specify the word size. - if (WORD_SIZE EQUAL 32) - #message(STATUS "WORD_SIZE is 32") + if (ADDRESS_SIZE EQUAL 32) + #message(STATUS "ADDRESS_SIZE is 32") set(ARCH i686) - elseif (WORD_SIZE EQUAL 64) - #message(STATUS "WORD_SIZE is 64") + elseif (ADDRESS_SIZE EQUAL 64) + #message(STATUS "ADDRESS_SIZE is 64") set(ARCH x86_64) - else (WORD_SIZE EQUAL 32) - #message(STATUS "WORD_SIZE is UNDEFINED") + else (ADDRESS_SIZE EQUAL 32) + #message(STATUS "ADDRESS_SIZE is UNDEFINED") execute_process(COMMAND uname -m COMMAND sed s/i.86/i686/ OUTPUT_VARIABLE ARCH OUTPUT_STRIP_TRAILING_WHITESPACE) if (ARCH STREQUAL x86_64) #message(STATUS "ARCH is detected as 64; ARCH is ${ARCH}") - set(WORD_SIZE 64) + set(ADDRESS_SIZE 64) else (ARCH STREQUAL x86_64) #message(STATUS "ARCH is detected as 32; ARCH is ${ARCH}") - set(WORD_SIZE 32) + set(ADDRESS_SIZE 32) endif (ARCH STREQUAL x86_64) - endif (WORD_SIZE EQUAL 32) + endif (ADDRESS_SIZE EQUAL 32) - if (WORD_SIZE EQUAL 32) + if (ADDRESS_SIZE EQUAL 32) set(DEB_ARCHITECTURE i386) set(FIND_LIBRARY_USE_LIB64_PATHS OFF) set(CMAKE_SYSTEM_LIBRARY_PATH /usr/lib32 ${CMAKE_SYSTEM_LIBRARY_PATH}) - else (WORD_SIZE EQUAL 32) + else (ADDRESS_SIZE EQUAL 32) set(DEB_ARCHITECTURE amd64) set(FIND_LIBRARY_USE_LIB64_PATHS ON) - endif (WORD_SIZE EQUAL 32) + endif (ADDRESS_SIZE EQUAL 32) execute_process(COMMAND dpkg-architecture -a${DEB_ARCHITECTURE} -qDEB_HOST_MULTIARCH RESULT_VARIABLE DPKG_RESULT @@ -151,7 +151,7 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") set(ARCH ${CMAKE_OSX_ARCHITECTURES}) set(LL_ARCH ${ARCH}_darwin) set(LL_ARCH_DIR universal-darwin) - set(WORD_SIZE 32) + set(ADDRESS_SIZE 32) endif (${CMAKE_SYSTEM_NAME} MATCHES "Darwin") # Default deploy grid diff --git a/indra/llcommon/CMakeLists.txt b/indra/llcommon/CMakeLists.txt index 493aa5d0f1..b29b2b2ccf 100644 --- a/indra/llcommon/CMakeLists.txt +++ b/indra/llcommon/CMakeLists.txt @@ -245,13 +245,13 @@ list(APPEND llcommon_SOURCE_FILES ${llcommon_HEADER_FILES}) if(LLCOMMON_LINK_SHARED) add_library (llcommon SHARED ${llcommon_SOURCE_FILES}) - if(NOT WORD_SIZE EQUAL 32) + if(NOT ADDRESS_SIZE EQUAL 32) if(WINDOWS) add_definitions(/FIXED:NO) else(WINDOWS) # not windows therefore gcc LINUX and DARWIN add_definitions(-fPIC) endif(WINDOWS) - endif(NOT WORD_SIZE EQUAL 32) + endif(NOT ADDRESS_SIZE EQUAL 32) if(WINDOWS) # always generate llcommon.pdb, even for "Release" builds set_target_properties(llcommon PROPERTIES LINK_FLAGS "/DEBUG") diff --git a/indra/llcommon/llcoros.cpp b/indra/llcommon/llcoros.cpp index 0d9e19f672..bc72faca5d 100644 --- a/indra/llcommon/llcoros.cpp +++ b/indra/llcommon/llcoros.cpp @@ -101,7 +101,7 @@ LLCoros::LLCoros(): // Previously we used // boost::context::guarded_stack_allocator::default_stacksize(); // empirically this is 64KB on Windows and Linux. Try quadrupling. -#if WORD_SIZE == 64 +#if ADDRESS_SIZE == 64 mStackSize(512*1024) #else mStackSize(256*1024) diff --git a/indra/llplugin/CMakeLists.txt b/indra/llplugin/CMakeLists.txt index 84667f1b82..22f3b24dc5 100644 --- a/indra/llplugin/CMakeLists.txt +++ b/indra/llplugin/CMakeLists.txt @@ -56,13 +56,13 @@ set(llplugin_HEADER_FILES set_source_files_properties(${llplugin_HEADER_FILES} PROPERTIES HEADER_FILE_ONLY TRUE) -if(NOT WORD_SIZE EQUAL 32) +if(NOT ADDRESS_SIZE EQUAL 32) if(WINDOWS) add_definitions(/FIXED:NO) else(WINDOWS) # not windows therefore gcc LINUX and DARWIN add_definitions(-fPIC) endif(WINDOWS) -endif(NOT WORD_SIZE EQUAL 32) +endif(NOT ADDRESS_SIZE EQUAL 32) list(APPEND llplugin_SOURCE_FILES ${llplugin_HEADER_FILES}) diff --git a/indra/media_plugins/base/CMakeLists.txt b/indra/media_plugins/base/CMakeLists.txt index 7367b9e5e6..6913235236 100644 --- a/indra/media_plugins/base/CMakeLists.txt +++ b/indra/media_plugins/base/CMakeLists.txt @@ -28,13 +28,13 @@ include_directories(SYSTEM ### media_plugin_base -if(NOT WORD_SIZE EQUAL 32) +if(NOT ADDRESS_SIZE EQUAL 32) if(WINDOWS) add_definitions(/FIXED:NO) else(WINDOWS) # not windows therefore gcc LINUX and DARWIN add_definitions(-fPIC) endif(WINDOWS) -endif(NOT WORD_SIZE EQUAL 32) +endif(NOT ADDRESS_SIZE EQUAL 32) set(media_plugin_base_SOURCE_FILES media_plugin_base.cpp diff --git a/indra/media_plugins/cef/CMakeLists.txt b/indra/media_plugins/cef/CMakeLists.txt index db471c7906..f9aada51a9 100644 --- a/indra/media_plugins/cef/CMakeLists.txt +++ b/indra/media_plugins/cef/CMakeLists.txt @@ -34,13 +34,13 @@ include_directories(SYSTEM ### media_plugin_cef -if(NOT WORD_SIZE EQUAL 32) +if(NOT ADDRESS_SIZE EQUAL 32) if(WINDOWS) add_definitions(/FIXED:NO) else(WINDOWS) # not windows therefore gcc LINUX and DARWIN add_definitions(-fPIC) endif(WINDOWS) -endif(NOT WORD_SIZE EQUAL 32) +endif(NOT ADDRESS_SIZE EQUAL 32) set(media_plugin_cef_SOURCE_FILES media_plugin_cef.cpp diff --git a/indra/media_plugins/example/CMakeLists.txt b/indra/media_plugins/example/CMakeLists.txt index 171645ef04..d84e40855b 100644 --- a/indra/media_plugins/example/CMakeLists.txt +++ b/indra/media_plugins/example/CMakeLists.txt @@ -32,13 +32,13 @@ include_directories(SYSTEM ### media_plugin_example -if(NOT WORD_SIZE EQUAL 32) +if(NOT ADDRESS_SIZE EQUAL 32) if(WINDOWS) add_definitions(/FIXED:NO) else(WINDOWS) # not windows therefore gcc LINUX and DARWIN add_definitions(-fPIC) endif(WINDOWS) -endif(NOT WORD_SIZE EQUAL 32) +endif(NOT ADDRESS_SIZE EQUAL 32) set(media_plugin_example_SOURCE_FILES media_plugin_example.cpp diff --git a/indra/media_plugins/gstreamer010/CMakeLists.txt b/indra/media_plugins/gstreamer010/CMakeLists.txt index 447f6e0689..a10ea19b17 100644 --- a/indra/media_plugins/gstreamer010/CMakeLists.txt +++ b/indra/media_plugins/gstreamer010/CMakeLists.txt @@ -33,13 +33,13 @@ include_directories(SYSTEM ### media_plugin_gstreamer010 -if(NOT WORD_SIZE EQUAL 32) +if(NOT ADDRESS_SIZE EQUAL 32) if(WINDOWS) add_definitions(/FIXED:NO) else(WINDOWS) # not windows therefore gcc LINUX and DARWIN add_definitions(-fPIC) endif(WINDOWS) -endif(NOT WORD_SIZE EQUAL 32) +endif(NOT ADDRESS_SIZE EQUAL 32) set(media_plugin_gstreamer010_SOURCE_FILES media_plugin_gstreamer010.cpp diff --git a/indra/media_plugins/libvlc/CMakeLists.txt b/indra/media_plugins/libvlc/CMakeLists.txt index 535d29125b..d652a8dcf9 100644 --- a/indra/media_plugins/libvlc/CMakeLists.txt +++ b/indra/media_plugins/libvlc/CMakeLists.txt @@ -33,13 +33,13 @@ include_directories(SYSTEM ### media_plugin_libvlc -if(NOT WORD_SIZE EQUAL 32) +if(NOT ADDRESS_SIZE EQUAL 32) if(WINDOWS) add_definitions(/FIXED:NO) else(WINDOWS) # not windows therefore gcc LINUX and DARWIN add_definitions(-fPIC) endif(WINDOWS) -endif(NOT WORD_SIZE EQUAL 32) +endif(NOT ADDRESS_SIZE EQUAL 32) set(media_plugin_libvlc_SOURCE_FILES media_plugin_libvlc.cpp -- cgit v1.2.3 From 0c8556921d05a356afd4014b966ee8c0e1002e36 Mon Sep 17 00:00:00 2001 From: Nat Goodspeed Date: Tue, 15 Nov 2016 16:02:39 -0500 Subject: DRTVWR-418: Mistakenly inverted the sense of the LL_64BIT_BUILD test. --- indra/cmake/00-Common.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/cmake/00-Common.cmake b/indra/cmake/00-Common.cmake index e270a43006..8fc05659f6 100644 --- a/indra/cmake/00-Common.cmake +++ b/indra/cmake/00-Common.cmake @@ -79,7 +79,7 @@ if (WINDOWS) ) # Nicky: x64 implies SSE2 - if( ADDRESS_SIZE EQUAL 64 ) + if( ADDRESS_SIZE EQUAL 32 ) add_definitions( /arch:SSE2 ) endif() -- cgit v1.2.3