Commit Graph
34 Commits
Author SHA1 Message Date
Martin Storsjö 14db168cd6 wrappers: Use --{start,end}-no-unused-arguments instead of -Qunused-arguments
This makes warnings for other unused arguments visible to the user.

This requires a version of llvm-project past
50ec1306d060e46e0d53c9f5d8a052e1b0d10d3b (Jan 2022) which added these
new options.
2022-02-09 14:02:20 +02:00
Martin Storsjö e35ef3b7d7 Use -unwindlib=libunwind instead of merging libunwind into libc++
This makes the build of libcxx a bit cleaner, and simplifies later
building and testing of libcxx.
2021-10-01 12:31:51 +03:00
Martin Storsjö 68b9eb60fa wrappers: Use -lucrtapp instead of -lvcruntime140_app
Passing -lucrt* to the clang driver inhibits the implicit default
-lmsvcrt, so this ends up only using libucrtapp.a instead of libucrt.a.

This still requires that the default crt was ucrt, as the prebuilt
libc++.a needs to have been built for the right crt.
2020-06-16 11:32:17 +03:00
Steve Lhomme 26e56ed5f6 Update the mingw32uwp wrapper libraries
- windowsapp is the preferred library when targeting Windows 10
https://docs.microsoft.com/en-us/uwp/win32-and-com/win32-apis

- _UCRT ensures we use the Universal C runtime
2020-06-04 00:19:33 +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ö bc6df720ce wrappers: Stop specifying -fuse-cxa-atexit
Since clang 9.0.0 (34ec6929a1fb33716d0035dc0f1f164d7568b4dc
in llvm-project), it's no longer necessary to set this to be able
to use __cxa_thread_atexit (for TLS destructors). This brings the
behaviour closer to GCC, and reduces the amount of non-default
options used.
2019-12-20 23:18:41 +02:00
Martin Storsjö 64d39428b6 Quote uses of $PREFIX in the build script, to improve support for installing into a path that contains spaces
For build-mingw-w64.sh to succeed when installing to such a path,
the mingw-w64 version has to be updated to the latest git master.

build-mingw-w64-libraries.sh still fails in this case, as libtool
fails to properly quote $LD in a test for whether the linker is GNU ld.
2019-12-03 21:49:53 +02:00
Martin Storsjö 7edc154d50 wrappers: Unify comments about exception handling methods. 2019-05-28 15:29:08 +03:00
Martin Storsjö 4811c1f489 wrappers: Stop explicitly requesting SEH for AArch64
It is the default exception handling model there now.
2019-05-28 15:27:56 +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ö 3deb039b62 Use SEH exceptions on aarch64
The SEH support for aarch64 should be pretty stable now.
2019-04-19 00:07:17 +03:00
Steve Lhomme cd73ed8308 wrappers: link with the Windows Store specific runtime for UWP 2019-04-18 12:35:25 +03:00
Steve Lhomme a270bc3cad wrappers: force linking with mincore for UWP targets
it's not needed for regular win32 so shouldn't be either for these targets
2019-04-18 12:23:38 +03:00
Steve Lhomme ca44a11660 Add wrappers that target Universal Windows 2019-04-18 11:28:05 +03:00
Martin Storsjö 4b537369ca Add more proper references to dwarf issues on i686 2019-03-01 10:28:00 +02:00
Martin Storsjö 8bfc9a18c6 Error out early if trying to compile ada
If we try to do that, clang would end up calling <triplet>-gcc with the
same arguments. In our setup, this recursively ends up calling clang again,
ending up with infinite recursion.
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ö 818766d3d4 Use posix shell variable expansion substitution instead of subshells with sed 2018-10-08 14:13:42 +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ö 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ö d951a625bd Switch to SEH exceptions for x86_64 2018-08-08 08:43:05 +03:00
Martin Storsjö 11e04f0466 Support destructors for thread local objects 2018-08-02 23:28:39 +03:00
Martin Storsjö ca43ab5ccd Use dwarf exceptions on i686 as well
Now libunwind works properly in this case for dwarf on i686 mingw.
2018-07-17 22:26:58 +03:00
Martin Storsjö fa08e722ed Don't use bashisms for finding the script directory
Posix sh and $0 should be good enough in most cases.
2018-05-07 09:49:48 +03:00
Martin Storsjö ce282cdf5d Use --driver-mode=g++ instead of invoking clang++
This avoids needing the clang++ symlink. On platforms without symlinks
(i.e. windows), clang.exe and clang++.exe are two separate but identical
executables. This allows getting rid of the latter, saving size.
2018-05-07 09:49:34 +03:00
Martin Storsjö 61eaf3a0de Stop manually setting the sysroot
Since clang SVN r330244, the one next to clang is preferred, even
if a similar mingw gcc exists in the path.
2018-04-19 00:52:35 +03:00
Martin Storsjö f175276aa7 Use native TLS on aarch64 2018-03-14 14:17:48 +02:00
Martin Storsjö 71e3239442 Allow setting CCACHE=1 to wrap all llvm-mingw building in ccache 2018-02-26 12:50:11 +02:00
Martin Storsjö 3e61dc4908 Consistently use 4 spaces for indentation in shell scripts 2018-02-26 12:48:18 +02:00
Martin Storsjö 55e8aef024 Provide <triplet>-<tool> wrappers and links to many llvm tools
Provide wrappers named <triplet>-gcc and <triplet>-g++ as well,
to ease cross compilation with e.g. autotools, to allow just
specifying --host=<triplet>.

Provide wrappers for objdump and ld that provide specific output
that autotools look for.

Provide <triplet>-strip as a symlink to /bin/true, since there is
no strip tool available yet (and llvm-objcopy doesn't support
COFF yet).
2018-01-10 10:53:02 +02:00
Martin Storsjö 9925666790 Rename the wrapper script, for consistency 2018-01-10 10:53:02 +02:00