[LLVMbugs] [Bug 14903] New: cmake shared build of modules/bundles incorrect on darwin

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Thu Jan 10 13:06:15 PST 2013


http://llvm.org/bugs/show_bug.cgi?id=14903

             Bug #: 14903
           Summary: cmake shared build of modules/bundles incorrect on
                    darwin
           Product: Build scripts
           Version: trunk
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: cmake
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: fang at csl.cornell.edu
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Darwin cmake+shared builds currently produce LLVMHello.dylib and
BugpointPasses.dylib of type "dynamically shared library", when in fact they
should be loadable plug-ins, a.k.a. bundles.  
(shared libraries != bundles on darwin, but they are indistinguishable on
linux)

The fix for this is trivial, following the example of LLVMPolly.so:

--- lib/Transforms/Hello/CMakeLists.txt.orig    2013-01-09 17:18:11.000000000
-0800
+++ lib/Transforms/Hello/CMakeLists.txt 2013-01-09 17:10:58.000000000 -0800
@@ -1,3 +1,5 @@
+# patch: this should be built as a bundle/module/plug-in
+set(MODULE TRUE)
 add_llvm_loadable_module( LLVMHello
   Hello.cpp
   )
--- tools/bugpoint-passes/CMakeLists.txt.orig   2013-01-09 17:17:41.000000000
-0800
+++ tools/bugpoint-passes/CMakeLists.txt        2013-01-09 17:12:36.000000000
-0800
@@ -1,3 +1,5 @@
+# patch: this should be built as a bundle/module/plug-in
+set(MODULE TRUE)
 add_llvm_loadable_module( BugpointPasses
   TestPasses.cpp
   )

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list