diff options
author | Cory Fields <cory-nospam-@coryfields.com> | 2020-07-15 20:46:14 +0000 |
---|---|---|
committer | Cory Fields <cory-nospam-@coryfields.com> | 2020-07-16 19:04:57 +0000 |
commit | 00d1ba7aaadbe881995ac1497633a012bc487bdd (patch) | |
tree | d463f7bab9f2de12a244959121fdcad751210fdf | |
parent | 1148f3d63094eab788993a9417e5038cfbe5aa77 (diff) |
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.
-rw-r--r-- | depends/packages/native_cctools.mk | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/depends/packages/native_cctools.mk b/depends/packages/native_cctools.mk index 072d3828a6..33e875a8ea 100644 --- a/depends/packages/native_cctools.mk +++ b/depends/packages/native_cctools.mk @@ -63,9 +63,10 @@ endef endif define $(package)_set_vars - $(package)_config_opts=--target=$(host) --disable-lto-support --with-libtapi=$($(package)_extract_dir) + $(package)_config_opts=--target=$(host) --with-libtapi=$($(package)_extract_dir) $(package)_ldflags+=-Wl,-rpath=\\$$$$$$$$\$$$$$$$$ORIGIN/../lib ifeq ($(strip $(FORCE_USE_SYSTEM_CLANG)),) + $(package)_config_opts+=--enable-lto-support --with-llvm-config=$($(package)_extract_dir)/toolchain/bin/llvm-config $(package)_cc=$($(package)_extract_dir)/toolchain/bin/clang $(package)_cxx=$($(package)_extract_dir)/toolchain/bin/clang++ else |