Skip to content

Commit e0ed4cc

Browse files
committed
Merge #19530: depends: build LTO support into Apple's ld64
5962522 depends: bump native_cctools for fixed lto with external clang (Cory Fields) 00d1ba7 depends: enable lto support for Apple's ld64 (Cory Fields) Pull request description: 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. ACKs for top commit: fanquake: ACK 5962522. The relevant option upstream is [here](https://github.com/tpoechtrager/cctools-port/blob/master/cctools/m4/llvm.m4#L4). Tree-SHA512: df2775e74e7bc847e6cef94cb8457d503d6c9e2fdea861e51386fa6ed5a7ba688241db3685561ae1a32f66724c1b3801727252025f00c04b90a3bdc8a4f6f93b
2 parents cea39fc + 5962522 commit e0ed4cc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

depends/packages/native_cctools.mk

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
package=native_cctools
2-
$(package)_version=4da2f3b485bcf4cef526f30c0b8c0bcda99cdbb4
2+
$(package)_version=55562e4073dea0fbfd0b20e0bf69ffe6390c7f97
33
$(package)_download_path=https://github.com/tpoechtrager/cctools-port/archive
44
$(package)_file_name=$($(package)_version).tar.gz
5-
$(package)_sha256_hash=a2d491c0981cef72fee2b833598f20f42a6c44a7614a61c439bda93d56446fec
5+
$(package)_sha256_hash=e51995a843533a3dac155dd0c71362dd471597a2d23f13dff194c6285362f875
66
$(package)_build_subdir=cctools
77
ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
88
$(package)_clang_version=8.0.0
@@ -63,9 +63,10 @@ endef
6363
endif
6464

6565
define $(package)_set_vars
66-
$(package)_config_opts=--target=$(host) --disable-lto-support --with-libtapi=$($(package)_extract_dir)
66+
$(package)_config_opts=--target=$(host) --with-libtapi=$($(package)_extract_dir)
6767
$(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib
6868
ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),)
69+
$(package)_config_opts+=--enable-lto-support --with-llvm-config=$($(package)_extract_dir)/toolchain/bin/llvm-config
6970
$(package)_cc=$($(package)_extract_dir)/toolchain/bin/clang
7071
$(package)_cxx=$($(package)_extract_dir)/toolchain/bin/clang++
7172
else

0 commit comments

Comments
 (0)