Steve Lhomme
990ad67759
build-llvm: Install and keep llvm-lib
...
It's an equivalent to MSVC lib.exe [^1].
It is used by meson to find the DLL name from a .lib/.dll.a [^2].
The other option is dlltool, which is not the same as llvm-dlltool.
[^1] https://llvm.org/docs/CommandGuide/llvm-lib.html
[^2] https://github.com/mesonbuild/meson/blob/1e986554ef2071f59fb796cda5e66c448bde6ac9/mesonbuild/scripts/symbolextractor.py#L209
2025-02-13 12:03:26 +02:00
Norbert Lange
7f8071951c
strip-llvm: Retain the clang-scan-dep tool for c++ modules
...
Compilers and buildsystems have early support for c++ modules,
see [1], [2].
`clang-scan-dep` is necessary for integration in CMake, potentially
other buildsystems in the future.
Using standard modules like from libc++ is still not solved thoroughly,
and module support from libc++ is marked experimental, documentation
how to use them is WIP [3].
[1]: https://www.kitware.com/import-cmake-the-experiment-is-over
[2]: https://cmake.org/cmake/help/latest/manual/cmake-cxxmodules.7.html
[3]: https://github.com/llvm/llvm-project/pull/80601
2024-04-12 22:22:22 +03:00
Martin Storsjö
7bbbf7c65f
strip-llvm: Inspect the --host= argument for the kind of triple
...
Don't assume that any host argument indicates cross compiling for
Windows.
Update build-all to pass --host arguments to strip-llvm as well,
for consistency.
2024-01-12 11:06:54 +02:00
Martin Storsjö
ceb97dadc3
strip-llvm: Include the lldb-dap tool
...
In LLVM 18, the lldb-vscode tool has been renamed to lldb-dap.
2023-11-10 13:44:33 +02:00
Martin Storsjö
a10755cbd5
build-llvm: Install and keep llvm-cxxfilt
...
This only provides the main binary llvm-cxxfilt; it doesn't
provide the binutils-style frontends named [<triple>-]c++filt.
If we were to provide such frontends, we'd need to make them
default to --strip-underscore for i686 triple prefixes, and
for the prefixless case when the default architecture is i686.
2023-10-02 14:44:48 +03:00
Martin Storsjö
fa0eec51be
strip-llvm: Retain clang-format and related files
2023-07-10 00:52:51 +03:00
Martin Storsjö
af99275e2e
Remove unnecessary empty cases in shell scripts
2023-04-26 10:01:21 +03:00
Martin Storsjö
dd24bdd749
strip-llvm: Don't strip out clang-target-wrapper
...
This avoids losing files if running strip-llvm after build-all.sh
instead of as part of it.
2023-04-20 14:00:24 +03:00
Martin Storsjö
aa173210ff
strip-llvm: Don't wipe out the whole share directory
...
Keep removing the same items installed by LLVM as before (although
that could be revisited too).
This avoids removing unintended files if running strip-llvm after
the installation of other components.
2023-04-20 14:00:24 +03:00
Martin Storsjö
3f72fcbabf
strip-llvm: Strip out some darwin specific files
2023-04-20 14:00:24 +03:00
Martin Storsjö
75dc6fd314
strip-llvm: Strip out the new amdgpu-arch and nvptx-arch executables
...
These weren't present in LLVM 15.x.
2023-03-11 23:29:12 +02:00
Martin Storsjö
9d96e5745f
Include the llvm-size tool like other binutils-like tools
...
This was requested in
https://github.com/mstorsjo/llvm-mingw/issues/320 .
2023-01-12 14:11:03 +02:00
Martin Storsjö
c9d406e44a
strip-llvm: Remove all libLLVM*.a
...
46efff459a regressed this aspect,
where libLLVM-<version>.{so,dylib,dll} was meant to be kept, but
also ended up keeping libLLVM<name>.a. (This only matters if trying
to strip a build done with --full-llvm.)
2022-08-11 16:00:13 +03:00
Martin Storsjö
eccf5de7e7
strip-llvm: Remove more files from full builds
2022-08-11 16:00:13 +03:00
Martin Storsjö
0a23956f1a
strip-llvm: Keep the lldb-vscode tool
2022-03-24 13:22:31 +02:00
Martin Storsjö
5ae5b1aa37
build-llvm: Build clang-tools-extra
...
This installs a bunch of new tools in the bin dir, namely the following:
clang-apply-replacements
clang-change-namespace
clang-doc
clang-include-fixer
clang-move
clang-query
clang-reorder-fields
clang-tidy
clangd
find-all-symbols
modularize
pp-trace
run-clang-tidy
These are stripped out by strip-llvm, but clangd and clang-tidy
are kept.
2022-03-23 13:07:39 +02:00
Martin Storsjö
b0864ea9ae
strip-llvm: Remove import libraries for liblldb/libLLVM/libclang-cpp
...
The import libraries for libLLVM/libclang-cpp are rather large
(21 and 15 MB each), while it hasn't been too much of an issue
with liblldb.dll.a (which was 600 KB).
2021-08-16 14:00:04 +03:00
Martin Storsjö
177cd0d33d
Include the llvm-readelf tool
2021-08-16 11:26:37 +03:00
Martin Storsjö
eaf5ac08e5
Build lldb-mi
...
Building this tool requires having a full LLVM build available;
either by installing without LLVM_INSTALL_TOOLCHAIN_ONLY (and not
stripping the llvm installation yet) or by pointing it at the
LLVM build directory instead. The latter works better for our
normal build flows.
2021-08-16 11:26:37 +03:00
Martin Storsjö
63a5d3c09f
build-llvm: Include the llvm-ml tool
2021-08-09 12:08:16 +03:00
Martin Storsjö
46efff459a
build-llvm: Build with a shared libLLVM and libclang-cpp
...
This reduces the size of e.g. the zipped toolchain for Windows
from 183 MB to 85 MB.
2021-07-01 23:33:28 +03:00
Martin Storsjö
37936ec0ea
build-llvm: Install llvm-windres if available
...
The current llvm main branch contains the tool llvm-windres; make
sure to install and include it, if it exists.
2021-04-26 22:21:42 +03:00
Martin Storsjö
f061215ebf
strip-llvm: Remove libLTO.dll
...
In LLVM 12, it no longer ends up called LTO.dll, but libLTO.dll.
2021-04-15 11:37:11 +03:00
Martin Storsjö
7e55d4df92
strip-llvm: Remove the new ld64.lld.darwinnew in newer llvm versions
2021-04-15 11:37:11 +03:00
Martin Storsjö
cc0055bc96
Fix the help printouts in scripts
...
Printing '<triple>' causes the shell to try to read a file named
triple. One could either quote it, or just remove the angle brackets;
removing the brackets for simplicity.
2021-02-09 13:54:16 +02:00
Martin Storsjö
bf40eb86fc
strip-llvm: Simplify stripping out the executable suffix
2020-10-09 20:51:11 +03:00
Martin Storsjö
5fc9728420
strip-llvm: Fix name mangling of tools that contain $EXEEXT
...
This makes sure that llvm-exegesis is handled correctly (i.e.
stripped out) if build-llvm.sh was invoked with --full-llvm when
building for windows.
2020-10-09 15:55:58 +03:00
Martin Storsjö
66eb0af305
strip-llvm: Remove include/lldb if stripping a full install
...
If llvm is built with build-llvm.sh --full-llvm, we need to remove
this directory to end up with the same set of installed files as if
without --full-llvm, after stripping the install.
2020-10-09 12:37:37 +03:00
Martin Storsjö
c1882530c3
Add copyright and license headers to all shell script files, for clarity
2020-03-05 11:31:31 +02:00
Martin Storsjö
39f7bf5e6e
strip-llvm: Inclue lldb-argdumper and lldb-instr
...
These can be useful for integrating with an IDE such as VS Code.
This should fix issue #83 .
2020-02-17 09:59:25 +02:00
Martin Storsjö
de510f07b5
build-llvm: Enable building LLDB
2019-12-28 13:59:42 +02:00
Martin Storsjö
57c4f47db3
Add the --host flag to the help output in the individual build scripts
2019-12-21 00:04:47 +02:00
Martin Storsjö
f1168d3016
Don't rely on EXEEXT as an env variable, infer it from --host instead
2019-11-13 12:59:53 +02:00
Martin Storsjö
c7821ce27d
build-llvm, strip-llvm: Include llvm-symbolizer
...
This is necessary for getting addr2line included.
2019-10-23 13:21:56 +00:00
Martin Storsjö
4670446157
Install llvm-addr2line
2019-07-01 22:30:24 +03:00
Martin Storsjö
6223a35822
strip-llvm: Remove lld-link on windows
2019-05-06 11:05:25 +03:00
Martin Storsjö
c3aeb78576
wrappers: Add a wrapper for running llvm binutils replacements
...
This saves a lot of diskspace, when symlinks are turned into full
copies of the tools on windows, as the symlinks only point to a small
wrapper instead of to the full tool.
2019-05-06 11:05:25 +03:00
Martin Storsjö
ad997b4ea9
Remove Remarks.dll in addition to the previous OptRemarks.dll
...
The latter has now been renamed.
2019-05-04 07:55:04 +03:00
Martin Storsjö
7c2067f19f
Build and keep llvm-cov and llvm-profdata
...
These might be useful now that the profiling library in compiler-rt
works.
2019-03-29 23:09:41 +02:00
Martin Storsjö
005b8efd91
Allow building a full llvm install
2019-03-15 23:56:18 +02:00
Martin Storsjö
78bade5cf1
Build and install llvm-objcopy and llvm-strip
2019-01-24 10:58:20 +02:00
Martin Storsjö
f43d7825e5
Remove the new OptRemarks.dll when stripping the llvm installation
2019-01-04 01:30:26 +02:00
Martin Storsjö
1f838437ca
Automatically set EXEEXT in build-mingw-w64.sh and strip-llvm.sh
2018-11-30 12:03:09 +02:00
Martin Storsjö
8f15532652
Clean up more for windows builds in strip-llvm.sh
...
On windows, symlinks might be changed into regular copies, so we keep
as few extra symlinks as possible.
2018-10-02 21:34:54 +03:00
Martin Storsjö
47392c5a90
Don't expect that all files exist in strip-llvm.sh
...
If run multiple times, this removal would try to remove a file named
clang-*, which doesn't exist.
2018-10-02 21:34:54 +03:00
Martin Storsjö
391c93d0d4
Allow strip-llvm.sh to run on files with a potential $EXEEXT suffix
2018-10-02 21:34:54 +03:00
Martin Storsjö
83fbea8ff1
Keep llvm-pdbutil after stripping
...
This tool may be of use in a windows toolchain.
2018-08-03 11:58:59 +03:00
Martin Storsjö
bbea540de6
Remove dangling symlinks when stripping the llvm installation
2018-08-03 11:58:59 +03:00
Martin Storsjö
1ecc51f84d
Clean up some more files installed by current clang
2018-07-25 14:59:31 +03:00
Martin Storsjö
579aa616b4
Fix strip-llvm.sh after updating to the latest version of clang
...
In this version, the binary actually is named clang-7 instead of
clang-7.0. This requires extending the test a little for keeping such
binaries but removing other clang-foo tools.
2018-04-26 13:15:53 +03:00