Commit Graph

17 Commits

Author SHA1 Message Date
Tobias Hieta
f98ee40f4b
[NFC][Py Reformat] Reformat python files in the rest of the dirs
This is an ongoing series of commits that are reformatting our
Python code. This catches the last of the python files to
reformat. Since they where so few I bunched them together.

Reformatting is done with `black`.

If you end up having problems merging this commit because you
have made changes to a python file, the best way to handle that
is to run git checkout --ours <yourfile> and then reformat it
with black.

If you run into any problems, post to discourse about it and
we will try to help.

RFC Thread below:

https://discourse.llvm.org/t/rfc-document-and-standardize-python-code-style

Reviewed By: jhenderson, #libc, Mordante, sivachandra

Differential Revision: https://reviews.llvm.org/D150784
2023-05-25 11:17:05 +02:00
Serge Guelton
a1aa7a4054 Python 2/3 compatibility
This should be the only change required to have lld's python code base compatible with both Python 2 and Python 3

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

llvm-svn: 356538
2019-03-20 07:42:13 +00:00
Chandler Carruth
2946cd7010 Update the file headers across all of the LLVM projects in the monorepo
to reflect the new license.

We understand that people may be surprised that we're moving the header
entirely to discuss the new license. We checked this carefully with the
Foundation's lawyer and we believe this is the correct approach.

Essentially, all code in the project is now made available by the LLVM
project under our new license, so you will see that the license headers
include that license only. Some of our contributors have contributed
code under our old license, and accordingly, we have retained a copy of
our old license notice in the top-level files in each project and
repository.

llvm-svn: 351636
2019-01-19 08:50:56 +00:00
Rafael Espindola
6dc954a0d9 Add a script to run various benchmarks and send the result to lnt.
Lnt is both a server and a set of script for benchmarking llvm.

I don't think it makes sense to use the scripts for lld since our
benchmarks are quite different.

The server on the other hand is very general and seems to work well
for tracking any quantities.

This patch adds a script to lld that can be used to run various
benchmarks and send the result to lnt.

The benchmarks are assumed to each be a response file in a
subdirectory. Each subdirectory can contain multiple response
files. That can be used to have a plain response.txt and a
response-icf.txt for example. The name of each benchmark is the
combination of the directory name and the "flavor": firefox-gc,
chromium-icf, etc.

For the first version the script uses perf and collects all the
metrics that a plain "perf stat" prints.

This script can then be used by a developer to test a patch or by a
bot to keep track of lld's performance.

llvm-svn: 318158
2017-11-14 16:40:30 +00:00
Rui Ueyama
1e4dd36824 Remove astyle-options.
We have our own code formatting tool, clang-format.
I believe no one is using "astyle" to format the code.

llvm-svn: 243570
2015-07-29 20:48:02 +00:00
Chandler Carruth
5ad16c2ad0 Move the 'linker-script-test' binary to the tools directory.
The canonical LLVM directory arrangement places binaries in the 'utils/'
tree when they are used as part of building the project. For example,
the tblgen binaries are built out of 'utils/' trees.

Tools which are not used by any other part of the build, including
testing utilities, are just in the 'tools' directory. For example, in
Clang we have 'c-index-test' which is exactly the same kind of thing as
'linker-script-test'.

Differential Revision: http://reviews.llvm.org/D8269

llvm-svn: 231973
2015-03-11 22:05:49 +00:00
Eric Christopher
ddaf4fd680 lldReaderWriter.a depends on lldCore.a so make sure
to link that in as well.

llvm-svn: 228252
2015-02-05 01:10:40 +00:00
Rafael Auler
ee95c3b5c5 Make ELFLinkingContext own LinkerScript buffers
Currently, no one owns script::Parser buffers, but yet ELFLinkingContext gets
updated with StringRef pointers to data inside Parser buffers. Since this buffer
is locally owned inside GnuLdDriver::evalLinkerScript(), as soon as this
function finishes, all pointers in ELFLinkingContext that comes from linker
scripts get invalid. The problem is that we need someone to own linker scripts
data structures and, since ELFLinkingContext transports references to linker
scripts data, we can simply make it also own all linker scripts data.

Differential Revision: http://reviews.llvm.org/D7323

llvm-svn: 227975
2015-02-03 16:08:57 +00:00
Greg Fitzgerald
57c29ad223 add_lld_library -> add_llvm_library
* Works better for shared libraries (sets PRIVATE instead of INTERFACE)
* Fixes http://llvm.org/bugs/show_bug.cgi?id=22269
* Also, use build-target names instead of component names

Differential Revision: http://reviews.llvm.org/D7074

From: Greg Fitzgerald <garious@gmail.com>
llvm-svn: 226702
2015-01-21 21:26:27 +00:00
Shankar Easwaran
48b9fc7981 Revert "Add support library."
This reverts commit r221583.

llvm-svn: 221649
2014-11-11 00:40:36 +00:00
Shankar Easwaran
c937b4923e Add support library.
The parsing routines in the linker script to parse strings encoded in various
formats(hexadecimal, octal, decimal, etc), is needed by the GNU driver too. This
library provides helper functions for all flavors and flavors to add helper
functions which other flavors may make use of.

llvm-svn: 221583
2014-11-10 14:54:34 +00:00
Rafael Espindola
c2199ecf1e Update for llvm api change.
llvm-svn: 212407
2014-07-06 17:43:22 +00:00
Rafael Espindola
6400ed4e75 Refer to error_code with an std prefix.
llvm-svn: 210820
2014-06-12 20:42:12 +00:00
Iain Sandoe
c4d9bedcfc Initial set of Makefiles
This provides support for the autoconfing & make build style.
The format, style and implementation follows that used within the llvm and clang projects.

TODO: implement out-of-source documentation builds.
llvm-svn: 210177
2014-06-04 09:54:07 +00:00
Ahmed Charles
13c70b6d4b Replace OwningPtr with std::unique_ptr.
This results in some simplifications to the code where an OwningPtr had to
be used with the previous api and then ownership moved to a unique_ptr for
the rest of lld.

llvm-svn: 203809
2014-03-13 16:20:38 +00:00
Michael J. Spencer
a55e37f477 Add basic linker script parsing.
llvm-svn: 176309
2013-03-01 00:03:36 +00:00
Michael J. Spencer
773a8fb6ab Initial commit. Code by Nick Kledzik. Cleanups and build system by me.
llvm-svn: 146844
2011-12-18 08:27:59 +00:00