[LLVMdev] 32-bit in-tree Polly build with CMake

Tobias Grosser tobias at grosser.es
Thu Jun 7 06:26:47 PDT 2012


On 06/07/2012 02:41 PM, Ondřej Hošek wrote:
> Hi,
>
> I was having troubles building LLVM with Polly in-tree using CMake
> with LLVM_BUILD_32_BITS on. Turns out CMake considers LLVMPolly a
> module, not a shared library, and LLVM_BUILD_32_BITS only makes
> provisions for the EXE and SHARED linker flags.

Hi,

thanks for reporting.

== Some bug reporting advice ==

In this case, posting to the mailing list was the best option, as it 
seems some discussion might be helpful and the discussion may even allow 
you to fix the problem yourself.

In general, creating a bug report is preferred if:

1. You cannot fix the bug yourself and/or you don't have time to fix it

2. Fixing the bug will take time

When looking into a bug and/or discussing it, it may turn out that 
fixing the bug is complicated. It may either depend on fixing some other 
bugs or a larger change is required that cannot be done directly.

In both cases it is good to document the bug.

For now, you don't need to open the bug. Let's see if we can solve the 
problem right ahead?

=== To the problem itself ===

First of all, is this problem platform specific?
We have a 32bit buildbot [1] and it does not report any problems. Do you 
understand why.

 > Possible fixes (pick one):
 >
 > 1. Change cmake/modules/HandleLLVMOptions.cmake to append -m32 to
 > CMAKE_MODULE_LINKER_FLAGS as well if LLVM_BUILD_32_BITS is set.
 > 2. Change $POLLY/CMakeLists.txt not to use MODULE in add_polly_library.

I would go for option 1 as Polly itself is used not as a shared library, 
but as a module. Would you be able to provide a patch?

Tobi

[1] http://lab.llvm.org:8011/builders/polly-intel32-linux/builds/1176




More information about the llvm-dev mailing list