<div dir="ltr">    Attached is a first pass at modifying the cmakefiles from <a href="https://github.com/pathscale/openmprtl/blob/master/itt/libomp_oss">https://github.com/pathscale/openmprtl/blob/master/itt/libomp_oss</a> to build openmp. I noticed that the existing <a href="http://build.pl">build.pl</a> doesn't actually build a fat shared library on darwin. The attached changes can does this in an indirect fashion with…<div>
<br></div><div>% cd runtime</div><div>% mkdir build_32</div><div>% cd build_32</div><div>% cmake -DARCH="32" ..</div><div>% make VERBOSE=1</div><div>% cd ..</div><div>% mkdir build_32e</div><div>% cmake -DARCH="32e" ..</div>
<div>% make VERBOSE=1</div><div>% cd ..</div><div>% lipo ./build_32/src/libiomp5.dylib ./build_32e/src/libiomp5.dylib -create -o libiomp5.dylib</div><div>% file  libiomp5.dylib</div><div><div>libiomp5.dylib: Mach-O universal binary with 2 architectures</div>
<div>libiomp5.dylib (for architecture x86_64):<span class="" style="white-space:pre">   </span>Mach-O 64-bit dynamically linked shared library x86_64</div><div>libiomp5.dylib (for architecture i386):<span class="" style="white-space:pre">      </span>Mach-O dynamically linked shared library i386</div>
</div><div><br></div><div>Normally we could do this in cmake by passing '-arch i386 -arch x86_64' but use of assembly code in the build gums that up.</div></div>