Remove -fvisibility=hidden and FORCE_STATIC.
authorMichael Kruse <llvm@meinersbur.de>
Mon, 12 Sep 2016 18:25:00 +0000 (18:25 +0000)
committerMichael Kruse <llvm@meinersbur.de>
Mon, 12 Sep 2016 18:25:00 +0000 (18:25 +0000)
commite5e752a28b1ef1b7be38268734df87cbb3298e6d
tree059acd49d58452660ac35708a0c4dde3bcf98d45
parentac205312038a09a9607020b032e88fe6027e30a6
Remove -fvisibility=hidden and FORCE_STATIC.

The flag -fvisibility=hidden flag was used for the integrated Integer
Set Library (and PPCG) to keep their definitions local to Polly. The
motivation was the be loaded into a DragonEgg-powered GCC, where GCC
might itself use ISL for its Graphite extension. The symbols of Polly's
ISL and GCC's ISL would clash.

The DragonEgg project is not actively developed anymore, but Polly's
unittests need to call ISL functions to set up a testing environment.
Unfortunately, the -fvisibility=hidden flag means that the ISL symbols
are not available to the gtest executable as it resides outside of
libPolly when linked dynamically. Currently, CMake links a second copy
of ISL into the unittests which leads to subtle bugs. What got observed
is that two isl_ids for isl_id_none exist, one for each library
instance. Because isl_id's are compared by address, isl_id_none could
happen to be different from isl_id_none, depending on which library
instance set the address and does the comparison.

Also remove the FORCE_STATIC flag which was introduced to keep the ISL
symbols visible inside the same libPolly shared object, even when build
with BUILD_SHARED_LIBS.

Differential Revision: https://reviews.llvm.org/D24460

llvm-svn: 281242
polly/cmake/polly_macros.cmake
polly/lib/External/CMakeLists.txt