1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 11:13:28 +01:00
Commit Graph

21 Commits

Author SHA1 Message Date
Petr Hosek
b4b18a9dcd [CMake][runtimes] Add install target for runtimes builtins
This adds an install-builtins target to avoid having to list all
builtins targets explicitly.

Differential Revision: https://reviews.llvm.org/D32710

llvm-svn: 304587
2017-06-02 19:38:11 +00:00
Petr Hosek
2bd86d8474 [CMake][runtimes] Use -nodefaultlibs for the runtimes build
We may not have a working C++ standard library at this point so we
shouldn't rely on it when running CMake checks.

Differential Revision: https://reviews.llvm.org/D31942

llvm-svn: 300260
2017-04-13 21:29:03 +00:00
Petr Hosek
e8355ccb89 [CMake] Support single target builtins build on Darwin
This change allows cross-compiling compiler-rt builtins for
multiple targets as part of runtimes on Darwin. This functionality
is already supported on other platforms.

Differential Revision: https://reviews.llvm.org/D30957

llvm-svn: 298678
2017-03-24 02:21:11 +00:00
Petr Hosek
c7a150fa81 [CMake] Provide an option to disable runtimes build
This could be used to either disable the runtimes build altogether
or avoid building them but still generate the build targets.

Differential Revision: https://reviews.llvm.org/D31060

llvm-svn: 298653
2017-03-23 22:40:10 +00:00
Petr Hosek
6e5f894db6 [CMake] Handle common options for runtimes build
All the existing runtimes relies on flags which are set by AddLLVM
and HandleLLVMOptions. In the standalone case, they would include
these themselves, but when being built using LLVM runtimes we should
include these in the top-level runtimes CMake files.

Differential Revision: https://reviews.llvm.org/D28389

llvm-svn: 291590
2017-01-10 19:47:05 +00:00
Chris Bieneman
10a9bfdd73 [CMake] Set HAVE_${runtime} before including any subdirectories
This should allow us to avoid most order dependence in the runtime library configurations.

llvm-svn: 290834
2017-01-02 20:33:33 +00:00
Petr Hosek
1d3d64194c [CMake] Multi-target builtins build
This change enables building builtins for multiple different targets
using LLVM runtimes directory.

To specify the builtin targets to be built, use the LLVM_BUILTIN_TARGETS
variable, where the value is the list of targets.  To pass a per target
variable to the builtin build, you can set BUILTINS_<target>_<variable>
where <variable> will be passed to the builtin build for <target>.

Differential Revision: https://reviews.llvm.org/D26652

llvm-svn: 289491
2016-12-12 23:15:10 +00:00
Chris Bieneman
212dec866c [CMake] Make the runtimes directory work with bootstrap builds
This patch builds on clang r284648, and allows the runtime directory to make the bootstrap builds depend on the builtin libraries.

This patch also make the bootstrap build depend on configuring the other runtimes because the libcxx headers are copied during configuration. I have left a TODO in the code to remove that once I come up with a better solution.

llvm-svn: 284650
2016-10-19 21:50:25 +00:00
Jonas Hahnfeld
52eac768a1 [CMake] Fixing lit for runtimes directory
Copy variable LLVM_BUILD_MAIN_SRC_DIR from LLVMConfig.cmake to
LLVM_MAIN_SRC_DIR as it is named for in-tree builds. This ensures that
add_lit_target() can reliably find llvm-lit which is not necessarily
in the PATH.

Differential Revision: https://reviews.llvm.org/D24503

llvm-svn: 281585
2016-09-15 06:14:13 +00:00
Chris Bieneman
e7ba91fa87 [CMake] Connecting check-all and test-depends targets correctly
My previous attempt at this connected the sub-project check targets to the test-depends target instead of to the check-all target. That resulted in the tests running multiple times on bots that built "test-depends" and "check-all" in separate build invocations.

llvm-svn: 280392
2016-09-01 18:26:01 +00:00
Chris Bieneman
ceed2cd0be [CMake] Ensure that compiler-rt is added first
This will enable other runtime projects to detect the presence of sanitizer runtimes by referring to the sanitizer targets directly.

