Commit Graph
44 Commits
Author SHA1 Message Date
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
Martin Storsjö d3ff718bd1 Remove unnecessary llvm files at the end
This doesn't help reduce the docker image size since it's done
in a separate RUN step than the one that added the files. (compiler-rt
and libunwind currently fail to build after stripping the llvm
installation though.)
2018-04-01 23:27:21 +03:00