1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-22 18:54:02 +01:00
Commit Graph

31 Commits

Author SHA1 Message Date
Fangrui Song
47a9b3b42d [OptTable] Rename PrintHelp to printHelp
To be consistent with other member functions and match the coding standard.
2021-06-24 14:47:03 -07:00
Cyndy Ishida
eff160f3ab [TextAPI] move source code files out of subdirectory, NFC
TextAPI/ELF has moved out into InterfaceStubs, so theres no longer a
need to seperate out TextAPI between formats.

Reviewed By: ributzka, int3, #lld-macho

Differential Revision: https://reviews.llvm.org/D99811
2021-04-05 10:24:42 -07:00
Kazu Hirata
2fb3d0d5a0 [Target] Use llvm::any_of (NFC) 2020-12-24 19:43:26 -08:00
serge-sans-paille
82b6e6053d llvmbuildectomy - replace llvm-build by plain cmake
No longer rely on an external tool to build the llvm component layout.

Instead, leverage the existing `add_llvm_componentlibrary` cmake function and
introduce `add_llvm_component_group` to accurately describe component behavior.

These function store extra properties in the created targets. These properties
are processed once all components are defined to resolve library dependencies
and produce the header expected by llvm-config.

Differential Revision: https://reviews.llvm.org/D90848
2020-11-13 10:35:24 +01:00
Alexander Shaposhnikov
9a180ff58f [Object][MachO] Refine the interface of Slice
This patch performs a minor cleanup of the class Slice:
static methods and constructors which take a pointer but assume that
it's not null now take the argument by reference.
NFC.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D88320
2020-09-25 16:27:45 -07:00
Adrien Guinet
add1ee3a12 [llvm-lipo] Add support for bitcode files
A Mach-O universal binary may contain bitcode as a slice.
This diff adds proper handling of such binaries to llvm-lipo.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D85740
2020-08-25 21:11:18 -07:00
Sameer Arora
fccf62295c [llvm-libtool-darwin] Refactor Slice and writeUniversalBinary
Refactoring `Slice` class and function `createUniversalBinary` from
`llvm-lipo` into  MachOUniversalWriter. This refactoring is necessary so
as to use the refactored code for creating universal binaries under
llvm-libtool-darwin.

Reviewed by alexshap, smeenai

Differential Revision: https://reviews.llvm.org/D84662
2020-07-31 09:22:35 -07:00
Nico Weber
47138b2f83 Suppress a few -Wunreachable-code warnings.
No behavior change. Also fix a comment to say match reality.
2020-03-25 13:55:42 -04:00
Benjamin Kramer
87d13166c7 Make llvm::StringRef to std::string conversions explicit.
This is how it should've been and brings it more in line with
std::string_view. There should be no functional change here.

This is mostly mechanical from a custom clang-tidy check, with a lot of
manual fixups. It uncovers a lot of minor inefficiencies.

This doesn't actually modify StringRef yet, I'll do that in a follow-up.
2020-01-28 23:25:25 +01:00
Alexander Shaposhnikov
8300cbdb12 [llvm-lipo] Add support for -extract
This diff adds support for -extract.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D70522
2019-11-21 16:11:48 -08:00
Alexander Shaposhnikov
5b55e57574 [llvm-lipo] Add missing cast
Add missing cast (to correctly sum 32-bit integers).

Test plan: make check-all

llvm-svn: 374945
2019-10-15 20:10:34 +00:00
Alexander Shaposhnikov
f44b178394 [llvm-lipo] Pass ArrayRef by value.
Pass ArrayRef by value, fix formatting. NFC.

Test plan: make check-all

llvm-svn: 374637
2019-10-12 06:14:02 +00:00
Heejin Ahn
719ca167a6 [llvm-lipo] Add TextAPI to LINK_COMPONENTS
Summary:
D68319 uses `MachO::getCPUTypeFromArchitecture` and without this builds
with `-DBUILD_SHARED_LIBS=ON` fail.

Reviewers: alexshap

Subscribers: mgorny, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D68594

llvm-svn: 373974
2019-10-07 22:11:30 +00:00
Alexander Shaposhnikov
aa1651acf6 [llvm-lipo] Relax the check of the specified input file architecture
cctools lipo only compares the cputypes when it verifies that
the specified (via -arch) input file and the architecture match.
This diff adjusts the behavior of llvm-lipo accordingly. 

Differential revision: https://reviews.llvm.org/D68319

Test plan: make check-all

llvm-svn: 373966
2019-10-07 21:14:22 +00:00
Alexander Shaposhnikov
5d5e87b41e [llvm-lipo] Add support for -arch
Add support for -arch.

Differential revision: https://reviews.llvm.org/D68116

Test plan: make check-all

llvm-svn: 373132
2019-09-27 22:33:18 +00:00
Alexander Shaposhnikov
18f2664e1b [llvm-lipo] Add support for archives
Add support for creating universal binaries which 
can contain an archive.

Differential revision: https://reviews.llvm.org/D67758

Test plan: make check-all

