summaryrefslogtreecommitdiffstats
path: root/llvm/tools
Commit message (Collapse)AuthorAgeFilesLines
...
* [llvm-objcopy][MachO] Implement --add-sectionSeiya Nuta2019-12-164-24/+148
| | | | | | | | | | | | Reviewers: alexshap, rupprecht, jhenderson Reviewed By: alexshap, jhenderson Subscribers: mgorny, jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66283
* [ORC] Make ObjectLinkingLayer own its jitlink::MemoryManager.Lang Hames2019-12-152-3/+2
| | | | | | | | This relieves ObjectLinkingLayer clients of the responsibility of holding the memory manager. This makes it easier to select between RTDyldObjectLinkingLayer (which already owned its memory manager factory) and ObjectLinkingLayer at runtime as clients aren't required to hold a jitlink::MemoryManager field just in case ObjectLinkingLayer is selected.
* [llvm-dwarfdump][Statistics] Don't count coverage less than 1% as 0%Kristina Bessonova2019-12-131-12/+10
| | | | | | | | | | | | | | | | | | | | | Summary: This is a follow up for D70548. Currently, variables with debug info coverage between 0% and 1% are put into zero-bucket. D70548 changed the way statistics calculate a variable's coverage: we began to use enclosing scope rather than a possible variable life range. Thus more variables might be moved to zero-bucket despite they have some debug info coverage. The patch is to distinguish between a variable that has location info but it's significantly less than its enclosing scope and a variable that doesn't have it at all. Reviewers: djtodoro, aprantl, dblaikie, avl Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71070
* [llvm-dwarfdump][Statistics] Change the coverage buckets representation. NFCKristina Bessonova2019-12-131-6/+6
| | | | | | | | | | | | | | | | Summary: This changes the representation of 'coverage buckets' in llvm-dwarfdump and llvm-locstats to one that makes more clear what the buckets contain. See some related details in D71070. Reviewers: djtodoro, aprantl, cmtice, jhenderson Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D71366
* [llvm-readobj] - Fix letters used for dumping section types in GNU style.Georgii Rymar2019-12-131-3/+4
| | | | | | | | | | | | | | I've noticed that when we have all regular flags set, we print "WAEXMSILoGTx" instead of "WAXMSILOGTCE" printed by GNU readelf. It happens because: 1) We print SHF_EXCLUDE at the wrong place. 2) We do not recognize SHF_COMPRESSED, we print "x" instead of "C". 3) We print "o" instead of "O" for SHF_OS_NONCONFORMING. This patch fixes differences and adds test cases. Differential revision: https://reviews.llvm.org/D71418
* [llvm-readobj][llvm-readelf] - Remove excessive empty lines when reporting ↵Georgii Rymar2019-12-111-2/+0
| | | | | | | | | | errors and warnings. After recent changes it is now seems possible to get rid of printing '\n' before each error and warning. This makes the output cleaner. Differential revision: https://reviews.llvm.org/D71246
* [llvm-readelf] - Do no print an empty symbol version as "<corrupt>"Georgii Rymar2019-12-111-1/+1
| | | | | | | | | | | | | It is discussed here https://reviews.llvm.org/D71118#inline-643172 Currently when a version is empty, llvm-readelf prints: "000: 0 (*local*) 2 (<corrupt>)" But GNU readelf does not treat empty section as corrupt. There is no sense in having empty versions anyways it seems, but this change is for consistency with GNU. Differential revision: https://reviews.llvm.org/D71243
* [llvm-readobj] Fix/improve printing WinEH unwind info for linked PE imagesMartin Storsjö2019-12-112-6/+56
| | | | | | | | | | | | | | | | | | | | ARMWinEHPrinter was already designed to handle linked PE images (since d2941b43f40d), but resolving symbols didn't consistently take the image base into account (as linked images seldom have a symbol table, except for in MinGW setups). Win64EHDumper wasn't really designed to handle linked images (it would crash if executed on such a file), but a few concepts (getSymbol, taking a virtual address instead of a relocation, and getSectionContaining for finding the section containing a certain virtual address) can be borrowed from ARMWinEHPrinter. Adjust ARMWinEHPrinter to print the address of the exception handler routine as a VA instead of an RVA, consistently with other addresses in the same printout, and make Win64EHDumper print addresses similarly for image cases. Differential Revision: https://reviews.llvm.org/D71303
* [llvm-ar] Improve tool selection heuristicFangrui Song2019-12-101-7/+17
| | | | | | | | | | | | | | | | If llvm-ar is installed at arm-pokymllib32-linux-gnueabi-llvm-ar, it may think it is llvm-lib due to the "lib" substring. Improve the heuristic to make all the following work as intended: llvm-ar-9 (llvm-9 package on Debian) llvm-ranlib.exe Lib.exe (reported by D44808) arm-pokymllib32-linux-gnueabi-llvm-ar (reported by D71030) Reviewed By: raj.khem, rupprecht Differential Revision: https://reviews.llvm.org/D71302
* [llvm-readelf/llvm-readobj] - Improved the error reporting in a few method ↵Georgii Rymar2019-12-101-42/+60
| | | | | | | | | | | | | | | | | | related to versioning. I was investigating a change previously discussed that eliminates an excessive empty lines from the output when we report warnings and errors (https://reviews.llvm.org/D70826#inline-639055) and found that we need this refactoring or alike to achieve that. The problem is that some of our functions that finds symbol versions just fail instead of returning errors or printing warnings. Another problem is that they might print a warning on the same line with the regular output. In this patch I've splitted getting of the version information and dumping of it for GNU printVersionSymbolSection(). I had to change a few methods to return Error or Expected<> to do that properly. Differential revision: https://reviews.llvm.org/D71118
* [llvm/dwarfdump] Use the architecture string to filter.Jonas Devlieghere2019-12-091-1/+1
| | | | | | | | | | | | | | | | | | Currently dwarfdump uses the ArchType to filter out architectures, which is problematic for architectures like arm64e and x86_64h that map back to arm64 and x86_64 respectively. The result is that the filter doesn't work for these architectures because it matches all the variants. This is especially bad because usually these architectures are the reason to use the filter in the first place. Instead, we should match the architecture based on the string name. This means the filter works for the values printed by dwarfdump. It has the unfortunate side effect of not working for aliases, like AArch64, but I think that's worth the trade-off. rdar://53653014 Differential revision: https://reviews.llvm.org/D71230
* [llvm-dwarfdump][Statistics] Unify coverage statistic computationKristina Bessonova2019-12-081-60/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: The patch removes OffsetToFirstDefinition in the 'scope bytes total' statistic computation. Thus it unifies the way the scope and the coverage buckets are computed. The rationals behind that are the following: 1. OffsetToFirstDefinition was used to calculate the variable's life range. However, there is no simple way to do it accurately, so the scope calculated this way might be misleading. See D69027 for more details on the subject. 2. Both 'scope bytes total' and coverage buckets seem to be intended to represent the same data in different ways. Otherwise, the statistics might be controversial and confusing. Note that the approach gives up a thorough evaluation of debug information completeness (i.e. coverage buckets by themselves doesn't tell how good the debug information is). Only changes in coverage over time make a 'physical' sense. Reviewers: djtodoro, aprantl, vsk, dblaikie, avl Subscribers: llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70548
* Fix building shared libraries broken by 8e48e8e3e32.Alexey Lapshin2019-12-062-1/+2
|
* [llvm-readobj][llvm-readelf] - Refactor parsing of the SHT_GNU_versym section.Georgii Rymar2019-12-061-28/+118
| | | | | | | This introduce a new helper which is used to parse the SHT_GNU_versym section. LLVM/GNU styles implementations now use it to share the logic. Differential revision: https://reviews.llvm.org/D71054
* [llvm-readobj] - Implement --dependent-libraries flag.Georgii Rymar2019-12-063-0/+57
| | | | | | | | | | There is no way to dump SHT_LLVM_DEPENDENT_LIBRARIES sections currently. This patch implements this. The section is described here: https://llvm.org/docs/Extensions.html#sht-llvm-dependent-libraries-section-dependent-libraries Differential revision: https://reviews.llvm.org/D70665
* [Dsymutil][NFC] Move NonRelocatableStringpool into common CodeGen folder.Alexey Lapshin2019-12-067-153/+12
| | | | | | | That refactoring moves NonRelocatableStringpool into common CodeGen folder. So that NonRelocatableStringpool could be used not only inside dsymutil. Differential Revision: https://reviews.llvm.org/D71068
* [JITLink] Remove the Section::symbols_empty() method.Lang Hames2019-12-052-6/+6
| | | | llvm::empty(Sec.symbols()) can be used instead.
* llvm-reduce: Add a space to an option's --helpGeorge Burgess IV2019-12-051-1/+1
| | | | Otherwise, we get "filewith".
* [llvm] llvm-ifs: Support for handling empty IFS and merging weak+strong symbols.Puyan Lotfi2019-12-051-9/+9
| | | | | | | | | | The following changes enable llvm-ifs to handle the following merge conflicts: * Weak + Strong symbol merging for the same symbol * empty vs non-empty triple field * empty vs non-empty object file format Differential Revision: https://reviews.llvm.org/D70834
* [ORC] Remove the automagic Main JITDylib fram ExecutionSession.Lang Hames2019-12-052-6/+7
| | | | | | | | | | | | This patch removes the magic "main" JITDylib from ExecutionEngine. The main JITDylib was created automatically at ExecutionSession construction time, and all subsequently created JITDylibs were added to the main JITDylib's links-against list by default. This saves a couple of lines of boilerplate for simple JIT setups, but this isn't worth introducing magical behavior for. ORCv2 clients should now construct their own main JITDylib using ExecutionSession::createJITDylib and set up its linkages manually using JITDylib::setSearchOrder (or related methods in JITDylib).
* [llvm-readelf/llvm-readobj] - Remove getSecTypeName() helper.Georgii Rymar2019-12-051-16/+10
| | | | | | | We do not need it, we have `object::getELFSectionTypeName` that can be used instead. Differential revision: https://reviews.llvm.org/D71017
* [llvm-symbolizer] Support debug file lookup using build IDPetr Hosek2019-12-041-0/+7
| | | | | | | | | | | | | | | | | | | Build ID is a protocol for looking up debug files that's already supported by various tools including debuggers. For example, when locating debug files, gdb would check the following directories: - /usr/lib/debug/.build-id/ab/cdef1234.debug - /usr/bin/ls.debug - /usr/bin/.debug/ls.debug - /usr/lib/debug/usr/bin/ls.debug llvm-symbolizer currently consults all of these except for build ID based one. This patch implements support for build ID lookup. The set of debug directories to search is specified by the new option: --debug-file-directory, whose name matches the debug-file-directory variable used by gdb for the same purpose. Differential Revision: https://reviews.llvm.org/D70759
* [dsymutil] Remove recursion from lookForChildDIEsToKeep (2/2) (NFC)Jonas Devlieghere2019-12-041-74/+139
| | | | | | | | | | | | | | | | | The functions lookForDIEsToKeep and keepDIEAndDependencies are mutually recursive and can cause a stackoverflow for large projects. While this has always been the case, it became a bigger issue when we parallelized dsymutil, because threads get only a fraction of the stack space. This patch removes the final recursive call from lookForDIEsToKeep. The call was used to look at the current DIE's parent chain and mark everything as kept. This was tested by running dsymutil on clang built in debug (both with and without modules) and comparing the MD5 hash of the generated dSYM companion file. Differential revision: https://reviews.llvm.org/D70994
* [dsymutil] Remove recursion from lookForChildDIEsToKeep (1/2) (NFC)Jonas Devlieghere2019-12-042-172/+206
| | | | | | | | | | | | | | | | | | | | | | | | | The functions lookForDIEsToKeep and keepDIEAndDependencies are mutually recursive and can cause a stackoverflow for large projects. While this has always been the case, it became a bigger issue when we parallelized dsymutil, because threads get only a fraction of the stack space. In an attempt to tackle this issue, we removed part of the recursion in r338536 by introducing a worklist. Processing of child DIEs was no longer recursive. However, we still received bug reports where we'd run out of stack space. This patch removes another recursive call from lookForDIEsToKeep. The call was used to look at DIEs that reference the current DIE. To make this possible, we inlined keepDIEAndDependencies and added this work to the existing worklist. Because the function is not tail recursive, we needed to add two more types of worklist entries to perform the subsequent work. This was tested by running dsymutil on clang built in debug (both with and without modules) and comparing the MD5 hash of the generated dSYM companion file. Differential revision: https://reviews.llvm.org/D70990
* [ELF] Support for PT_GNU_PROPERTY in header and toolsPeter Smith2019-12-042-0/+5
| | | | | | | | | | | | | The PT_GNU_PROPERTY is generated by a linker to describe the .note.gnu.property section. The Linux kernel uses this program header to locate the .note.gnu.property section. It is described in "The Linux gABI extension" Include support for llvm-readelf, llvm-readobj and the yaml reader and writers. Differential Revision: https://reviews.llvm.org/D70959
* [yaml2obj] - Make DynamicSymbols to be Optional<> too.Georgii Rymar2019-12-041-2/+4
| | | | | | | | | | | | | | | | | | We already have Symbols property to list regular symbols and it is currently Optional<>. This patch makes DynamicSymbols to be optional too. With this there is no need to define a dummy symbol anymore to trigger creation of the .dynsym and it is now possible to define an empty .dynsym using just the following line: DynamicSymbols: [] (it is important to have when you do not want to have dynamic symbols, but want to have a .dynsym) Now the code is consistent and it helped to fix a bug: previously we did not report an error when both Content/Size and an empty Symbols/DynamicSymbols list were specified. Differential revision: https://reviews.llvm.org/D70956
* [dsymutil] Support --out (NFC)Jonas Devlieghere2019-12-031-1/+1
| | | | Seems like this got lost during the libOption conversion.
* llvm-config: do not link absolute paths with `-l`Saleem Abdulrasool2019-12-031-1/+5
| | | | | | | When dealing with system libraries which are absolute paths, use the absolute path rather than the `-l` option. This ensures that the system library can be properly linked against. This is needed to enable using proper link dependencies in CMake.
* [CodeGen] Move ARMCodegenPrepare to TypePromotionSam Parker2019-12-031-0/+1
| | | | | | | | | | | | | | | | | | Convert ARMCodeGenPrepare into a generic type promotion pass by: - Removing the insertion of arm specific intrinsics to handle narrow types as we weren't using this. - Removing ARMSubtarget references. - Now query a generic TLI object to know which types should be promoted and what they should be promoted to. - Move all codegen tests into Transforms folder and testing using opt and not llc, which is how they should have been written in the first place... The pass searches up from icmp operands in an attempt to safely promote types so we can avoid generating unnecessary unsigned extends during DAG ISel. Differential Revision: https://reviews.llvm.org/D69556
* Recommit "[DWARF5]Addition of alignment atrribute in typedef DIE."Sourabh Singh Tomar2019-12-031-1/+1
| | | | | | | | | | | | | | | | This revision is revised to update Go-bindings and Release Notes. The original commit message follows. This patch, adds support for DW_AT_alignment[DWARF5] attribute, to be emitted with typdef DIE. When explicit alignment is specified. Patch by Awanish Pandey <Awanish.Pandey@amd.com> Reviewers: aprantl, dblaikie, jini.susan.george, SouraVX, alok, deadalinx Differential Revision: https://reviews.llvm.org/D70111
* [llvm-exegesis] Fix 44b9942898c7.Clement Courbet2019-12-021-0/+1
| | | | | | | | | | | | | | Summary: Add missing stack release instructions in loadImplicitRegAndFinalize. Reviewers: pengfei, gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70903
* [X86] Add initialization of FPCW in llvm-exegesisWang, Pengfei2019-12-021-5/+11
| | | | | | | | | | | | Summary: This is a following up to D70874. It adds the initialization of FPCW in llvm-exegesis. Reviewers: craig.topper, RKSimon, courbet, gchatelet Subscribers: tschuett, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70891
* [llvm-readobj/llvm-readelf] - Simplify the code that dumps versions.Georgii Rymar2019-12-021-131/+45
| | | | | | | | | | | | After changes introduced in D70495 and D70826 its now possible to significantly simplify the code we have. This also fixes an issue: previous code assumed that version strings should always be read from the dynamic string table. While it is normally true, the string table should be taken from the corresponding sh_link field. Differential revision: https://reviews.llvm.org/D70855
* [X86] Add initialization of MXCSR in llvm-exegesisWang, Pengfei2019-12-021-0/+17
| | | | | | | | | | | | Summary: This patch is used to initialize the new added register MXCSR. Reviewers: craig.topper, RKSimon Subscribers: tschuett, courbet, llvm-commits, LiuChen3 Tags: #llvm Differential Revision: https://reviews.llvm.org/D70874
* [llvm-readelf/llvm-readobj] - Check the version of SHT_GNU_verneed section ↵Georgii Rymar2019-12-021-0/+6
| | | | | | | | | | | | | | | entries. It is a follow-up for D70826 and it is similar to D70810. SHT_GNU_verneed contains the following fields: `vn_version`: Version of structure. This value is currently set to 1, and will be reset if the versioning implementation is incompatibly altered. (https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/symversion.html) We should check it for correctness. Differential revision: https://reviews.llvm.org/D70842
* [ORC] Add a runAsMain utility function to ExecutionUtils.Lang Hames2019-12-022-30/+8
| | | | | | | | | | | The runAsMain function takes a pointer to a function with a standard C main signature, int(*)(int, char*[]), and invokes it using the given arguments and program name. The arguments are copied into writable temporary storage as required by the C and C++ specifications, so runAsMain safe to use when calling main functions that modify their arguments in-place. This patch also uses the new runAsMain function to replace hand-rolled versions in lli, llvm-jitlink, and the SpeculativeJIT example.
* [llvm-readobj/llvm-readelf] - Reimplement dumping of the SHT_GNU_verneed ↵Georgii Rymar2019-12-021-84/+168
| | | | | | | | | | section. This is similar to D70495, but for SHT_GNU_verneed section. It solves the same problems: different implementations, lack of error reporting and no test coverage. DIfferential revision: https://reviews.llvm.org/D70826
* Revert "[Examples] Add IRTransformations directory to examples."Florian Hahn2019-12-012-12/+0
| | | | | | | | | This breaks LLVMExports.cmake in some build configurations. PR44197 This reverts commits ceb72d07b004af9c428c4a3c73a98ea97d49a713 7d0b1d77b3d4d47df477519fd1bf099b3df6f899.
* [llvm-readelf/llvm-readobj] - Check version of SHT_GNU_verdef section ↵Georgii Rymar2019-11-291-0/+6
| | | | | | | | | | | | | | | | | entries when dumping. Elfxx_Verdef contains the following field: vd_version Version revision. This field shall be set to 1. (https://refspecs.linuxfoundation.org/LSB_5.0.0/LSB-Core-generic/LSB-Core-generic/symversion.html) Our code should check the struct version for correctness. This patch does that. (This will help to simplify or eliminate ELFDumper<ELFT>::LoadVersionDefs() which has it's own logic to parse version definitions for no reason. It checks the struct version currently). Differential revision: https://reviews.llvm.org/D70810
* [yaml2obj] - Add a way to describe content of the SHT_GNU_verneed section ↵Georgii Rymar2019-11-291-1/+3
| | | | | | | | | with "Content". There is no way to set raw content for SHT_GNU_verneed section. This patch implements it. Differential revision: https://reviews.llvm.org/D70816
* [ORC][JITLink] Add support for weak references, and improve handling of staticLang Hames2019-11-281-3/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | libraries. This patch substantially updates ORCv2's lookup API in order to support weak references, and to better support static archives. Key changes: -- Each symbol being looked for is now associated with a SymbolLookupFlags value. If the associated value is SymbolLookupFlags::RequiredSymbol then the symbol must be defined in one of the JITDylibs being searched (or be able to be generated in one of these JITDylibs via an attached definition generator) or the lookup will fail with an error. If the associated value is SymbolLookupFlags::WeaklyReferencedSymbol then the symbol is permitted to be undefined, in which case it will simply not appear in the resulting SymbolMap if the rest of the lookup succeeds. Since lookup now requires these flags for each symbol, the lookup method now takes an instance of a new SymbolLookupSet type rather than a SymbolNameSet. SymbolLookupSet is a vector-backed set of (name, flags) pairs. Clients are responsible for ensuring that the set property (i.e. unique elements) holds, though this is usually simple and SymbolLookupSet provides convenience methods to support this. -- Lookups now have an associated LookupKind value, which is either LookupKind::Static or LookupKind::DLSym. Definition generators can inspect the lookup kind when determining whether or not to generate new definitions. The StaticLibraryDefinitionGenerator is updated to only pull in new objects from the archive if the lookup kind is Static. This allows lookup to be re-used to emulate dlsym for JIT'd symbols without pulling in new objects from archives (which would not happen in a normal dlsym call). -- JITLink is updated to allow externals to be assigned weak linkage, and weak externals now use the SymbolLookupFlags::WeaklyReferencedSymbol value for lookups. Unresolved weak references will be assigned the default value of zero. Since this patch was modifying the lookup API anyway, it alo replaces all of the "MatchNonExported" boolean arguments with a "JITDylibLookupFlags" enum for readability. If a JITDylib's associated value is JITDylibLookupFlags::MatchExportedSymbolsOnly then the lookup will only match against exported (non-hidden) symbols in that JITDylib. If a JITDylib's associated value is JITDylibLookupFlags::MatchAllSymbols then the lookup will match against any symbol defined in the JITDylib.
* [llvm-readelf] - Make GNU style dumping of invalid SHT_GNU_verdef be ↵Georgii Rymar2019-11-281-16/+24
| | | | | | | | | | | | consistent with LLVM style. When we dump SHT_GNU_verdef section that has sh_link that references a non-existent section, llvm-readobj reports a warning and continues dump, but llvm-readelf fails with a error. This patch fixes the issue and opens road for futher follow-ups for improving the printGNUVersionSectionProlog(). Differential revision: https://reviews.llvm.org/D70776
* [llvm-readobj] - Always print "Predecessors" for version definition sections.Georgii Rymar2019-11-271-3/+0
| | | | | | | | | | | | | This is a follow-up discussed in D70495 thread. The current logic is unusual for llvm-readobj. It doesn't print predecessors list when it is empty. This is not good for machine parsers. D70495 had to add this condition during refactoring to reduce amount of changes, in tests, because the original code also had a similar logic. Now seems it is time to get rid of it. This patch does it. Differential revision: https://reviews.llvm.org/D70717
* [llvm-objcopy] [COFF] Fix a typo in a comment. NFC.Martin Storsjö2019-11-271-1/+1
|
* [llvm-readobj/llvm-readelf] - Reimplement dumping of the SHT_GNU_verdef section.Georgii Rymar2019-11-261-68/+149
| | | | | | | | | | | | Currently we have following issues: 1) We have 2 different implementations with a different behaviors for GNU/LLVM styles. 2) Errors are either not handled at all or we call report_fatal_error with not helpfull messages. 3) There is no test coverage even for those errors that are reported. This patch reimplements parsing of the SHT_GNU_verdef section entries in a single place, adds a few error messages and test coverage. Differential revision: https://reviews.llvm.org/D70495
* [yaml2obj] - Teach tool to describe SHT_GNU_verdef section with a "Content" ↵Georgii Rymar2019-11-261-1/+3
| | | | | | | | | property. There is no way to set raw content for SHT_GNU_verdef section. This patch implements it. Differential revision: https://reviews.llvm.org/D70710
* [yaml2obj/obj2yaml] - Add support for SHT_LLVM_DEPENDENT_LIBRARIES sections.Georgii Rymar2019-11-251-0/+37
| | | | | | | | | | | | | | | | | | | | | | | | This section contains strings specifying libraries to be added to the link by the linker. The strings are encoded as standard null-terminated UTF-8 strings. This patch adds a way to describe and dump SHT_LLVM_DEPENDENT_LIBRARIES sections. I introduced a new YAMLFlowString type here. That used to teach obj2yaml to dump them like: ``` Libraries: [ foo, bar ] ``` instead of the following (if StringRef would be used): ``` Libraries: - foo - bar ``` Differential revision: https://reviews.llvm.org/D70598
* [llvm-objcopy][MachO] Implement --dump-sectionSeiya Nuta2019-11-251-5/+34
| | | | | | | | | | | | Reviewers: alexshap, rupprecht, jhenderson Reviewed By: alexshap, rupprecht, jhenderson Subscribers: MaskRay, jakehehrlich, abrachet, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D66408
* [llvm-lipo] Add support for -extractAlexander Shaposhnikov2019-11-212-11/+60
| | | | | | | | This diff adds support for -extract. Test plan: make check-all Differential revision: https://reviews.llvm.org/D70522
* [cmake] Explicitly mark libraries defined in lib/ as "Component Libraries"Tom Stellard2019-11-211-14/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Summary: Most libraries are defined in the lib/ directory but there are also a few libraries defined in tools/ e.g. libLLVM, libLTO. I'm defining "Component Libraries" as libraries defined in lib/ that may be included in libLLVM.so. Explicitly marking the libraries in lib/ as component libraries allows us to remove some fragile checks that attempt to differentiate between lib/ libraries and tools/ libraires: 1. In tools/llvm-shlib, because llvm_map_components_to_libnames(LIB_NAMES "all") returned a list of all libraries defined in the whole project, there was custom code needed to filter out libraries defined in tools/, none of which should be included in libLLVM.so. This code assumed that any library defined as static was from lib/ and everything else should be excluded. With this change, llvm_map_components_to_libnames(LIB_NAMES, "all") only returns libraries that have been added to the LLVM_COMPONENT_LIBS global cmake property, so this custom filtering logic can be removed. Doing this also fixes the build with BUILD_SHARED_LIBS=ON and LLVM_BUILD_LLVM_DYLIB=ON. 2. There was some code in llvm_add_library that assumed that libraries defined in lib/ would not have LLVM_LINK_COMPONENTS or ARG_LINK_COMPONENTS set. This is only true because libraries defined lib lib/ use LLVMBuild.txt and don't set these values. This code has been fixed now to check if the library has been explicitly marked as a component library, which should now make it easier to remove LLVMBuild at some point in the future. I have tested this patch on Windows, MacOS and Linux with release builds and the following combinations of CMake options: - "" (No options) - -DLLVM_BUILD_LLVM_DYLIB=ON - -DLLVM_LINK_LLVM_DYLIB=ON - -DBUILD_SHARED_LIBS=ON - -DBUILD_SHARED_LIBS=ON -DLLVM_BUILD_LLVM_DYLIB=ON - -DBUILD_SHARED_LIBS=ON -DLLVM_LINK_LLVM_DYLIB=ON Reviewers: beanz, smeenai, compnerd, phosek Reviewed By: beanz Subscribers: wuzish, jholewinski, arsenm, dschuff, jyknight, dylanmckay, sdardis, nemanjai, jvesely, nhaehnle, mgorny, mehdi_amini, sbc100, jgravelle-google, hiraditya, aheejin, fedor.sergeev, asb, rbar, johnrusso, simoncook, apazos, sabuasal, niosHD, jrtc27, MaskRay, zzheng, edward-jones, atanasyan, steven_wu, rogfer01, MartinMosbeck, brucehoult, the_o, dexonsmith, PkmX, jocewei, jsji, dang, Jim, lenary, s.egerton, pzheng, sameer.abuasal, llvm-commits Tags: #llvm Differential Revision: https://reviews.llvm.org/D70179
OpenPOWER on IntegriCloud