Commit Graph
57 Commits
Author SHA1 Message Date
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ö 056c1f5cd2 build-llvm: Update to a recent git master version of llvm
Notable changes since the previous version are:
- Added a lld option for requesting delay loading libraries
- Allowing using custom .edata from input object files in lld (for Wine)
- Fixed llvm-dlltool with symbol renaming with stdcall decorations
- Supporting merging resources from more than one resource object file in lld
- Improved error messages for duplicate or undefined symbols in lld
  (including demangling C++ symbols and printing source locations
  where possible)
- Made lld look for for more library name patterns, matching GNU ld
- Brushed up support for using LLDB for, and building on, mingw
- Implemented initial support for armv7 and aarch64 windows in LLDB
2019-12-19 23:09:29 +02:00
Jacek Caban f862f91c1c Allow overriding default llvm and msvcrt versions.
build-mingw-w64.sh already provides --with-default-msvcrt option, but
this makes it more convenient to use build-all.sh with non-default
msvcrt config.
2019-12-19 22:18:22 +02:00
Martin Storsjö 577400a5f7 Pass $HOST to individual script with a --host parameter
This avoids ambiguity on distributions (such as openSUSE) where the
HOST environment variable already is set, to the hostname.
2019-11-13 12:55:39 +02:00
Martin Storsjö 255286eb72 build-llvm: Fix only checking out the source
This is used if calling build-compiler-rt.sh or build-libcxx.sh with
the environment variable SYNC set.
2019-10-23 13:21:56 +00: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ö ef9af0d3ad build-llvm: Update to the 9.0.0 release 2019-09-20 11:27:27 +03:00
Martin Storsjö c2f25a93ad build-llvm: Remove a redundant -b parameter to git clone 2019-09-20 11:27:27 +03:00
Martin Storsjö 3024fbc50f build-llvm: Set LLVM_HOST_TRIPLE when cross compiling
This makes the bare executables know what their default triple
is.
2019-09-17 13:59:59 +03:00
Martin Storsjö d31dc46137 build-llvm: Use symlinks in the llvm/tools directory instead of LLVM_ENABLE_PROJECTS
This makes cmake use relative paths to all source files, allowing ccache
to reuse compilation results from different source trees in different
directories.

Keep using LLVM_ENABLE_PROJECTS on msys, where symlinks aren't supported.
2019-09-12 14:32:14 +03:00
Martin Storsjö 0f9d9f1986 Check out llvm sources using the new llvm git monorepo
This updates compiler-rt, libunwind, libcxxabi and libcxx to a newer
version, matching the compiler.

This will be the official, canonical repo in the future.

For the non-dev Dockerfile build, this means that all the llvm based
subprojects need to be built in one RUN to avoid storing the llvm
checkout in the docker layers.
2019-09-12 13:14:19 +03:00
Martin Storsjö 4670446157 Install llvm-addr2line 2019-07-01 22:30:24 +03:00
Martin Storsjö 0c7aac99ad Update llvm/clang/lld to the latest version
This version adds support for a version of the -pdb option to the MinGW
frontend to lld that can work without a parameter, and implements --help
and -v for the same frontend.
2019-05-28 00:03:05 +03:00
Steve Lhomme b31ef612fb also pass the number of CORES to Ninja
It may automatically get a value but we can't override it
2019-05-21 14:26:26 +03:00
Martin Storsjö d009355b91 build-llvm: Remove the now unnecessary BUILDTARGETS variable 2019-05-09 09:22:26 +03:00
Martin Storsjö 873243acc2 build-llvm: Use the built-in recursive cmake for building llvm-tblgen if necessary
This requires setting a flag to use the system default compiler
for this, instead of the cross compiler.
2019-05-09 09:22:26 +03:00
Martin Storsjö 1759d79daa Update to the latest version of llvm/clang/lld
This contains the following changes relevant for mingw usage:
- A fix in a code generation bug affecting dwarf exception handling
  on i686
- Setting the proper machine type in weak alias objects in import libraries,
  making GNU binutils not reject such files outright
