[LLVMdev] Darwin option processing

Mike Stump mrs at apple.com
Thu May 7 18:24:45 PDT 2009


I'm toying with building with -mdynamic-no-pic, but for this to work,  
the shared library bits in llvm can't be built with that flag.

I've found that:

Index: Makefile.rules
===================================================================
--- Makefile.rules	(revision 71041)
+++ Makefile.rules	(working copy)
@@ -472,6 +476,9 @@
  ifneq ($(DARWIN_MAJVERS),4)
    LD.Flags += $(RPATH) -Wl,$(LibDir)
  endif
+  ifeq ($(OS),Darwin)
+    EXTRA_OPTIONS := $(filter-out -mdynamic-no-pic,$(EXTRA_OPTIONS))
+  endif
  endif

  ifdef TOOL_VERBOSE


can be used to strip the option out in the places it won't work.  This  
mirrors the style used in other parts of the file.  If the experiment  
goes well, I'd like to check this in, if no objections.  If someone  
wants to approve it (pending testing), let me know...



More information about the llvm-dev mailing list