[llvm-commits] [poolalloc] r137610 - in /poolalloc/trunk/runtime: DynCount/Makefile DynamicTypeChecks/Makefile FL2Allocator/Makefile FreeListAllocator/Makefile HeapFrag/Makefile PreRT/Makefile

John Criswell criswell at uiuc.edu
Mon Aug 15 08:47:11 PDT 2011


Author: criswell
Date: Mon Aug 15 10:47:10 2011
New Revision: 137610

URL: http://llvm.org/viewvc/llvm-project?rev=137610&view=rev
Log:
Fixed compilation on Mac OS X by disabling bitcode libraries for only that
platform.  XCode has its own llvm-gcc that the LLVM build system finds and
tries to use.  Disabling bitcode libraries seems to be the easiest fix.
Also modified one of the Makefiles so that LOADABLE_MODULE and SHARED_LIBRARY
are defined together; this seems necessary for building dynamically loadable
modules on Mac OS X.

Modified:
    poolalloc/trunk/runtime/DynCount/Makefile
    poolalloc/trunk/runtime/DynamicTypeChecks/Makefile
    poolalloc/trunk/runtime/FL2Allocator/Makefile
    poolalloc/trunk/runtime/FreeListAllocator/Makefile
    poolalloc/trunk/runtime/HeapFrag/Makefile
    poolalloc/trunk/runtime/PreRT/Makefile

Modified: poolalloc/trunk/runtime/DynCount/Makefile
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/runtime/DynCount/Makefile?rev=137610&r1=137609&r2=137610&view=diff
==============================================================================
--- poolalloc/trunk/runtime/DynCount/Makefile (original)
+++ poolalloc/trunk/runtime/DynCount/Makefile Mon Aug 15 10:47:10 2011
@@ -1,6 +1,5 @@
 LEVEL = ../..
 LIBRARYNAME=count
-BYTECODE_LIBRARY=1
 
 #
 # Build shared libraries on all platforms except Cygwin and MingW (which do
@@ -21,5 +20,14 @@
 CXX.Flags += -fno-threadsafe-statics
 include $(LEVEL)/Makefile.common
 
+#
+# Do not build bitcode library on Mac OS X; XCode will pre-install llvm-gcc,
+# and that can cause the build to fail if it doesn't match the current version
+# of LLVM.
+#
+ifneq ($(OS),Darwin)
+BYTECODE_LIBRARY=1
+endif
+
 # Always build optimized and debug versions
 all:: $(LIBNAME_OBJO) $(LIBNAME_OBJG)

Modified: poolalloc/trunk/runtime/DynamicTypeChecks/Makefile
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/runtime/DynamicTypeChecks/Makefile?rev=137610&r1=137609&r2=137610&view=diff
==============================================================================
--- poolalloc/trunk/runtime/DynamicTypeChecks/Makefile (original)
+++ poolalloc/trunk/runtime/DynamicTypeChecks/Makefile Mon Aug 15 10:47:10 2011
@@ -1,10 +1,14 @@
 LEVEL = ../..
 LIBRARYNAME = typechecks_rt
-BYTECODE_LIBRARY=1
 
+#
+# Don't build shared libraries on Windows.  Note that we need to specify
+# both SHARED_LIBRARY and LOADABLE_MODULE on Mac OS X.
+#
 ifneq ($(OS),Cygwin)
 ifneq ($(OS),MingW)
 SHARED_LIBRARY=1
+LOADABLE_MODULE := 1
 endif
 endif
 
@@ -14,5 +18,14 @@
 
 include $(LEVEL)/Makefile.common
 
+#
+# Do not build bitcode library on Mac OS X; XCode will pre-install llvm-gcc,
+# and that can cause the build to fail if it doesn't match the current version
+# of LLVM.
+#
+ifneq ($(OS),Darwin)
+BYTECODE_LIBRARY=1
+endif
+
 # Always build optimized and debug versions
 all:: $(LIBNAME_OBJO) $(LIBNAME_OBJG)

