summaryrefslogtreecommitdiffstats
path: root/lld/test/lit.cfg.py
Commit message (Collapse)AuthorAgeFilesLines
* ELF: Change FileSize back to a uint64_t.Peter Collingbourne2019-03-011-0/+3
| | | | | | | | | This lets us detect file size overflows when creating a 64-bit binary on a 32-bit machine. Differential Revision: https://reviews.llvm.org/D58840 llvm-svn: 355218
* Use llvm_canonicalize_cmake_booleans for LLVM_LIBXML2_ENABLED [lld]Nico Weber2019-01-191-3/+3
| | | | | | | | | | | | r291284 added a nice mechanism to consistently pass CMake on/off toggles to lit. This change uses it for LLVM_LIBXML2_ENABLED too (which was added around the same time and doesn't use the new system yet). No intended behavior change. Differential Revision: https://reviews.llvm.org/D56912 llvm-svn: 351614
* [LLD][ELF] - Support MSP430.George Rimar2019-01-101-0/+1
| | | | | | | | | | | Patch by Michael Skvortsov! This change adds a basic support for linking static MSP430 ELF code. Implemented relocation types are intended to correspond to the BFD. Differential revision: https://reviews.llvm.org/D56535 llvm-svn: 350819
* [test] Enable system-linker-elf feature on NetBSD [NFC]Michal Gorny2019-01-021-1/+1
| | | | | | | Since NetBSD uses ELF linker, enable the relevant feature. It's not currently used for anything, though. llvm-svn: 350253
* Tolerate flaky LLD tests on NetBSDKamil Rytarowski2018-12-231-0/+5
| | | | | | | | | | | | | | | | | | | | | Summary: For unknown reasons LLD tests are flaky on the NetBSD buildbot, but not on local machines of developers. Unless the linker will be fully functional on this target, allow to pass flaky tests with optional retry. Reviewers: joerg, mgorny, ruiu Reviewed By: mgorny Subscribers: lebedev.ri, MaskRay, llvm-commits, #lld Tags: #lld Differential Revision: https://reviews.llvm.org/D56053 llvm-svn: 350036
* [test] Capture stderr from 'tar --version' call as wellMichal Gorny2018-12-141-3/+6
| | | | | | | | | | | Capture the stderr from 'tar --version' call as otherwise error messages spill onto user's terminal unnecessarily (e.g. on NetBSD where tar does not support long options). While at it, refactor the code to use communicate() instead of reinventing the wheel. Differential Revision: https://reviews.llvm.org/D55443 llvm-svn: 349204
* Support RISC-VRui Ueyama2018-08-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Patch by PkmX. This patch makes lld recognize RISC-V target and implements basic relocation for RV32/RV64 (and RVC). This should be necessary for static linking ELF applications. The ABI documentation for RISC-V can be found at: https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md. Note that the documentation is far from complete so we had to figure out some details from bfd. The patch should be pretty straightforward. Some highlights: - A new relocation Expr R_RISCV_PC_INDIRECT is added. This is needed as the low part of a PC-relative relocation is linked to the corresponding high part (auipc), see: https://github.com/riscv/riscv-elf-psabi-doc/blob/master/riscv-elf.md#pc-relative-symbol-addresses - LLVM's MC support for RISC-V is very incomplete (we are working on this), so tests are given in objectyaml format with the original assembly included in the comments. Once we have complete support for RISC-V in MC, we can switch to llvm-as/llvm-objdump. - We don't support linker relaxation for now as it requires greater changes to lld that is beyond the scope of this patch. Once this is accepted we can start to work on adding relaxation to lld. Differential Revision: https://reviews.llvm.org/D39322 llvm-svn: 339364
* Add Hexagon SupportSid Manning2018-06-131-0/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D47791 llvm-svn: 334637
* [WebAssembly] Initial support for LTOSam Clegg2018-05-301-1/+2
| | | | | | Differential Revision: https://reviews.llvm.org/D47162 llvm-svn: 333570
* Add llvm-dwarfdump tool_patternsSam Clegg2018-05-051-1/+1
| | | | | | Differential Revision: https://reviews.llvm.org/D46481 llvm-svn: 331572
* [PDB] Resubmit "Support embedding natvis files in PDBs."Zachary Turner2018-03-231-0/+3
| | | | | | | | | | | | This was reverted several times due to what ultimately turned out to be incompatibilities in our serialized hash table format. Several changes went in prior to this to fix those issues since they were more fundamental and independent of supporting injected sources, so now that those are fixed this change should hopefully pass. llvm-svn: 328363
* Revert "Resubmit "Support embedding natvis files in PDBs.""Zachary Turner2018-03-201-3/+0
| | | | | | | | This is still failing on a different bot this time due to some issue related to hashing absolute paths. Reverting until I can figure it out. llvm-svn: 328014
* Fix consitent -> consistent.Eric Christopher2018-03-201-1/+1
| | | | llvm-svn: 328010
* Resubmit "Support embedding natvis files in PDBs."Zachary Turner2018-03-201-0/+3
| | | | | | | | | | | The issue causing this to fail in certain configurations should be fixed. It was due to the fact that DIA apparently expects there to be a null string at ID 1 in the string table. I'm not sure why this is important but it seems to make a difference, so set it. llvm-svn: 328002
* Revert r327964 "lit: Make config.llvm_libxml2_enabled an int, not a string"Hans Wennborg2018-03-201-3/+3
| | | | | | | | | | | | | | It seems @LLVM_LIBXML2_ENABLED@ doesn't always get set to 0 when not available, but to nothing, which broke parsing of lit.site.cfg.py. > @LLVM_LIBXML2_ENABLED@ will be replaced with 0 or 1. Putting quotes > around that is unnecessary and just makes it harder to use the value. > This matches what have_zlib does below. > > This also puts the flag together with the feature-related ones instead > of the path-related flags. llvm-svn: 327966
* lit: Make config.llvm_libxml2_enabled an int, not a stringHans Wennborg2018-03-201-3/+3
| | | | | | | | | | | @LLVM_LIBXML2_ENABLED@ will be replaced with 0 or 1. Putting quotes around that is unnecessary and just makes it harder to use the value. This matches what have_zlib does below. This also puts the flag together with the feature-related ones instead of the path-related flags. llvm-svn: 327964
* Revert "Support embedding natvis files in PDBs."Zachary Turner2018-03-191-3/+0
| | | | | | | This is causing a test failure on a certain bot, so I'm removing this temporarily until we can figure out the source of the error. llvm-svn: 327903
* Support embedding natvis files in PDBs.Zachary Turner2018-03-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | Natvis is a debug language supported by Visual Studio for specifying custom visualizers. The /NATVIS option is an undocumented link.exe flag which will take a .natvis file and "inject" it into the PDB. This way, you can ship the debug visualizers for a program along with the PDB, which is very useful for postmortem debugging. This is implemented by adding a new "named stream" to the PDB with a special name of /src/files/<natvis file name> and simply copying the contents of the xml into this file. Additionally, we need to emit a single stream named /src/headerblock which contains a hash table of embedded files to records describing them. This patch adds this functionality, including the /NATVIS option to lld-link. Differential Revision: https://reviews.llvm.org/D44328 llvm-svn: 327895
* [ELF] Add llvm-readelf to the lit tool substitutionsAlexander Richardson2018-02-271-2/+2
| | | | | | | | | | | | | | | | | Summary: Some of the tests invoke llvm-readelf. This currently appears to work probably because the LLVM binary directory is included in $PATH. However, this is quite fragile so let's just make lit expand the full path. Reviewers: ruiu, espindola Reviewed By: ruiu Subscribers: llvm-commits Differential Revision: https://reviews.llvm.org/D43827 llvm-svn: 326257
* Remove "--full-shutdown" and instead use an environment variable LLD_IN_TEST.Rui Ueyama2018-02-161-0/+1
| | | | | | | | | | | | | | | | | We are running lld tests with "--full-shutdown" option because we don't want to call _exit() in lld if it is running tests. Regular shutdown is needed for leak sanitizer. This patch changes the way how we tell lld that it is running tests. Now "--full-shutdown" is removed, and LLD_IN_TEST environment variable is used instead. This patch enables full shutdown on all ports, e.g. ELF, COFF and wasm. Previously, we enabled it only for ELF. Differential Revision: https://reviews.llvm.org/D43410 llvm-svn: 325413
* [ELF] Use shell to check the file permissionsPetr Hosek2017-12-121-8/+0
| | | | | | | | This is less error-prone to mask settings than stat. Differential Revision: https://reviews.llvm.org/D41097 llvm-svn: 320442
* [ELF] Don't set the executable bit for relocatable filesPetr Hosek2017-12-111-0/+8
| | | | | | | | These are not executable files so they shouldn't be marked as such. Differential Revision: https://reviews.llvm.org/D41041 llvm-svn: 320438
* [WebAssembly] Initial wasm linker implementationSam Clegg2017-11-171-1/+2
| | | | | | | | | | This linker backend is still a work in progress but is enough to link simple programs including linking against library archives. Differential Revision: https://reviews.llvm.org/D34851 llvm-svn: 318539
* [lit] Respect LLVM_LIT_TOOLS_DIR when looking for 'tar' on Windows.Igor Kudrin2017-10-261-5/+7
| | | | | | | | | | Changes in D38977 expect 'tar' to be found in one of PATH directories. On Windows, one might opt to use LLVM_LIT_TOOLS_DIR rather than add MSYS tools directory to the PATH. In that case, tests for lld failed on run. Differential Revision: https://reviews.llvm.org/D39278 llvm-svn: 316635
* COFF: Add type server pdb files to linkrepro tar file.Peter Collingbourne2017-10-201-0/+6
| | | | | | Differential Revision: https://reviews.llvm.org/D38977 llvm-svn: 316233
* [lit] Raise the logic for enabling clang & lld substitutions to llvm.Zachary Turner2017-10-121-19/+4
| | | | | | | | | | This paves the way for other projects which might /use/ clang or lld but not necessarily need to the full set of functionality available to clang and lld tests to be able to have a basic set of substitutions that allow a project to run the clang or lld executables. llvm-svn: 315627
* [lit] Improve tool substitution in lit.Zachary Turner2017-10-061-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This addresses two sources of inconsistency in test configuration files. 1. Substitution boundaries. Previously you would specify a substitution, such as 'lli', and then additionally a set of characters that should fail to match before and after the tool. This was used, for example, so that matches that are parts of full paths would not be replaced. But not all tools did this, and those that did would often re-invent the set of characters themselves, leading to inconsistency. Now, every tool substitution defaults to using a sane set of reasonable defaults and you have to explicitly opt out of it. This actually fixed a few latent bugs that were never being surfaced, but only on accident. 2. There was no standard way for the system to decide how to locate a tool. Sometimes you have an explicit path, sometimes we would search for it and build up a path ourselves, and sometimes we would build up a full command line. Furthermore, there was no standardized way to handle missing tools. Do we warn, fail, ignore, etc? All of this is now encapsulated in the ToolSubst class. You either specify an exact command to run, or an instance of FindTool('<tool-name>') and everything else just works. Furthermore, you can specify an action to take if the tool cannot be resolved. Differential Revision: https://reviews.llvm.org/D38565 llvm-svn: 315085
* Run pyformat on lit code.Zachary Turner2017-10-061-15/+15
| | | | llvm-svn: 315084
* Resubmit "[lit] Refactor out some more common lit configuration code."Zachary Turner2017-09-211-42/+15
| | | | | | | | There were two issues, one Python 3 specific related to Unicode, and another which is that the tool substitution for lld no longer rejected matches where a / preceded the tool name. llvm-svn: 313928
* Revert "[lit] Refactor out some more common lit configuration code."Zachary Turner2017-09-211-15/+42
| | | | | | | | This is breaking several bots. I have enough information to investigate, so I'm reverting to green until I get it figured out. llvm-svn: 313922
* [lit] Refactor out some more common lit configuration code.Zachary Turner2017-09-211-42/+15
| | | | | | | | | | | | | | | | | | | | | debuginfo-tests has need to reuse a lot of common configuration from clang and lld, and in general it seems like all of the projects which are tightly coupled (e.g. lld, clang, llvm, lldb, etc) can benefit from knowing about one other. For example, lldb needs to know various things about how to run clang in its test suite. Since there's a lot of common substitutions and operations that need to be shared among projects, sinking this up into LLVM makes sense. In addition, this patch introduces a function add_tool_substitution which handles all the dirty intricacies of matching tool names which was previously copied around the various config files. This is now a simple straightforward interface which is hard to mess up. Differential Revision: https://reviews.llvm.org/D37944 llvm-svn: 313919
* [lit] Rename lld and clang lit configs to end in .pyZachary Turner2017-09-211-0/+128
This follows in line with a previous patch of renaming LLVM's. Working on these files is difficult in certain operating systems and/or environments that don't like handling python code with a non .py file extension. llvm-svn: 313892
OpenPOWER on IntegriCloud