summaryrefslogtreecommitdiff
path: root/lld/Common/Filesystem.cpp
AgeCommit message (Collapse)Author
2023-10-05[LLD][COFF] Add support for `--time-trace` (#68236)Alexandre Ganea
This adds support for generating Chrome-tracing .json profile traces in the LLD COFF driver. Also add the necessary time scopes, so that the profile trace shows in great detail which tasks are executed. As an example, this is what we see when linking a Unreal Engine executable: ![image](https://github.com/llvm/llvm-project/assets/37383324/b2e26eb4-9d37-4cf9-b002-48b604e7dcb7)
2023-09-28[NFC][LLD] Refactor some copy-paste into the Common library (#67598)Matheus Izvekov
2023-09-21[NFC] clang-format lld/COFF/Driver.cpp and lld/Common/Filesystem.cppMatheus Izvekov
In order to reduce noise for a MR.
2020-07-13[LLD][ELF][Windows] small improvement to D82567Ben Dunbobbin
Bail early if there is no existing output file to be overwritten. Differential Revision: https://reviews.llvm.org/D83272
2020-07-03[LLD][ELF][Windows] Allow LLD to overwrite existing output files that are in useBen Dunbobbin
On Windows co-operative programs can be expected to open LLD's output in FILE_SHARE_DELETE mode. This allows us to delete the file (by moving it to a temporary filename and then deleting it) so that we can link another output file that overwrites the existing file, even if the current file is in use. A similar strategy is documented here: https://boostgsoc13.github.io/boost.afio/doc/html/afio/FAQ/deleting_open_files.html Differential Revision: https://reviews.llvm.org/D82567
2020-05-05[Support] Move LLD's parallel algorithm wrappers to supportReid Kleckner
Essentially takes the lld/Common/Threads.h wrappers and moves them to the llvm/Support/Paralle.h algorithm header. The changes are: - Remove policy parameter, since all clients use `par`. - Rename the methods to `parallelSort` etc to match LLVM style, since they are no longer C++17 pstl compatible. - Move algorithms from llvm::parallel:: to llvm::, since they have "parallel" in the name and are no longer overloads of the regular algorithms. - Add range overloads - Use the sequential algorithm directly when 1 thread is requested (skips task grouping) - Fix the index type of parallelForEachN to size_t. Nobody in LLVM was using any other parameter, and it made overload resolution hard for for_each_n(par, 0, foo.size(), ...) because 0 is int, not size_t. Remove Threads.h and update LLD for that. This is a prerequisite for parallel public symbol processing in the PDB library, which is in LLVM. Reviewed By: MaskRay, aganea Differential Revision: https://reviews.llvm.org/D79390
2020-03-31[lld][COFF][ELF][WebAssembly] Replace --[no-]threads /threads[:no] with ↵Fangrui Song
--threads={1,2,...} /threads:{1,2,...} --no-threads is a name copied from gold. gold has --no-thread, --thread-count and several other --thread-count-*. There are needs to customize the number of threads (running several lld processes concurrently or customizing the number of LTO threads). Having a single --threads=N is a straightforward replacement of gold's --no-threads + --thread-count. --no-threads is used rarely. So just delete --no-threads instead of keeping it for compatibility for a while. If --threads= is specified (ELF,wasm; COFF /threads: is similar), --thinlto-jobs= defaults to --threads=, otherwise all available hardware threads are used. There is currently no way to override a --threads={1,2,...}. It is still a debate whether we should use --threads=all. Reviewed By: rnk, aganea Differential Revision: https://reviews.llvm.org/D76885
2020-01-06[lld] Fix trivial typos in commentsKazuaki Ishizaki
Reviewed By: ruiu, MaskRay Differential Revision: https://reviews.llvm.org/D72196
2019-07-11Fix build breakage on Win32.Rui Ueyama
llvm-svn: 365732
2019-07-11[Coding style change][lld] Rename variables for non-ELF portsRui Ueyama
This patch does the same thing as r365595 to other subdirectories, which completes the naming style change for the entire lld directory. With this, the naming style conversion is complete for lld. Differential Revision: https://reviews.llvm.org/D64473 llvm-svn: 365730
2019-03-11Fail early if an output file is not writableRui Ueyama
Fixes https://bugs.llvm.org/show_bug.cgi?id=36478 Differential Revision: https://reviews.llvm.org/D43664 llvm-svn: 355834