[llvm-commits] [llvm] r65229 - /llvm/trunk/Makefile.rules
Nick Lewycky
nicholas at mxc.ca
Sat Feb 21 00:41:11 PST 2009
Author: nicholas
Date: Sat Feb 21 02:41:09 2009
New Revision: 65229
URL: http://llvm.org/viewvc/llvm-project?rev=65229&view=rev
Log:
Pass different flags on different platforms when building PIC.
Modified:
llvm/trunk/Makefile.rules
Modified: llvm/trunk/Makefile.rules
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/Makefile.rules?rev=65229&r1=65228&r2=65229&view=diff
==============================================================================
--- llvm/trunk/Makefile.rules (original)
+++ llvm/trunk/Makefile.rules Sat Feb 21 02:41:09 2009
@@ -278,8 +278,19 @@
endif
ifeq ($(ENABLE_PIC),1)
- CXX.Flags += -fPIC
- C.Flags += -fPIC
+ ifeq ($(LLVM_ON_WIN32),1)
+ # Nothing. Win32 defaults to PIC and warns when given -fPIC
+ else
+ ifeq ($(OS),Darwin)
+ # common is forbidden in dylib files
+ CXX.Flags += -fno-common
+ C.Flags += -fno-common
+ else
+ # Linux and others; pass -fPIC
+ CXX.Flags += -fPIC
+ C.Flags += -fPIC
+ endif
+ endif
endif
CXX.Flags += $(CXXFLAGS) -Woverloaded-virtual
More information about the llvm-commits
mailing list