llvm-svn: 372666
2019-09-23 22:22:55 +00:00
Alexander Shaposhnikov
7afab9f42f [Object] Extend MachOUniversalBinary::getObjectForArch
Make the method MachOUniversalBinary::getObjectForArch return MachOUniversalBinary::ObjectForArch
and add helper methods MachOUniversalBinary::getMachOObjectForArch, MachOUniversalBinary::getArchiveForArch
for those who explicitly expect to get a MachOObjectFile or an Archive.

Differential revision: https://reviews.llvm.org/D67700

Test plan: make check-all

llvm-svn: 372278
2019-09-19 00:02:12 +00:00
Anusha Basana
6944ca7039 [llvm-lipo] Implement -segalign
Sets section alignments of the specified architecture slices to the
alignment values.
Alignment values are hexadecimal values that are powers of 2.

Differential Revision: https://reviews.llvm.org/D65420

llvm-svn: 367908
2019-08-05 19:06:55 +00:00
Anusha Basana
cb472f88b8 [build] Add the ability to create a symlink for lipo
Add user enabled option to create lipo with symlink to llvm-lipo
Used rL326381 for reference.

Differential Revision: https://reviews.llvm.org/D65477

llvm-svn: 367444
2019-07-31 16:46:57 +00:00
Anusha Basana
8df3777583 [llvm-lipo] Implement -replace
Replaces specified architecture in universal binary input file with
slice from the file_name argument passed into the replace command.

Differential Revision: https://reviews.llvm.org/D65247

llvm-svn: 367248
2019-07-29 18:46:34 +00:00
Shoaib Meenai
02aa65e266 [llvm-lipo] Implement alignment function in -create
Summary:
Removes hard coded valuse for alignment in -create.

Patch by Anusha Basana <anusha.basana@gmail.com>

Differential Revision: https://reviews.llvm.org/D64871

llvm-svn: 366970
2019-07-25 00:29:19 +00:00
Shoaib Meenai
3cee48a64d [llvm-lipo] Implement -info
Prints architecture type of all input files.

Patch by Anusha Basana <anusha.basana@gmail.com>

Differential Revision: https://reviews.llvm.org/D64668

llvm-svn: 366772
2019-07-23 00:42:03 +00:00
Simon Pilgrim
d94781f714 Fix MSVC "result of 32-bit shift implicitly converted to 64 bits" warning. NFCI.
llvm-svn: 366563
2019-07-19 11:18:46 +00:00
Shoaib Meenai
1528fde232 Reapply [llvm-lipo] Implement -create (with hardcoded alignments)
This reapplies r366142 with a fix for the failing Windows test.

Original commit message:

Creates universal binary output file from input files. Currently uses
hard coded value for alignment.  Want to get the create functionality
approved before implementing the alignment function.

Patch by Anusha Basana <anusha.basana@gmail.com>

Differential Revision: https://reviews.llvm.org/D64102

llvm-svn: 366512
2019-07-18 22:48:38 +00:00
Shoaib Meenai
3f57cf86fc Revert [llvm-lipo] Implement -create (with hardcoded alignments)
This reverts r366142 (git commit 67cee1dc7ee285b03372eb818a3894d35efa7394)

The test is failing on the Windows buildbots. Reverting while I
investigate.

llvm-svn: 366144
2019-07-15 22:44:08 +00:00
Shoaib Meenai
d3358a0215 [llvm-lipo] Implement -create (with hardcoded alignments)
Creates universal binary output file from input files. Currently uses
hard coded value for alignment.  Want to get the create functionality
approved before implementing the alignment function.

Patch by Anusha Basana <anusha.basana@gmail.com>

Differential Revision: https://reviews.llvm.org/D64102

llvm-svn: 366142
2019-07-15 22:29:30 +00:00
Shoaib Meenai
8170d669b1 [MachO] Add valid architecture function
Added array of valid architectures and function returning array.
Modified llvm-lipo to include list of valid architectures in error message for invalid arch.

Patch by Anusha Basana <anusha.basana@gmail.com>

Differential Revision: https://reviews.llvm.org/D63735

llvm-svn: 365099
2019-07-04 00:17:02 +00:00
Shoaib Meenai
e24eeda57d [llvm-lipo] Implement -thin
Creates thin output file of specified arch_type from the fat input file.

Patch by Anusha Basana <anushabasana@fb.com>

Differential Revision: https://reviews.llvm.org/D63341

llvm-svn: 364107
2019-06-21 21:59:01 +00:00
Shoaib Meenai
720baf9a35 [llvm-lipo] Drop unneeded braces. NFC
llvm-svn: 362841
2019-06-07 20:52:17 +00:00
Shoaib Meenai
2365b4ea23 [llvm-lipo] Implement -archs
Displays the architecture names of an input file.
Unknown architectures are represented by unknown(cputype,cpusubtype).

Patch by Anusha Basana <anusha.basana@gmail.com>

Differential Revision: https://reviews.llvm.org/D62753

llvm-svn: 362840
2019-06-07 20:47:58 +00:00
Alexander Shaposhnikov
2a4af1a0c6 [tools] Introduce llvm-lipo
This diff starts the implementation of llvm-lipo 
which is supposed to be a drop-in replacement for the well-known tool lipo.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D61927

llvm-svn: 361896
2019-05-28 23:22:12 +00:00