llvm-svn: 280162
2016-08-30 21:29:21 +00:00
Chris Bieneman
c4708cab08 [CMake] Builtins build needs LLVM_*_OUTPUT_INTDIR variables
This allows the builtins archives to build into the correct subdirectory under the binary dir. Addresses the issue discussed in D24001.

llvm-svn: 280002
2016-08-29 20:18:52 +00:00
Chris Bieneman
4041f0c8c7 [CMake] Only generate Components.cmake if components are specified
Generating the Components import file is useless if there are no components coming in from the runtimes configuration, so we should skip generation in that case.

This also should fix the configuration error that Renato reported on llvm-dev.

llvm-svn: 279893
2016-08-27 00:19:51 +00:00
Chris Bieneman
8922537391 [CMake] Expose runtime component check targets
This will expose the check targets for runtime project components into the top-level build. It will enable exposing targets like check-asan.

llvm-svn: 279861
2016-08-26 20:34:11 +00:00
Chris Bieneman
c469a141ff [CMake] Fixing LLVM_INCLUDE_TESTS for runtimes directory
We need to explicitly pass LLVM_INCLUDE_TESTS through from the top-level to the runtimes configuration because it isn't in LLVMConfig.cmake

llvm-svn: 279857
2016-08-26 20:08:57 +00:00
Chris Bieneman
227ad6083e [CMake] Add support for exposing runtime targets
This patch adds support to the runtimes build for exposing sub-project targets through the high-level configuration. This will enable exposing the build, check and install targets for sub-project components (i.e. asan, check-asan, install-asan...).

This patch requires minor changes to the runtime projects to take advantage of it, and I'll phase those changes into Compiler-RT shortly.

llvm-svn: 279776
2016-08-25 20:49:51 +00:00
Chris Bieneman
9b02f49869 Hooking up a check-all target for the runtimes projects
llvm-svn: 279756
2016-08-25 17:18:41 +00:00
Chris Bieneman
046e2963b8 [CMake] Add variables for tracking which runtimes are included
This allows sub-projects to have conditionals based on the presence of other projects.

llvm-svn: 279172
2016-08-18 22:18:11 +00:00
Chris Bieneman
2d74f408e2 [CMake] Create convenience targets for runtime projects
Each runtime project has a top-level target that is the name of the runtime (minus the "lib" prefix if applicable). This creates top-level targets mapping to runtime projects.

llvm-svn: 279160
2016-08-18 21:47:18 +00:00
Chris Bieneman
6dfd57cdfc [CMake] Make llvm-config implicit dependency for subprojects
The subproject interface being used for runtime libraries expects that llvm-config is passed into the subproject for consumption. We currently do this for every subproject, so we should expect that all LLVM ExternalProjects depend on llvm-config for the time being.

Eventually I'd like to see the sub-projects using LLVMConfig.cmake instead of the llvm-config binary, but that will take time to roll out.

llvm-svn: 279155
2016-08-18 21:41:21 +00:00
Chris Bieneman
3fe6b38cf2 [CMake] Add LLVM runtimes directory
Summary:
There are a few LLVM projects that produce runtime libraries. Ideally
runtime libraries should be built differently than other projects,
specifically they should be built using the just-built toolchain.

There is support for building compiler-rt in this way from the clang
build. Moving this logic into the LLVM build is interesting because it
provides a simpler way to extend the just-built toolchain to include
LLD and the LLVM object file tools.

Once this functionality is better fleshed out and tested we’ll want to
encapsulate it in a module that can be used for clang standalone
builds, and we’ll want to make it the default way to build compiler-rt.

With this patch applied there is no immediate change in the build.
Moving compiler-rt out from llvm/projects into llvm/runtimes enables
the functionality.

This code has a few improvements over the method provided by
LLVM_BUILD_EXTERNAL_COMPILER_RT. Specifically the sub-ninja command is
always invoked, so changes to compiler-rt source files will get built
properly, so this patch can be used for iterative development with
just-built tools.

This first patch only works with compiler-rt. Support for other
runtime projects will be coming in follow-up patches.

Reviewers: chandlerc, bogner

Subscribers: kubabrecka, llvm-commits

Differential Revision: http://reviews.llvm.org/D20992

llvm-svn: 273620
2016-06-23 22:07:21 +00:00