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ö
750ab50433
wrappers: Consistently quote all arguments when calling spawn or creating a command line
2019-05-06 11:04:53 +03:00
Martin Storsjö
fa88c4ee1e
wrappers: Escape the first argument to spawn
...
This fixes running in paths that contain a space.
2019-05-06 11:04:53 +03:00
Martin Storsjö
97ca0681bc
wrappers: Split out shared helpers for native wrapper executables to a header
2019-05-06 11:04:53 +03:00
Martin Storsjö
66055dfe63
wrappers: Take the argv null terminator into account when checking for overflows
...
When adding the terminator without incrementing arg and checking for
overflows with "arg > max_arg", we need to allocate space for one
extra element for the implicit terminator.
2019-05-06 11:04:27 +03:00
Martin Storsjö
013dfc08e4
windres-wrapper: Check that the number of args isn't exceeded
2019-05-06 11:04:27 +03:00
Martin Storsjö
2ad83e2c1a
Extend the dockerignore file to exclude more unnecessary files
2019-05-06 10:54:07 +03:00
Martin Storsjö
debd8ca382
Do cleanup even if the release script is interrupted
2019-05-04 07:55:04 +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ö
56ef08dadc
Build libcxx without --export-all-symbols
...
With the latest clang and libcxx, this workaround no longer is
necessary.
2019-05-04 07:55:04 +03:00
Martin Storsjö
b4256fea44
Update libcxx to the latest version
...
This version fixes dllexport handling of template instantiations for
mingw.
2019-05-04 07:55:04 +03:00
Martin Storsjö
f9ce17774e
Switch i686 exception handling back to dwarf
...
The code generation bug in llvm has been fixed now.
2019-05-04 07:55:04 +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ö
82324fcff5
run-tests: Build optimized versions of the exception handling tests
...
Exception handling codegen can be greatly affected by optimization.
2019-04-30 00:03:28 +03:00
Martin Storsjö
8cf83f259e
Add the testcase from llvm PR40322
2019-04-30 00:03:19 +03:00
Martin Storsjö
c3a16814bd
crt-test: Add tests for logb/ilogb
2019-04-29 12:17:07 +03:00
Martin Storsjö
571aa86e6a
Update mingw-w64 to a newer version
...
This version contains more fixes for the logbl/ilogb math functions.
2019-04-29 12:17:07 +03:00
Martin Storsjö
566d1dece9
crt-test: Clarify a comment further
2019-04-29 12:16:02 +03:00
Martin Storsjö
7e74b87a29
crt-test: Remove workarounds for llrint rounding to even numbers
...
Also add testcases for the same case with other functions.
2019-04-20 07:37:11 +03:00
Martin Storsjö
306b98716b
crt-test: Test powl on arm/aarch64 now
2019-04-20 07:37:11 +03:00
Martin Storsjö
fd74ad4c52
crt-test: Remove a workaround for mingw math functions
2019-04-20 07:37:11 +03:00
Martin Storsjö
583e9f2a78
Update to the latest version of mingw-w64
...
This version fixes a number of math functions.
2019-04-20 07:30:27 +03:00
Martin Storsjö
1dd468bb4a
run-tests: Only run aarch64 exception tests if running on native windows
2019-04-19 00:09:06 +03:00
Martin Storsjö
3deb039b62
Use SEH exceptions on aarch64
...
The SEH support for aarch64 should be pretty stable now.
2019-04-19 00:07:17 +03:00
Martin Storsjö
8cbdd0c9b4
crt-test: Clarify a comment about a workaround
2019-04-18 22:40:35 +03:00
Martin Storsjö
0e7e0fe397
clang-target-wrapper: Properly separate arguments for UWP in the C wrapper
2019-04-18 14:31:14 +03:00
Martin Storsjö
a484ddba04
Stop using --enable-secure-api with mingw-w64 headers
...
This is on by default now, and the option is ignored (and produces
a warning).
2019-04-18 14:16:32 +03:00
Martin Storsjö
47acbb667e
run-tests: Handle uname MSYS* in the same way as MINGW*
2019-04-18 10:16:41 +03:00
Martin Storsjö
8c5bac6cb7
run-tests: Actually run the asan test binary when running on native windows
2019-04-18 10:15:26 +03:00
Martin Storsjö
2e31d11bfd
run-tests: Make sure to actually run tests when run on native windows
2019-04-18 10:09:00 +03:00
Martin Storsjö
86e0b3732f
crt-test: Remove skips for acosh(infinity) on x86 mingw
...
This is fixed in the latest upstream version.
2019-04-16 14:53:54 +03:00
Martin Storsjö
978a430069
Update mingw-w64 to a yet newer version
...
This improves math functions in libmsvcrt-os.a for arm/arm64, and
improves the acosh function for x86.
2019-04-16 14:53:54 +03:00
Martin Storsjö
cb7feea731
crt-test: Tweak TEST_FLT_ACCURACY to not accept NAN
2019-04-16 10:28:43 +03:00
Martin Storsjö
70c64e58c9
crt-test: Add tests for acosh/asinh/atanh
2019-04-16 10:28:43 +03:00
Martin Storsjö
141027d5d4
crt-test: Add tests for expm1 and log1p
2019-04-16 10:28:33 +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ö
34cf84fa68
crt-test: Test putenv and the environ variable
2019-04-15 14:05:46 +03:00
Martin Storsjö
fd39855471
crt-test: Remove a skip for fmodl on arm
2019-04-15 14:05:46 +03:00
Martin Storsjö
a59b98bb0c
crt-test: Test error reporting of CRT functions via errno
2019-04-15 14:05:46 +03:00
Martin Storsjö
62869c798c
crt-test: Remove a skip for a floor function issue
...
When using the floor function from msvcrt/ucrt instead of a libmingwex
reimplementation, this test passes on arm as well.
2019-04-15 14:05:46 +03:00
Martin Storsjö
5f846336c0
Bump to a newer version of mingw-w64
...
This version contains a number of improvements for the arm CRT
libraries.
2019-04-15 14:05:22 +03:00
Martin Storsjö
a96783ee46
crt-test: Improve the tests for fmod/remainder/remquo
2019-04-09 14:20:23 +03:00
Martin Storsjö
776b1f4a84
crt-test: Add tests for modf
2019-04-09 13:17:06 +03:00
Martin Storsjö
3ccaf1c1bf
crt-test: Add tests of fmod/remainder/remquo
2019-04-09 12:47:00 +03:00
Martin Storsjö
cb71dfa03b
crt-test: Test sincos()
2019-04-09 12:45:35 +03:00
Martin Storsjö
5d969f2a70
crt-test: Add tests of ldexp/scalbn/scalbln
2019-04-09 12:32:56 +03:00
Martin Storsjö
dde687f36d
crt-test: Add tests of exp2
2019-04-09 12:32:56 +03:00
Martin Storsjö
f2f68dff90
crt-test: Add testcases of log2l
2019-04-09 12:32:56 +03:00
Martin Storsjö
db663db2b8
Fix building libunwind/libcxxabi with an unstripped llvm after SVN r357899
2019-04-09 11:33:46 +03:00
Martin Storsjö
053c581e1f
Allow overriding which CRT to use by default
2019-04-06 23:01:27 +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ö
13d73ee670
Update compiler-rt to a new version
...
This version fixes undefined symbols in the profiling library.
2019-03-29 23:07:57 +02:00
Martin Storsjö
666a26307d
Revert "Mention the fact that binutils can't use the generated import libraries"
...
This reverts commit 9367988be7 .
binutils actually can handle the short import format just fine.
It only has got issues with base mingw import libraries that contain
symbol aliases (which in llvm-dlltool is implemented via weak
symbols, and linking to weak symbols differ a bit between lld and
binutils ld).
2019-03-24 22:16:08 +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ö
b3ff7b278d
Update libcxx to the 8.0 release version
...
libunwind and libcxxabi are kept at the previously pinned versions, past
the 8.0 branch.
2019-03-19 09:40:46 +02:00
Martin Storsjö
f39d45162e
Update compiler-rt to the 8.0 release version
...
This doesn't fix any particular known issue, but the release branch
should generally be a safe version.
2019-03-19 09:34:19 +02:00
Martin Storsjö
b9e0685167
Update mingw-w64 to the latest version from today
2019-03-19 00:30:54 +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ö
25c3bd8593
Set LLVM_COMPILER_CHECKED when bootstrapping libunwind/libcxxabi/libcxx
...
The checks behind LLVM_COMPILER_CHECKED fail if there's no libc++
available for linking.
This fixes building libunwind/libcxxabi/libcxx with newer versions
of llvm, if the llvm installation isn't stripped.
2019-03-15 23:53:20 +02:00
Martin Storsjö
4b537369ca
Add more proper references to dwarf issues on i686
2019-03-01 10:28:00 +02:00
Martin Storsjö
a8064cfdb5
Install the sanitizer headers
2019-02-22 22:34:54 +02:00
Martin Storsjö
7c891a036d
Don't point libunwind to the libcxx include directory
...
This is no longer necessary.
2019-01-30 09:19:47 +02:00
Martin Storsjö
2ccb0d5975
Update libunwind to the latest version
...
This version drops the dependency on standard C++ library headers.
2019-01-30 09:19:38 +02:00
Martin Storsjö
6cab2bca42
Update libunwind to the latest version
...
This version fixes restoring of float registers for armv7, when using
dwarf exceptions (which we use by default).
2019-01-29 11:01:10 +02:00
Martin Storsjö
68aa79a99b
Create the prefixless objcopy/strip tools from an executable
...
This is necessary since 62b208aee2 .
2019-01-24 13:46:08 +02:00
Martin Storsjö
5f56f7694b
Display the output filename after packaging the cross built toolchain
2019-01-24 13:25:16 +02:00
Martin Storsjö
56506a5c6e
Avoid warnings when building libcxxabi due to redefining _LIBCPP_BUILDING_LIBRARY
...
Some libcxxabi source files define _LIBCPP_BUILDING_LIBRARY themselves.
A "#define FOO" in a file defines it to "", while "-DFOO" on the command
line defines it to "1". Define it on the command line using "-DFOO=" to
make it match the #define within the source files.
2019-01-24 11:12:17 +02:00
Martin Storsjö
a0d10c51cc
Build libunwind with -Wno-dll-attribute-on-redeclaration
...
libunwind doesn't have the dllexport attributes on the original
declarations of functions, and clang normally warns about this.
2019-01-24 11:12:09 +02:00
Martin Storsjö
371f002680
Revert "Suppress compiler warnings in libunwind/libcxxabi if llvm cmake files are unavailable"
...
This reverts commit 92f301f775 .
With the latest versions of libunwind and libcxxabi, the -w option
for suppressing compiler warnings isn't added any longer when building
with the llvm cmake files available.
2019-01-24 11:11:40 +02:00
Martin Storsjö
bc4dde7cd1
Update libunwind and libcxxabi to the latest versions
...
These versions no longer disable warnings when llvm cmake files
are available, and have got a lot of warnings silenced within the
code.
2019-01-24 11:11:36 +02:00
Martin Storsjö
62b208aee2
Use llvm-objcopy/llvm-strip instead of a shell script wrapper and binutils
2019-01-24 10:58:20 +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ö
add8d6ee31
Update mingw-w64 to the latest version
...
This fixes issues with the _xgetbv builtin in latest trunk versions
of clang.
2019-01-24 10:58:20 +02:00
Martin Storsjö
da00a0662e
Update libunwind to the latest version
...
This version makes libunwind actually make the SjLj context properly
thread local.
2019-01-18 22:39:26 +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ö
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ö
5be98a5cd6
Ignore *.tar.xz and *.zip for docker builds
2019-01-03 09:04:43 +02:00
Martin Storsjö
b9eb66bc1f
Set LIBCXX_INCLUDE_TESTS=FALSE when building libcxx
...
The DLL build fails since we stopped setting LIBCXX_ABI_UNSTABLE=TRUE,
if the tests are enabled (which they are if building against a
non-stripped llvm installation).
2018-12-21 09:42:38 +02:00
Martin Storsjö
585c767ee4
Use llvm-ar with the flag 'L' instead of a helper MRI script for merging archives
2018-12-20 12:11:10 +02:00
Martin Storsjö
52fc6c5c06
Update libunwind to the latest version
...
This version supports SEH unwinding on aarch64.
2018-12-20 12:10:15 +02:00
Martin Storsjö
5004db0de6
Update mingw-w64 to the latest version
...
This fixes symbol availability of __C_specific_handler for
use of SEH on arm64.
2018-12-20 12:10:15 +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ö
837fee3ce1
Clarify the output of the exception-locale test
2018-12-12 00:07:50 +02:00
Martin Storsjö
1228a03be4
Update libunwind to the latest version, fixing SEH exceptions in certain cases
2018-12-11 13:35:56 +02:00
Martin Storsjö
7e0dbe79bf
Stop building libcxx with LIBCXX_ABI_UNSTABLE=TRUE
...
This didn't seem to actually be necessary, not even in the initial
commit adding support for building a DLL of libcxx. It might have
been necessary at some earlier point while working on building a DLL.
2018-12-06 00:49:25 +02:00
Martin Storsjö
7a86e4ce73
Define _LIBCPP_ABI_UNSTABLE manually when building libcxxabi
...
This is set via a cmake option when building libcxx, but libcxxabi
uses the raw libcxx headers from its include directory before they
are installed.
This fixes cases of inconsistent classes seen while compiling libcxxabi
and libcxx. With potential future patches to clang to adjust how
classes are exported with dllexport, this change is needed to avoid
conflicts.
2018-12-05 13:47:48 +02:00
Martin Storsjö
4d861b67b5
Don't move clang.exe to clang-<major>.exe if clang-<major>.exe already exists
2018-11-30 12:03:09 +02:00
Martin Storsjö
11a83711ad
Check that clang.exe exists before moving it to clang-<major>.exe
2018-11-30 12:03:09 +02:00
Martin Storsjö
32668f336b
Keep clang.exe around if we won't be replacing it with an unprefixed wrapper
2018-11-30 12:03:09 +02:00
Martin Storsjö
e45e9ab98e
Update compiler-rt to a newer version
...
This fixes building sanitizers natively on windows/msys.
2018-11-30 12:03:09 +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ö
9e7a6e0afb
Convert msys style paths to windows style in merge-archives.sh
2018-11-30 12:03:09 +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ö
d294d17053
Create the prefix/triplet/bin directory before installing DLLs in build-libcxx.sh
...
If the triplet directory is wiped and only the build-mingw-w64.sh
step is rerun, the bin subdirectory would be missing, ending up
with a file named "bin", which actually was the libc++ DLL.
2018-11-30 11:37:00 +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ö
ecdbfaacc3
Only apply .gitignore ignore rules at the top level
2018-11-20 22:51:35 +02:00