Commit Graph
329 Commits
Author SHA1 Message Date
Martin Storsjö 9069c627a9 Install unprefixed tools when cross compiling the toolchain 2018-10-10 23:33:19 +03:00
Martin Storsjö b5deb9fc1f Set a default target in wrapper scripts and executables 2018-10-10 23:33:19 +03:00
Martin Storsjö 1bc3d75a41 For cross-built toolchains, rename the clang executable to clang-$MAJOR.exe 2018-10-10 23:33:19 +03:00
Martin Storsjö fb26be33a1 Correct the escaping of arguments passed through on windows 2018-10-10 23:33:18 +03:00
Martin Storsjö b9543f23b9 Mention the lack of llvm-objcopy for COFF as a known issue in the readme 2018-10-09 11:40:26 +03:00
Martin Storsjö 2a3cdc9115 Update the description of the project's status
The level of maturity is generally quite a bit higher now than when
this initially was written.
2018-10-09 11:40:03 +03:00
Martin Storsjö a914746ab2 Remove the mention of other similar projects
The mentioned differences aren't quite as pronounced any longer.
2018-10-09 11:35:16 +03:00
Martin Storsjö 945845fba2 Make a helper function static in clang-target-wrapper.c 2018-10-08 14:15:25 +03:00
Martin Storsjö 818766d3d4 Use posix shell variable expansion substitution instead of subshells with sed 2018-10-08 14:13:42 +03:00
Martin Storsjö 0ec597b1bb Remove inconsistently used braces
Using braces here is fine in itself, but we write most similar cases
without braces, so change it for consistency.
2018-10-08 14:12:55 +03:00
Martin Storsjö 89c91ecaae windres: Print help and version texts to stdout
meson checks the output from --version, and expects to see it on stdout.
2018-10-08 14:12:55 +03:00
Martin Storsjö b1b6c0ba6f windres: Minor cleanups
Make indentation consistent, define a variable used in printing errors,
remove an unused helper function.
2018-10-08 14:12:54 +03:00
Martin Storsjö 03b99b5144 Do one in-bounds write in clean runs of stacksmash.c 2018-10-07 21:00:30 +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ö 99b6407196 Quote arguments in clang-target-wrapper.c
We quote each passed through argument, and escape quote chars in them.

For cases when the passed through argument ends with a backslash, this
fails though, since whatever is unescaping it doesn't seem to handle
double backslashes for escaping backslashes themselves.
2018-10-05 12:46:11 +03:00
Martin Storsjö 22b5681765 Add $EXEEXT as suffix for the ar/ranlib/nm/strings symlinks 2018-10-05 12:46:10 +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ö a62ee10c2d Build clang-target-wrapper.c with -municode for windows 2018-10-03 23:06:22 +03:00
Martin Storsjö ad47efba70 Implement clang-target-wrapper as an executable for windows
This allows non-msys build systems to use the triplet prefixed
compiler frontends on windows.

Keep the old shell script version as well, for easier hackability
on unix platforms.
2018-10-03 22:48:36 +03:00
Martin Storsjö 9f3a4a25f2 Support wrappers named <triplet>-c++ in clang-target-wrapper.sh as well
We currently don't install any such wrapper, but one might want to.
2018-10-02 23:38:19 +03:00
Martin Storsjö fb5c95589c Restructure clang-target-wrapper.sh to set one flag per line 2018-10-02 23:38:19 +03:00
Martin Storsjö 7f98eea889 Mention prebuilt docker images from Docker Hub 2018-10-02 21:34:54 +03:00
Martin Storsjö 9db7f21bcb Make windres --version output the string "GNU windres"
meson might start looking for this string soon, for identifying
the kind of resource compiler.
2018-10-02 21:34:54 +03:00
Martin Storsjö 773c0299c5 Add scripts for crosscompiling the toolchain using an already built native toolchain 2018-10-02 21:34:54 +03: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ö 49103cf127 Strip the built widl by passing -Wl,-s to the linker, instead of INSTALL="install -s"
When stripping via "install -s", install invokes the system's
strip tool, which might not support the cross target that we are
building for. This could also be handled by passing
--strip-program=<arch>-w64-mingw32-strip to install though.
2018-10-02 21:34:54 +03:00
Martin Storsjö fb4862b0d6 Split out building widl to a separate shell script
When cross compiling a llvm-mingw toolchain, we need to build widl
for the intended host environment as well.
2018-10-02 21:34:54 +03:00
Martin Storsjö 0c24f99adb Allow setting CC or HOST for install-wrappers.sh
Also allow setting EXEEXT for the executable suffix.
2018-10-02 21:34:54 +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ö 784c15f9b9 Allow passing --enable-shared/static to build-libcxx.sh
These are the default already, but by allowing them as options, it becomes
easier to potentially change the default behaviour.
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ö 6bb0cfca58 Convert TOOLCHAIN_ARCHS from ENV to ARG
This allows overriding it with --build-arg.
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ö a7616d6d23 Add helpful printouts in stacksmash.c 2018-10-02 21:34:54 +03:00
Martin Storsjö a38e52fff5 Build address sanitizer 2018-10-02 14:53:53 +03:00
Martin Storsjö 6d7cef9e9e test: Rename ssp.c to stacksmash.c 2018-10-02 14:53:53 +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ö e26ab372bf Update compiler-rt to the latest version
This version supports building address sanitizer for mingw.
2018-10-02 14:53:53 +03:00
Martin Storsjö 4d110b4508 Update mingw-w64 to the latest version
This fixes a few headers as necessary for building asan, and
fixes cross compiling widl.
2018-10-02 14:53:53 +03:00
Jacek Caban bbe4f90ae3 Set _LIBDIR_SUFFIX in build-libcxx.sh
This fixes building libcxx on Gentoo.
2018-10-02 14:53:53 +03:00
Martin Storsjö 47fca28422 Tweak the wording for the comment about exception issues with dwarf for i686 2018-10-01 14:44:32 +03:00
Martin Storsjö f0aa7c4c10 Revert "Use dwarf exceptions on i686 as well"
This reverts commit ca43ab5ccd.

It was reported in https://github.com/mstorsjo/llvm-mingw/issues/8 that
the dwarf unwinding on i686 doesn't always work.

This commit adds a testcase for the case that didn't work previously.
2018-10-01 14:28:30 +03:00
Martin Storsjö bc8c9c3a8d windres: Add support for the --preprocessor-arg options 2018-09-29 23:05:25 +03:00
Martin Storsjö f89a85c973 windres: Fix handling of the -c/--codepage options 2018-09-29 23:03:16 +03:00
Martin Storsjö ab1da59a48 Use a single COPY command in dockerfiles for both *.sh and *.c for wrappers 2018-09-14 09:38:44 +02:00
Martin Storsjö 5a70c3cb78 Extend the dll autoimport test to test references to a external variable with offset 2018-09-07 00:02:16 +03:00
Martin Storsjö c8ca4bddd6 Add known issues about the fact that the toolchain by default targets Vista or newer 2018-09-05 13:39:28 +03:00