16 Commits

Author SHA1 Message Date
Martin Storsjö f415e25b3e build-openmp: Switch to building through the runtimes directory
Since 6295b8e763503644961f9087382f80965b98d466 in llvm-project,
it's no longer possible to build openmp entirely standalone;
now one has to build it through the runtimes directory.
2026-02-19 23:32:42 +02:00
Martin Storsjö cb92de78e7 Include arm64ec in the lists of all architectures
Since LLVM 21.x, the upstream support for ARM64EC in LLD and
compiler-rt is complete enough for us to be able to build it.
2025-07-17 22:48:39 +03:00
Jacek Caban 192334d04b Skip openmp for ARM64EC target 2025-05-18 22:28:25 +03:00
Norbert Lange d0a03c46c0 Use CMake's build and install functionality
This allows simplification, this functionality was added long
ago to CMake.

Further motivation is to be able to re-direct the installation,
make/ninja install allow this by setting DESTDIR but this
generally doesnt work well with window paths (see [1]).

[1] - https://cmake.org/cmake/help/latest/envvar/DESTDIR.html#envvar:DESTDIR
2023-09-27 22:53:01 +03:00
Norbert Lange 97cd12a63a Ignore set but empty CORES variable
Change the behavior when the CORES environment variable
is set and empty.
Now `-j` will not be added to make/ninja.
2023-09-27 22:53:01 +03:00
Martin Storsjö 2bfe3e7c48 Remove setting the unused variable NINJA in build shell scripts
This variable ended up unused in
b89cdef107.
2023-09-21 12:42:03 +03:00
Martin Storsjö af99275e2e Remove unnecessary empty cases in shell scripts 2023-04-26 10:01:21 +03:00
Martin Storsjö 6b8725333a build-openmp: Build the OpenMP library on all architectures
Since a356782426f5bf54a00570e1f925345e5fda7b2e in llvm-project,
OpenMP can be built for mingw/aarch64, since
fb947c358661b3bd3d5e1fa776ec74cc0f308854 it should work correctly
in all currently tested cases, and since
97958c9bb83cec44b6ce13e732b53de0171a5d43 it can be built for
mingw/armv7.
2023-01-29 01:09:17 +02:00
Martin Storsjö 36f8c1359e Switch the default to enabling CFGuard in all individual build-* scripts 2023-01-29 01:09:17 +02:00
Martin Storsjö 972b3b2725 Wipe the cmake cache before rerunning cmake
When rebuilding in an already built directory, cmake does use
the cache file, containing what variables were set to previously.
When changing build configuration (building with a different prefix,
or changing build configurations) this can often result in failed
cmake runs.

Wipe the cache (and the rest of the cmake temp files) by default.
This makes sure that the full cmake configuration is run each time
when running the build scripts, just like it does the first time.
(This doesn't remove the build artifacts; if nothing of significance
has changed, ninja would still reuse old built files.)

By setting the env variable NO_RECONF, this behaviour can be skipped,
rerunning cmake without wiping the cache inbetween. (For cases where
the user knows that the configuration hasn't changed since the last
build, this can speed up the cmake execution time a bit.)
2022-10-01 13:29:15 +03:00
Alvin Wong e9401c8bfe Add CFGuard options to build scripts (disabled by default) 2022-10-01 13:25:52 +03:00
Martin Storsjö 7060e41fc1 Stop manually setting CMAKE_CROSSCOMPILING
This is set implicitly when CMAKE_SYSTEM_NAME is set. According to
the docs, the user isn't supposed to set it manually.
2022-08-03 22:45:24 +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
Martin Storsjö ea46c8d98f build-openmp.sh: Use llvm-ml instead of uasm 2021-08-09 12:08:16 +03:00
Martin Storsjö 93e0b63f3c build-openmp: Stop setting CMAKE_C_COMPILER_WORKS
This wasn't ever needed for building the OpenMP runtime.
2020-11-11 12:21:11 +02:00
Martin Storsjö 9031eb6791 Build the OpenMP runtime in docker based builds
LLVM's OpenMP implementation only supports Windows on x86, and it
requires a MASM-compatible assembler to build it. Build UASM
for this purpose, for now. (UASM isn't available packaged in
debian/ubuntu repos.) In the future, llvm-ml should be able
to handle it instead, but it's not currently mature enough.

Not including it in the regular build-all.sh for now, as UASM
isn't generally available.
2020-10-15 23:23:05 +03:00