- Fixes for SEH generation for AArch64, for functions containing
  jump tables
- Fixes to the calling convention of functions returning structs on AArch64
- Improvements in handling of dllexport of C++ template instantiations,
  allowing building libc++ into a DLL without using --export-all-symbols
- Proper separators in the output of clang --print-search-dirs on
  Windows
- A new flag --appcontainer to lld's mingw frontend
- Lld now has extra handling of crtend.o, fixing use of lld with gcc
  based mingw setups, when using dwarf exceptions
2019-05-04 07:53:15 +03:00
Martin Storsjö 84bdd9c4e8 Set the correct CMake option CMAKE_CROSSCOMPILING in build-llvm.sh
The previous option doesn't seem to have had any effect, and cmake
correctly has warned about an unused option.

Also set the value of the option to TRUE, for slightly more consistency
with where this option is set in build-llvm.sh.
2019-04-16 10:27:25 +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ö 4e58a5a9a0 Update llvm/clang/lld to a recent version
Since the previous pinned version, there was one fix relevant for
windows on aarch64.
2019-03-19 09:44:01 +02:00
Martin Storsjö 4a7cb27899 Don't error out if git-svn is unavailable
This should avoid leaving the llvm tree checked out at a version other
than the pinned one, if git-svn failed or wasn't available.
2019-03-16 10:53:00 +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ö c013ab7548 Update llvm/clang/lld to the latest version
In this version, llvm-objcopy has gained support for operating on
COFF object files and executables.
2019-01-24 10:58:20 +02:00
Martin Storsjö 6d9eb8296f Update llvm/clang/lld
This implements the .arch_extension directive for aarch64, and fixes a
regression in the C++ ABI in the previous clang update.
2019-01-03 09:04:43 +02:00
Martin Storsjö 04beed38bc Update llvm/clang/lld
This version supports SEH for arm64, fixes certain cases of dllexport
of C++ classes defined entirely in headers (fixing building Qt in
debug mode), and fixes a compiler bug (regression since the end of
August 2018) when compiling glslang (as part of VLC) for armv7.
2018-12-20 12:10:15 +02:00
Martin Storsjö fdd0a116ae Try to set "MSYS Makefiles" as cmake generator in mingw environments 2018-11-30 12:03:09 +02:00
Martin Storsjö f9811f258e Set CMAKE_GENERATOR to the intended generator only, add the -G separately 2018-11-30 12:03:09 +02:00
Martin Storsjö 53db1c3a4c Resolve $PREFIX to an absolute path at the start of shell scripts
This fixes building/installing into a relative path.
2018-11-23 13:51:05 +02:00
Martin Storsjö 99e2fefc9d Use nproc and sysctl -n hw.cpu for default initializing CORES
This avoids having to pass --build-arg CORES=n when building the
docker images.
2018-11-09 22:20:34 +02:00
Martin Storsjö 2244b6cdfa Update llvm/clang/lld to a newer version
This makes the help output from llvm-nm contain keywords that libtool
may look for, makes combined compilation and linking with -flto in
one command work, fixes a bug with alignment of locally imported
symbols on arm64, allows using linker directives for specifying
default libraries to link, and allows linking to undefined behaviour
sanitizer.
2018-10-17 22:45:54 +03:00
Martin Storsjö 14e7d650f1 Allow building llvm-tblgen/clang-tblgen/llvm-config if needed 2018-10-16 20:27:53 +03:00
Martin Storsjö 461f889187 Update llvm/clang/lld to the latest version
This avoids warnings about both main and wmain being present when linking,
warnings that appeared in the previous update.
2018-10-06 07:44:33 +03:00
Martin Storsjö 10210478ee Update llvm/clang/lld to the latest version
This fixes cases where llvm built without assertions can hang when
assembling a file that references _GLOBAL_OFFSET_TABLE_ for windows
(which is unsupported; previously this used llvm_unreachable making
it undefined what happens if that really is hit).
2018-10-05 09:07:41 +03:00
Martin Storsjö bf2ede1537 Add support for crosscompiling llvm 2018-10-02 21:34:54 +03:00
Martin Storsjö 81864b3883 Disable asserts in llvm by default
This gives a 25% speedup. As long as the llvm version has been
reasonably tested, this should hopefully be safe.
2018-10-02 21:34:54 +03:00
Martin Storsjö d379cc8b21 Allow passing --enable-asserts to build-llvm.sh
This is the default already, but by allowing this as an option, it becomes
easier to potentially change the default behaviour.
2018-10-02 21:34:54 +03:00
Martin Storsjö 0a181a36a3 Use -n instead of != "" in build-llvm.sh 2018-10-02 21:34:54 +03:00
Martin Storsjö cea63c570a Update llvm/clang/lld to the latest version
This version allows clang to use address sanitizer for mingw,
adds support for linking against import libraries from GNU tools
and makes the linker provide the __CTOR_LIST__ symbol for better
compatibility with binutils based sysroots, and adds support for
thunks for armv7 (allowing linking armv7 binaries over 16 MB).
2018-10-02 14:53:53 +03:00
Martin Storsjö 5f12b33177 Update llvm/clang/lld to the latest version from today
This adds support for automatically importing variables from dlls
without using the dllimport attribute.
2018-09-05 11:55:12 +03:00
Martin Storsjö 5e295f5c62 Allow building llvm with asserts disabled
Doing that speeds up the built clang by around 25% (which is rather
significant) and reduces the size of the clang executable by almost 30%.

