This is an archive of the discontinued LLVM Phabricator instance.

[compiler-rt] Add install-*-stripped targets
ClosedPublic

Authored by smeenai on Nov 30 2017, 3:22 PM.

Details

Summary

These targets strip during installation, and are required to support
install-distribution-stripped in LLVM (to support a stripped
distribution). LLVM has an add_llvm_install_targets function for this
purpose, but we can't rely on LLVM being present.

Diff Detail

Repository
rL LLVM

Event Timeline

smeenai created this revision.Nov 30 2017, 3:22 PM
beanz edited edge metadata.Dec 1 2017, 9:49 AM

This change isn't safe. Compiler-RT is buildable without LLVM's modules as long as you disable the tests, so you can't use an AddLLVM function inside AddCompilerRT unless it is only used when tests are disabled.

Ah, that's a bummer.

compiler-rt's CMakeLists has this big shiny comment up top:

# This build assumes that CompilerRT is checked out into the
# 'projects/compiler-rt' or 'runtimes/compiler-rt' inside of an LLVM tree.
# Standalone build system for CompilerRT is not yet ready.

I assume that's out of date then?

beanz added a comment.Dec 1 2017, 10:53 AM

Yes, that comment is very out of date. The compiler-rt standalone build is essential to many of the users. It is quite common to build and use compiler-rt without LLVM (like sanitizer support in gcc).

smeenai updated this revision to Diff 125180.Dec 1 2017, 10:58 AM
smeenai retitled this revision from [compiler-rt] Switch to add_llvm_install_targets to [compiler-rt] Add install-*-stripped targets.
smeenai edited the summary of this revision. (Show Details)

Add targets manually

beanz accepted this revision.Dec 1 2017, 11:01 AM

LGTM.

This revision is now accepted and ready to land.Dec 1 2017, 11:01 AM
This revision was automatically updated to reflect the committed changes.