Commit Graph

11 Commits

Author SHA1 Message Date
Petr Hosek baf1444929 [CMake] Use NOT instead of STREQUAL
`<var> STREQUAL ""` fails when `<var>` is unset which can be the
case when using runtimes as top-level build. Use `NOT` instead.

Differential Revision: https://reviews.llvm.org/D109570
2021-09-10 01:32:46 -07:00
Martin Storsjö a3870e8ab1 Reapply [runtimes] Set more paths when building runtimes standalone
These paths are needed when building with per-target runtime directories.

(It's possible to fix this by manually setting these when invoking
cmake, but one isn't supposed to need to do that.)

Also set LLVM_TOOLS_BINARY_DIR while touching this area (as it's
also unset in this case) even if it isn't specifically needed by the
per-target runtime configuration.

Fixed since previous attempt: Don't check if the runtimes directory
is the root of the CMake invocation; when the main LLVM CMake
build builds runtimes, it does invoke a sub-CMake with this directory
as the root too, just as if manually invoking CMake at the runtimes
directory. Instead check whether LLVM_TOOLS_BINARY_DIR was set and
whether find_package(LLVM) succeeded or not.

Differential Revision: https://reviews.llvm.org/D107895
2021-09-09 15:30:42 +03:00
Leonard Chan d96e0c5388 Revert "[runtimes] Set more paths when building runtimes standalone"
This reverts commit 407e07aa67.

Reverting since this seems to break OpenMP builds and our clang
builders. See thread on https://reviews.llvm.org/D107895.
2021-09-08 18:31:10 -07:00
Martin Storsjö 407e07aa67 [runtimes] Set more paths when building runtimes standalone
These paths are needed when building with per-target runtime directories.

(It's possible to fix this by manually setting these when invoking
cmake, but one isn't supposed to need to do that.)

Also set LLVM_TOOLS_BINARY_DIR while touching this area (as it's
also unset in this case) even if it isn't specifically needed by the
per-target runtime configuration.

Differential Revision: https://reviews.llvm.org/D107895
2021-09-09 00:01:38 +03:00
Siva Chandra d0a71c6ee6 [runtimes] Add the libc project to the list of runtimes.
This is possible as the default libc build now works under runtimes build.

Differential Revision: https://reviews.llvm.org/D99101
2021-03-23 17:33:03 +00:00
Petr Hosek 61a792b39b [CMake] Rename RUNTIMES_BUILD to LLVM_RUNTIMES_BUILD
This avoid potential conflict with other internal variables.

Differential Revision: https://reviews.llvm.org/D97838
2021-03-03 10:58:51 -08:00
Petr Hosek 6e3946c9f5 [runtimes] Use standalone build only for compiler-rt
compiler-rt needs to use standalone build because of the assumptions
made by its build, but other runtimes can use non-standalone build.

Differential Revision: https://reviews.llvm.org/D97575
2021-03-03 00:06:20 -08:00
Petr Hosek b3ac90da1d Revert "[runtimes] Use standalone build only for compiler-rt"
This reverts commit 4e421b2323 as this
seemed to have broke Python 3 executable detection on some builders.
2021-03-02 16:59:32 -08:00
Petr Hosek 4e421b2323 [runtimes] Use standalone build only for compiler-rt
compiler-rt needs to use standalone build because of the assumptions
made by its build, but other runtimes can use non-standalone build.

Differential Revision: https://reviews.llvm.org/D97575
2021-03-02 16:21:35 -08:00
Reid Kleckner 98c89ccfbd [MSVC] Don't add -nostdinc++ -isystem to runtimes builds
If the host compiler is MSVC or clang-cl, then the compiler used to
buidl the runtimes will be clang-cl, and it doesn't support either of
those flags.

Worse, because -isystem is a space separated flag, it causes all cmake
try_compile tests to fail, so none of the -Wno-* flags make it to the
compiler in libcxx. I noticed that we weren't passing
-Wno-user-defined-literals to clang-cl and were getting warnings in the
build, and this fixes that for me.

Differential Revision: https://reviews.llvm.org/D94817
2021-01-15 13:22:07 -08:00
Petr Hosek b688c5875d [CMake] Split the target side of runtimes build
Previously, llvm/runtimes/CMakeLists.txt played two different roles:
1. host side which could used  to set up the build of runtimes for
   different targets in the right order;
2. target side to build the runtimes for the specified target.

This change splits llvm/runtimes/CMakeLists.txt and moves the target
side to runtimes/CMakeLists laying down the foundation for the "A vision
for building the runtimes" proposal. From the user perspective, there
shouldn't be any visible difference at the moment.

Differential Revision: https://reviews.llvm.org/D93408
2021-01-11 23:39:36 -08:00