Commit Graph

136 Commits

Author SHA1 Message Date
Alessandro Di Federico 416c59c43b support.py: rework get_command
We introduce two paths where we can hard code search prefixes
(`/additional-search-prefixes`) and additional binaries paths
(`/share/revng/additional-bin-paths`).

This enables us to add to `additional-bin-paths` the configure-time
specified path of the preferred LLVM installation, instead of relying on
`PATH` to look up, e.g., `opt` at run-time.
2023-04-13 18:11:48 +02:00
Alessandro Di Federico 1454ba6ebb Link to the LLVMTargetParser library 2023-04-08 08:42:23 +02:00
Alessandro Di Federico 564519b6f9 Explicitly add -L for LLVM libraries path 2023-04-08 08:42:23 +02:00
Alessandro Di Federico 5a99154196 Put Python packages into lib/python*/site-packages 2022-10-11 19:08:10 +02:00
Alessandro Di Federico c2f16b0907 Minor changes 2022-08-08 13:54:40 +02:00
Pietro Fezzardi c8b47cfdc6 Enable -Wimplicit-fallthrough
This warning is not enabled by default with -Wall nor with -Wextra.
2022-07-05 10:33:06 +02:00
Alessandro Di Federico bee6872414 Fix CMake formatting 2022-06-21 18:24:43 +02:00
Alessandro Di Federico f4684e244d Switch to new testsuite 2022-06-20 19:04:18 +02:00
Ivan Krysak 80e9243e06 Add a basic CFG pipeline 2022-06-15 15:52:26 +03:00
Alessandro Di Federico 5b39595b77 Minor changes 2022-05-13 15:14:51 +02:00
Alessandro Di Federico 34a94188f0 Suggest how to build with ASan 2022-05-12 21:55:18 +02:00
Giacomo Vercesi 4468cedbf1 CMake: generate node_modules 2022-05-09 13:37:03 +02:00
Ivan Krysak 282b4e238d Add yield-assembly pipeline 2022-05-06 18:51:47 +02:00
Alessandro Di Federico e6f6010cfd Build with -fvisibility-inlines-hidden
`-fvisibility-inlines-hidden` ensures that each dynamic library uses its
own version of each `inline` function.

This reduces the number of exported symbols and resolves issues related
to picking a version of a weak symbol that has already been deleted upon
`dlclose`.

The downside of this flag is that the address of `inline` functions can
be different across different libraries. This commit drops certain
assertions that were relying on this behavior.
2022-04-29 16:40:24 +02:00
Giacomo Vercesi d109a68bc4 Remove BUILD_PATH
It has not been relevant for a long time.
2022-04-28 22:10:02 +02:00
Giacomo Vercesi 7c64831835 revng-check-conventions: install configurations
Fix bug in revng-check-conventions that caused config files to not
be present in the install directory and to not be looked for if run
from there.
2022-04-28 09:45:52 +02:00
Pietro Fezzardi 18f5d7577f Move copy_to_build_and_install to Common.cmake
This enables using this handy helper function also in revng-c.
2022-03-30 14:39:29 +02:00
Filippo Cremonese 70a460c46a TupleTreeGenerator: use dataclasses
Give up on pydantic.
2022-03-22 17:52:02 +01:00
Alessandro Di Federico 2b55d1df22 Adopt cmake-format 2022-03-17 18:52:18 +01:00
Alessandro Di Federico 6832698e5b Introduce revng llvm pipeline
This is a wrapper to `revng-pipeline` designed to make the adoption of
pipelines easier for places where we are now using `revng opt`.
2022-03-17 16:46:02 +01:00
Alessandro Di Federico da7701bd4e Move all executables except revng to libexec/revng
We used to collect all binaries into the `bin/` directory. However this
led to confusions since certain commands where available both as
`revng-command` and `revng command`.

This commit moves all the executables except `revng` into
`libexec/revng`, which, according to FHS, is dedicated to "internal
binaries that are not intended to be executed directly by users or shell
scripts".
2022-03-17 14:10:50 +01:00
Alessandro Di Federico 997e7f60cb scripts/renvg: handle revng pipeline
Let `scripts/revng` intercept `revng-pipeline` invocations and add, not
only -load, but `-P` (pipelines) too.
2022-03-16 22:10:15 +01:00
Filippo Cremonese 09a995ba51 python-model: generate from jsonschema 2022-02-23 18:03:35 +01:00
Filippo Cremonese 6672eb8dbc Turn Python scripts into modules 2022-02-23 18:02:42 +01:00
Massimo Fioravanti d696197597 scripts/revng: adopt revng-pipeline
The revng-translate tool is now a driver for revng-pipeline to perform
the translation.

