From 0b6f487c639ec0c28cd725e880f74ab810068a82 Mon Sep 17 00:00:00 2001 From: Francis Ricci Date: Thu, 8 Sep 2016 15:57:22 +0000 Subject: [PATCH] [compiler-rt] Don't use -fPIC when building for Windows Summary: This flag doesn't make sense on Windows systems. Reviewers: beanz, kubabrecka, compnerd Subscribers: dberris, llvm-commits, beanz Differential Revision: https://reviews.llvm.org/D24320 llvm-svn: 280953 --- compiler-rt/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/compiler-rt/CMakeLists.txt b/compiler-rt/CMakeLists.txt index 05bd8c0..7c9baad 100644 --- a/compiler-rt/CMakeLists.txt +++ b/compiler-rt/CMakeLists.txt @@ -129,7 +129,9 @@ if(NOT COMPILER_RT_HAS_FUNC_SYMBOL) endif() # Provide some common commmandline flags for Sanitizer runtimes. -append_list_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC SANITIZER_COMMON_CFLAGS) +if(NOT WIN32) + append_list_if(COMPILER_RT_HAS_FPIC_FLAG -fPIC SANITIZER_COMMON_CFLAGS) +endif() append_list_if(COMPILER_RT_HAS_FNO_BUILTIN_FLAG -fno-builtin SANITIZER_COMMON_CFLAGS) append_list_if(COMPILER_RT_HAS_FNO_EXCEPTIONS_FLAG -fno-exceptions SANITIZER_COMMON_CFLAGS) if(NOT COMPILER_RT_DEBUG) -- 2.7.4