But since the mingw target in clang/llvm is less mature and less widely
tested than other llvm targets, running with assertions allows catching
quite a few issues during build instead of ending up with potentially
broken code.
2018-09-03 09:25:08 +03:00
Martin Storsjö 65859ddf20 Update llvm/clang/lld to the latest version
This version fixes issues with linking mingw-style SEH data (making
sure all unwind info is included), adds support for assembler
directives like .rva, which often is used in SEH contexts, and
updates clang's unwind.h to match the libgcc ABI for SEH unwinding.
2018-08-08 08:42:28 +03:00
Martin Storsjö 0c85589b93 Limit what parts of llvm are installed in the first place 2018-08-03 11:58:59 +03:00
Martin Storsjö 86d8400cae Update llvm/clang/lld to a version from today
This allows using GNU binutils strip and objcopy on executables with
dwarf debug info linked by lld.

This also improves clang's handling of detecting known libraries
that override default libraries to link.
2018-07-25 00:56:40 +03:00
Martin Storsjö 66d79fd7fe Update to the latest versions of llvm/clang/lld
This fixes an issue with code generation for functions that needed
a stack probe on armv7, improves llvm-rc and adds a few more options
to the mingw lld frontend.
2018-05-16 09:10:01 +03:00
Martin Storsjö da4d3df5da Update to the latest version of llvm/clang/lld
This version improves llvm-rc to support more rc script features
and features built-in filtering of CPP output in llvm-rc. It also
improves the handling of some def features in llvm-dlltool, allows
producing codeview debug information when targeting mingw and adds
handling of a few more ARM64 relocations in lld.
2018-05-11 09:48:07 +03:00
Martin Storsjö 37e0a35aa5 Update to the latest version of llvm/clang/lld
This version contains improvements and fixes for llvm-rc and llvm-cvtres.
2018-05-03 14:51:26 +03:00
Martin Storsjö f13e8da487 Update to the latest version of llvm/clang/lld
This version improves the handling of mingw cross sysroots
and the libc++ include paths.
2018-04-18 20:44:22 +03:00
Martin Storsjö 172b2974dd Strip llvm on install 2018-04-01 22:45:30 +03:00
Martin Storsjö 28ac526c42 Update to the latest version of llvm/clang/lld
This version fixes issues with long double math functions on x86_64
(and some mingw-w64 float/double math functions are implemented with
a long double function internally), and adds support for the --kill-at
flag in lld.
2018-03-20 09:57:21 +02:00