[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 ___ ___ Python-bugs-list mailing list Uns

[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 "/Users/brettcannon/Repositories/pyt

[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 ___ ___ Python-bugs-list mailing list Unsubscribe: https://mai

[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 ___ ___

[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 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 (clang-50

[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: 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 c

[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 who

[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 _Py