Seb Martel wrote:
Hi,
I am trying to build boost.threads 1.32 statically with struct alignment set to 1.
I dug up from the documentation that this should do the trick:
bjam -sTOOLS=vc-7_1 "-sBUILD=debug <struct-alignment>1" -a -d+2
however, I don't see the alignment switch '/Zp1' on the command line :
"cl" /Zm800 -nologo /EHsc -c -DBOOST_THREAD_LIB_NAME=boost_thread -DBOOST_THREAD_BUILD_LIB=1 /Z7 /Od /Ob0 /EHsc /GR /MDd /Op Zc:forScope /Zc:wchar_t -I"..\..\..\bin\boost\libs\thread\build" -I"C:\Program Files\Microsoft Visual Studio .NET 2003\VC7\include" I"G:\boost_1_32_0"
-Fo"..\..\..\bin\boost\libs\thread\build\libboost_thread.lib\vc-7_1\debug\threading-multi\tss.obj" -Tp"..\..\..\libs\thread\build\..\src\tss.cpp"
Is there something I am missing ?
-seb
I am getting in the habit of answering to myself : Here is a patch to msvc-tools.jam that implements support for feature struct-alignment, as documented in features.jam http://boost.org/tools/build/v1/features.jam G:\boost_1_32_0\tools\build\v1> diff orig.jam msvc-tools.jam 81a82,87
flags msvc CFLAGS <struct-alignment>1 : /Zp1 ; flags msvc CFLAGS <struct-alignment>2 : /Zp2 ; flags msvc CFLAGS <struct-alignment>4 : /Zp4 ; flags msvc CFLAGS <struct-alignment>8 : /Zp8 ; flags msvc CFLAGS <struct-alignment>16 : /Zp16 ; flags msvc CFLAGS <struct-alignment>auto : ;
Is there a better way to do this ? -seb