Bug 1427831 - Install LLVM utils
Summary: Install LLVM utils
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: llvm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Tom Stellard
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-03-01 11:02 UTC by Tom Stellard
Modified: 2017-06-17 05:27 UTC (History)
8 users (show)

Fixed In Version: 4.0.0-6.fc27
Clone Of:
Environment:
Last Closed: 2017-06-17 05:27:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
Patch to install llvm-utils (deleted)
2017-03-01 11:02 UTC, Tom Stellard
no flags Details | Diff
Install LLVM utils v2 (6.06 KB, patch)
2017-03-07 14:01 UTC, Tom Stellard
no flags Details | Diff
Install LLVM utils v3 (7.78 KB, patch)
2017-03-10 11:55 UTC, Tom Stellard
no flags Details | Diff

Description Tom Stellard 2017-03-01 11:02:41 UTC
This patches enables installation of the following llvm utils:

count
FileCheck
lli-child-target
llvm-PerfectShuffle
not
yaml-bench


Installing these utils will make it possible for the clang package to run make-check.  Some of these utils have generic names, like 'not' and 'count', do we need to add 'llvm-' prefix to these?  Should we put these utils in their own package, so that aren't part of the normal llvm installation?

Comment 1 Josh Stone 2017-03-01 18:18:46 UTC
FWIW, Rust has some codegen-tests that I've had to disable for want of FileCheck, so it would be nice to enable those.

> Some of these utils have generic names, like 'not' and 'count', do we need to add 'llvm-' prefix to these?

Will clang etc. be able to find prefixed names?

Another possibility is to put them in a private path, like %{_libexecdir}/llvm/.

> Should we put these utils in their own package, so that aren't part of the normal llvm installation?

They seem fairly niche, so I'd say yes, use a subpackage like llvm-utils.

Comment 2 Tom Stellard 2017-03-07 14:01:51 UTC
Created attachment 1260825 [details]
Install LLVM utils v2

Install utils to libexec/llvm and create a new llvm-utils package for them.

Comment 3 Tom Stellard 2017-03-07 14:04:47 UTC
(In reply to Josh Stone from comment #1)
> FWIW, Rust has some codegen-tests that I've had to disable for want of
> FileCheck, so it would be nice to enable those.
> 
> > Some of these utils have generic names, like 'not' and 'count', do we need to add 'llvm-' prefix to these?
> 
> Will clang etc. be able to find prefixed names?
> 
> Another possibility is to put them in a private path, like
> %{_libexecdir}/llvm/.
> 

clang can only find them if they are installed in /usr/bin, even if they don't have the prefixed names, so we will need to patch clang to find them.

> > Should we put these utils in their own package, so that aren't part of the normal llvm installation?
> 
> They seem fairly niche, so I'd say yes, use a subpackage like llvm-utils.

Comment 4 Josh Stone 2017-03-07 18:16:30 UTC
+%files utils
+%{_libexecdir}/llvm/count
...

It should also own the directory itself, like "%dir %{_libexecdir}/llvm".

Alternatively, you can list just "%{_libexecdir}/llvm/" here to include the directory and all its contents at once.  It depends on whether you want to be explicit about listing what executables are expected here.

Comment 5 Tom Stellard 2017-03-10 11:55:36 UTC
Created attachment 1261914 [details]
Install LLVM utils v3

I've reworked this patch and taken a different approach.  With this patch, all tools and utils (except for llvm-config) are installed into %{_libexec}/llvm.  In order for clang to be able run make check, tools and utils must be in the same directory.

To maintain compatibility with current installs, symlinks for tools and utils are added to /usr/bin (except for the tools with generic names: not and count).

This approaches matches what debian does and should put us in a better position if we want to put version suffixed tools in /usr/bin, or manage them with updated-alternatives.

llvm-config is an exception, because it hardcodes some of its paths, so it must be installed to /usr/bin.  We also add a symlink for llvm-config in %libexec}/llvm.

Comment 6 Fedora Admin XMLRPC Client 2017-05-04 13:57:06 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 7 Tom Stellard 2017-06-17 05:27:34 UTC
Fixed in rawhide: llvm-4.0.0-6.fc27


Note You need to log in before you can comment on or make changes to this bug.