Commit Graph
54 Commits
Author SHA1 Message Date
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ö 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ö ee555b9013 Fix building when $PATH contains spaces 2019-11-30 10:37:19 +02:00
Martin Storsjö 4a4cc16393 build-libcxx: Stop manually linking to -lpsapi
Since the default _WIN32_WINNT now is for Windows 7, psapi.h
redirects to PSAPI version 2, which is available in kernel32.dll
with a "K32" prefix on the function names (K32EnumProcessModules).
2019-11-26 12:17:51 +02: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ö a8829aeebb build-libcxx: Remove cmake flag overrides that no longer are necessary 2019-05-09 09:22:26 +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ö db663db2b8 Fix building libunwind/libcxxabi with an unstripped llvm after SVN r357899 2019-04-09 11:33:46 +03: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ö 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ö 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ö 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ö 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ö 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ö 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ö fdd0a116ae Try to set "MSYS Makefiles" as cmake generator in mingw environments 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ö 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ö 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
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ö 957c34372c Build libunwind and libcxx both as static and dynamic libraries 2018-09-05 12:28:33 +03:00
Martin Storsjö bc0cde364d Skip new/delete definitions in libcxxabi
These are also provided by libcxx, and can conflict if trying to
link a shared library containing both libcxxabi and libcxx.
2018-09-05 12:28:33 +03:00
Martin Storsjö 72c4128a68 Update libcxxabi and libcxx to the latest version
These versions add missing function visibility to __gxx_personality_seh0
for libcxxabi, and fixes including a static libcxxabi in a shared libcxx.
2018-09-05 12:28:33 +03:00
Martin Storsjö 6bff543bd9 Use libunwind's built-in SEH support instead of libgcc 2018-08-31 12:15:28 +03:00
Martin Storsjö cdd5409cad Update libunwind to the latest version
This version has got built-in support for SEH exceptions for x86_64.
2018-08-31 11:34:37 +03:00
Martin Storsjö bf1ac02e82 Silence the svn clone of libgcc and libssp 2018-08-13 23:52:43 +03:00
Martin Storsjö e784dc6513 Build unwind-seh.c from libgcc instead of libunwind, if SEH is in use 2018-08-08 08:43:05 +03:00
Martin Storsjö d8a6254bed Update libunwind to the latest version
This fixes potential pointer truncation on 64 bit windows.
(Existing tests have ran fine in practice; either these are codepaths
not exercised in current setups, or potential codepaths that could
be triggered with more extensive tests.)
2018-08-08 08:40:48 +03:00
Martin Storsjö 92f301f775 Suppress compiler warnings in libunwind/libcxxabi if llvm cmake files are unavailable
The llvm cmake files add a few compiler flags, among them one for
suppressing warnings.
2018-08-03 10:56:49 +03:00
Martin Storsjö 2739421564 Update compiler-rt/libuwnind/libcxxabi/libcxx to the latest version
For compiler-rt and libunwind, this makes them build successfully even
if llvm-config and the llvm cmake files aren't available.

For libcxxabi, this brings in support for using SEH exceptions.

For libcxx, this removes a few build time warnings.
2018-08-03 10:56:49 +03:00
Martin Storsjö 3da8d27a8e Update libunwind to the latest version
This version fixes the issue that caused dwarf exceptions not to work
properly on i686 mingw.
2018-07-17 22:26:44 +03:00
Martin Storsjö 158b65f7c0 Set LIBUNWIND_STANDALONE_BUILD while building
This avoids accidentally finding an extra copy of libcxc outside
of the source tree.
2018-07-16 14:42:53 +03:00
Martin Storsjö 2372dc03e8 Update to the latest versions of libunwind/libcxxabi/libcxx
These updates help in building these projects on windows in msys.
2018-06-21 11:52:14 +03:00
Martin Storsjö 35c2028e50 Define _LIBCPP_HAS_THREAD_API_WIN32 while building libcxxabi
When building libcxx, this is also already enabled via the cmake
option -DLIBCXX_HAS_WIN32_THREAD_API=ON.

This fixes building libcxxabi if pthreads are available.
2018-05-03 14:50:43 +03:00
Martin Storsjö 6b5651a4a3 Stop adding the toplevel c++ include symlink
As long as we pass --sysroot explicitly in clang-target-wrapper.sh,
this isn't necessary. And since clang SVN r329946. it's no longer
necessary when not specifying the sysroot (and having it is in
fact harmful).
2018-04-19 00:35:45 +03:00
Martin Storsjö 93e7810749 Share one include directory between all archs 2018-04-01 22:45:30 +03:00
Martin Storsjö 48af4af2c3 Update to the latest version of libunwind
This fixes issues with building libunwind as a DLL with SJLJ
exception handling. (We currently don't build it as a DLL though.)
2018-02-02 09:44:29 +02:00
Martin Storsjö 5d202dfe4f Update to the latest version of libcxx
This version avoids polluting the namespace of users of the <thread>
header with windows.h.
2018-01-24 12:25:49 +02:00
Martin Storsjö 9c3636a676 Check out the right versions of libunwind/libcxxabi/libcxx before building at all
This makes sure that libunwind and libcxxabi actually get built
against the same headers that are checked out later.
2018-01-24 12:25:21 +02:00