[PATCH] [compiler-rt] Upstreaming small changes from the Rust project.

Vadim Chugunov vadimcn at gmail.com
Tue Dec 9 02:20:30 PST 2014


REPOSITORY
  rL LLVM

================
Comment at: lib/builtins/assembly.h:45
@@ -42,3 +44,3 @@
 
-#else // !__APPLE__ && !__ELF__
+#elif defined(__WIN32__)
 
----------------
compnerd wrote:
> I'd rather leave this part of the change out.  We don't have a good way to test if the target is COFF, which these directives target, not specifically Windows.
ok

================
Comment at: make/config.mk:47
@@ -46,3 +46,3 @@
 COMMON_INCLUDES=-I${ProjSrcRoot}/lib -I${ProjSrcRoot}/include
-COMMON_CXXFLAGS=-std=c++11 -fno-exceptions -fPIC -funwind-tables $(COMMON_INCLUDES)
-COMMON_CFLAGS=-fPIC $(COMMON_INCLUDES)
+COMMON_CXXFLAGS=-std=c++11 -fno-exceptions -funwind-tables $(COMMON_INCLUDES)
+COMMON_CFLAGS=$(COMMON_INCLUDES)
----------------
compnerd wrote:
> Whats the reason for sinking the -fPIC into the individual makefiles rather than keeping it here?
mingw gcc issues a warning for each compiled file: "-fPIC ignored for target (all code is position independent)", which doesn't go well together with -Werror.

On second thought, -fno-PIC seems to override it, so perhaps I'll drop this change and instead add a special case when building for Windows.

http://reviews.llvm.org/D6547






More information about the llvm-commits mailing list