[issue21122] CPython fails to build modules with LLVM LTO on Mac OS X

2016-09-06 Thread Brett Cannon
Changes by Brett Cannon : -- resolution: -> fixed status: open -> closed ___ Python tracker ___

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS X

2016-09-06 Thread Roundup Robot
Roundup Robot added the comment: New changeset cc5f8179a7ba by Ned Deily in branch 'default': Issue #21122: Fix LTO builds on OS X. https://hg.python.org/cpython/rev/cc5f8179a7ba -- nosy: +python-dev ___ Python tracker

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS X

2016-09-02 Thread Brett Cannon
Brett Cannon added the comment: Here is a patch to turn on `-Wl,-export_dynamic` when building with LTO. Unfortunately I have a bunch of tests that fail when running with LTO+PGO of the form of: [ 95/398] test_bytes Traceback (most recent call last): File

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS X

2016-09-02 Thread Brett Cannon
Changes by Brett Cannon : -- components: +Macintosh ___ Python tracker ___ ___

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS X

2014-09-09 Thread Jonas Wagner
Jonas Wagner added the comment: No response for a while, and problem solved... closing. -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21122 ___

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS X

2014-04-04 Thread Jonas Wagner
Jonas Wagner added the comment: I confirm that this also works with my self-compiled Clang 3.4. -export_dynamic was the missing option. Is a good place to document this? Otherwise, I think this issue can be closed. Thanks a lot for the help! --

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS X

2014-04-02 Thread Jonas Wagner
Jonas Wagner added the comment: Thanks Ned, this is interesting! I don't know about Mac OS, but on Ubuntu, LTO and PGO apparently make Python around 10% faster (see #17781). However, that data point refers to GCC's LTO, not LLVM's. Personally I'm interested in LTO because I want to obtain

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS X

2014-04-02 Thread Ronald Oussoren
Ronald Oussoren added the comment: I've used -O4 for extensions in the past (which until recently implied LTO) and that worked fine. I'm pretty sure that I haven't used LTO for python itself, apart from a some tests with an early version llvm-gcc where using LTO for building python used to

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS X

2014-04-02 Thread Ronald Oussoren
Ronald Oussoren added the comment: Have you tried the -export_dynamic option for ld(1): -export_dynamic Preserves all global symbols in main executables during LTO. Without this option, Link Time Optimization is allowed to inline and remove global functions. This

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS X

2014-04-02 Thread Ronald Oussoren
Ronald Oussoren added the comment: This works for me (with a separate build directory): CC=clang CXX=clang++ CFLAGS=-g -flto LDFLAGS=-flto -Wl,-export_dynamic ../configure This is on OSX 10.9.2, with Xcode 5.1, and clang --version says: $ clang --version Apple LLVM version 5.1

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS

2014-04-01 Thread Jonas Wagner
New submission from Jonas Wagner: CPython fails to build with LLVM's link-time optimization (LTO) in Mac OS. Very similar commands work on Linux. I'm currently configuring CPython as follows: on Linux: RANLIB=ar -s --plugin=/path/to/llvm/lib/LLVMgold.so CC=/path/to/llvm/bin/clang

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS

2014-04-01 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21122 ___ ___ Python-bugs-list

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS

2014-04-01 Thread STINNER Victor
Changes by STINNER Victor victor.stin...@gmail.com: -- nosy: +koobs ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21122 ___ ___ Python-bugs-list

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS

2014-04-01 Thread Jonas Wagner
Jonas Wagner added the comment: I am indeed using Clang 3.4 (both the one that ships with Mac OS, and a version compiled from the sources). However, the errors I get are rather different than #20767. In particular, Clang finishes successfully and does produce shared object files; they just

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS

2014-04-01 Thread STINNER Victor
STINNER Victor added the comment: What is your clang version? See also issue #20767. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21122 ___

[issue21122] CPython fails to build modules with LLVM LTO on Mac OS X

2014-04-01 Thread Ned Deily
Ned Deily added the comment: Just as an experiment (using the 3.4 branch and the Xcode 5.1 clang), the list of unique symbols not found during the test dlopen in setup.py when using -flto: _PyArg_ParseTuple _PyArg_ParseTupleAndKeywords _PyBaseObject_Type _PyBool_Type _PyByteArray_Type