theuni
commented at 8:57 pm on July 15, 2020:
member
This didn’t work for a few reasons (various toolchain compatibility issues) the last time I tested it, but after the last round of bumps it works with no apparent issues.
Note that this does not enable LTO by default in any way, only hooks up the machinery for -flto to work correctly when specified.
Lines were split for an easier rebase after #17919 is merged.
fanquake added the label
Build system
on Jul 15, 2020
fanquake
commented at 1:00 pm on July 16, 2020:
member
Concept ACK 🚀
depends: enable lto support for Apple's ld64
Note that this does not _enable_ lto by default in any way, only hooks up the
machinery for -flto to work correctly.
enable-lto-support is explicitly used for pinned-clang because we know it
works. It is neither enabled nor disabled in the external clang case so that
it can be auto-detected.
00d1ba7aaa
depends: bump native_cctools for fixed lto with external clang
https://github.com/tpoechtrager/cctools-port/pull/85 was merged upstream, which
fixes lto detection for external clang with some Linux Distro's including
Ubuntu.
5962522fbc
theuni force-pushed
on Jul 16, 2020
theuni
commented at 8:06 pm on July 16, 2020:
member
0[ 97%] Building C object genisoimage/CMakeFiles/genisoimage.dir/endian.o
1[ 97%] Building C object genisoimage/CMakeFiles/genisoimage.dir/sha1.o
2[ 97%] Building C object genisoimage/CMakeFiles/genisoimage.dir/sha256.o
3[ 98%] Building C object genisoimage/CMakeFiles/genisoimage.dir/sha512.o
4[ 98%] Building C object genisoimage/CMakeFiles/genisoimage.dir/checksum.o
5[100%] Linking C executable genisoimage
6/usr/bin/ld: CMakeFiles/genisoimage.dir/apple.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
7/usr/bin/ld: CMakeFiles/genisoimage.dir/boot.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
8/usr/bin/ld: CMakeFiles/genisoimage.dir/desktop.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
9/usr/bin/ld: CMakeFiles/genisoimage.dir/dvd_file.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
10/usr/bin/ld: CMakeFiles/genisoimage.dir/dvd_reader.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
11/usr/bin/ld: CMakeFiles/genisoimage.dir/eltorito.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
12/usr/bin/ld: CMakeFiles/genisoimage.dir/files.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
13/usr/bin/ld: CMakeFiles/genisoimage.dir/hash.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
14/usr/bin/ld: CMakeFiles/genisoimage.dir/ifo_read.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
15/usr/bin/ld: CMakeFiles/genisoimage.dir/joliet.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
16/usr/bin/ld: CMakeFiles/genisoimage.dir/mac_label.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
17/usr/bin/ld: CMakeFiles/genisoimage.dir/multi.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
18/usr/bin/ld: CMakeFiles/genisoimage.dir/name.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
19/usr/bin/ld: CMakeFiles/genisoimage.dir/rock.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
20/usr/bin/ld: CMakeFiles/genisoimage.dir/scsi.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
21/usr/bin/ld: CMakeFiles/genisoimage.dir/stream.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
22/usr/bin/ld: CMakeFiles/genisoimage.dir/tree.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
23/usr/bin/ld: CMakeFiles/genisoimage.dir/udf.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
24/usr/bin/ld: CMakeFiles/genisoimage.dir/volume.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
25/usr/bin/ld: CMakeFiles/genisoimage.dir/write.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
26/usr/bin/ld: CMakeFiles/genisoimage.dir/boot-alpha.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
27/usr/bin/ld: CMakeFiles/genisoimage.dir/boot-hppa.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
28/usr/bin/ld: CMakeFiles/genisoimage.dir/boot-mips.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
29/usr/bin/ld: CMakeFiles/genisoimage.dir/jte.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
30/usr/bin/ld: CMakeFiles/genisoimage.dir/rsync.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
31/usr/bin/ld: CMakeFiles/genisoimage.dir/boot-mipsel.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
32/usr/bin/ld: CMakeFiles/genisoimage.dir/checksum.o:(.bss+0x0): multiple definition of `outfile'; CMakeFiles/genisoimage.dir/genisoimage.o:(.bss+0x0): first defined here
33collect2: error: ld returned 1 exit status
Have not investigated further.
fanquake added the label
Needs gitian build
on Jul 17, 2020
theuni
commented at 12:53 pm on July 17, 2020:
member
@fanquake Strange… this is fine locally, and our c-i didn’t have any trouble with it either.
Is the problem locally reproducible?
theuni
commented at 3:21 pm on July 17, 2020:
member
For me, builds of bitcoind and bitcoin-qt even succeed with lto enabled for dependencies as well with the following hack:
The solution seemed to be to pass -object_path_lto through to ld64. Doing that I end up with a properly generated .dSYM:
I think I understand what’s happening here. From the clang docs
0 The default for :option:`-flto` is "full", in which the
1 LLVM bitcode is suitable for monolithic Link Time Optimization (LTO), where
2 the linker merges all such modules into a single combined module for
3 optimization. With "thin", :doc:`ThinLTO <../ThinLTO>`
4 compilation is invoked instead.
5 6 .. note::
7 8 On Darwin, when using :option:`-flto` along with :option:`-g` and
9 compiling and linking in separate steps, you also need to pass
10 ``-Wl,-object_path_lto,<lto-filename>.o`` at the linking step to instruct the
11 ld64 linker not to delete the temporary object file generated during Link
12 Time Optimization (this flag is automatically passed to the linker by Clang
13 if compilation and linking are done in a single step). This allows debugging
14 the executable as well as generating the ``.dSYM`` bundle using :manpage:`dsymutil(1)`.
That’s describing us.
The machinery to get clang to do this for you only applies when compiling and linking at the same time. Here’s a comment from elsewhere explaining why:
0 // Add a 'dsymutil' step if necessary, when debug info is enabled and we
1 // have a compile input. We need to run 'dsymutil' ourselves in such cases
2 // because the debug info will refer to a temporary object file which
3 // will be removed at the end of the compilation process.
I can confirm that is working as intended with a test-case:
So, it sounds as though everything is actually working as intended. We just need to add that link flag if lto and debugging are on. But we’re getting ahead of ourselves, as we don’t have an option for lto yet :)
fanquake referenced this in commit
007e15dcd7
on Jul 24, 2020
naumenkogs referenced this in commit
1c73c54479
on Jul 24, 2020
sidhujag referenced this in commit
26b9a95b92
on Jul 24, 2020
sidhujag referenced this in commit
72a7a0e88b
on Jul 24, 2020
sidhujag referenced this in commit
ff4a47add1
on Jul 24, 2020
fanquake approved
fanquake
commented at 7:41 am on July 28, 2020:
member
ACK5962522fbcb7b72c269fc271ac4463791a103918. The relevant option upstream is here.
fanquake merged this
on Jul 28, 2020
fanquake closed this
on Jul 28, 2020
sidhujag referenced this in commit
aad54d66aa
on Jul 28, 2020
zkbot referenced this in commit
2a39656e6d
on Jul 30, 2020
Warchant referenced this in commit
3b5baf7709
on Aug 6, 2020
zkbot referenced this in commit
e0692ed4df
on Aug 7, 2020
deadalnix referenced this in commit
9e3969ba97
on Jan 5, 2021
furszy referenced this in commit
816f42d7ac
on May 25, 2021
PastaPastaPasta referenced this in commit
53ed3f6697
on Jun 27, 2021
PastaPastaPasta referenced this in commit
22165582ec
on Jun 28, 2021
PastaPastaPasta referenced this in commit
19bd7eb467
on Jun 29, 2021
PastaPastaPasta referenced this in commit
08a97ffed1
on Jul 1, 2021
PastaPastaPasta referenced this in commit
3e33950447
on Jul 1, 2021
PastaPastaPasta referenced this in commit
c3a4b8ea1b
on Jul 15, 2021
PastaPastaPasta referenced this in commit
ca2d095489
on Jul 16, 2021
kittywhiskers referenced this in commit
9f97a97a11
on Aug 24, 2021
kittywhiskers referenced this in commit
e7a28348a0
on Aug 24, 2021
kittywhiskers referenced this in commit
cbe90ef8eb
on Aug 24, 2021
kittywhiskers referenced this in commit
0220032161
on Aug 24, 2021
kittywhiskers referenced this in commit
7686acc1a5
on Aug 24, 2021
kittywhiskers referenced this in commit
be1b17355e
on Aug 24, 2021
kittywhiskers referenced this in commit
b86adc79fc
on Aug 25, 2021
kittywhiskers referenced this in commit
1ab73d5e71
on Aug 25, 2021
kittywhiskers referenced this in commit
ebe5a0c20a
on Aug 26, 2021
kittywhiskers referenced this in commit
2ec15d3d75
on Aug 26, 2021
kittywhiskers referenced this in commit
62dc66ce3d
on Aug 26, 2021
kittywhiskers referenced this in commit
f9ba0f6995
on Aug 27, 2021
kittywhiskers referenced this in commit
17e32dd03f
on Aug 30, 2021
kittywhiskers referenced this in commit
bba2bd4b7b
on Sep 1, 2021
kittywhiskers referenced this in commit
66f68786c6
on Sep 1, 2021
kittywhiskers referenced this in commit
cc575e6f0c
on Sep 2, 2021
kittywhiskers referenced this in commit
d3c22d9474
on Sep 3, 2021
kittywhiskers referenced this in commit
9f2019b36b
on Sep 3, 2021
kittywhiskers referenced this in commit
9c81cd1e82
on Sep 3, 2021
kittywhiskers referenced this in commit
adbc5f1dde
on Sep 4, 2021
This is a metadata mirror of the GitHub repository
bitcoin/bitcoin.
This site is not affiliated with GitHub.
Content is generated from a GitHub metadata backup.
generated: 2024-11-23 18:12 UTC
This site is hosted by @0xB10C More mirrored repositories can be found on mirror.b10c.me