This commit also drops computing the `-load` "roots". It shouldn't
really be necessary.
2022-02-08 00:05:03 +01:00
Alessandro Di Federico c0f8110e4e s/revng-compare-yaml/revng-model-compare/ 2022-01-31 16:28:17 +01:00
Alessandro Di Federico 0d7decccb3 s/revng-dump-model/revng-model-to-json/ 2022-01-31 16:28:17 +01:00
Massimo Fioravanti 70ec456078 Introduce revng-pipeline 2022-01-17 18:17:54 +01:00
Filippo Cremonese 6e7439ad6d Check Python requirements at configure time 2022-01-13 14:34:11 +01:00
Filippo Cremonese 74217b4fe5 Generate C++ model from YAML definition
Model classes are now described by a YAML document, which is used to
generate C++ headers containing classes and all the boilerplate
required for YAML serialization/deserialization, usage in
SortedVectors, etc. See the README in include/revng/Model for more
info.
2022-01-13 14:34:11 +01:00
Alessandro Di Federico 738637b673 Suggest DISABLE_RECURSIVE_COROUTINES usage 2022-01-09 19:00:57 +01:00
Alessandro Di Federico 777adcbd45 model::Binary: add segments and imported libraries
Now, `scripts/revng` uses the model and we no longer need to emit
.li.csv and .need.csv.
2021-12-22 17:47:54 +01:00
Alessandro Di Federico c64223a80c mv scripts/{,revng-}compare-yaml 2021-12-17 18:50:49 +01:00
Filippo Cremonese 2341b37832 Release build: suppressed unused typedefs warning
Builds in release mode failed because of unused local typedefs defined
in headers included from boost. This commit disables that specific
error.
2021-09-01 16:33:33 +02:00
Pietro Fezzardi 6f7de910a6 Enable warning -Wunused-local-typedefs 2021-06-14 23:04:02 +02:00
Pietro Fezzardi 7735879fa0 Enable warning: -Wdeprecated-enum-enum-conversion
This was disabled because it triggered errors when compiling with older
versions of llvm-12 and -Werror.
With llvm-12 this needed anymore, so we can re-enable it
2021-06-14 23:04:02 +02:00
Alessandro Di Federico 27b58695a1 Let FunctionIsolation and EnforceABI use the Model 2021-02-19 09:39:49 +01:00
Alessandro Di Federico 2d22b31d00 revng-all-binaries: depend on early-linked-module-* 2021-02-18 18:46:49 +01:00
Alessandro Di Federico a314fd61ef Import revng-dump-model 2021-02-18 18:46:49 +01:00
Filippo Cremonese f05f785023 Fix revng_merge_dynamic installation
This commit also substantially reorganizes the root CMakeLists.txt.
2021-02-10 00:00:38 +01:00
Alessandro Di Federico 256ba44158 Make revng-all-binaries depend on support-*.ll 2021-01-27 19:46:53 +01:00
Filippo Cremonese c5680b2120 Refactor revng-merge-dynamic
Notable changes:

- Split in multiple files the existing revng-merge-dynamic script
- Add the option to merge additional LOAD segments in the resulting
  binary
- Align the new .dynstr to a 4 byte boundary
- Ensure the last verneed entry is marked as such (vn_next == 0)
- Ensure LOAD PHDRs are listed in ascending order,
  as mandated by ELF spec
2021-01-23 00:41:52 +01:00
Pietro Fezzardi 9a3b514a80 CMakeLists.txt: generate and install .clang-format
This is intended to be used by all projects that adopt rev.ng coding
conventions for C++. Each project can create a symbolic link to the
installed .clang-format file, so that IDEs and other dev tools can pick
it up easily while keeping it up-to-date when updating revng.
2020-12-29 16:14:49 +01:00
Pietro Fezzardi 670801fad7 Tidy-up cmake commands for check-revng-conventions
This is a preliminary step before adding cmake commands to generate and
install a .clang-format file for easier use from other projects.
2020-12-29 16:14:49 +01:00
Alessandro Di Federico dab8a2dfae Install clang-format-style-file 2020-11-20 18:06:16 +01:00
Alessandro Di Federico 1fa5b0fe68 Install bin/revng from build directory 2020-10-06 16:03:59 +02:00
Alessandro Di Federico 62c1e3c564 Go back to version 0.0.0 2020-10-06 16:03:33 +02:00
Pietro Fezzardi 05e34ef6f9 Add functions to get installed resource files 2020-10-05 14:09:53 +02:00
Alessandro Di Federico 5a7d4d194a Install check-revng-conventions 2020-10-01 18:17:53 +02:00
Pietro Fezzardi 49b3c4b2c9 Upgrade to LLVM 10 2020-06-13 10:36:08 +02:00