[Openmp-dev] Initial Intel Cmake Build System Patch

Peyton, Jonathan L jonathan.l.peyton at intel.com
Mon Jun 9 08:14:56 PDT 2014


Jack,

Right now, after you build the both the 32 and 32e libraries, you should be able to say “make fat” and it will call the lipo command for you.
Keep in mind, the system is setup so that cmake will only include the “fat” target when the configuration is for 32e, and it will not automatically build the libraries for you if you specify the “fat” target but both 32 and 32e libraries haven’t been built yet, only an error is spit out.  There are no plans to automate it further.

There is some instruction on it in Build_With_CMake.txt.
+Mac Fat Libraries
+=================
+On OS X machines, it is possible to build universal (or fat) libraries which
+include both IA-32 architecture and Intel(R) 64 architecture objects in a
+single archive; just build the 32 and 32e libraries separately:
+ $ cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -Darch=32 ..
+ $ make
+ $ cmake -Darch=32e ..
+ $ make
+then invoke make again with a special argument as follows:
+ $ make fat
+* The fat target is only available for the arch=32e configuration.
+* The fat libraries will be put in exports/mac_32e/lib while the "thin" libraries
+  will be in exports/mac_32e/lib.thin and exports/mac_32/lib.thin

Johnny

From: Jack Howarth [mailto:howarth.mailing.lists at gmail.com]
Sent: Friday, June 6, 2014 8:42 PM
To: Peyton, Jonathan L
Cc: openmp-dev at dcs-maillist2.engr.illinois.edu
Subject: Re: [Openmp-dev] Initial Intel Cmake Build System Patch

Jonathon,
     Thanks. Confirmed to work properly on x86_64-apple-darwin12 with…

% cd runtime
% mkdir build
% cd build
% cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -Dos=mac -Darch=32 ..
% make all common
% file libiomp5.dylib
libiomp5.dylib: Mach-O dynamically linked shared library i386

and

% cd runtime
% mkdir build
% cd build
% cmake -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -Dos=mac -Darch=32e ..
% make all common
% file libiomp5.dylib
libiomp5.dylib: Mach-O 64-bit dynamically linked shared library x86_64

Are there any plans to tweak this to automate the build of a fat libiomp5.dylib on darwin?


On Fri, Jun 6, 2014 at 7:02 PM, Peyton, Jonathan L <jonathan.l.peyton at intel.com<mailto:jonathan.l.peyton at intel.com>> wrote:
Hello All,

Since everyone wants to see it, this patch is the initial cmake build system we have been developing.  Some quick notes:
1) The top-level CMakeLists.txt you all have been working on is moved to CMakeLists.txt.old (the src/CMakeLists.txt file is untouched)
2) There is a Build_With_CMake.txt tutorial that shows the most important features and how to build libiomp5
3) As a special note, the current build.pl<http://build.pl> system does five “micro-tests” which test certain features of the newly built libiomp5.so library (basic linking/compilation, library dependencies, etc.)  If you want these to be off in the new CMake system just specify it when calling cmake with the flag –Dtests=off

Please keep in mind this is the initial system and that it can be trimmed back incrementally to what you need.  Right now, it builds nearly identical libraries as build.pl<http://build.pl>.  On a related note, I attempted ( as suggested by David ) to port libiomp5 to NetBSD to see what walls I would hit.  I hit some ☺ , but eventually got it working (not included in this initial patch).  So I am going to follow up this initial patch with further improvements (to the build system) to make re-targeting in general even easier.  Some of these improvements will also help the build.pl<http://build.pl> system as well.

Just try it.  See what you hate and what you like.  Leave feedback.  I am here on weekdays.

Thanks,
Johnny

_______________________________________________
Openmp-dev mailing list
Openmp-dev at dcs-maillist2.engr.illinois.edu<mailto:Openmp-dev at dcs-maillist2.engr.illinois.edu>
http://lists.cs.uiuc.edu/mailman/listinfo/openmp-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/openmp-dev/attachments/20140609/619dde01/attachment.html>


More information about the Openmp-dev mailing list