This is an archive of the discontinued LLVM Phabricator instance.

[Polly] Remove -fvisibility=hidden and FORCE_STATIC.
ClosedPublic

Authored by Meinersbur on Sep 12 2016, 9:13 AM.

Details

Summary

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.

Diff Detail

Repository
rL LLVM

Event Timeline

Meinersbur updated this revision to Diff 71015.Sep 12 2016, 9:13 AM
Meinersbur retitled this revision from to [Polly] Remove -fvisibility=hidden and FORCE_STATIC..
Meinersbur updated this object.
Meinersbur added reviewers: grosser, jdoerfert.
Meinersbur added a project: Restricted Project.
Meinersbur added subscribers: pollydev, llvm-commits.
Meinersbur updated this object.Sep 12 2016, 9:28 AM
grosser accepted this revision.Sep 12 2016, 11:00 AM
grosser edited edge metadata.

Not sure if my email was seen. Officially LGTM in phabricator.

This revision is now accepted and ready to land.Sep 12 2016, 11:00 AM
This revision was automatically updated to reflect the committed changes.