Modified: poolalloc/trunk/runtime/FL2Allocator/Makefile
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/runtime/FL2Allocator/Makefile?rev=137610&r1=137609&r2=137610&view=diff
==============================================================================
--- poolalloc/trunk/runtime/FL2Allocator/Makefile (original)
+++ poolalloc/trunk/runtime/FL2Allocator/Makefile Mon Aug 15 10:47:10 2011
@@ -1,6 +1,5 @@
 LEVEL = ../..
 LIBRARYNAME=poolalloc_rt
-BYTECODE_LIBRARY=1
 
 #
 # Build shared libraries on all platforms except Cygwin and MingW (which do
@@ -20,3 +19,12 @@
 
 include $(LEVEL)/Makefile.common
 
+#
+# Do not build bitcode library on Mac OS X; XCode will pre-install llvm-gcc,
+# and that can cause the build to fail if it doesn't match the current version
+# of LLVM.
+#
+ifneq ($(OS),Darwin)
+BYTECODE_LIBRARY=1
+endif
+

Modified: poolalloc/trunk/runtime/FreeListAllocator/Makefile
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/runtime/FreeListAllocator/Makefile?rev=137610&r1=137609&r2=137610&view=diff
==============================================================================
--- poolalloc/trunk/runtime/FreeListAllocator/Makefile (original)
+++ poolalloc/trunk/runtime/FreeListAllocator/Makefile Mon Aug 15 10:47:10 2011
@@ -7,7 +7,8 @@
 #
 ifneq ($(OS),Cygwin)
 ifneq ($(OS),MingW)
-SHARED_LIBRARY=1
+#SHARED_LIBRARY=1
+#LOADABLE_MODULE := 1
 endif
 endif
 

Modified: poolalloc/trunk/runtime/HeapFrag/Makefile
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/runtime/HeapFrag/Makefile?rev=137610&r1=137609&r2=137610&view=diff
==============================================================================
--- poolalloc/trunk/runtime/HeapFrag/Makefile (original)
+++ poolalloc/trunk/runtime/HeapFrag/Makefile Mon Aug 15 10:47:10 2011
@@ -1,8 +1,6 @@
 LEVEL = ../..
 LIBRARYNAME=heapfrag
 
-#BYTECODE_LIBRARY=1
-
 #
 # Build shared libraries on all platforms except Cygwin and MingW (which do
 # not support them).
@@ -15,5 +13,14 @@
 
 include $(LEVEL)/Makefile.common
 
+#
+# Do not build bitcode library on Mac OS X; XCode will pre-install llvm-gcc,
+# and that can cause the build to fail if it doesn't match the current version
+# of LLVM.
+#
+ifneq ($(OS),Darwin)
+BYTECODE_LIBRARY=1
+endif
+
 # Always build optimized and debug versions
 all:: $(LIBNAME_OBJO) $(LIBNAME_OBJG)

Modified: poolalloc/trunk/runtime/PreRT/Makefile
URL: http://llvm.org/viewvc/llvm-project/poolalloc/trunk/runtime/PreRT/Makefile?rev=137610&r1=137609&r2=137610&view=diff
==============================================================================
--- poolalloc/trunk/runtime/PreRT/Makefile (original)
+++ poolalloc/trunk/runtime/PreRT/Makefile Mon Aug 15 10:47:10 2011
@@ -1,6 +1,14 @@
 LEVEL = ../..
 LIBRARYNAME=pa_pre_rt
-BYTECODE_LIBRARY=1
 
 include $(LEVEL)/Makefile.common
 
+#
+# Do not build bitcode library on Mac OS X; XCode will pre-install llvm-gcc,
+# and that can cause the build to fail if it doesn't match the current version
+# of LLVM.
+#
+ifneq ($(OS),Darwin)
+BYTECODE_LIBRARY=1
+endif
+





More information about the llvm-commits mailing list