Commit Graph
31 Commits
Author SHA1 Message Date
Norbert Lange a1e0579bad if using an existing clang, test if cfguard is available 2024-02-26 00:22:14 +02:00
Norbert Lange 47355937ad support using an existing clang installation
add an option --host-clang which will skip building llvm,
and instead provide symlinks and wrappers for clang and
llvm tools.

Currently the clang version is detected, but it does not
affect the llvm version that will be downloaded and used.
2024-02-26 00:22:14 +02:00
Martin Storsjö 7bbbf7c65f strip-llvm: Inspect the --host= argument for the kind of triple
Don't assume that any host argument indicates cross compiling for
Windows.

Update build-all to pass --host arguments to strip-llvm as well,
for consistency.
2024-01-12 11:06:54 +02:00
Martin Storsjö 2f2114eed8 build-all: Add options for rebuilding runtimes only
This allows rebuilding runtimes with e.g. a different default CRT.
2023-06-01 11:25:03 +03:00
Martin Storsjö 8f3c096ef5 build-all: Allow passing --host for cross compiling the tools 2023-04-26 19:18:24 +03:00
Martin Storsjö 0b68b891e0 build-all: Remove stray/leftover help for an unsupported option
This was added in 050b4ef701, but this
option was never supported to be passed on to build-llvm.sh from
here.

Additionally, this option was removed entirely from build-llvm.sh
in bd190c04c3.
2023-03-28 11:38:53 +03:00
Martin Storsjö fb67e16120 build-all: Stop requiring curl to be available
Curl (or wget) isn't required for fetching libssp any longer,
so don't require it while running build-all.sh.

(It's still required by build-cross-tools.sh, for build-make.sh
though.)
2023-01-29 01:09:17 +02:00
Martin Storsjö 4ee7cc97de build-libssp: Stop building the real libssp from GCC
As mingw-w64 now provides these routines, we no longer need to build
the original library from GCC.

As building with -fstack-protector-strong still links with -lssp
(and -lssp_nonshared), we still need to provide libraries with these
names, but they can be empty dummy libraries.
2023-01-29 01:09:17 +02:00
Alvin Wong 9d352374f2 Enable CFGuard by default 2023-01-29 01:09:17 +02:00
Martin Storsjö aa5216db99 build-all: Allow building only tools, but no runtimes 2022-10-21 18:00:20 +03:00
Martin Storsjö 5ad257fed0 Add comments about the missing $CFGUARD_ARGS when building sanitizers 2022-10-02 10:17:05 +03:00
Alvin Wong e9401c8bfe Add CFGuard options to build scripts (disabled by default) 2022-10-01 13:25:52 +03:00
Martin Storsjö 11e7485306 build-all: Allow skipping building lldb-mi 2022-08-12 00:48:46 +03:00
Martin Storsjö 3d4e36806a Avoid using the nonstandard "which" command
This command isn't a standard tool; different distributions have
different implementations, and e.g. Fedora doesn't ship it by
default.

Settle on using "command -v $tool >/dev/null" for tests about whether
a tool is available. (We could also use "hash $tool 2>/dev/null" as we
already had in build-all.sh, but settling on using "command -v"
everywhere, for consistency and simplicity.)
2022-08-02 15:17:24 +03:00
Scr3amer 9c002a9e1b Fix typo in help of build-all.sh 2022-06-19 21:37:37 +03:00
Martin Storsjö 050b4ef701 build-all: Allow passing many common build-llvm/build-mingw-w64 options via this script 2022-06-15 17:25:32 +03:00
Martin Storsjö e56fb975e9 build-all: Move a call to strip-llvm.sh into build-all.sh
This is the usual build configuration that most people would use.
2022-06-12 23:06:53 +03:00
Martin Storsjö 81c39dda6a Build libunwind before mingw-w64-libraries
When --unwindlib=libunwind is implicit, we need to build libunwind
to have a complete working C compiler too. Currently this is worked
around by initially creating a dummy, empty libunwind.a, but with
the current version of libcxx/libunwind, we can get rid of that
workaround if we build it as soon as possible.
2022-02-09 14:02:20 +02:00
Martin Storsjö eaf5ac08e5 Build lldb-mi
Building this tool requires having a full LLVM build available;
either by installing without LLVM_INSTALL_TOOLCHAIN_ONLY (and not
stripping the llvm installation yet) or by pointing it at the
LLVM build directory instead. The latter works better for our
normal build flows.
2021-08-16 11:26:37 +03:00
Martin Storsjö ea46c8d98f build-openmp.sh: Use llvm-ml instead of uasm 2021-08-09 12:08:16 +03:00
Martin Storsjö 1db63b8682 build-all: Switch to requiring curl instead of wget
The dockerfiles install both tools, and the scripts that use them
(build-make.sh and build-libssp.sh) can make do with either curl
or wget, but e.g. macOS ships with curl but not wget.
2021-03-08 09:09:07 +02:00
Orgad Shaneh 959f14a1c1 libssp: Download directory from gitlab instead of svn
svn is typically blocked on corporate firewalls.
2020-11-11 12:48:15 +02:00
Orgad Shaneh 06883c79ad build-all: Verify that git and svn are installed 2020-10-16 15:48:46 +03:00
Martin Storsjö 3fd3e58979 build-mingw-w64: Split out building tools to a separate script
This simplifies build-mingw-w64.sh. When building on native
windows (where we also provide unprefixed tools, we can't have
the yet incomplete compiler toolchain in $PATH when building
the mingw-w64 tools. (Logically, build-mingw-w64-tools belong
with build-llvm and install-wrappers; using the original system
compiler to build tools that are supposed to run on the current
machine, as opposed to the cross target, like when building the
runtimes.)
2020-09-16 00:03:57 +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ö a38e52fff5 Build address sanitizer 2018-10-02 14:53:53 +03:00
Martin Storsjö 3c1c81f321 Build the winstorecompat library from mingw-w64-libraries 2018-07-16 23:30:54 +03:00
Josh de Kock 69b81a6d01 Build the mingw winpthreads library 2018-05-07 09:46:10 +03:00
Martin Storsjö c9db1e06b5 Build libssp from gcc
gcc/libssp's configure script runs checks for flags that clang doesn't
implement. We actually just need to set a few HAVE defines and compile
the .c sources, so just check out this subdirectory using svn and build
it using a custom makefile.
2018-04-23 00:26:05 +03:00
Martin Storsjö 098f6750d7 Automatically extract the clang version number when installing compiler-rt 2018-01-18 10:00:01 +02:00
Martin Storsjö e56a519fdc Split the building of the toolchain into individual shellscripts
This simplifies building the toolchain outside of docker.
2018-01-10 10:24:48 +02:00