Bug 1427831

Summary: Install LLVM utils
Product: [Fedora] Fedora Reporter: Tom Stellard <tstellar>
Component: llvmAssignee: Tom Stellard <tstellar>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: rawhideCC: ajax, bos, davejohansen, dmalcolm, jistone, petersen, scottt.tw, tstellar
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: 4.0.0-6.fc27 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-06-17 05:27:34 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
Patch to install llvm-utils
none
Install LLVM utils v2
none
Install LLVM utils v3 none

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