[PATCH] D24460: [Polly] Remove -fvisibility=hidden and FORCE_STATIC.

Michael Kruse via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 12 11:33:39 PDT 2016


This revision was automatically updated to reflect the committed changes.
Closed by commit rL281242: Remove -fvisibility=hidden and FORCE_STATIC. (authored by Meinersbur).

Changed prior to commit:
  https://reviews.llvm.org/D24460?vs=71015&id=71037#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D24460

Files:
  polly/trunk/cmake/polly_macros.cmake
  polly/trunk/lib/External/CMakeLists.txt

Index: polly/trunk/cmake/polly_macros.cmake
===================================================================
--- polly/trunk/cmake/polly_macros.cmake
+++ polly/trunk/cmake/polly_macros.cmake
@@ -2,7 +2,7 @@
 include(CMakeParseArguments)
 
 macro(add_polly_library name)
-  cmake_parse_arguments(ARG "FORCE_STATIC" "" "" ${ARGN})
+  cmake_parse_arguments(ARG "" "" "" ${ARGN})
   set(srcs ${ARG_UNPARSED_ARGUMENTS})
   if(MSVC_IDE OR XCODE)
     file( GLOB_RECURSE headers *.h *.td *.def)
@@ -15,12 +15,6 @@
   endif(MSVC_IDE OR XCODE)
   if (MODULE)
     set(libkind MODULE)
-  elseif (ARG_FORCE_STATIC)
-    if (SHARED_LIBRARY OR BUILD_SHARED_LIBS)
-      message(STATUS "${name} is being built as static library because it is compiled with -fvisibility=hidden; "
-                     "Its symbols are not visible from outside a shared library")
-    endif ()
-    set(libkind STATIC)
   elseif (SHARED_LIBRARY)
     set(libkind SHARED)
   else()
Index: polly/trunk/lib/External/CMakeLists.txt
===================================================================
--- polly/trunk/lib/External/CMakeLists.txt
+++ polly/trunk/lib/External/CMakeLists.txt
@@ -256,7 +256,7 @@
     isl/imath/imrat.c
     )
 
-add_polly_library(PollyISL FORCE_STATIC
+add_polly_library(PollyISL
   ${ISL_FILES}
 )
 
@@ -274,19 +274,10 @@
 # ISL requires at least C99 to compile. gcc < 5.0 use -std=gnu89 as default.
 target_enable_c99(PollyISL)
 
-# Define the FLAGS for the compilation of isl and imath
-#
-# We first set the visibility of all isl functions to hidden to ensure we do
-# not clash with other isl versions that got linked into a program that uses
-# Polly. (This happens e.g when linking Polly with dragonegg)
-#
-# This is the reason for the FORCE_STATIC flag above; without it, not even Polly
-# could access ISL's symbols in shared library builds.
-#
-# We also disable warnings which should be coped with upstream.
+# Disable warnings which should be coped with upstream for isl and imath.
 if (NOT MSVC)
   set_target_properties(PollyISL PROPERTIES
-    COMPILE_FLAGS "-fvisibility=hidden -w"
+    COMPILE_FLAGS "-w"
   )
 endif ()
 
@@ -332,12 +323,12 @@
   ${PET_SOURCE_DIR}/include
 )
 
-add_polly_library(PollyPPCG FORCE_STATIC
+add_polly_library(PollyPPCG
   ${PPCG_FILES}
 )
 
 if (NOT MSVC)
   set_target_properties(PollyPPCG PROPERTIES
-    COMPILE_FLAGS "-fvisibility=hidden -w"
+    COMPILE_FLAGS "-w"
   )
 endif ()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24460.71037.patch
Type: text/x-patch
Size: 2429 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160912/3b6182f2/attachment-0001.bin>


More information about the llvm-commits mailing list